amikula-sprite 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/sprite/sass_extensions.rb +11 -11
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.10
|
@@ -5,34 +5,34 @@ module Sprite
|
|
5
5
|
sprite = sprite_data(group, image)
|
6
6
|
if sprite
|
7
7
|
sprite_path = sprite_builder.image_path(group.value)
|
8
|
-
"url('#{sprite_path}') no-repeat #{sprite[:x]}px #{sprite[:y]}px"
|
8
|
+
::Sass::Script::String.new "url('#{sprite_path}') no-repeat #{sprite[:x]}px #{sprite[:y]}px"
|
9
9
|
else
|
10
|
-
""
|
10
|
+
::Sass::Script::String.new ""
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
14
|
def sprite_width(*args)
|
15
|
-
sprite_attr(:width, *args)
|
15
|
+
::Sass::Script::String.new sprite_attr(:width, *args)
|
16
16
|
end
|
17
17
|
|
18
18
|
def sprite_height(*args)
|
19
|
-
sprite_attr(:height, *args)
|
19
|
+
::Sass::Script::String.new sprite_attr(:height, *args)
|
20
20
|
end
|
21
21
|
|
22
22
|
def sprite_x_offset(*args)
|
23
|
-
sprite_attr(:x, *args)
|
23
|
+
::Sass::Script::String.new sprite_attr(:x, *args)
|
24
24
|
end
|
25
25
|
|
26
26
|
def sprite_y_offset(*args)
|
27
|
-
sprite_attr(:y, *args)
|
27
|
+
::Sass::Script::String.new sprite_attr(:y, *args)
|
28
28
|
end
|
29
29
|
|
30
30
|
def sprite_image(group)
|
31
|
-
sprite_builder.image_path(group.value)
|
31
|
+
::Sass::Script::String.new sprite_builder.image_path(group.value)
|
32
32
|
end
|
33
33
|
|
34
34
|
def sprite_url(group)
|
35
|
-
"url('#{sprite_image(group)}')"
|
35
|
+
::Sass::Script::String.new "url('#{sprite_image(group)}')"
|
36
36
|
end
|
37
37
|
|
38
38
|
##
|
@@ -46,7 +46,7 @@ module Sprite
|
|
46
46
|
def sprite_offset(group, image, x=nil, y=nil)
|
47
47
|
xoff = compute_offset(group, image, :x, x)
|
48
48
|
yoff = compute_offset(group, image, :y, y)
|
49
|
-
"#{xoff} #{yoff}"
|
49
|
+
::Sass::Script::String.new "#{xoff} #{yoff}"
|
50
50
|
end
|
51
51
|
|
52
52
|
protected
|
@@ -84,9 +84,9 @@ module Sprite
|
|
84
84
|
@__sprite_data = File.open(sprite_data_path) { |yf| YAML::load( yf ) }
|
85
85
|
end
|
86
86
|
|
87
|
-
group_data = @__sprite_data[group.
|
87
|
+
group_data = @__sprite_data[group.value]
|
88
88
|
if group_data
|
89
|
-
return group_data[image.
|
89
|
+
return group_data[image.value]
|
90
90
|
else
|
91
91
|
nil
|
92
92
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 10
|
9
|
+
version: 0.1.10
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Jacques Crocker
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-05-13 00:00:00 -07:00
|
19
19
|
default_executable: sprite
|
20
20
|
dependencies: []
|
21
21
|
|