npo_assets 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.2
1
+ 0.4.3
@@ -43,7 +43,7 @@ module NPO
43
43
  else
44
44
  # /000/001/002/320x240.jpg
45
45
  ext = File.extname(u)
46
- dir = File.basename(u, ext)
46
+ dir = u.gsub(ext, '')
47
47
  parts = [dir, "#{size}#{ext}"]
48
48
  end
49
49
 
data/npo_assets.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{npo_assets}
8
- s.version = "0.4.2"
8
+ s.version = "0.4.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Bart Zonneveld"]
@@ -171,7 +171,7 @@ describe NPO::Assets::Asset do
171
171
 
172
172
  describe "when generating an url" do
173
173
  before(:each) do
174
- hash = {"asset" => {"url" => "1.jpg"}}
174
+ hash = {"asset" => {"url" => "001/002/003.jpg"}}
175
175
  Crack::XML.stub!(:parse).and_return hash
176
176
  RestClient.stub!(:post).and_return mock("Response", :code => 200)
177
177
 
@@ -179,11 +179,11 @@ describe NPO::Assets::Asset do
179
179
  end
180
180
 
181
181
  it "should return the correct url without a size" do
182
- @asset.url.should == "http://test.com/assets/1.jpg"
182
+ @asset.url.should == "http://test.com/assets/001/002/003.jpg"
183
183
  end
184
184
 
185
185
  it "should return the correct url with a size" do
186
- @asset.url('100x200').should == "http://test.com/assets/1/100x200.jpg"
186
+ @asset.url('100x200').should == "http://test.com/assets/001/002/003/100x200.jpg"
187
187
  end
188
188
  end
189
189
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: npo_assets
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 2
10
- version: 0.4.2
9
+ - 3
10
+ version: 0.4.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Bart Zonneveld