octicons_helper 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YmI2YzMzOWRlODNjNTZhY2IyNzI2NjNkZDY5N2FjNzZjYzA0ZTE0YQ==
5
- data.tar.gz: !binary |-
6
- ZTc1YjllNzFhMTFkYjhmMzcxMDNmN2U5MzZmOTE2ZDA0NGM2ZTNiYg==
2
+ SHA1:
3
+ metadata.gz: 8cce7f5fa392fa3da0f711b56872edb3b8968749
4
+ data.tar.gz: c48d64fd22cdd14642a5900ad46251d442a89164
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- Yjg2NTAxMjk3NDhkNmM1NzhkZDM2M2JhMDY5NGI4OTE0OGZkNWQ4OTZmMWE2
10
- MmQzMDZjOTQzMDAzMjgwNDRmNDBiNTdmYTA1OTRhZDI4YWMwMjIyNTQ5MDRj
11
- ZGViMjg2MzlmMDUwYzQwYmQwYTgwOTU5ZDUxODczNDc0Y2UwYWY=
12
- data.tar.gz: !binary |-
13
- MTlhNTY5MWFmZGRiZDBkN2UyZGNkOTI1MTA2NmY5Mjc0M2I4MGVhMDY5MjU1
14
- NTdiMDU0NWIwMjMzN2RkZDJkZjA2YjQ3OTZhOTViNWM4MWU0YTBmMzI1YTJi
15
- OTBkZmY4ZDQ0OGIxMmQwMThkYjc4OTA4ZGQyNTNiNDE4YWZmZTE=
6
+ metadata.gz: 53901c89b8169bcca6124f836ebc9b98ae8092e56b8db47a25fbc39cde6e2ce669caa938da523bfc5d228ed1de21b5dd317157661e32d32fe561263a9532aba7
7
+ data.tar.gz: 2be71939680ef6e424d6a62bfce970330398761fe0ca0fdc5478c93ee7eb1f6f08b0faa92bdfa70c82b37178edffb796091c9e8e1e19e88e329b28612ef5adb6
data/LICENSE CHANGED
@@ -1,9 +1,21 @@
1
- (c) 2012-2016 GitHub
1
+ MIT License
2
2
 
