rails_icons 1.4.0 → 1.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d7cd3efc6fcdd950e2a509b16d65cb70657b5444ac28b3a16e86a36aaae9a68
4
- data.tar.gz: 41e21e7a5d8fa720b16e90c7a67534de8c2fd2e59eac726408243778e2d90f60
3
+ metadata.gz: ae559df8ec6324c772dce7173e10984a680ef5997261a0e252129f80e6642794
4
+ data.tar.gz: b5d1771d610c7e2757703f3b066457b07a8caa0a3622e2829ac892d261ce349a
5
5
  SHA512:
6
- metadata.gz: 91571161520d6d7a57b6fc53d7e2a81ec49dfc76c58d922b0c3adb1e706207f55de846b436e7d87803262f18d8dfa0e4a4a7874bf7e8b2770df023f5091d4b7b
7
- data.tar.gz: 07f2cdb947abed671415af4ec25b784a651acd094581099622bc7e40bf44e98ec70283ee0e1154d974c7a8e6586e1a3a263a88a338c3d0c7af1a42283503443d
6
+ metadata.gz: e4984a1423f44b7a4c57011f5f299f94ae46bc19411670b35c3a49bd295290d1bccdc86dc7824d1cc022326b5d22ea3a0356ef8ecce03d7ddd02f2fd595db1ab
7
+ data.tar.gz: 2d0e131f64176d49f4fbe23da5a7cf2adf230119735b462cb22b36aa38f06592b4887b86885db7420011ecac121e004b206ce4e4a4c82eca75997b0928033b19
data/Gemfile CHANGED
@@ -5,7 +5,8 @@ source "https://rubygems.org"
5
5
  # Specify your gem's dependencies in rails_icons.gemspec
6
6
  gemspec
7
7
 
8
- gem "rails", "~> 7.0.6"
8
+ # gem "rails", "~> 7.0.6"
9
+ gem "appraisal"
9
10
  gem "propshaft"
10
11
 
11
12
  group :development do
data/Gemfile.lock CHANGED
@@ -1,99 +1,117 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails_icons (1.4.0)
4
+ rails_icons (1.5.0)
5
5
  nokogiri (~> 1.16, >= 1.16.4)
