weloveiconfonts_rails 1.0.0 → 1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7ad903a1cee946861028edde166ad1fdc6bbec4b
4
- data.tar.gz: 3cc7b2719ad5add2d0ee41f81cffc44aae162d4e
3
+ metadata.gz: caa1e134bdf43668e06f2ce9b9d9aea1f54dcd78
4
+ data.tar.gz: de702293bdd1bc3bd68ddacb3de85a610dec07d2
5
5
  SHA512:
6
- metadata.gz: d41a997abe6600e88888600563c164d07d95df3609f5fdfb974c97a500c4948abfa266f65d07caaf63a31772bcaa01fd1baa7ebd292e33982f2535303b76b070
7
- data.tar.gz: 9583c3aebced730adc7990374ba79aaf59d07b8de9498e3697c3daac609c0e2ae2c886391ba177b12c5e32e6aa635acd5348090a34680237af214ce629de53a4
6
+ metadata.gz: 10c9fc86604794b7ad0d67970858a547e6ba217bdcdccefa1007b49eb41c867fc71243e351014e2520c9409e1d7a42fe9926bdd407ae9b42c9aded3ab312162d
7
+ data.tar.gz: b7211fb0716706143a0a46480f0f05f88f6311e39ecebbe032c3aa32a8fa358fde8c33fd3557e6b34b6c43f8293255b70f500aa3cd6c46314b5ac4758351547e
@@ -1,4 +1,3 @@
1
-
2
1
  @import url(http://weloveiconfonts.com/api/?family=brandico|entypo|fontawesome|fontelico|iconicfill|iconicstroke|maki|openwebicons|typicons|zocial);
3
2
 
4
3
  /* brandico */
@@ -2,7 +2,7 @@ module WeLoveIconFonts
2
2
  module Base
3
3
  def iconfont(icon, options = {})
4
4
  @options = option_defaults(options)
5
- method = options[:link].present? ? :create_link : :create_icon
5
+ method = options[:link].empty? ? :create_link : :create_icon
6
6
 
7
7
  @input_html = generate_input_html(options[:input_html])
8
8
  @html_attributes = generate_html_attributes(options)
@@ -10,11 +10,15 @@ module WeLoveIconFonts
10
10
  @content_classes = generate_content_classes(options)
11
11
  @icon = icon
12
12
 
13
+ content =
13
14
  "
14
15
  <div class=\"weloveiconfonts__item\">
15
16
  #{send method}
16
17
  </div>
17
- ".html_safe
18
+ "
19
+
20
+ content = content.html_safe if String.method_defined? :html_safe
21
+ content
18
22
  end
19
23
 
20
24
  private
@@ -22,7 +26,7 @@ module WeLoveIconFonts
22
26
  def option_defaults(options)
23
27
  options ||= {}
24
28
  options[:link] ||= ''
25
- options[:hoverable] = options[:link].present? if options[:hoverable].nil?
29
+ options[:hoverable] = options[:link].empty? if options[:hoverable].nil?
26
30
  options[:foreground] ||= '#000000'
27
31
  options[:round] ||= false
28
32
  options[:shade] ||= :bright
@@ -3,9 +3,11 @@ if defined?(ActionView::Helpers)
3
3
  ActionView::Helpers.include(WeLoveIconFonts::Base)
4
4
  end
5
5
 
6
- module WeLoveIconFontsRails
7
- module Rails
8
- class Engine < ::Rails::Engine
6
+ if defined?(Rails)
7
+ module WeLoveIconFontsRails
8
+ module Rails
9
+ class Engine < ::Rails::Engine
10
+ end
9
11
  end
10
12
  end
11
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weloveiconfonts_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Herman Zvonimir Došilović
@@ -14,44 +14,44 @@ dependencies:
14
14
  name: sass-rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '5.0'
19
+ version: '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: '5.0'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: jquery-rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '4.0'
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: '4.0'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '3.0'
47
+ version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '3.0'
54
+ version: '0'
55
55
  description: We must stop here, this is icon fonts country for Rails!
56
56
  email: hermanz.dosilovic@gmail.com
57
57
  executables: []