flickrie 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,20 +18,20 @@ module Flickrie
18
18
  case flickr_method
19
19
  # people
20
20
  when 'flickr.people.findByUsername'
21
- data['user']['username'] = data['user']['username']['_content']
21
+ data['user']['username'] = data['user']['username']['_content'] rescue nil
22
22
  when 'flickr.people.findByEmail'
23
- data['user']['username'] = data['user']['username']['_content']
23
+ data['user']['username'] = data['user']['username']['_content'] rescue nil
24
24
  when 'flickr.people.getInfo'
25
25
  %w[username realname location description profileurl mobileurl photosurl].each do |attribute|
26
- data['person'][attribute] = data['person'][attribute]['_content']
26
+ data['person'][attribute] = data['person'][attribute]['_content'] rescue nil
27
27
  end
28
28
  %w[count firstdatetaken firstdate].each do |photo_attribute|
29
- data['person']['photos'][photo_attribute] = data['person']['photos'][photo_attribute]['_content']
29
+ data['person']['photos'][photo_attribute] = data['person']['photos'][photo_attribute]['_content'] rescue nil
30
30
  end
31
31
  when 'flickr.test.login'
32
- data['user']['username'] = data['user']['username']['_content']
32
+ data['user']['username'] = data['user']['username']['_content'] rescue nil
33
33
  when 'flickr.people.getUploadStatus'
