rails_icons 1.5.0 → 1.5.1
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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/rails_icons/engine.rb +8 -0
- data/lib/rails_icons/helpers/icon_helper.rb +27 -0
- data/lib/rails_icons/version.rb +1 -1
- data/lib/rails_icons.rb +1 -1
- metadata +2 -3
- data/app/helpers/rails_icons/icon_helper.rb +0 -25
- data/lib/rails_icons/railtie.rb +0 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 645bae107e2a186cb00dd0708c30e27daebcde1b2be5d864efcaec70328f80eb
|
|
4
|
+
data.tar.gz: 47ef71241543d1435578efa7d6dc81039b818d333df7f27af90c44c10a2a63f8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d322f6b6be3037cbbb3511371bb47436164ee515187778bb4249f3effb074485d7702dde5ca2bd46f84cdbe0adb21b3d2832ea97410919d9669b2a958eea0bb0
|
|
7
|
+
data.tar.gz: ba7ea5648ee4dc82374721fe2c88d8265a59889c81d67d206a4348d52007ba2ce781d49ebf12079c29c026cb6cab14a4e556f0faef8e247659371f452b110c77
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -134,8 +134,8 @@ rails generate rails_icons:sync --libraries=heroicons lucide
|
|
|
134
134
|
## Projects using Rails Icons
|
|
135
135
|
|
|
136
136
|
- [Rails Designer UI Components](https://railsdesigner.com/components/) — The first professionally-designed UI components library for Ruby on Rails apps
|
|
137
|
+
- [Chirp Form](https://chirpform.com/) — Add forms to any site. Display responses anywhere
|
|
137
138
|
- [Helptail](https://helptail.com/) — Put your routine tasks on autopilot
|
|
138
|
-
- [Forge](https://forge.railsdesigner.com/) — Self-hosted Community Software
|
|
139
139
|
|
|
140
140
|
|
|
141
141
|
## Contributing
|
data/lib/rails_icons/engine.rb
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "rails_icons/helpers/icon_helper"
|
|
4
|
+
|
|
3
5
|
module RailsIcons
|
|
4
6
|
class Engine < ::Rails::Engine
|
|
5
7
|
isolate_namespace RailsIcons
|
|
8
|
+
|
|
9
|
+
initializer "rails_icons.helpers" do
|
|
10
|
+
ActiveSupport.on_load(:action_view) do
|
|
11
|
+
include RailsIcons::Helpers::IconHelper
|
|
12
|
+
end
|
|
13
|
+
end
|
|
6
14
|
end
|
|
7
15
|
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module RailsIcons
|
|
4
|
+
module Helpers
|
|
5
|
+
module IconHelper
|
|
6
|
+
def icon(name, library: RailsIcons.configuration.default_library, from: library, variant: nil, **arguments)
|
|
7
|
+
RailsIcons::Icon.new(
|
|
8
|
+
name: name,
|
|
9
|
+
library: from || library,
|
|
10
|
+
variant: variant,
|
|
11
|
+
arguments: arguments
|
|
12
|
+
).svg
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def encoded_icon(name, library: RailsIcons.configuration.default_library, from: library, variant: nil, **arguments)
|
|
16
|
+
svg_content = RailsIcons::Icon.new(
|
|
17
|
+
name: name,
|
|
18
|
+
library: from || library,
|
|
19
|
+
variant: variant,
|
|
20
|
+
arguments: arguments
|
|
21
|
+
).svg
|
|
22
|
+
|
|
23
|
+
"data:image/svg+xml;base64,#{Base64.strict_encode64(svg_content)}"
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
data/lib/rails_icons/version.rb
CHANGED
data/lib/rails_icons.rb
CHANGED
|
@@ -5,7 +5,7 @@ require_relative "rails_icons/libraries"
|
|
|
5
5
|
require_relative "rails_icons/configuration"
|
|
6
6
|
require_relative "rails_icons/engine"
|
|
7
7
|
require_relative "rails_icons/errors"
|
|
8
|
-
require_relative "rails_icons/railtie"
|
|
8
|
+
# require_relative "rails_icons/railtie"
|
|
9
9
|
require_relative "rails_icons/icon"
|
|
10
10
|
|
|
11
11
|
module RailsIcons
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails_icons
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.5.
|
|
4
|
+
version: 1.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rails Designer Developers
|
|
@@ -60,7 +60,6 @@ files:
|
|
|
60
60
|
- app/assets/svg/rails_icons/icons/animated/faded-spinner.svg
|
|
61
61
|
- app/assets/svg/rails_icons/icons/animated/fading-dots.svg
|
|
62
62
|
- app/assets/svg/rails_icons/icons/animated/trailing-spinner.svg
|
|
63
|
-
- app/helpers/rails_icons/icon_helper.rb
|
|
64
63
|
- bin/console
|
|
65
64
|
- bin/rails
|
|
66
65
|
- bin/release
|
|
@@ -86,11 +85,11 @@ files:
|
|
|
86
85
|
- lib/rails_icons/configuration/weather.rb
|
|
87
86
|
- lib/rails_icons/engine.rb
|
|
88
87
|
- lib/rails_icons/errors.rb
|
|
88
|
+
- lib/rails_icons/helpers/icon_helper.rb
|
|
89
89
|
- lib/rails_icons/icon.rb
|
|
90
90
|
- lib/rails_icons/icon/attributes.rb
|
|
91
91
|
- lib/rails_icons/icon/file_path.rb
|
|
92
92
|
- lib/rails_icons/libraries.rb
|
|
93
|
-
- lib/rails_icons/railtie.rb
|
|
94
93
|
- lib/rails_icons/sync/engine.rb
|
|
95
94
|
- lib/rails_icons/sync/process_variants.rb
|
|
96
95
|
- lib/rails_icons/sync/transformations.rb
|
|
@@ -1,25 +0,0 @@
|
|
|
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
|
data/lib/rails_icons/railtie.rb
DELETED