3
- When using the GitHub logos, be sure to follow the GitHub logo guidelines (https://github.com/logos)
3
+ Copyright (c) 2012-2016 GitHub, Inc.
4
4
 
5
- Font License: SIL OFL 1.1 (http://scripts.sil.org/OFL)
6
- Applies to all font files and SVG files
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
7
11
 
8
- Code License: MIT (http://choosealicense.com/licenses/mit/)
9
- Applies to all other files
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![Gem version](https://img.shields.io/gem/v/octicons_helper.svg)](https://rubygems.org/gems/octicons_helper)
4
4
  [![Build Status](https://travis-ci.org/primer/octicons_helper.svg?branch=master)](https://travis-ci.org/primer/octicons_helper)
5
5
 
6
- > A rails helper that injects Octicon svg into the page
6
+ > A rails helper that inlines SVG octicons
7
7
 
8
8
  This rails helper let's you easily include svg [octicons][octicons] in your rails apps.
9
9
 
@@ -18,7 +18,7 @@ This rails helper let's you easily include svg [octicons][octicons] in your rail
18
18
  3. Use this tag in your erbs
19
19
 
20
20
  ```rb
21
- <%= octicon "alert", :size => "large", :class => "right left", :"aria-label" => "hi" %>
21
+ <%= octicon "alert", :height => 32, :class => "right left", :"aria-label" => "hi" %>
22
22
  ```
23
23
 
24
24
  The minimum CSS you'll need in your rails app is in the [octicons][octicons] repository. You can also npm install that package and include `build/octicons.css` in your styles.
@@ -29,9 +29,15 @@ For a full list of options available, see the [octicons_gem documentation](https
29
29
 
30
30
  ## License
31
31
 
32
- _Code License:_ [MIT](./LICENSE) &copy; [GitHub](https://github.com/)
32
+ (c) 2012-2016 GitHub, Inc.
33
33
 
34
- _Font License:_ [SIL OFL 1.1](./LICENSE) &copy; [GitHub](https://github.com/)
34
+ When using the GitHub logos, be sure to follow the [GitHub logo guidelines](https://github.com/logos).
35
+
36
+ _Font License:_ [SIL OFL 1.1](http://scripts.sil.org/OFL)
37
+ Applies to all font files and SVG files
38
+
39
+ _Code License:_ [MIT](./LICENSE)
40
+ Applies to all other files
35
41
 
36
42
  [octicons]: https://github.com/primer/octicons
37
43
  [octicons-docs]: https://octicons.github.com/
@@ -6,13 +6,9 @@ module OcticonsHelper
6
6
  include ActionView::Helpers::TagHelper
7
7
 
8
8
  def octicon(symbol, options = {})
9
- icon = Octicons::Octicon.new(options.merge({ :symbol => symbol }))
10
- content_tag(:svg, icon.path.html_safe, icon.html_options)
11
- end
12
- end
9
+ return "" if symbol.nil?
13
10
 
14
- module Octicons
15
- class Octicon
16
- attr_reader :path, :html_options
11
+ icon = Octicons::Octicon.new(symbol, options)
12
+ content_tag(:svg, icon.path.html_safe, icon.options)
17
13
  end
18
14
  end
@@ -0,0 +1,9 @@
1
+ require "rails"
2
+
3
+ module OcticonsHelper
4
+ class Railtie < Rails::Railtie
5
+ initializer "octicons_helper.helper" do
6
+ ActionView::Base.send :include, OcticonsHelper
7
+ end
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module OcticonsHelper
2
- VERSION = "1.0.0"
2
+ VERSION = "2.0.0".freeze
3
3
  end
@@ -1,7 +1,3 @@
1
1
  require "octicons_helper/version"
2
2
  require "octicons_helper/helper"
3
- require "active_support"
4
-
5
- ActiveSupport.on_load(:action_view) do
6
- include OcticonsHelper
7
- end
3
+ require "octicons_helper/railtie" if defined?(Rails)
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octicons_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-16 00:00:00.000000000 Z
11
+ date: 2016-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octicons
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.0'
19
+ version: '2.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.0'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '3.2'
33
+ version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '3.2'
40
+ version: '0'
41
41
  description: A rails helper that makes including svg Octicons simple.
42
42
  email:
43
43
  - support@github.com
@@ -45,11 +45,12 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
- - LICENSE
49
- - README.md
50
- - lib/octicons_helper.rb
51
48
  - lib/octicons_helper/helper.rb
49
+ - lib/octicons_helper/railtie.rb
52
50
  - lib/octicons_helper/version.rb
51
+ - lib/octicons_helper.rb
52
+ - LICENSE
53
+ - README.md
53
54
  homepage: https://github.com/primer/octicons_helper
54
55
  licenses:
55
56
  - MIT
@@ -60,17 +61,17 @@ require_paths:
60
61
  - lib
61
62
  required_ruby_version: !ruby/object:Gem::Requirement
62
63
  requirements:
63
- - - ! '>='
64
+ - - ">="
64
65
  - !ruby/object:Gem::Version
65
66
  version: '0'
66
67
  required_rubygems_version: !ruby/object:Gem::Requirement
67
68
  requirements:
68
- - - ! '>='
69
+ - - ">="
69
70
  - !ruby/object:Gem::Version
70
71
  version: '0'
71
72
  requirements: []
72
73
  rubyforge_project:
73
- rubygems_version: 2.4.5
74
+ rubygems_version: 2.0.14.1
74
75
  signing_key:
75
76
  specification_version: 4
76
77
  summary: Octicons rails helper