sprite 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sprite (0.2.6)
4
+ sprite (0.2.7)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -145,7 +145,7 @@ module Sprite
145
145
 
146
146
  # if no image configs are detected, set some intelligent defaults
147
147
  def default_images
148
- sprites_path = image_source_path("sprites")
148
+ sprites_path = File.expand_path(image_source_path("sprites"))
149
149
  collection = []
150
150
 
151
151
  if File.exists?(sprites_path)
@@ -165,6 +165,7 @@ module Sprite
165
165
  }
166
166
  end
167
167
  end
168
+
168
169
  collection
169
170
  end
170
171
 
@@ -174,7 +175,7 @@ module Sprite
174
175
  @images.each do |image|
175
176
  # expand out all the globs
176
177
  image['sources'] = image['sources'].to_a.map{ |source|
177
- Dir.glob(image_source_path(source))
178
+ Dir.glob(File.expand_path(image_source_path(source)))
178
179
  }.flatten.compact
179
180
  end
180
181
  end
@@ -3,19 +3,19 @@ module Sprite
3
3
  def initialize(config)
4
4
  @config = config
5
5
  end
6
-
6
+
7
7
  def write(image, name, format, quality = nil, background_color = nil)
8
8
  # set up path
9
9
  path = image_output_path(name, format)
10
10
  FileUtils.mkdir_p(File.dirname(path))
11
-
11
+
12
12
  # write sprite image file to disk
13
13
  image.write(path) {
14
14
  self.quality = quality unless quality.nil?
15
15
  self.background_color = background_color unless background_color.nil?
16
16
  }
17
17
  end
18
-
18
+
19
19
  # get the disk path for a location within the image output folder
20
20
  def image_output_path(name, format, relative = false)
21
21
  path_parts = []
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "sprite"
3
- s.version = "0.2.6"
3
+ s.version = "0.2.7"
4
4
 
5
5
  s.executables = ["sprite"]
6
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-06-23 00:00:00.000000000 Z
13
+ date: 2012-12-19 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
@@ -127,7 +127,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
127
127
  version: '0'
128
128
  segments:
129
129
  - 0
130
- hash: -111215513587068376
130
+ hash: 1703190802677343372
131
131
  required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  none: false
133
133
  requirements:
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  version: '0'
137
137
  segments:
138
138
  - 0
139
- hash: -111215513587068376
139
+ hash: 1703190802677343372
140
140
  requirements: []
141
141
  rubyforge_project: none
142
142
  rubygems_version: 1.8.21