rails-sprite 0.0.2 → 0.0.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f1f161c45ab42b30f3a2e3829b970a723262f36
|
4
|
+
data.tar.gz: b6307cc28ffbe84024c89ebba851ed185f07adae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8200de91069f1ab0cde28a42b78ff9b72dcbdc80eb37f90762159a6eaa9f18043b444a034a026f8b90ac739f15b86222a61bd9a7c59fe19b0b82b0147765588
|
7
|
+
data.tar.gz: e3d1c749166df140684c4ea063b3dde270fbd061ba2f9108f8a300f8b66ad16ec701f489afce9ed868684bf61769cbc03a2b970acdfdc468a941357ebc58b0ec
|
data/README.md
CHANGED
@@ -20,15 +20,12 @@
|
|
20
20
|
|
21
21
|
simple:
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
:css_class_prefix => 'icons-16x16-'
|
31
|
-
)
|
32
|
-
|
23
|
+
::RailsSprite.sprite(
|
24
|
+
:root_path => "#{::File.dirname(__FILE__)}/..",
|
25
|
+
:scope_name => "rails_app_name/",
|
26
|
+
:recipe_path => "icons/16x16",
|
27
|
+
:css_class_prefix => "u-icons-16x16-",
|
28
|
+
:spacing => 10
|
29
|
+
)
|
33
30
|
|
34
31
|
```
|
@@ -47,21 +47,30 @@ module RailsSprite
|
|
47
47
|
def self.composite_css_scss_erb result
|
48
48
|
styles = []
|
49
49
|
|
50
|
-
styles << <<-END_CSS
|
51
|
-
.#{result[:css_class_shared]} {
|
52
|
-
background: url(<%= image_path("#{result[:image_scope_name]}") %>) no-repeat;
|
53
|
-
}
|
54
|
-
END_CSS
|
55
|
-
|
56
50
|
result[:styles].each do |style|
|
57
51
|
styles << <<-END_CSS
|
58
52
|
.#{style[:class]} {
|
59
|
-
background
|
53
|
+
background: url(<%= image_path("#{result[:image_scope_name]}") %>) #{style[:x]} -#{style[:y]} no-repeat;
|
60
54
|
}
|
61
55
|
END_CSS
|
62
56
|
end
|
63
57
|
|
64
58
|
|
59
|
+
# styles << <<-END_CSS
|
60
|
+
# .#{result[:css_class_shared]} {
|
61
|
+
# background: url(<%= image_path("#{result[:image_scope_name]}") %>) no-repeat;
|
62
|
+
# }
|
63
|
+
# END_CSS
|
64
|
+
|
65
|
+
# result[:styles].each do |style|
|
66
|
+
# styles << <<-END_CSS
|
67
|
+
#.#{style[:class]} {
|
68
|
+
# background-position: #{style[:x]} -#{style[:y]};
|
69
|
+
#}
|
70
|
+
# END_CSS
|
71
|
+
# end
|
72
|
+
|
73
|
+
|
65
74
|
styles.join("\n")
|
66
75
|
end
|
67
76
|
|
data/lib/rails_sprite/version.rb
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-sprite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- happy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
description:
|
55
|
+
description: Rails CSS Sprite Utils.
|
56
56
|
email:
|
57
57
|
- andywang7259@163.com
|
58
58
|
executables: []
|
@@ -109,6 +109,7 @@ files:
|
|
109
109
|
- test/dummy/public/favicon.ico
|
110
110
|
- test/fixtures/testing/app/assets/images/rails_xxx/sprite/icons/16x16.png
|
111
111
|
- test/fixtures/testing/app/assets/images/rails_xxx/sprite/icons/32x32.png
|
112
|
+
- test/fixtures/testing/app/assets/images/rails_xxx/sprite_sources/icons/128x128/mail.png
|
112
113
|
- test/fixtures/testing/app/assets/images/rails_xxx/sprite_sources/icons/16x16/avatar.png
|
113
114
|
- test/fixtures/testing/app/assets/images/rails_xxx/sprite_sources/icons/16x16/heart-rose.png
|
114
115
|
- test/fixtures/testing/app/assets/images/rails_xxx/sprite_sources/icons/16x16/mail.png
|
@@ -118,7 +119,7 @@ files:
|
|
118
119
|
- test/fixtures/testing/app/assets/stylesheets/rails_xxx/sprite/icons/32x32.css.scss.erb
|
119
120
|
- test/rails_sprite_test.rb
|
120
121
|
- test/test_helper.rb
|
121
|
-
homepage: http://github.com
|
122
|
+
homepage: http://github.com/gialib/rails-sprite.git
|
122
123
|
licenses:
|
123
124
|
- MIT
|
124
125
|
metadata: {}
|
@@ -141,7 +142,7 @@ rubyforge_project:
|
|
141
142
|
rubygems_version: 2.4.5
|
142
143
|
signing_key:
|
143
144
|
specification_version: 4
|
144
|
-
summary:
|
145
|
+
summary: Rails CSS Sprite Utils.
|
145
146
|
test_files:
|
146
147
|
- test/dummy/app/assets/javascripts/application.js
|
147
148
|
- test/dummy/app/assets/stylesheets/application.css
|
@@ -184,6 +185,7 @@ test_files:
|
|
184
185
|
- test/dummy/README.rdoc
|
185
186
|
- test/fixtures/testing/app/assets/images/rails_xxx/sprite/icons/16x16.png
|
186
187
|
- test/fixtures/testing/app/assets/images/rails_xxx/sprite/icons/32x32.png
|
188
|
+
- test/fixtures/testing/app/assets/images/rails_xxx/sprite_sources/icons/128x128/mail.png
|
187
189
|
- test/fixtures/testing/app/assets/images/rails_xxx/sprite_sources/icons/16x16/avatar.png
|
188
190
|
- test/fixtures/testing/app/assets/images/rails_xxx/sprite_sources/icons/16x16/heart-rose.png
|
189
191
|
- test/fixtures/testing/app/assets/images/rails_xxx/sprite_sources/icons/16x16/mail.png
|