heroicons_helper 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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} don't have variant #{@variant.inspect}" unless icon_in_variant
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"],
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HeroiconsHelper
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "heroicons_helper/version"
4
+ require_relative "heroicons_helper/cache"
4
5
  require_relative "heroicons_helper/icon"
5
6
  require "json"
6
7
 
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.1.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-09 00:00:00.000000000 Z
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