6
- rails (> 6.1)
6
+ rails (>= 7.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actioncable (7.0.8.1)
12
- actionpack (= 7.0.8.1)
13
- activesupport (= 7.0.8.1)
11
+ actioncable (8.0.2)
12
+ actionpack (= 8.0.2)
13
+ activesupport (= 8.0.2)
14
14
  nio4r (~> 2.0)
15
15
  websocket-driver (>= 0.6.1)
16
- actionmailbox (7.0.8.1)
17
- actionpack (= 7.0.8.1)
18
- activejob (= 7.0.8.1)
19
- activerecord (= 7.0.8.1)
20
- activestorage (= 7.0.8.1)
21
- activesupport (= 7.0.8.1)
22
- mail (>= 2.7.1)
23
- net-imap
24
- net-pop
25
- net-smtp
26
- actionmailer (7.0.8.1)
27
- actionpack (= 7.0.8.1)
28
- actionview (= 7.0.8.1)
29
- activejob (= 7.0.8.1)
30
- activesupport (= 7.0.8.1)
31
- mail (~> 2.5, >= 2.5.4)
32
- net-imap
33
- net-pop
34
- net-smtp
35
- rails-dom-testing (~> 2.0)
36
- actionpack (7.0.8.1)
37
- actionview (= 7.0.8.1)
38
- activesupport (= 7.0.8.1)
39
- rack (~> 2.0, >= 2.2.4)
16
+ zeitwerk (~> 2.6)
17
+ actionmailbox (8.0.2)
18
+ actionpack (= 8.0.2)
19
+ activejob (= 8.0.2)
20
+ activerecord (= 8.0.2)
21
+ activestorage (= 8.0.2)
22
+ activesupport (= 8.0.2)
23
+ mail (>= 2.8.0)
24
+ actionmailer (8.0.2)
25
+ actionpack (= 8.0.2)
26
+ actionview (= 8.0.2)
27
+ activejob (= 8.0.2)
28
+ activesupport (= 8.0.2)
29
+ mail (>= 2.8.0)
30
+ rails-dom-testing (~> 2.2)
31
+ actionpack (8.0.2)
32
+ actionview (= 8.0.2)
33
+ activesupport (= 8.0.2)
34
+ nokogiri (>= 1.8.5)
35
+ rack (>= 2.2.4)
36
+ rack-session (>= 1.0.1)
40
37
  rack-test (>= 0.6.3)
41
- rails-dom-testing (~> 2.0)
42
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
43
- actiontext (7.0.8.1)
44
- actionpack (= 7.0.8.1)
45
- activerecord (= 7.0.8.1)
46
- activestorage (= 7.0.8.1)
47
- activesupport (= 7.0.8.1)
38
+ rails-dom-testing (~> 2.2)
39
+ rails-html-sanitizer (~> 1.6)
40
+ useragent (~> 0.16)
41
+ actiontext (8.0.2)
42
+ actionpack (= 8.0.2)
43
+ activerecord (= 8.0.2)
44
+ activestorage (= 8.0.2)
45
+ activesupport (= 8.0.2)
48
46
  globalid (>= 0.6.0)
49
47
  nokogiri (>= 1.8.5)
50
- actionview (7.0.8.1)
51
- activesupport (= 7.0.8.1)
48
+ actionview (8.0.2)
49
+ activesupport (= 8.0.2)
52
50
  builder (~> 3.1)
53
- erubi (~> 1.4)
54
- rails-dom-testing (~> 2.0)
55
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
56
- activejob (7.0.8.1)
57
- activesupport (= 7.0.8.1)
51
+ erubi (~> 1.11)
52
+ rails-dom-testing (~> 2.2)
53
+ rails-html-sanitizer (~> 1.6)
54
+ activejob (8.0.2)
55
+ activesupport (= 8.0.2)
58
56
  globalid (>= 0.3.6)
59
- activemodel (7.0.8.1)
60
- activesupport (= 7.0.8.1)
61
- activerecord (7.0.8.1)
62
- activemodel (= 7.0.8.1)
63
- activesupport (= 7.0.8.1)
64
- activestorage (7.0.8.1)
65
- actionpack (= 7.0.8.1)
66
- activejob (= 7.0.8.1)
67
- activerecord (= 7.0.8.1)
68
- activesupport (= 7.0.8.1)
57
+ activemodel (8.0.2)
58
+ activesupport (= 8.0.2)
59
+ activerecord (8.0.2)
60
+ activemodel (= 8.0.2)
61
+ activesupport (= 8.0.2)
62
+ timeout (>= 0.4.0)
63
+ activestorage (8.0.2)
64
+ actionpack (= 8.0.2)
65
+ activejob (= 8.0.2)
66
+ activerecord (= 8.0.2)
67
+ activesupport (= 8.0.2)
69
68
  marcel (~> 1.0)
70
- mini_mime (>= 1.1.0)
71
- activesupport (7.0.8.1)
72
- concurrent-ruby (~> 1.0, >= 1.0.2)
69
+ activesupport (8.0.2)
70
+ base64
71
+ benchmark (>= 0.3)
72
+ bigdecimal
73
+ concurrent-ruby (~> 1.0, >= 1.3.1)
74
+ connection_pool (>= 2.2.5)
75
+ drb
73
76
  i18n (>= 1.6, < 2)
77
+ logger (>= 1.4.2)
74
78
  minitest (>= 5.1)
75
- tzinfo (~> 2.0)
76
- ast (2.4.2)
77
- builder (3.2.4)
78
- concurrent-ruby (1.2.3)
79
+ securerandom (>= 0.3)
80
+ tzinfo (~> 2.0, >= 2.0.5)
81
+ uri (>= 0.13.1)
82
+ appraisal (2.5.0)
83
+ bundler
84
+ rake
85
+ thor (>= 0.14.0)
86
+ ast (2.4.3)
87
+ base64 (0.3.0)
88
+ benchmark (0.4.1)
89
+ bigdecimal (3.2.2)
90
+ builder (3.3.0)
91
+ concurrent-ruby (1.3.5)
92
+ connection_pool (2.5.3)
79
93
  crass (1.0.6)
80
- date (3.3.4)
81
- debug (1.9.2)
94
+ date (3.4.1)
95
+ debug (1.11.0)
82
96
  irb (~> 1.10)
83
97
  reline (>= 0.3.8)
84
- erubi (1.12.0)
98
+ drb (2.2.3)
99
+ erb (5.0.2)
100
+ erubi (1.13.1)
85
101
  globalid (1.2.1)
86
102
  activesupport (>= 6.1)
87
- i18n (1.14.4)
103
+ i18n (1.14.7)
88
104
  concurrent-ruby (~> 1.0)
89
- io-console (0.7.2)
90
- irb (1.12.0)
91
- rdoc
105
+ io-console (0.8.1)
106
+ irb (1.15.2)
107
+ pp (>= 0.6.0)
108
+ rdoc (>= 4.0.0)
92
109
  reline (>= 0.4.2)
93
- json (2.7.1)
94
- language_server-protocol (3.17.0.3)
110
+ json (2.13.0)
111
+ language_server-protocol (3.17.0.5)
95
112
  lint_roller (1.1.0)
96
- loofah (2.22.0)
113
+ logger (1.7.0)
114
+ loofah (2.24.1)
97
115
  crass (~> 1.0.2)
98
116
  nokogiri (>= 1.12.0)
99
117
  mail (2.8.1)
@@ -102,115 +120,134 @@ GEM
102
120
  net-pop
103
121
  net-smtp
104
122
  marcel (1.0.4)
105
- method_source (1.0.0)
106
123
  mini_mime (1.1.5)
107
- mini_portile2 (2.8.8)
108
- minitest (5.22.3)
109
- net-imap (0.4.10)
124
+ mini_portile2 (2.8.9)
125
+ minitest (5.25.5)
126
+ net-imap (0.5.9)
110
127
  date
111
128
  net-protocol
112
129
  net-pop (0.1.2)
113
130
  net-protocol
114
131
  net-protocol (0.2.2)
115
132
  timeout
116
- net-smtp (0.5.0)
133
+ net-smtp (0.5.1)
117
134
  net-protocol
118
- nio4r (2.7.1)
119
- nokogiri (1.18.3)
135
+ nio4r (2.7.4)
136
+ nokogiri (1.18.9)
120
137
  mini_portile2 (~> 2.8.2)
121
138
  racc (~> 1.4)
122
- nokogiri (1.18.3-arm64-darwin)
139
+ nokogiri (1.18.9-arm64-darwin)
140
+ racc (~> 1.4)
141
+ nokogiri (1.18.9-x86_64-linux-gnu)
123
142
  racc (~> 1.4)
124
- parallel (1.24.0)
125
- parser (3.3.0.5)
143
+ parallel (1.27.0)
144
+ parser (3.3.8.0)
126
145
  ast (~> 2.4.1)
127
146
  racc
128
- propshaft (0.8.0)
147
+ pp (0.6.2)
148
+ prettyprint
149
+ prettyprint (0.2.0)
150
+ prism (1.4.0)
151
+ propshaft (1.2.1)
129
152
  actionpack (>= 7.0.0)
130
153
  activesupport (>= 7.0.0)
131
154
  rack
132
- railties (>= 7.0.0)
133
- psych (5.1.2)
155
+ psych (5.2.6)
156
+ date
134
157
  stringio
135
158
  racc (1.8.1)
136
- rack (2.2.9)
137
- rack-test (2.1.0)
159
+ rack (3.1.16)
160
+ rack-session (2.1.1)
161
+ base64 (>= 0.1.0)
162
+ rack (>= 3.0.0)
163
+ rack-test (2.2.0)
138
164
  rack (>= 1.3)
139
- rails (7.0.8.1)
140
- actioncable (= 7.0.8.1)
141
- actionmailbox (= 7.0.8.1)
142
- actionmailer (= 7.0.8.1)
143
- actionpack (= 7.0.8.1)
144
- actiontext (= 7.0.8.1)
145
- actionview (= 7.0.8.1)
146
- activejob (= 7.0.8.1)
147
- activemodel (= 7.0.8.1)
148
- activerecord (= 7.0.8.1)
149
- activestorage (= 7.0.8.1)
150
- activesupport (= 7.0.8.1)
165
+ rackup (2.2.1)
166
+ rack (>= 3)
167
+ rails (8.0.2)
168
+ actioncable (= 8.0.2)
169
+ actionmailbox (= 8.0.2)
170
+ actionmailer (= 8.0.2)
171
+ actionpack (= 8.0.2)
172
+ actiontext (= 8.0.2)
173
+ actionview (= 8.0.2)
174
+ activejob (= 8.0.2)
175
+ activemodel (= 8.0.2)
176
+ activerecord (= 8.0.2)
177
+ activestorage (= 8.0.2)
178
+ activesupport (= 8.0.2)
151
179
  bundler (>= 1.15.0)
152
- railties (= 7.0.8.1)
153
- rails-dom-testing (2.2.0)
180
+ railties (= 8.0.2)
181
+ rails-dom-testing (2.3.0)
154
182
  activesupport (>= 5.0.0)
155
183
  minitest
156
184
  nokogiri (>= 1.6)
157
- rails-html-sanitizer (1.6.0)
185
+ rails-html-sanitizer (1.6.2)
158
186
  loofah (~> 2.21)
159
- nokogiri (~> 1.14)
160
- railties (7.0.8.1)
161
- actionpack (= 7.0.8.1)
162
- activesupport (= 7.0.8.1)
163
- method_source
187
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
188
+ railties (8.0.2)
189
+ actionpack (= 8.0.2)
190
+ activesupport (= 8.0.2)
191
+ irb (~> 1.13)
192
+ rackup (>= 1.0.0)
164
193
  rake (>= 12.2)
165
- thor (~> 1.0)
166
- zeitwerk (~> 2.5)
194
+ thor (~> 1.0, >= 1.2.2)
195
+ zeitwerk (~> 2.6)
167
196
  rainbow (3.1.1)
168
- rake (13.2.1)
169
- rdoc (6.6.3.1)
197
+ rake (13.3.0)
198
+ rdoc (6.14.2)
199
+ erb
170
200
  psych (>= 4.0.0)
171
- regexp_parser (2.9.0)
172
- reline (0.5.0)
201
+ regexp_parser (2.10.0)
202
+ reline (0.6.2)
173
203
  io-console (~> 0.5)
174
- rexml (3.2.6)
175
- rubocop (1.62.1)
204
+ rubocop (1.75.8)
176
205
  json (~> 2.3)
177
- language_server-protocol (>= 3.17.0)
206
+ language_server-protocol (~> 3.17.0.2)
207
+ lint_roller (~> 1.1.0)
178
208
  parallel (~> 1.10)
179
209
  parser (>= 3.3.0.2)
180
210
  rainbow (>= 2.2.2, < 4.0)
181
- regexp_parser (>= 1.8, < 3.0)
182
- rexml (>= 3.2.5, < 4.0)
183
- rubocop-ast (>= 1.31.1, < 2.0)
211
+ regexp_parser (>= 2.9.3, < 3.0)
212
+ rubocop-ast (>= 1.44.0, < 2.0)
184
213
  ruby-progressbar (~> 1.7)
185
- unicode-display_width (>= 2.4.0, < 3.0)
186
- rubocop-ast (1.31.2)
187
- parser (>= 3.3.0.4)
188
- rubocop-performance (1.20.2)
189
- rubocop (>= 1.48.1, < 2.0)
190
- rubocop-ast (>= 1.30.0, < 2.0)
214
+ unicode-display_width (>= 2.4.0, < 4.0)
215
+ rubocop-ast (1.46.0)
216
+ parser (>= 3.3.7.2)
217
+ prism (~> 1.4)
218
+ rubocop-performance (1.25.0)
219
+ lint_roller (~> 1.1)
220
+ rubocop (>= 1.75.0, < 2.0)
221
+ rubocop-ast (>= 1.38.0, < 2.0)
191
222
  ruby-progressbar (1.13.0)
192
- standard (1.35.1)
223
+ securerandom (0.4.1)
224
+ standard (1.50.0)
193
225
  language_server-protocol (~> 3.17.0.2)
194
226
  lint_roller (~> 1.0)
195
- rubocop (~> 1.62.0)
227
+ rubocop (~> 1.75.5)
196
228
  standard-custom (~> 1.0.0)
197
- standard-performance (~> 1.3)
229
+ standard-performance (~> 1.8)
198
230
  standard-custom (1.0.2)
199
231
  lint_roller (~> 1.0)
200
232
  rubocop (~> 1.50)
201
- standard-performance (1.3.1)
233
+ standard-performance (1.8.0)
202
234
  lint_roller (~> 1.1)
203
- rubocop-performance (~> 1.20.2)
204
- stringio (3.1.0)
205
- thor (1.3.1)
206
- timeout (0.4.1)
235
+ rubocop-performance (~> 1.25.0)
236
+ stringio (3.1.7)
237
+ thor (1.4.0)
238
+ timeout (0.4.3)
207
239
  tzinfo (2.0.6)
208
240
  concurrent-ruby (~> 1.0)
209
- unicode-display_width (2.5.0)
210
- websocket-driver (0.7.6)
241
+ unicode-display_width (3.1.4)
242
+ unicode-emoji (~> 4.0, >= 4.0.4)
243
+ unicode-emoji (4.0.4)
244
+ uri (1.0.3)
245
+ useragent (0.16.11)
246
+ websocket-driver (0.8.0)
247
+ base64
211
248
  websocket-extensions (>= 0.1.0)
212
249
  websocket-extensions (0.1.5)
213
- zeitwerk (2.6.13)
250
+ zeitwerk (2.7.3)
214
251
 
215
252
  PLATFORMS
216
253
  arm64-darwin-22
@@ -218,10 +255,10 @@ PLATFORMS
218
255
  x86_64-linux
219
256
 
220
257
  DEPENDENCIES
258
+ appraisal
221
259
  debug (~> 1.9, >= 1.9.2)
222
260
  minitest
223
261
  propshaft
224
- rails (~> 7.0.6)
225
262
  rails_icons!
226
263
  standard
227
264
 
data/README.md CHANGED
@@ -25,17 +25,15 @@ The icons are sourced directly from their respective GitHub repositories, ensuri
25
25
  </picture>
26
26
  </a>
27
27
 
28
- Want to make JavaScript your second-favorite language? 👉 [JavaScript for Rails Developers](https://javascriptforrails.com/)
29
-
30
28
 
31
29
  ## Install
32
30
 
33
- Add the gem
31
+ Add the gem:
34
32
  ```bash
35
33
  bundle add rails_icons
36
34
  ```
37
35
 
38
- Install, choosing one of the supported libraries
36
+ Install, choosing one of the supported libraries:
39
37
  ```bash
40
38
  rails generate rails_icons:install --libraries=LIBRARY_NAME
41
39
  ```
@@ -106,12 +104,12 @@ Use like this: `icon "faded-spinner", library: "animated"`. The same attributes
106
104
 
107
105
  ## Custom icon library
108
106
 
109
- Need to use an icon from another library?
107
+ Need to use an icon from another library (for example [Simple Icons](https://simpleicons.org/))?
110
108
 
111
109
  1. run `rails generate rails_icons:initializer --custom=simple_icons`;
112
- 2. add the (SVG) icons to the created directory *app/assets/svg/icons/simple_icons*;
110
+ 2. add the SVG icons to the created directory (*app/assets/svg/icons/simple_icons*);
113
111
 
114
- Every custom icon can now be used with the same interface as first-party icon libraries.
112
+ Every custom icon can now be used with the same interface as first-party icon libraries:
115
113
  ```ruby
116
114
  icon "apple", library: "simple_icons", class: "text-black"
117
115
  ```
@@ -119,12 +117,12 @@ icon "apple", library: "simple_icons", class: "text-black"
119
117
 
120
118
  ## Sync icons
121
119
 
122
- To sync all libraries, run
120
+ To sync all libraries, run:
123
121
  ```bash
124
122
  rails generate rails_icons:sync
125
123
  ```
126
124
 
127
- To sync only a specific library, run
125
+ To sync only a specific library, run:
128
126
  ```bash
129
127
  rails generate rails_icons:sync --libraries=heroicons
130
128
 
@@ -133,6 +131,13 @@ rails generate rails_icons:sync --libraries=heroicons lucide
133
131
  ```
134
132
 
135
133
 
134
+ ## Projects using Rails Icons
135
+
136
+ - [Rails Designer UI Components](https://railsdesigner.com/components/) — The first professionally-designed UI components library for Ruby on Rails apps
137
+ - [Helptail](https://helptail.com/) — Put your routine tasks on autopilot
138
+ - [Forge](https://forge.railsdesigner.com/) — Self-hosted Community Software
139
+
140
+
136
141
  ## Contributing
137
142
 
138
143
  This project uses [Standard](https://github.com/testdouble/standard) for formatting Ruby code. Please make sure to run `be standardrb` before submitting pull requests. Run tests via `rails test`.
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle fill="currentColor" stroke="none" cx="4" cy="12" r="2.5"><animateTransform attributeName="transform" dur="1s" type="translate" values="0 3.6 ; 0 -3.6; 0 3.6" repeatCount="indefinite" begin="0.1"></animateTransform></circle><circle fill="currentColor" stroke="none" cx="12" cy="12" r="2.5"><animateTransform attributeName="transform" dur="1s" type="translate" values="0 2.4 ; 0 -2.4; 0 2.4" repeatCount="indefinite" begin="0.2"></animateTransform></circle><circle fill="currentColor" stroke="none" cx="20" cy="12" r="2.5"><animateTransform attributeName="transform" dur="1s" type="translate" values="0 1.2 ; 0 -1.2; 0 1.2" repeatCount="indefinite" begin="0.3"></animateTransform></circle></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="4" cy="12" r="2.5" fill="currentColor"><animateTransform attributeName="transform" begin=".1" dur="1s" repeatCount="indefinite" type="translate" values="0 3.6 ; 0 -3.6; 0 3.6"/></circle><circle cx="12" cy="12" r="2.5" fill="currentColor"><animateTransform attributeName="transform" begin=".2" dur="1s" repeatCount="indefinite" type="translate" values="0 2.4 ; 0 -2.4; 0 2.4"/></circle><circle cx="20" cy="12" r="2.5" fill="currentColor"><animateTransform attributeName="transform" begin=".3" dur="1s" repeatCount="indefinite" type="translate" values="0 1.2 ; 0 -1.2; 0 1.2"/></circle></svg>
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" ><defs><style>@keyframes spin {to{transform:rotate(360deg);}}</style></defs><g style="transform-origin:center;animation:spin 1s linear infinite"><circle style="opacity: 0.25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4" fill="none"/><path style="opacity: 0.75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"/></g></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" stroke-width="4" viewBox="0 0 24 24"><style>@keyframes spin{to{transform:rotate(360deg)}}</style><g style="transform-origin:center;animation:spin 1s linear infinite"><circle cx="12" cy="12" r="10" fill="none" stroke="currentColor" style="opacity:.25"/><path fill="none" stroke="currentColor" stroke-linecap="round" d="M12 2a10 10 0 0 1 10 10" style="opacity:.75"/></g></svg>
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle fill="currentColor" stroke="none" cx="4" cy="12" r="2.5"> <animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.1"></animate></circle><circle fill="currentColor" stroke="none" cx="12" cy="12" r="2.5"><animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.2"></animate></circle><circle fill="currentColor" stroke="none" cx="20" cy="12" r="2.5"><animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.3"></animate></circle></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="4" cy="12" r="2.5" fill="currentColor"><animate attributeName="opacity" begin=".1" dur="1s" repeatCount="indefinite" values="0;1;0"/></circle><circle cx="12" cy="12" r="2.5" fill="currentColor"><animate attributeName="opacity" begin=".2" dur="1s" repeatCount="indefinite" values="0;1;0"/></circle><circle cx="20" cy="12" r="2.5" fill="currentColor"><animate attributeName="opacity" begin=".3" dur="1s" repeatCount="indefinite" values="0;1;0"/></circle></svg>
@@ -1 +1 @@
1
- <svg stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><style>.spinner{transform-origin:center; animation:spinner_outside 2s linear infinite}.spinner circle{stroke-linecap:round;animation:spinner_inside 1.5s ease-in-out infinite}@keyframes spinner_outside{100%{transform:rotate(360deg)}}@keyframes spinner_inside{0%{stroke-dasharray:0 150;stroke-dashoffset:0}47.5%{stroke-dasharray:42 150;stroke-dashoffset:-16}95%,100%{stroke-dasharray:42 150;stroke-dashoffset:-59}}</style><g class="spinner"><circle cx="12" cy="12" r="9.5" fill="none" stroke-width="4"></circle></g></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" stroke="currentColor" stroke-width="4" viewBox="0 0 24 24"><style>@keyframes spinner_outside{to{transform:rotate(360deg)}}@keyframes spinner_inside{0%{stroke-dasharray:0 150;stroke-dashoffset:0}47.5%{stroke-dasharray:42 150;stroke-dashoffset:-16}95%,to{stroke-dasharray:42 150;stroke-dashoffset:-59}}</style><g class="spinner" style="transform-origin:center;animation:spinner_outside 2s linear infinite"><circle cx="12" cy="12" r="9.5" fill="none" style="stroke-linecap:round;animation:spinner_inside 1.5s ease-in-out infinite"/></g></svg>
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RailsIcons
4
+ module IconHelper
5
+ def icon(name, library: RailsIcons.configuration.default_library, from: library, variant: nil, **arguments)
6
+ RailsIcons::Icon.new(
7
+ name: name,
8
+ library: from || library,
9
+ variant: variant,
10
+ arguments: arguments
11
+ ).svg
12
+ end
13
+
14
+ def encoded_icon(name, library: RailsIcons.configuration.default_library, from: library, variant: nil, **arguments)
15
+ svg_content = RailsIcons::Icon.new(
16
+ name: name,
17
+ library: from || library,
18
+ variant: variant,
19
+ arguments: arguments
20
+ ).svg
21
+
22
+ "data:image/svg+xml;base64,#{Base64.strict_encode64(svg_content)}"
23
+ end
24
+ end
25
+ end
@@ -9,7 +9,7 @@ module RailsIcons
9
9
  desc "Create the Rails Icons initializer."
10
10
 
11
11
  class_option :libraries, type: :array, default: [], desc: "Choose libraries (#{RailsIcons.libraries.keys.join("/")})"
12
- class_option :destination, type: :string, default: RailsIcons.configuration.destination_path, desc: "Specify destination folder for icons"
12
+ class_option :destination, type: :string, default: RailsIcons.configuration.icons_path, desc: "Specify icons folder"
13
13
  class_option :custom, type: :string, desc: "Name of the custom library"
14
14
 
15
15
  def copy_initializer
@@ -32,12 +32,12 @@ module RailsIcons
32
32
  end
33
33
  end
34
34
 
35
- def insert_custom_destination_path
36
- return if options[:destination] && options[:destination] == RailsIcons.configuration.destination_path
35
+ def insert_custom_icons_path
36
+ return if options[:destination] && options[:destination] == RailsIcons.configuration.icons_path
37
37
 
38
38
  insert_into_file INITIALIZER, <<~RB.indent(2), after: "RailsIcons.configure do |config|\n"
39
- # Default destination path
40
- config.destination_path = "#{options[:destination]}"
39
+ # Default icons path
40
+ config.icons_path = "#{options[:destination]}"
41
41
 
42
42
  RB
43
43
  end
@@ -60,19 +60,15 @@ module RailsIcons
60
60
  def insert_custom_configuration
61
61
  unless file_contains?(INITIALIZER, "config.libraries.merge!")
62
62
  custom_default_configuration = <<~RB.indent(2)
63
- config.libraries.merge!(
64
63
 
65
- {
66
- custom: {
67
- }
68
- }
64
+ config.libraries.merge!(
69
65
  )
70
66
  RB
71
67
 
72
68
  insert_into_file INITIALIZER, custom_default_configuration, before: "end"
73
69
  end
74
70
 
75
- insert_into_file INITIALIZER, "\n#{custom_configuration}", after: "custom: {"
71
+ insert_into_file INITIALIZER, "\n#{custom_configuration}", after: "config.libraries.merge!("
76
72
  end
77
73
 
78
74
  def create_custom_directory = FileUtils.mkdir_p(File.join(options[:destination], options[:custom]))
@@ -82,7 +78,7 @@ module RailsIcons
82
78
  end
83
79
 
84
80
  def custom_configuration
85
- <<~RB.indent(8)
81
+ <<~RB.indent(4)
86
82
  #{options[:custom]}: {
87
83
  # path: "app/assets/svg/icons/#{options[:custom]}/",
88
84
  default: {
@@ -9,7 +9,7 @@ module RailsIcons
9
9
  desc "Install Rails Icons with the chosen libraries. This creates the configuration initializer and will sync the icons."
10
10
 
11
11
  class_option :libraries, type: :array, default: [], desc: "Choose libraries (#{RailsIcons.libraries.keys.join("/")})"
12
- class_option :destination, type: :string, default: RailsIcons.configuration.destination_path, desc: "Specify destination folder for icons"
12
+ class_option :destination, type: :string, default: RailsIcons.configuration.icons_path, desc: "Specify destination folder for icons"
13
13
  class_option :skip_sync, type: :boolean, default: false
14
14
 
15
15
  def initializer_generator
@@ -21,7 +21,7 @@ module RailsIcons
21
21
 
22
22
  def synced_libraries
23
23
  RailsIcons.libraries.keys.map(&:to_s).select do |library|
24
- Dir.exist?(File.join(RailsIcons.configuration.destination_path, library.to_s))
24
+ Dir.exist?(File.join(RailsIcons.configuration.icons_path, library.to_s))
25
25
  end
26
26
  end
27
27
  end
@@ -5,7 +5,7 @@ module RailsIcons
5
5
  hide!
6
6
 
7
7
  def initialize(*arguments)
8
- super(*arguments)
8
+ super
9
9
 
10
10
  validate! if validatable?
11
11
  end
@@ -17,6 +17,18 @@ module RailsIcons
17
17
  set_libraries_config
18
18
  end
19
19
 
20
+ def destination_path
21
+ ActiveSupport::Deprecation.new.warn("`destination_path` is deprecated. Use `icons_path` instead.")
22
+
23
+ @config.icons_path
24
+ end
25
+
26
+ def destination_path=(value)
27
+ ActiveSupport::Deprecation.new.warn("`destination_path=` is deprecated. Use `icons_path=` instead.")
28
+
29
+ @config.icons_path = value
30
+ end
31
+
20
32
  def method_missing(method_name, ...)
21
33
  if @config.respond_to?(method_name)
22
34
  @config.send(method_name, ...)
@@ -33,7 +45,7 @@ module RailsIcons
33
45
 
34
46
  def set_default_config
35
47
  @config.default_library = nil
36
- @config.destination_path = "app/assets/svg/icons"
48
+ @config.icons_path = "app/assets/svg/icons"
37
49
  end
38
50
 
39
51
  def set_libraries_config
@@ -46,7 +46,7 @@ module RailsIcons
46
46
 
47
47
  def parts
48
48
  [
49
- RailsIcons.configuration.destination_path,
49
+ RailsIcons.configuration.icons_path,
50
50
  @library,
51
51
  @variant,
52
52
  "#{@name}.svg"
@@ -2,8 +2,8 @@ require "rails_icons/icon/file_path"
2
2
  require "rails_icons/icon/attributes"
3
3
 
4
4
  class RailsIcons::Icon
5
- def initialize(name:, library:, arguments:, variant: nil, config: RailsIcons.configuration)
6
- @config = config # set first, config is used during initialization
5
+ def initialize(name:, library:, arguments:, variant: nil)
6
+ @config = RailsIcons.configuration
7
7
 
8
8
  @name = name
9
9
  @library = library.to_s.inquiry
@@ -57,20 +57,6 @@ class RailsIcons::Icon
57
57
  def default(key) = library_attributes.dig(:default, key)
58
58
 
59
59
  def library_attributes
60
- custom_library? ? custom_library : @config.libraries.dig(@library, @variant) || {}
60
+ @config.libraries.dig(*[@library, @variant].select(&:present?)) || {}
61
61
  end
62
-
63
- def custom_library
64
- RailsIcons
65
- .configuration
66
- .libraries
67
- &.dig("custom")
68
- &.dig(@library.to_sym)&.with_defaults(
69
- {
70
- path: [@config.destination_path, @library].join("/")
71
- }
72
- ) || {}
73
- end
74
-
75
- def custom_library? = custom_library.present?
76
62
  end
@@ -1,19 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "rails_icons/helpers/icon_helper"
4
-
5
3
  module RailsIcons
6
4
  class Railtie < Rails::Railtie
7
- initializer "rails_icons.view_helpers" do
5
+ initializer "rails_icons.helpers" do
8
6
  ActiveSupport.on_load(:action_view) do
9
- include RailsIcons::Helpers::IconHelper
7
+ include RailsIcons::IconHelper
10
8
  end
11
9
  end
12
-
13
- initializer "rails_icons.assets" do |app|
14
- gem_root = Pathname.new(Gem.loaded_specs["rails_icons"].gem_dir)
15
-
16
- app.config.assets.paths << gem_root.join("app", "assets", "svg")
17
- end
18
10
  end
19
11
  end
@@ -39,7 +39,7 @@ module RailsIcons
39
39
  def clone_repository
40
40
  raise "[Rails Icons] Failed to clone repository" unless system("git clone '#{@library[:url]}' '#{@temp_directory}'")
41
41
 
42
- say "[Rails Icons] '#{@name}' repository cloned successfully."
42
+ say "[Rails Icons] '#{@name}' repository cloned"
43
43
  end
44
44
 
45
45
  def process_variants = Sync::ProcessVariants.new(@temp_directory, @name, @library).process
@@ -49,16 +49,16 @@ module RailsIcons
49
49
  .select { _1.file? && _1.extname != ".svg" }
50
50
  .each(&:delete)
51
51
 
52
- say "[Rails Icons] Non-SVG files removed successfully"
52
+ say "[Rails Icons] Non-SVG files removed"
53
53
  end
54
54
 
55
55
  def move_library
56
- destination = File.join(RailsIcons.configuration.destination_path, @name)
56
+ destination = File.join(RailsIcons.configuration.icons_path, @name)
57
57
 
58
58
  FileUtils.mkdir_p(destination)
59
59
  FileUtils.mv(Dir.glob("#{@temp_directory}/*"), destination, force: true)
60
60
 
61
- say "[Rails Icons] Synced '#{@name}' library successfully #{%w[😃 🎉 ✨].sample}", :green
61
+ say "[Rails Icons] Synced '#{@name}' library #{%w[😃 🎉 ✨].sample}", :green
62
62
  end
63
63
 
64
64
  def purge_temp_directory = FileUtils.rm_rf(TEMP_DIRECTORY)
@@ -64,7 +64,7 @@ module RailsIcons
64
64
 
65
65
  def remove_previously_downloaded(variants)
66
66
  variants.each do |variant|
67
- FileUtils.rm_rf(File.join(RailsIcons.configuration.destination_path, @name, variant.to_s))
67
+ FileUtils.rm_rf(File.join(RailsIcons.configuration.icons_path, @name, variant.to_s))
68
68
  end
69
69
  end
70
70
 
@@ -1,3 +1,3 @@
1
1
  module RailsIcons
2
- VERSION = "1.4.0"
2
+ VERSION = "1.5.0"
3
3
  end
data/rails_icons.gemspec CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
 
19
19
  spec.files = Dir["{bin,app,config,db,lib,public}/**/*", "Rakefile", "README.md", "rails_icons.gemspec", "Gemfile", "Gemfile.lock"]
20
20
 
21
- spec.required_ruby_version = ">= 3.1.0"
22
- spec.add_dependency "rails", "> 6.1"
21
+ # spec.required_ruby_version = ">= 3.1.0"
22
+ spec.add_dependency "rails", ">= 7.0"
23
23
  spec.add_runtime_dependency "nokogiri", "~> 1.16", ">= 1.16.4"
24
24
  end
metadata CHANGED
@@ -1,29 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_icons
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rails Designer Developers
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-07-22 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rails
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
- - - ">"
16
+ - - ">="
18
17
  - !ruby/object:Gem::Version
19
- version: '6.1'
18
+ version: '7.0'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
- - - ">"
23
+ - - ">="
25
24
  - !ruby/object:Gem::Version
26
- version: '6.1'
25
+ version: '7.0'
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: nokogiri
29
28
  requirement: !ruby/object:Gem::Requirement
@@ -61,6 +60,7 @@ files:
61
60
  - app/assets/svg/rails_icons/icons/animated/faded-spinner.svg
62
61
  - app/assets/svg/rails_icons/icons/animated/fading-dots.svg
63
62
  - app/assets/svg/rails_icons/icons/animated/trailing-spinner.svg
63
+ - app/helpers/rails_icons/icon_helper.rb
64
64
  - bin/console
65
65
  - bin/rails
66
66
  - bin/release
@@ -86,7 +86,6 @@ files:
86
86
  - lib/rails_icons/configuration/weather.rb
87
87
  - lib/rails_icons/engine.rb
88
88
  - lib/rails_icons/errors.rb
89
- - lib/rails_icons/helpers/icon_helper.rb
90
89
  - lib/rails_icons/icon.rb
91
90
  - lib/rails_icons/icon/attributes.rb
92
91
  - lib/rails_icons/icon/file_path.rb
@@ -103,7 +102,6 @@ licenses:
103
102
  metadata:
104
103
  homepage_uri: https://railsdesigner.com/rails-icons/
105
104
  source_code_uri: https://github.com/Rails-Designer/rails_icons/
106
- post_install_message:
107
105
  rdoc_options: []
108
106
  require_paths:
109
107
  - lib
@@ -111,15 +109,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
111
109
  requirements:
112
110
  - - ">="
113
111
  - !ruby/object:Gem::Version
114
- version: 3.1.0
112
+ version: '0'
115
113
  required_rubygems_version: !ruby/object:Gem::Requirement
116
114
  requirements:
117
115
  - - ">="
118
116
  - !ruby/object:Gem::Version
119
117
  version: '0'
120
118
  requirements: []
121
- rubygems_version: 3.3.7
122
- signing_key:
119
+ rubygems_version: 3.6.9
123
120
  specification_version: 4
124
121
  summary: Add any icon library to a Rails app
125
122
  test_files: []
@@ -1,18 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "../configuration"
4
-
5
- module RailsIcons
6
- module Helpers
7
- module IconHelper
8
- def icon(name, library: RailsIcons.configuration.default_library, from: library, variant: nil, **arguments)
9
- RailsIcons::Icon.new(
10
- name: name,
11
- library: from || library,
12
- variant: variant,
13
- arguments: arguments
14
- ).svg
15
- end
16
- end
17
- end
18
- end