heroicon 0.2.1 → 0.2.2

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: 0d84d48fe0bd5ee18ae0a8ff4fcb18700b44415bdb6c834b2d606b334635990c
4
- data.tar.gz: e34a0b8f7f67ae51c8d0712b28c9592c5a6a40bb1b91a790a2a025f9b18856e8
3
+ metadata.gz: 35e1d9abe120daa9e73f9e2cf1b526adcda92accaa1095f715b3b5a7ea2d8888
4
+ data.tar.gz: 057d9415f6060a9180ca62fc632cbbf3f55f7a3d47b62b8c3976e4817af111ed
5
5
  SHA512:
6
- metadata.gz: 3b5ad7a7dd7e3636840d551f75c449ab16da0f43e868abe9e3d5304abefd99fb3dce2651c93d15c1efde4d87a09c9475c28b3c7f6fa1edbb7dc02596f0d0f98c
7
- data.tar.gz: 66f0d51350a460c9b23518e3a6f9982a2ac3890ea97e0f3b2c3fb4fc5ee5a2d1afc97e391d34a378fe97662bdc5e86ba4f195abf981c25ad7551141828f455a2
6
+ metadata.gz: 16c5b008d9752eab8b71fa056fed4606f5455a0db62a8df1c50bc18d28c062d934ab1729f1109736fd522042f5097a48a6eb90ee384580131e8be1c4323e0f81
7
+ data.tar.gz: 289046250e604ab2785fae7136cd8a2368a22e14cffcf04352283079f44f9752e45edbafdcb190af956c8af0ba63cd57fe36aa4d90df531a7b57f9f4274ce4fc
data/README.md CHANGED
@@ -2,9 +2,12 @@
2
2
  [![Build Status](https://github.com/bharget/heroicon/workflows/CI/badge.svg)](https://github.com/bharget/heroicon/actions)
3
3
  [![Ruby Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/testdouble/standard)
4
4
 
5
- Ruby on Rails view helpers for the beautiful hand-crafted SVG icons, Heroicons. This gem has no official affiliation with Tailwind CSS or the Heroicon team.
5
+ Ruby on Rails view helpers for the beautiful hand-crafted SVG icons, Heroicons.
6
6
 
7
- Check out their sites:
7
+ Used in production at [Morning Brew ☕](https://www.morningbrew.com/?utm_source=bharget_github)
8
+
9
+
10
+ This gem has no official affiliation with Tailwind CSS or the Heroicon team (yet!). Check out their sites:
8
11
 
9
12
  - [Tailwind CSS](https://tailwindcss.com/?utm_source=bharget_github)
10
13
  - [Tailwind UI](https://tailwindui.com/?utm_source=bharget_github)
@@ -47,7 +50,7 @@ You can also pass a class to use on the icon.
47
50
  <%= heroicon "search", options: { class: "text-primary-500" } %>
48
51
  ```
49
52
 
50
- Heroicon currently supports icons up to `Version 0.4.1`. If there is a icon that is missing, feel free to contribute by following our contributing guide below.
53
+ Heroicon currently supports icons up to [`Version 0.4.2`](https://github.com/tailwindlabs/heroicons/releases/tag/v0.4.2). If there is a icon that is missing, feel free to contribute by following our contributing guide below.
51
54
 
52
55
  ## Contributing
53
56
 
@@ -5,4 +5,7 @@ require "heroicon/icon"
5
5
  require "heroicon/configuration"
6
6
 
7
7
  module Heroicon
8
+ def self.root
9
+ File.dirname(__dir__)
10
+ end
8
11
  end
@@ -31,11 +31,15 @@ module Heroicon
31
31
  end
32
32
 
33
33
  def file
34
- @file ||= Rails.application.assets_manifest.find_sources("heroicon/#{variant}/#{name}.svg").first.force_encoding("UTF-8")
34
+ @file ||= File.read(file_path).force_encoding("UTF-8")
35
35
  rescue
36
36
  nil
37
37
  end
38
38
 
39
+ def file_path
40
+ File.join(Heroicon.root, "app/assets/images/heroicon/#{variant}/#{name}.svg")
41
+ end
42
+
39
43
  def warning
40
44
  return unless Rails.env.development?
41
45
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Heroicon
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroicon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Hargett
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-15 00:00:00.000000000 Z
11
+ date: 2021-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails