fotonauts-flickr_fu 0.3.11 → 0.3.13
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/flickr_fu.gemspec +2 -2
- data/lib/flickr/auth.rb +1 -1
- data/lib/flickr/people.rb +1 -1
- data/lib/flickr/person.rb +2 -2
- data/lib/flickr/photos.rb +6 -7
- data/lib/flickr/photoset.rb +4 -6
- metadata +3 -3
data/VERSION.yml
CHANGED
data/flickr_fu.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{fotonauts-flickr_fu}
|
5
|
-
s.version = "0.3.
|
5
|
+
s.version = "0.3.13"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Ben Wyrosdick", "Maciej Bilas", "Fotonauts"]
|
@@ -105,7 +105,7 @@ Gem::Specification.new do |s|
|
|
105
105
|
|
106
106
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
107
107
|
s.add_runtime_dependency(%q<mime-types>, ["> 0.0.0"])
|
108
|
-
s.add_runtime_dependency(%q<nokogiri>, ["
|
108
|
+
s.add_runtime_dependency(%q<nokogiri>, [">= 1.5.5"])
|
109
109
|
else
|
110
110
|
s.add_dependency(%q<mime-types>, ["> 0.0.0"])
|
111
111
|
end
|
data/lib/flickr/auth.rb
CHANGED
@@ -74,7 +74,7 @@ class Flickr::Auth < Flickr::Base
|
|
74
74
|
elsif pass_through
|
75
75
|
rsp = @flickr.send_request('flickr.auth.getToken', {:frob => self.frob})
|
76
76
|
|
77
|
-
Token.new(:token => rsp.auth.token.
|
77
|
+
Token.new(:token => rsp.auth.token.text, :permisions => rsp.auth.perms.to_s, :user_id => rsp.auth.user[:nsid], :username => rsp.auth.user[:username], :user_real_name => rsp.auth.user[:fullname])
|
78
78
|
end
|
79
79
|
end
|
80
80
|
end
|
data/lib/flickr/people.rb
CHANGED
@@ -19,7 +19,7 @@ class Flickr::People < Flickr::Base
|
|
19
19
|
:icon_farm => rsp.person[:iconfarm],
|
20
20
|
:username => rsp.person.username.to_s,
|
21
21
|
:realname => rsp.person.realname.to_s,
|
22
|
-
:mbox_sha1sum => rsp.person.mbox_sha1sum.to_s,
|
22
|
+
:mbox_sha1sum => (rsp.person.mbox_sha1sum.to_s rescue nil),
|
23
23
|
:location => rsp.person.location.to_s,
|
24
24
|
:photos_url => rsp.person.photosurl.to_s,
|
25
25
|
:profile_url => rsp.person.profileurl.to_s,
|
data/lib/flickr/person.rb
CHANGED
@@ -51,10 +51,10 @@ class Flickr::People::Person
|
|
51
51
|
:api => self,
|
52
52
|
:method => 'public_photos',
|
53
53
|
:options => options) do |photos|
|
54
|
-
rsp.photos.photo.each do |photo|
|
54
|
+
rsp.photos.xpath("photo").each do |photo|
|
55
55
|
attributes = Flickr::Photos.create_attributes(photo)
|
56
56
|
photos << Flickr::Photos::Photo.new(@flickr, attributes)
|
57
|
-
end if rsp.photos.photo
|
57
|
+
end if rsp.photos.at_xpath("photo")
|
58
58
|
end
|
59
59
|
end
|
60
60
|
end
|
data/lib/flickr/photos.rb
CHANGED
@@ -131,11 +131,10 @@ class Flickr::Photos < Flickr::Base
|
|
131
131
|
:api => self,
|
132
132
|
:method => 'search',
|
133
133
|
:options => options) do |photos|
|
134
|
-
rsp.photos.photo.each do |photo|
|
134
|
+
rsp.photos.xpath("photo").each do |photo|
|
135
135
|
attributes = create_attributes(photo)
|
136
|
-
|
137
136
|
photos << Photo.new(@flickr, attributes)
|
138
|
-
end if rsp.photos.photo
|
137
|
+
end if rsp.photos.at_xpath("photo")
|
139
138
|
end
|
140
139
|
end
|
141
140
|
|
@@ -164,11 +163,11 @@ class Flickr::Photos < Flickr::Base
|
|
164
163
|
:photos => [], :api => self,
|
165
164
|
:method => 'flickr.photos.getRecent',
|
166
165
|
:options => options) do |photos|
|
167
|
-
rsp.photos.photo.each do |photo|
|
166
|
+
rsp.photos.xpath("photo").each do |photo|
|
168
167
|
attributes = create_attributes(photo)
|
169
168
|
|
170
169
|
photos << Photo.new(@flickr, attributes)
|
171
|
-
end if rsp.photos.photo
|
170
|
+
end if rsp.photos.at_xpath("photo")
|
172
171
|
end
|
173
172
|
end
|
174
173
|
|
@@ -185,12 +184,12 @@ class Flickr::Photos < Flickr::Base
|
|
185
184
|
:api => self,
|
186
185
|
:method => 'flickr.interestingness.getList',
|
187
186
|
:options => options) do |photos|
|
188
|
-
rsp.photos.photo.each do |photo|
|
187
|
+
rsp.photos.xpath("photo").each do |photo|
|
189
188
|
attributes = create_attributes(photo)
|
190
189
|
|
191
190
|
|
192
191
|
photos << Photo.new(@flickr, attributes)
|
193
|
-
end if rsp.photos.photo
|
192
|
+
end if rsp.photos.at_xpath("photo")
|
194
193
|
end
|
195
194
|
end
|
196
195
|
|
data/lib/flickr/photoset.rb
CHANGED
@@ -22,12 +22,10 @@ class Flickr::Photosets::Photoset
|
|
22
22
|
def collect_photos(rsp)
|
23
23
|
photos = []
|
24
24
|
return photos unless rsp
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
end
|
30
|
-
end
|
25
|
+
rsp.photos.xpath("photo").each do |photo|
|
26
|
+
attributes = create_attributes(photo)
|
27
|
+
photos << Flickr::Photos::Photo.new(@flickr,attributes)
|
28
|
+
end if rsp.photos.at_xpath("photo")
|
31
29
|
return photos
|
32
30
|
end
|
33
31
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fotonauts-flickr_fu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.13
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -34,7 +34,7 @@ dependencies:
|
|
34
34
|
requirement: !ruby/object:Gem::Requirement
|
35
35
|
none: false
|
36
36
|
requirements:
|
37
|
-
- - ! '
|
37
|
+
- - ! '>='
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: 1.5.5
|
40
40
|
type: :runtime
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
none: false
|
44
44
|
requirements:
|
45
|
-
- - ! '
|
45
|
+
- - ! '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 1.5.5
|
48
48
|
description: Provides a ruby interface to flickr via the REST api
|