Current section

48 Versions

Jump to

Compare versions

7 files changed
+12 additions
-35 deletions
  @@ -1,5 +1,10 @@
1 1 # Changelog
2 2
3 + ## 0.1.7
4 +
5 + Updated:
6 + - Added `is_small` for `tabnav` items
7 +
3 8 ## 0.1.6
4 9
5 10 Updated:
  @@ -38,4 +38,4 @@
38 38 {<<"optional">>,false},
39 39 {<<"repository">>,<<"hexpm">>},
40 40 {<<"requirement">>,<<"~> 1.0">>}]]}.
41 - {<<"version">>,<<"0.1.6">>}.
41 + {<<"version">>,<<"0.1.7">>}.
unknownlib/component.ex
File is too large to be displayed (100 KB limit).
  @@ -316,39 +316,10 @@ defmodule PrimerLive.Helpers.AttributeHelpers do
316 316 max(min, min(value, max))
317 317 end
318 318
319 - @random_string_length 12
320 -
321 319 @doc """
322 - Generates a random (printable) string.
323 - Customised to return lowercase alpha characters.
324 - Source: https://gist.github.com/ahmadshah/8d978bbc550128cca12dd917a09ddfb7?permalink_comment_id=4178225#gistcomment-4178225
325 -
326 - ## Examples
327 -
328 - iex> PrimerLive.Helpers.AttributeHelpers.random_string() |> is_binary
329 - true
330 -
331 - iex> PrimerLive.Helpers.AttributeHelpers.random_string() |> String.length
332 - 12
320 + Generates a random string.
333 321 """
334 - def random_string() do
335 - for(_ <- 1..@random_string_length, do: rand_uniform(97, 122))
336 - |> List.to_string()
337 - end
338 -
339 - # Returns a random integer uniformly distributed in the range
340 - # `n <= X <= m`.
341 - #
342 - # If the random variable `X` is uniformly distributed in the range
343 - # `1 <= X <= m - n + 1`, then r.v `Y = X + n - 1` is uniformly
344 - # distributed in the range `n <= Y <= m`.
345 - # (Because we just shift X to the right).
346 - defp rand_uniform(n, m) do
347 - # random X
348 - :rand.uniform(m - n + 1)
349 - # shift X to the right to get Y
350 - |> Kernel.+(n - 1)
351 - end
322 + def random_string(), do: Ecto.UUID.generate()
352 323
353 324 @doc """
354 325 Verifies if a slot should be handled as a link.
  @@ -22,6 +22,7 @@ defmodule PrimerLive.Helpers.TestHelpers do
22 22 |> String.replace(~r/\s*\n\s*/, " ")
23 23 |> String.replace(~r/\s*\<\s*/, "<")
24 24 |> String.replace(~r/\s*\>\s*/, ">")
25 + |> String.replace(~r/<path .*<\/path>/, "STRIPPED_SVG_PATHS")
25 26 |> String.trim()
26 27 end
27 28 end
Loading more files…