icon_kit 0.1.2 → 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: 18be3c9874567e095eb6f20cb2fdef972adc2f09e1154cdc82889d0beacab3b3
4
- data.tar.gz: ad785998a2cdd76d3d03a5affd29421f59754fa20940078e436fad6014fbbff7
3
+ metadata.gz: 77e1c94bf3728e17117a27fe606dc8a0dd5a34f354f50272e2ac799db56a9dc1
4
+ data.tar.gz: 56ebbeac6050f6f5f23ed9239a6003c62c971c461c073bd26d945730f19bba47
5
5
  SHA512:
6
- metadata.gz: ef58210ff68dfd6f1f9b82a8dfd60f3e4f55033ccc6f350213e48c3eee0a7d859d146cf7f6f3b44dbd509a9dbbdc474a7309c4386d161b12c51278f278c23ddc
7
- data.tar.gz: c7b2854b1cc213c47c3e8fcaba70a2872bea6cd78d3255b185289ffc02eae37ea81dbd15614ee1e3f291dda4b9b29882349056c31e38fb67f6d65b816562f194
6
+ metadata.gz: 80d4bfa717d941290fecd9790b108893f3b5697e102bc5cbbc044dc8cdc9efb4e89f63eb3518a3cecdbfab7e7dc09f26f07b76622931ac1c550efbd6b06c255e
7
+ data.tar.gz: 5f746afec378a84ea5202054c353173279d290a08220f123538a425696fcb28c19f1d559062287224a812415a81f4d7a0e4df0114ce14437e24ae1f7a8014d8f
@@ -2,9 +2,9 @@ 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
- require 'icon_kit/icons_helper' unless defined?(IconKit::IconsHelper)
8
8
  helper IconKit::IconsHelper
9
9
  end
10
10
  end
data/lib/icon_kit.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  require "icon_kit/engine"
2
2
  require "icon_kit/version"
3
- require "icon_kit/icons_helper"
4
3
 
5
4
  module IconKit
6
5
  # Global default config options
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.2
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