sprite 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/bin/sprite +0 -0
- data/lib/sprite/styles/sass_mixin_generator.rb +4 -4
- data/lib/sprite/styles/sass_yml_generator.rb +5 -5
- data/sprite.gemspec +1 -1
- metadata +5 -5
data/Gemfile.lock
CHANGED
data/bin/sprite
CHANGED
File without changes
|
@@ -11,7 +11,7 @@ module Sprite
|
|
11
11
|
File.open(File.join(Sprite.root, path), 'w') do |f|
|
12
12
|
add_else = false
|
13
13
|
|
14
|
-
f.puts "= sprite(
|
14
|
+
f.puts "= sprite($group_name, $image_name, $offset: 0)"
|
15
15
|
sprite_files.each do |sprite_file, sprites|
|
16
16
|
background_url = @builder.background_url(sprite_file)
|
17
17
|
sprites.each do |sprite|
|
@@ -23,12 +23,12 @@ module Sprite
|
|
23
23
|
#{sprite[:x]}px #{sprite[:y]}px
|
24
24
|
|
25
25
|
if sprite[:align] == 'horizontal'
|
26
|
-
background_offset = "\#{#{sprite[:x]}
|
26
|
+
background_offset = "\#{#{sprite[:x]}+$offset}px #{sprite[:y]}px"
|
27
27
|
else
|
28
|
-
background_offset = "#{sprite[:x]}px \#{#{sprite[:y]}
|
28
|
+
background_offset = "#{sprite[:x]}px \#{#{sprite[:y]}+$offset}px"
|
29
29
|
end
|
30
30
|
|
31
|
-
f.puts %{if
|
31
|
+
f.puts %{if $group_name == "#{sprite[:group]}" and $image_name == "#{sprite[:name]}"}
|
32
32
|
f.puts " background: #{background_url} repeat #{background_offset}"
|
33
33
|
f.puts " width: #{sprite[:width]}px"
|
34
34
|
f.puts " height: #{sprite[:height]}px"
|
@@ -16,12 +16,12 @@ module Sprite
|
|
16
16
|
|
17
17
|
# write the sass mixins to disk
|
18
18
|
File.open(File.join(Sprite.root, sass_path), 'w') do |f|
|
19
|
-
f.puts "
|
19
|
+
f.puts "$sprite_data: '#{path}'"
|
20
20
|
f.puts ""
|
21
|
-
f.puts "= sprite(
|
22
|
-
f.puts " background= sprite_background(
|
23
|
-
f.puts " width= sprite_width(
|
24
|
-
f.puts " height= sprite_height(
|
21
|
+
f.puts "= sprite($group_name, $image_name)"
|
22
|
+
f.puts " background= sprite_background($group_name, $image_name)"
|
23
|
+
f.puts " width= sprite_width($group_name, $image_name)"
|
24
|
+
f.puts " height= sprite_height($group_name, $image_name)"
|
25
25
|
f.puts ""
|
26
26
|
end
|
27
27
|
end
|
data/sprite.gemspec
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: sprite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.2.
|
5
|
+
version: 0.2.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Jacques Crocker
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2011-03-
|
14
|
+
date: 2011-03-27 00:00:00 -07:00
|
15
15
|
default_executable: sprite
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
@@ -122,7 +122,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
122
122
|
requirements:
|
123
123
|
- - ">="
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
hash: -
|
125
|
+
hash: -1470112761177688250
|
126
126
|
segments:
|
127
127
|
- 0
|
128
128
|
version: "0"
|
@@ -131,14 +131,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
131
|
requirements:
|
132
132
|
- - ">="
|
133
133
|
- !ruby/object:Gem::Version
|
134
|
-
hash: -
|
134
|
+
hash: -1470112761177688250
|
135
135
|
segments:
|
136
136
|
- 0
|
137
137
|
version: "0"
|
138
138
|
requirements: []
|
139
139
|
|
140
140
|
rubyforge_project: none
|
141
|
-
rubygems_version: 1.
|
141
|
+
rubygems_version: 1.6.2
|
142
142
|
signing_key:
|
143
143
|
specification_version: 3
|
144
144
|
summary: generate your css and sass sprites automagically
|