weather-icons-rails 0.0.3 → 0.0.3.3
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/README.md +2 -2
- data/lib/weather-icons/rails/version.rb +1 -1
- metadata +1 -3
- data/app/helpers/weather_icons/rails/icon_helper.rb +0 -92
- data/lib/weather-icons-rails/rails.rb +0 -58
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7f6a5a035eb46b3ae68cfd809a9f168f8b899dd
|
4
|
+
data.tar.gz: 449189c67dbed4f6bb3e8c30e222532b27b362a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd2df7968faed17ce62b55b2b4e94a8efbca07a5d4780a869523e05182b3e2111f5c61d2b1caa1a12be09f67795a36372645e5084a655a51e7e69ab3986e5407
|
7
|
+
data.tar.gz: 634a1f3a54ab45f5cb98acf6dd6e23da61b0cb9f72743724276dd27ba19db0321c6dbf2f28b48d2ce82bfb25c38ef15a2ce61ff9b5f7b5b0de9c87cafe0a3d16
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
# Weather::Icons::Rails [](http://rubygems.org/gems/weather-icons-rails)
|
2
|
+
# Weather::Icons::Rails [](http://rubygems.org/gems/weather-icons-rails) [](https://travis-ci.org/CodySchaaf/weather-icons-rails)
|
3
3
|
Weather-Icons-Rails gem for use in Ruby projects
|
4
4
|
|
5
5
|
## A free, open source font of Weather icons
|
@@ -103,7 +103,7 @@ Supported classes:
|
|
103
103
|
.wi-border
|
104
104
|
```
|
105
105
|
|
106
|
-
## Version 0.0.
|
106
|
+
## Version 0.0.3.3 (BETA?)
|
107
107
|
This is my first attempt at making a gem, please feel free to send me any pull requests or questions. I'm happy to help and or learn. Thanks!
|
108
108
|
|
109
109
|
The icon designs are originally by [Lukas Bischoff](http://www.twitter.com/artill). The font has been modified slightly for icon-font usage, which was then turned into a HTML/CSS/LESS addon by [Erik Flowers](http://www.helloerik.com). My gem was originally based off of the hard work over at [Font Awesome Rails](https://github.com/bokmann/font-awesome-rails) and then updated to closely mirror the Sass based version at [Font Awesome Sass](https://github.com/FortAwesome/font-awesome-sass).
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: weather-icons-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.3
|
4
|
+
version: 0.0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Schaaf
|
@@ -144,9 +144,7 @@ files:
|
|
144
144
|
- app/assets/stylesheets/weather-icons/_spinning.css.scss
|
145
145
|
- app/assets/stylesheets/weather-icons/_stacked.css.scss
|
146
146
|
- app/assets/stylesheets/weather-icons/_variables.css.scss
|
147
|
-
- app/helpers/weather_icons/rails/icon_helper.rb
|
148
147
|
- lib/weather-icons-rails.rb
|
149
|
-
- lib/weather-icons-rails/rails.rb
|
150
148
|
- lib/weather-icons/rails.rb
|
151
149
|
- lib/weather-icons/rails/rails/engine.rb
|
152
150
|
- lib/weather-icons/rails/rails/helpers.rb
|
@@ -1,92 +0,0 @@
|
|
1
|
-
# module WeatherIcons
|
2
|
-
# module Rails
|
3
|
-
# module IconHelper
|
4
|
-
# # Creates an icon tag given an icon name and possible icon
|
5
|
-
# # modifiers.
|
6
|
-
# #
|
7
|
-
# # Examples
|
8
|
-
# #
|
9
|
-
# # wi_icon "camera-retro"
|
10
|
-
# # # => <i class="wi-camera-retro"></i>
|
11
|
-
# #
|
12
|
-
# # wi_icon "camera-retro", text: "Take a photo"
|
13
|
-
# # # => <i class="wi-camera-retro"></i> Take a photo
|
14
|
-
# #
|
15
|
-
# # wi_icon "camera-retro 2x"
|
16
|
-
# # # => <i class="wi-camera-retro wi-2x"></i>
|
17
|
-
# # wi_icon ["camera-retro", "4x"]
|
18
|
-
# # # => <i class="wi-camera-retro wi-4x"></i>
|
19
|
-
# # wi_icon "spinner spin lg"
|
20
|
-
# # # => <i class="wi-spinner wi-spin wi-lg">
|
21
|
-
# #
|
22
|
-
# # wi_icon "quote-left 4x", class: "pull-left"
|
23
|
-
# # # => <i class="wi-quote-left wi-4x pull-left"></i>
|
24
|
-
# #
|
25
|
-
# # wi_icon "user", data: { id: 123 }
|
26
|
-
# # # => <i class="wi-user" data-id="123"></i>
|
27
|
-
# #
|
28
|
-
# # content_tag(:li, wi_icon("check li", text: "Bulleted list item"))
|
29
|
-
# # # => <li><i class="wi-check wi-li"></i> Bulleted list item</li>
|
30
|
-
# def wi_icon(names = "flag", options = {})
|
31
|
-
# classes = []
|
32
|
-
# classes.concat Private.icon_names(names)
|
33
|
-
# classes.concat Array(options.delete(:class))
|
34
|
-
# text = options.delete(:text)
|
35
|
-
# icon = content_tag(:i, nil, options.merge(:class => classes))
|
36
|
-
# Private.icon_join(icon, text)
|
37
|
-
# end
|
38
|
-
#
|
39
|
-
# # Creates an stack set of icon tags given a base icon name, a main icon
|
40
|
-
# # name, and possible icon modifiers.
|
41
|
-
# #
|
42
|
-
# # Examples
|
43
|
-
# #
|
44
|
-
# # wi_stacked_icon "twitter", base: "square-o"
|
45
|
-
# # # => <span class="wi-stack">
|
46
|
-
# # # => <i class="wi-square-o wi-stack-2x"></i>
|
47
|
-
# # # => <i class="wi-twitter wi-stack-1x"></i>
|
48
|
-
# # # => </span>
|
49
|
-
# #
|
50
|
-
# # wi_stacked_icon "terminal inverse", base: "square", class: "pull-right", text: "Hi!"
|
51
|
-
# # # => <span class="wi-stack pull-right">
|
52
|
-
# # # => <i class="wi-square wi-stack-2x"></i>
|
53
|
-
# # # => <i class="wi-terminal wi-inverse wi-stack-1x"></i>
|
54
|
-
# # # => </span> Hi!
|
55
|
-
# #
|
56
|
-
# # wi_stacked_icon "camera", base: "ban-circle", reverse: true
|
57
|
-
# # # => <span class="wi-stack">
|
58
|
-
# # # => <i class="wi-camera wi-stack-1x"></i>
|
59
|
-
# # # => <i class="wi-ban-circle wi-stack-2x"></i>
|
60
|
-
# # # => </span>
|
61
|
-
# def wi_stacked_icon(names = "flag", options = {})
|
62
|
-
# classes = Private.icon_names("stack").concat(Array(options.delete(:class)))
|
63
|
-
# base_names = Private.array_value(options.delete(:base) || "square-o").push("stack-2x")
|
64
|
-
# names = Private.array_value(names).push("stack-1x")
|
65
|
-
# base = wi_icon(base_names, options.delete(:base_options) || {})
|
66
|
-
# icon = wi_icon(names, options.delete(:icon_options) || {})
|
67
|
-
# icons = [base, icon]
|
68
|
-
# icons.reverse! if options.delete(:reverse)
|
69
|
-
# text = options.delete(:text)
|
70
|
-
# stacked_icon = content_tag(:span, safe_join(icons), options.merge(:class => classes))
|
71
|
-
# Private.icon_join(stacked_icon, text)
|
72
|
-
# end
|
73
|
-
#
|
74
|
-
# module Private
|
75
|
-
# extend ActionView::Helpers::OutputSafetyHelper
|
76
|
-
#
|
77
|
-
# def self.icon_join(icon, text)
|
78
|
-
# return icon if text.blank?
|
79
|
-
# safe_join([icon, ERB::Util.html_escape(text)], " ")
|
80
|
-
# end
|
81
|
-
#
|
82
|
-
# def self.icon_names(names = [])
|
83
|
-
# array_value(names).map { |n| "wi-#{n}" }
|
84
|
-
# end
|
85
|
-
#
|
86
|
-
# def self.array_value(value = [])
|
87
|
-
# value.is_a?(Array) ? value : value.to_s.split(/\s+/)
|
88
|
-
# end
|
89
|
-
# end
|
90
|
-
# end
|
91
|
-
# end
|
92
|
-
# end
|
@@ -1,58 +0,0 @@
|
|
1
|
-
module WeatherIcons
|
2
|
-
module Rails
|
3
|
-
class << self
|
4
|
-
def load!
|
5
|
-
if rails?
|
6
|
-
register_rails_engine
|
7
|
-
end
|
8
|
-
|
9
|
-
if compass?
|
10
|
-
register_compass_extension
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
def gem_path
|
15
|
-
@gem_path ||= File.expand_path('..', File.dirname(__FILE__))
|
16
|
-
end
|
17
|
-
|
18
|
-
def stylesheets_path
|
19
|
-
File.join(assets_path, 'stylesheets')
|
20
|
-
end
|
21
|
-
|
22
|
-
def fonts_path
|
23
|
-
File.join(assets_path, 'fonts')
|
24
|
-
end
|
25
|
-
|
26
|
-
def assets_path
|
27
|
-
@assets_path ||= File.join(gem_path, 'vendor', 'assets')
|
28
|
-
end
|
29
|
-
|
30
|
-
def compass?
|
31
|
-
defined?(::Compass)
|
32
|
-
end
|
33
|
-
|
34
|
-
def rails?
|
35
|
-
defined?(::Rails)
|
36
|
-
end
|
37
|
-
|
38
|
-
private
|
39
|
-
|
40
|
-
def register_compass_extension
|
41
|
-
::Compass::Frameworks.register(
|
42
|
-
'weather-icons-rails',
|
43
|
-
path: gem_path,
|
44
|
-
stylesheets_directory: stylesheets_path,
|
45
|
-
templates_directory: File.join(gem_path, 'templates')
|
46
|
-
)
|
47
|
-
end
|
48
|
-
|
49
|
-
def register_rails_engine
|
50
|
-
require 'sass-rails'
|
51
|
-
require 'weather-icons-rails/rails/rails/engine'
|
52
|
-
require 'weather-icons-rails/rails/rails/railtie'
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
WeatherIcons::Rails.load!
|