fotonauts-flickr_fu 0.3.10 → 0.3.11

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 3
4
- :patch: 10
4
+ :patch: 11
5
5
 
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.10"
5
+ s.version = "0.3.11"
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"]
data/lib/flickr/photo.rb CHANGED
@@ -48,12 +48,12 @@ class Flickr::Photos::Photo
48
48
  end
49
49
  end
50
50
  def self.create_attributes(photo)
51
- {:id => photo['id'].to_i,
51
+ {:id => photo['id'],
52
52
  :secret => photo['secret'],
53
53
  :server => photo['server'],
54
54
  :farm => photo['farm'],
55
55
  :license_id => photo['license'],
56
- :rotation => photo['rotation'].to_i,
56
+ :rotation => photo['rotation'],
57
57
  :uploaded_at => (Time.at(photo['dateuploaded'].to_i) rescue nil),
58
58
  :owner => photo.owner['nsid'],
59
59
  :owner_username => photo.owner['username'],
@@ -62,6 +62,8 @@ class Flickr::Photos::Photo
62
62
  :title => (photo.title.text rescue ''),
63
63
  :description => photo.at_xpath("description").text, # description is a method of XML::Node, so we use at_xpath instead
64
64
  :original_secret => photo['originalsecret'],
65
+ :original_format => photo['originalformat'],
66
+
65
67
 
66
68
  :is_public => photo.visibility['ispublic'].to_i,
67
69
  :is_friend => photo.visibility['isfriend'].to_i,
@@ -69,7 +71,7 @@ class Flickr::Photos::Photo
69
71
 
70
72
  :taken_at => (Time.parse(photo.dates['taken']) rescue nil),
71
73
  :updated_at => (Time.at(photo.dates['lastupdate'].to_i) rescue nil),
72
- :tags => photo.tags.tag.map { |t|
74
+ :tags => (photo.tags.xpath('tag') || []).map { |t|
73
75
  { :id => t['id'], :author => t['author'],
74
76
  :raw => t['raw'], :machine_tag => t['machine_tag'],
75
77
  :text => t.text }},
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.10
4
+ version: 0.3.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: