healthicons 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -2
- data/lib/healthicons/errors.rb +1 -1
- data/lib/healthicons/icon.rb +3 -1
- data/lib/healthicons/transform.rb +4 -2
- data/lib/healthicons/version.rb +1 -1
- data/lib/healthicons.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbd073520f4ddc99a699018401af47a004cff409d9e536a7673ba7405374c28a
|
4
|
+
data.tar.gz: 95f6d7d03b9694b1f4a80c61483e546ce07cd33cc5f4bfcff23e3e4853f2afb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6553af313372e2ec25b5a4a3cdc1553f4b254f9b3b4c1b0c22dbef7b9e12ec6c6e249467b192b60ebe1b8fcaa739758e1dbe34481fd4a521d536f3dae9b11b96
|
7
|
+
data.tar.gz: 65f10c2e90b01597db234b23fb72205987ddd109ebb11704e20e916c29d9366692325abff58e7a2946185ae644a186b02a723aeead3ce551e6f7dd5c2936e02f
|
data/CHANGELOG.md
CHANGED
@@ -1,12 +1,23 @@
|
|
1
1
|
# Changelog
|
2
|
+
|
2
3
|
All notable changes to this project will be documented in this file.
|
3
4
|
|
4
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
7
|
|
8
|
+
## [0.0.7] - 2023-1130
|
9
|
+
|
10
|
+
- Resolve `Healthicons::Errors::UnknownIcon` not properly passing error message
|
11
|
+
- Update gemspec to support Rails 7+
|
12
|
+
- Update Gemfile.lock
|
13
|
+
- Include `activesupport/blank` require for some instances where `blank?` may be unavailable
|
14
|
+
- Resolve issue were tests are failing for some version of nokogiri
|
15
|
+
- Version bump
|
16
|
+
|
7
17
|
## [0.0.6] - 2021-11-15
|
8
18
|
|
9
19
|
- FIXED: When the icons SVG tags are parsed it should conver `<path />` to `<path></path>` to fix and issue with IE not recognising path as a self-closing tag.
|
20
|
+
|
10
21
|
## [0.0.5] - 2021-07-27
|
11
22
|
|
12
23
|
- CHANGED: Updated icons to include healthicons latest SVG changes and newly added icons
|
@@ -14,8 +25,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
14
25
|
|
15
26
|
## [0.0.4] - 2021-07-9
|
16
27
|
|
17
|
-
- CHANGED: Removing adding
|
18
|
-
- FIXED:
|
28
|
+
- CHANGED: Removing adding variant attribute to SVG/XML when a variant is specified
|
29
|
+
- FIXED: misspelling of `variant` so all icons were being defaulted to to `:outline`
|
19
30
|
|
20
31
|
## [0.0.1] - 2021-06-30
|
21
32
|
|
data/lib/healthicons/errors.rb
CHANGED
data/lib/healthicons/icon.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'active_support/core_ext/object/blank'
|
4
|
+
|
3
5
|
module Healthicons
|
4
6
|
class Icon
|
5
7
|
VARIANTS = %i[outline solid].freeze
|
@@ -74,7 +76,7 @@ module Healthicons
|
|
74
76
|
# @return [String] SVG/XML file contents
|
75
77
|
def svg_file_contents
|
76
78
|
@_svg_file_contents ||= if File.exist?(file_path)
|
77
|
-
File.
|
79
|
+
File.read(file_path).force_encoding('UTF-8')
|
78
80
|
else
|
79
81
|
raise Healthicons::Errors::UnknownIcon, "Icon '#{@name}' could not be found."
|
80
82
|
end
|
@@ -1,10 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'nokogiri'
|
4
|
+
require 'active_support/core_ext/object/blank'
|
4
5
|
|
5
6
|
module Healthicons
|
6
7
|
class Transform
|
7
|
-
DEFAULT_OPTIONS = { 'aria-hidden' => true, focusable: false, role: 'img', size: 24 }.freeze
|
8
|
+
DEFAULT_OPTIONS = { 'aria-hidden' => true, stroke: 'currentColor', focusable: false, role: 'img', size: 24 }.freeze
|
8
9
|
HEIGHT_AND_WIDTH = %i[height width].freeze
|
9
10
|
KEYS_TO_REMOVE = %i[height width variant viewbox xmlns].freeze
|
10
11
|
|
@@ -76,7 +77,8 @@ module Healthicons
|
|
76
77
|
return if @options.blank? || !options.is_a?(Hash)
|
77
78
|
|
78
79
|
set_size_and_width
|
79
|
-
@options.reject { |k| k == :size }
|
80
|
+
@options = @options.reject { |k| k == :size }
|
81
|
+
@options.each do |key, val|
|
80
82
|
set_icon_attribute(key, val)
|
81
83
|
end
|
82
84
|
end
|
data/lib/healthicons/version.rb
CHANGED
data/lib/healthicons.rb
CHANGED
@@ -7,6 +7,7 @@ require_relative 'healthicons/icon'
|
|
7
7
|
require_relative 'healthicons/transform' # Used for adding, modifying, and/or modifying attributes to the SVG icon
|
8
8
|
require_relative 'healthicons/rails/railtie' # Used to initialize and lazyload the applications views
|
9
9
|
require_relative 'healthicons/rails/view_helpers'
|
10
|
+
require 'active_support/core_ext/object/blank'
|
10
11
|
|
11
12
|
module Healthicons
|
12
13
|
class Error < StandardError; end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: healthicons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Hicks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -1005,7 +1005,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1005
1005
|
- !ruby/object:Gem::Version
|
1006
1006
|
version: '0'
|
1007
1007
|
requirements: []
|
1008
|
-
rubygems_version: 3.
|
1008
|
+
rubygems_version: 3.4.22
|
1009
1009
|
signing_key:
|
1010
1010
|
specification_version: 4
|
1011
1011
|
summary: An application helper to add healthicon SVG icons to your applications views.
|