phlex-icons-remix 0.16.0 ā†’ 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11e947ab9a130e2a2fe18c0cabc50c0e9565d37e733595c809eb208744b6eece
4
- data.tar.gz: 6912e1f1a95e7df0700d9575f70957f62bbbe1b282c8d7d4684fa29874c6bdc6
3
+ metadata.gz: e5c600c7834a7b57832430d74e90029172e2f3d3dfb1f92804bff9dd3825055e
4
+ data.tar.gz: 7362c1de9b4b02b3e417d503925b94f0b28cca68c2cfde234f05939785b7d442
5
5
  SHA512:
6
- metadata.gz: 493d354f350d41b702f90c9ba1a1cb79326243bb20b33d433d18f0cd8498aa95590a7c5785e8079c9b1be3eb01bbb6792f1a908cfae70aad6da37456d006a138
7
- data.tar.gz: 013ae763f1ffc8ce88b004e6dd2b20eb5b7b916bb56707d1bb00ed2f1965d79039c6b3d5c2ee6cd2bfab7e88d73bc0ecf53ca2fab34d08b9cee590d86fba20ce
6
+ metadata.gz: 8fa7f00221d99c6d4ca6b979842956b57d29b3586ad3f1583ddafa132ec24261f5dbd6ef0eccc9f381e62f98042b465b79ce9d2256293ac339def153f92c956e
7
+ data.tar.gz: 21773dcbb353562e0384f625d676cb66752f9a391e709d79f1d61aeac89c1252047798dfbc3abd8c1dce7ecc649042fc7fccf8635986263ab28da3f8f6365d32
data/README.md CHANGED
@@ -124,7 +124,7 @@ Phlex::Icons::Tabler.configuration.default_variant = :outline # or :filled
124
124
  ### With `Phlex::Kit`
125
125
 
126
126
  ```ruby
127
- require 'phlex-icons'
127
+ require 'phlex-icons' # No need to require the gem if you are using it in a Rails application.
128
128
 
129
129
  class PhlexIcons < Phlex::HTML
130
130
  include Phlex::Icons
@@ -146,7 +146,7 @@ end
146
146
  ### Without `Phlex::Kit`
147
147
 
148
148
  ```ruby
149
- require 'phlex-icons'
149
+ require 'phlex-icons' # No need to require the gem if you are using it in a Rails application.
150
150
 
151
151
  class PhlexIcons < Phlex::HTML
152
152
  def view_template
@@ -172,8 +172,8 @@ Let's say you want to use only Heroicons and Flag Icons, you can use the followi
172
172
  Then, in your application, you can use the icons like this:
173
173
 