34
- data['user']['username'] = data['user']['username']['_content']
34
+ data['user']['username'] = data['user']['username']['_content'] rescue nil
35
35
  data['user']['upload_status'] = {
36
36
  'bandwidth' => data['user'].delete('bandwidth'),
37
37
  'filesize' => data['user'].delete('filesize'),
@@ -46,10 +46,10 @@ module Flickrie
46
46
  when 'flickr.people.getPublicPhotos'
47
47
  fix_common!(data)
48
48
  when 'flickr.photos.getInfo'
49
- data['photo']['title'] = data['photo']['title']['_content']
50
- data['photo']['description'] = data['photo']['description']['_content']
51
- data['photo']['comments_count'] = data['photo'].delete('comments')['_content']
52
- data['photo']['dates']['uploaded'] = data['photo'].delete('dateuploaded')
49
+ data['photo']['title'] = data['photo']['title']['_content'] rescue nil
50
+ data['photo']['description'] = data['photo']['description']['_content'] rescue nil
51
+ data['photo']['comments_count'] = data['photo'].delete('comments')['_content'] rescue nil
52
+ data['photo']['dates']['uploaded'] = data['photo'].delete('dateuploaded') rescue nil
53
53
  data['photo']['tags'] = data['photo']['tags']['tag']
54
54
  when 'flickr.photosets.getPhotos'
55
55
  data['photoset']['photo'].map! do |media_hash|
@@ -135,14 +135,14 @@ module Flickrie
135
135
 
136
136
  # photosets
137
137
  when 'flickr.photosets.getInfo'
138
- data['photoset']['title'] = data['photoset']['title']['_content']
139
- data['photoset']['description'] = data['photoset']['description']['_content']
138
+ data['photoset']['title'] = data['photoset']['title']['_content'] rescue nil
139
+ data['photoset']['description'] = data['photoset']['description']['_content'] rescue nil
140
140
  when 'flickr.photosets.getList'
141
141
  data['photosets']['photoset'].map! do |set_hash|
142
142
  set_hash['count_photos'] = set_hash.delete('photos')
143
143
  set_hash['count_videos'] = set_hash.delete('videos')
144
- set_hash['title'] = set_hash['title']['_content']
145
- set_hash['description'] = set_hash['description']['_content']
144
+ set_hash['title'] = set_hash['title']['_content'] rescue nil
145
+ set_hash['description'] = set_hash['description']['_content'] rescue nil
146
146
  set_hash['owner'] = query['user_id'].first
147
147
  set_hash
148
148
  end
@@ -1,3 +1,3 @@
1
1
  module Flickrie
2
- VERSION = "1.5.1"
2
+ VERSION = "1.5.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flickrie
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-09 00:00:00.000000000 Z
12
+ date: 2012-07-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday_middleware
16
- requirement: &70109122251160 !ruby/object:Gem::Requirement
16
+ requirement: &70237381004760 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -24,10 +24,10 @@ dependencies:
24
24
  version: '0.9'
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *70109122251160
27
+ version_requirements: *70237381004760
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: faraday
30
- requirement: &70109122250400 !ruby/object:Gem::Requirement
30
+ requirement: &70237381003940 !ruby/object:Gem::Requirement
31
31
  none: false
32
32
  requirements:
33
33
  - - ! '>='
@@ -38,10 +38,10 @@ dependencies:
38
38
  version: '0.9'
39
39
  type: :runtime
40
40
  prerelease: false
41
- version_requirements: *70109122250400
41
+ version_requirements: *70237381003940
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: simple_oauth
44
- requirement: &70109122249660 !ruby/object:Gem::Requirement
44
+ requirement: &70237381003160 !ruby/object:Gem::Requirement
45
45
  none: false
46
46
  requirements:
47
47
  - - ~>
@@ -49,10 +49,10 @@ dependencies:
49
49
  version: '0.1'
50
50
  type: :runtime
51
51
  prerelease: false
52
- version_requirements: *70109122249660
52
+ version_requirements: *70237381003160
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: multi_xml
55
- requirement: &70109122249180 !ruby/object:Gem::Requirement
55
+ requirement: &70237381002580 !ruby/object:Gem::Requirement
56
56
  none: false
57
57
  requirements:
58
58
  - - ~>
@@ -60,10 +60,10 @@ dependencies:
60
60
  version: '0.4'
61
61
  type: :runtime
62
62
  prerelease: false
63
- version_requirements: *70109122249180
63
+ version_requirements: *70237381002580
64
64
  - !ruby/object:Gem::Dependency
65
65
  name: bundler
66
- requirement: &70109122248720 !ruby/object:Gem::Requirement
66
+ requirement: &70237381002100 !ruby/object:Gem::Requirement
67
67
  none: false
68
68
  requirements:
69
69
  - - ~>
@@ -71,10 +71,10 @@ dependencies:
71
71
  version: '1.0'
72
72
  type: :development
73
73
  prerelease: false
74
- version_requirements: *70109122248720
74
+ version_requirements: *70237381002100
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: rake
77
- requirement: &70109122248260 !ruby/object:Gem::Requirement
77
+ requirement: &70237381001620 !ruby/object:Gem::Requirement
78
78
  none: false
79
79
  requirements:
80
80
  - - ~>
@@ -82,10 +82,10 @@ dependencies:
82
82
  version: '0.9'
83
83
  type: :development
84
84
  prerelease: false
85
- version_requirements: *70109122248260
85
+ version_requirements: *70237381001620
86
86
  - !ruby/object:Gem::Dependency
87
87
  name: rspec
88
- requirement: &70109122247780 !ruby/object:Gem::Requirement
88
+ requirement: &70237381001120 !ruby/object:Gem::Requirement
89
89
  none: false
90
90
  requirements:
91
91
  - - ! '>='
@@ -96,10 +96,10 @@ dependencies:
96
96
  version: '3'
97
97
  type: :development
98
98
  prerelease: false
99
- version_requirements: *70109122247780
99
+ version_requirements: *70237381001120
100
100
  - !ruby/object:Gem::Dependency
101
101
  name: vcr
102
- requirement: &70109122247040 !ruby/object:Gem::Requirement
102
+ requirement: &70237381000280 !ruby/object:Gem::Requirement
103
103
  none: false
104
104
  requirements:
105
105
  - - ~>
@@ -107,7 +107,7 @@ dependencies:
107
107
  version: '2.1'
108
108
  type: :development
109
109
  prerelease: false
110
- version_requirements: *70109122247040
110
+ version_requirements: *70237381000280
111
111
  description: This gem wraps the Flickr API with a nice object-oriented interface.
112
112
  email: janko.marohnic@gmail.com
113
113
  executables: []
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  version: '0'
168
168
  segments:
169
169
  - 0
170
- hash: 3993820191450085043
170
+ hash: -3513964845288430156
171
171
  requirements: []
172
172
  rubyforge_project:
173
173
  rubygems_version: 1.8.11