heroicons_helper 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +3 -0
- data/README.md +26 -0
- data/lib/heroicons_helper/cache.rb +69 -0
- data/lib/heroicons_helper/data.json +3682 -1
- data/lib/heroicons_helper/icon.rb +2 -1
- data/lib/heroicons_helper/version.rb +1 -1
- data/lib/heroicons_helper.rb +1 -0
- metadata +3 -2
@@ -7,6 +7,7 @@ module HeroiconsHelper
|
|
7
7
|
|
8
8
|
VARIANT_OUTLINE = "outline"
|
9
9
|
VARIANT_SOLID = "solid"
|
10
|
+
VARIANTS = [VARIANT_OUTLINE, VARIANT_SOLID].freeze
|
10
11
|
|
11
12
|
def initialize(symbol, variant, attributes: {})
|
12
13
|
@symbol = symbol
|
@@ -58,7 +59,7 @@ module HeroiconsHelper
|
|
58
59
|
raise "Couldn't find heroicons symbol for #{@symbol.inspect}" unless icon
|
59
60
|
|
60
61
|
icon_in_variant = icon["variants"][variant]
|
61
|
-
raise "Heroicons symbol for #{@symbol.inspect}
|
62
|
+
raise "Heroicons symbol for #{@symbol.inspect} doesn't have variant #{@variant.inspect}" unless icon_in_variant
|
62
63
|
|
63
64
|
{
|
64
65
|
"name" => icon["name"],
|
data/lib/heroicons_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heroicons_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen J. Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A package that distributes Heroicons as a gem, for easy inclusion in
|
14
14
|
Ruby projects.
|
@@ -26,6 +26,7 @@ files:
|
|
26
26
|
- Rakefile
|
27
27
|
- heroicons_helper.gemspec
|
28
28
|
- lib/heroicons_helper.rb
|
29
|
+
- lib/heroicons_helper/cache.rb
|
29
30
|
- lib/heroicons_helper/data.json
|
30
31
|
- lib/heroicons_helper/icon.rb
|
31
32
|
- lib/heroicons_helper/version.rb
|