icon_kit 0.1.1 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ce2a9ec1add08cabb6dd1fea75b2669c705bd6a92bbcd425b53b4a5bdc6c5cf
4
- data.tar.gz: 0b598a45df907620a519b5656d6c2690c728766e39d80b820182e4d053908ddb
3
+ metadata.gz: 77e1c94bf3728e17117a27fe606dc8a0dd5a34f354f50272e2ac799db56a9dc1
4
+ data.tar.gz: 56ebbeac6050f6f5f23ed9239a6003c62c971c461c073bd26d945730f19bba47
5
5
  SHA512:
6
- metadata.gz: ae7ec9e6e2876a38e7c29314e6dfdc5aa101344d2f2cf465113804a79e2a057f4a2d38bab0216e8c34ddb6d39922efcbd7c5a7ea4eb2fc6702dbd9c14284f76e
7
- data.tar.gz: 0c174aa655546419449279b47345d7adea99b9e894f418c1070d5b1627888b67e4756a6298ec8018ef04f32ba009e24aa502db7b70f59939b28d5e81989aaae9
6
+ metadata.gz: 80d4bfa717d941290fecd9790b108893f3b5697e102bc5cbbc044dc8cdc9efb4e89f63eb3518a3cecdbfab7e7dc09f26f07b76622931ac1c550efbd6b06c255e
7
+ data.tar.gz: 5f746afec378a84ea5202054c353173279d290a08220f123538a425696fcb28c19f1d559062287224a812415a81f4d7a0e4df0114ce14437e24ae1f7a8014d8f
@@ -211,4 +211,4 @@ module IconKit
211
211
  end
212
212
  end
213
213
  end
214
- end
214
+ end
@@ -2,10 +2,11 @@ module IconKit
2
2
  class Engine < ::Rails::Engine
3
3
  isolate_namespace IconKit
4
4
 
5
+
5
6
  initializer "icon_kit.helpers" do
6
7
  ActiveSupport.on_load(:action_controller) do
7
8
  helper IconKit::IconsHelper
8
9
  end
9
10
  end
10
11
  end
11
- end
12
+ end
data/lib/icon_kit.rb CHANGED
@@ -1,5 +1,3 @@
1
- # lib/icon_kit.rb
2
-
3
1
  require "icon_kit/engine"
4
2
  require "icon_kit/version"
5
3
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: icon_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phani Bhusan Mohanty
@@ -39,10 +39,9 @@ extra_rdoc_files: []
39
39
  files:
40
40
  - MIT-LICENSE
41
41
  - README.md
42
- - app/helpers/icons_helper.rb
42
+ - app/helpers/icon_kit/icons_helper.rb
43
43
  - lib/icon_kit.rb
44
44
  - lib/icon_kit/engine.rb
45
- - lib/icon_kit/icons_helper.rb
46
45
  - lib/icon_kit/version.rb
47
46
  homepage: https://github.com/Phani2425/icon_kit
48
47
  licenses:
@@ -1,17 +0,0 @@
1
- module IconKit
2
- module IconsHelper
3
- def icon_tag(name, size: IconKit.default_size, color: IconKit.default_color)
4
- file_path = IconKit::Engine.root.join("app/assets/images/icons/#{name}.svg")
5
-
6
- unless File.exist?(file_path)
7
- Rails.logger.warn "[IconKit] SVG icon '#{name}' not found at #{file_path}"
8
- return ""
9
- end
10
-
11
- svg_content = File.read(file_path)
12
- svg_content = svg_content.gsub(/<svg/, "<svg class=\"#{size} #{color}\"")
13
-
14
- svg_content.html_safe
15
- end
16
- end
17
- end