npo_assets 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
@@ -16,7 +16,7 @@ module NPO
16
16
 
17
17
  if res && res['assets']
18
18
  res['assets']['asset'].map do |vars|
19
- find_or_create_by_url_and_remote_id(vars['url'], vars['id'])
19
+ find_or_create_by_url_and_remote_id(vars['url'], vars['id'].to_i)
20
20
  end
21
21
  else
22
22
  []
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.3.0"
8
+ s.version = "0.3.1"
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"]
@@ -230,8 +230,8 @@ describe NPO::Assets::Asset do
230
230
 
231
231
  @object1 = mock("Asset")
232
232
  @object2 = mock("Asset")
233
- NPO::Assets::Asset.stub!(:find_or_create_by_url_and_remote_id).with("000/000/001.jpg", "1").and_return @object1
234
- NPO::Assets::Asset.stub!(:find_or_create_by_url_and_remote_id).with("000/000/002.jpg", "2").and_return @object2
233
+ NPO::Assets::Asset.stub!(:find_or_create_by_url_and_remote_id).with("000/000/001.jpg", 1).and_return @object1
234
+ NPO::Assets::Asset.stub!(:find_or_create_by_url_and_remote_id).with("000/000/002.jpg", 2).and_return @object2
235
235
 
236
236
  NPO::Assets::Asset.stub!(:get).and_return @response
237
237
  end
@@ -246,8 +246,8 @@ describe NPO::Assets::Asset do
246
246
  end
247
247
 
248
248
  it "should generate new assets for each returned asset" do
249
- NPO::Assets::Asset.should_receive(:find_or_create_by_url_and_remote_id).with("000/000/001.jpg", "1").once
250
- NPO::Assets::Asset.should_receive(:find_or_create_by_url_and_remote_id).with("000/000/002.jpg", "2").once
249
+ NPO::Assets::Asset.should_receive(:find_or_create_by_url_and_remote_id).with("000/000/001.jpg", 1).once
250
+ NPO::Assets::Asset.should_receive(:find_or_create_by_url_and_remote_id).with("000/000/002.jpg", 2).once
251
251
  do_list
252
252
  end
253
253
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 0
9
- version: 0.3.0
8
+ - 1
9
+ version: 0.3.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Bart Zonneveld