174
174
  ```ruby
175
- require 'phlex-icons-flag'
176
- require 'phlex-icons-hero'
175
+ require 'phlex-icons-flag' # No need to require the gem if you are using it in a Rails application.
176
+ require 'phlex-icons-hero' # No need to require the gem if you are using it in a Rails application.
177
177
 
178
178
  class PhlexIcons < Phlex::HTML
179
179
  include Phlex::Icons # If you want to use Phlex::Kit.
@@ -230,7 +230,7 @@ Now, you can use your custom icons like any other icon pack as described above.
230
230
 
231
231
  ## Update icon packs
232
232
 
233
- All icon packs provided in this gem are auto-generated by their generator under [`generators`](/generators) directory. You just need to clone the repo and run the generator for the icon pack you want to update. In future, I'm planning to add GitHub Actions to automatically generate the icon packs and update the gem.
233
+ All icon packs provided in this gem are auto-generated by their generator under [`generators`](/generators) directory. You just need to clone the repo and run the generator for the icon pack you want to update. Also, there is a GitHub Action that will run the generator for all icon packs and update the gem weekly on each Friday.
234
234
 
235
235
  ## Development
236
236
 
@@ -4,6 +4,7 @@ require_relative 'helper'
4
4
 
5
5
  REPO_URL = 'https://github.com/twbs/icons.git'
6
6
  REPO_NAME = 'twbs-icons'
7
+ ICONS_PACK_MODULE_PATH = 'lib/phlex/icons/bootstrap.rb'
7
8
  ICONS_PACK_PATH = 'lib/phlex/icons/bootstrap'
8
9
 
9
10
  TEMPLATE = ERB.new <<~TEMPLATE
@@ -39,7 +40,12 @@ REPLACEMENTS = {
39
40
  }.freeze
40
41
 
41
42
  def main
42
- run_generator { icon_file_paths.tqdm.each { create_icon_component(_1) } }
43
+ run_generator do
44
+ new_version = JSON.parse(File.read("generators/#{REPO_NAME}/package.json"))['version']
45
+ update_icon_path_version(new_version)
46
+
47
+ icon_file_paths.tqdm.each { create_icon_component(_1) }
48
+ end
43
49
  end
44
50
 
45
51
  def icon_file_paths
data/generators/flag.rb CHANGED
@@ -4,6 +4,7 @@ require_relative 'helper'
4
4
 
5
5
  REPO_URL = 'https://github.com/lipis/flag-icons.git'
6
6
  REPO_NAME = 'lipis-flag-icons'
7
+ ICONS_PACK_MODULE_PATH = 'lib/phlex/icons/flag.rb'
7
8
  ICONS_PACK_PATH = 'lib/phlex/icons/flag'
8
9
 
9
10
  TEMPLATE = ERB.new <<~TEMPLATE
@@ -29,7 +30,12 @@ TEMPLATE = ERB.new <<~TEMPLATE
29
30
  TEMPLATE
30
31
 
31
32
  def main
32
- run_generator { icon_file_names.tqdm.each { create_icon_component(_1) } }
33
+ run_generator do
34
+ new_version = JSON.parse(File.read("generators/#{REPO_NAME}/package.json"))['version']
35
+ update_icon_path_version(new_version)
36
+
37
+ icon_file_names.tqdm.each { create_icon_component(_1) }
38
+ end
33
39
  end
34
40
 
35
41
  def icon_file_names
data/generators/helper.rb CHANGED
@@ -55,6 +55,12 @@ def prepare_phlex_icons_pack_directory(icons_pack_path)
55
55
  puts "\e[2K\ršŸŽ‰ '#{icons_pack_path}' directory prepared successfully!"
56
56
  end
57
57
 
58
+ def update_icon_path_version(new_version)
59
+ content = File.read(ICONS_PACK_MODULE_PATH)
60
+ updated_content = content.sub(/VERSION = '.*'/, "VERSION = '#{new_version}'")
61
+ File.write(ICONS_PACK_MODULE_PATH, updated_content)
62
+ end
63
+
58
64
  def component_file_name(icon_file_name, replacements = nil)
59
65
  replacements ||= {}
60
66
 
data/generators/hero.rb CHANGED
@@ -4,6 +4,7 @@ require_relative 'helper'
4
4
 
5
5
  REPO_URL = 'https://github.com/tailwindlabs/heroicons.git'
6
6
  REPO_NAME = 'tailwindlabs-heroicons'
7
+ ICONS_PACK_MODULE_PATH = 'lib/phlex/icons/hero.rb'
7
8
  ICONS_PACK_PATH = 'lib/phlex/icons/hero'
8
9
 
9
10
  TEMPLATE = ERB.new <<~TEMPLATE
@@ -29,7 +30,12 @@ TEMPLATE = ERB.new <<~TEMPLATE
29
30
  TEMPLATE
30
31
 
31
32
  def main
32
- run_generator { icon_file_names.tqdm.each { create_icon_component(_1) } }
33
+ run_generator do
34
+ new_version = JSON.parse(File.read("generators/#{REPO_NAME}/package.json"))['version']
35
+ update_icon_path_version(new_version)
36
+
37
+ icon_file_names.tqdm.each { create_icon_component(_1) }
38
+ end
33
39
  end
34
40
 
35
41
  def icon_file_names
data/generators/lucide.rb CHANGED
@@ -4,6 +4,7 @@ require_relative 'helper'
4
4
 
5
5
  REPO_URL = 'https://github.com/lucide-icons/lucide.git'
6
6
  REPO_NAME = 'lucide-icons-lucide'
7
+ ICONS_PACK_MODULE_PATH = 'lib/phlex/icons/lucide.rb'
7
8
  ICONS_PACK_PATH = 'lib/phlex/icons/lucide'
8
9
 
9
10
  TEMPLATE = ERB.new <<~TEMPLATE
@@ -25,7 +26,15 @@ TEMPLATE = ERB.new <<~TEMPLATE
25
26
  TEMPLATE
26
27
 
27
28
  def main
28
- run_generator { icon_file_paths.tqdm.each { create_icon_component(_1) } }
29
+ run_generator do
30
+ cd_command = "cd generators/#{REPO_NAME}"
31
+ safe_directory_command = "git config --global --add safe.directory '*'"
32
+ get_latest_tag_command = 'git describe --tags --abbrev=0'
33
+ new_version = `#{cd_command} && #{safe_directory_command} && #{get_latest_tag_command}`.strip
34
+ update_icon_path_version(new_version)
35
+
36
+ icon_file_paths.tqdm.each { create_icon_component(_1) }
37
+ end
29
38
  end
30
39
 
31
40
  def icon_file_paths
data/generators/radix.rb CHANGED
@@ -2,8 +2,9 @@
2
2
 
3
3
  require_relative 'helper'
4
4
 
5
- REPO_URL = 'https://github.com/radix-ui/icons'
5
+ REPO_URL = 'https://github.com/radix-ui/icons.git'
6
6
  REPO_NAME = 'radix-ui-icons'
7
+ ICONS_PACK_MODULE_PATH = 'lib/phlex/icons/radix.rb'
7
8
  ICONS_PACK_PATH = 'lib/phlex/icons/radix'
8
9
 
9
10
  TEMPLATE = ERB.new <<~TEMPLATE
@@ -25,7 +26,12 @@ TEMPLATE = ERB.new <<~TEMPLATE
25
26
  TEMPLATE
26
27
 
27
28
  def main
28
- run_generator { icon_file_paths.tqdm.each { create_icon_component(_1) } }
29
+ run_generator do
30
+ new_version = JSON.parse(File.read("generators/#{REPO_NAME}/packages/radix-icons/package.json"))['version']
31
+ update_icon_path_version(new_version)
32
+
33
+ icon_file_paths.tqdm.each { create_icon_component(_1) }
34
+ end
29
35
  end
30
36
 
31
37
  def icon_file_paths
data/generators/remix.rb CHANGED
@@ -4,6 +4,7 @@ require_relative 'helper'
4
4
 
5
5
  REPO_URL = 'https://github.com/Remix-Design/RemixIcon.git'
6
6
  REPO_NAME = 'remix-design-remixicon'
7
+ ICONS_PACK_MODULE_PATH = 'lib/phlex/icons/remix.rb'
7
8
  ICONS_PACK_PATH = 'lib/phlex/icons/remix'
8
9
 
9
10
  TEMPLATE = ERB.new <<~TEMPLATE
@@ -30,7 +31,12 @@ REPLACEMENTS = {
30
31
  }.freeze
31
32
 
32
33
  def main
33
- run_generator { icon_file_paths.tqdm.each { create_icon_component(_1) } }
34
+ run_generator do
35
+ new_version = JSON.parse(File.read("generators/#{REPO_NAME}/package.json"))['version']
36
+ update_icon_path_version(new_version)
37
+
38
+ icon_file_paths.tqdm.each { create_icon_component(_1) }
39
+ end
34
40
  end
35
41
 
36
42
  def icon_file_paths
data/generators/tabler.rb CHANGED
@@ -4,6 +4,7 @@ require_relative 'helper'
4
4
 
5
5
  REPO_URL = 'https://github.com/tabler/tabler-icons.git'
6
6
  REPO_NAME = 'tabler-tabler-icons'
7
+ ICONS_PACK_MODULE_PATH = 'lib/phlex/icons/tabler.rb'
7
8
  ICONS_PACK_PATH = 'lib/phlex/icons/tabler'
8
9
 
9
10
  TEMPLATE = ERB.new <<~TEMPLATE
@@ -29,7 +30,12 @@ TEMPLATE = ERB.new <<~TEMPLATE
29
30
  TEMPLATE
30
31
 
31
32
  def main
32
- run_generator { icon_file_names.tqdm.each { create_icon_component(_1) } }
33
+ run_generator do
34
+ new_version = JSON.parse(File.read("generators/#{REPO_NAME}/package.json"))['version']
35
+ update_icon_path_version(new_version)
36
+
37
+ icon_file_names.tqdm.each { create_icon_component(_1) }
38
+ end
33
39
  end
34
40
 
35
41
  def icon_file_names
@@ -3,6 +3,8 @@
3
3
  module Phlex
4
4
  module Icons
5
5
  module Remix # rubocop:disable Metrics/ModuleLength
6
+ VERSION = '4.3.0'
7
+
6
8
  extend Phlex::Kit
7
9
 
8
10
  require_relative 'remix/base'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Phlex
4
4
  module Icons
5
- VERSION = '0.16.0'
5
+ VERSION = '0.17.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phlex-icons-remix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ali Hamdi Ali Fadel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-09-03 00:00:00.000000000 Z
11
+ date: 2024-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: phlex