flickr 2.0.2 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65cb1e57a0b7ff7ce2f05da2b7e2bcf910c417b79e66d1ad5b32bd4f3c1c8ca7
4
- data.tar.gz: 2fe80a2e1db250bf7f8e297da921891e5baa97f106186fe5876f698c82cfc10e
3
+ metadata.gz: 1f0cdb71210b22543b9bb1ccea0f424f01c755aac6e381dcc004acbd07cc6437
4
+ data.tar.gz: 6475827a161382a260a24a26c410d8e1a989fc718adef34c954a841badb2c702
5
5
  SHA512:
6
- metadata.gz: a494a33e313ab2f06a971f2ae4afaab55a75e7221f6a24dd9484fd59b0c04830f4b2e74f3434d121b1d6a072560eed70c81732863e98dc86dcef556fb3781edc
7
- data.tar.gz: 80b7dca89da88c74055fcbba17ff858965d8ae075e036e0a84fc9d97831babaddfb6210e0e46ef4855e9a1934415d5fca489e02dd7bcb4047649a99488afec55
6
+ metadata.gz: acaba2309c9c501a4f1445ef6d8f73d1eac37f066fe660808cad18d2f8325beb6328cac49a7dc8348df438ce8783b965a5ef36410112581910a04f5fdf98e42d
7
+ data.tar.gz: efcc14ec4b79d757c424b63fb2abde56e222c198d89a25772d3b8e229ece03c42d6dd0f4ab7eef9c275426550a0fe64ffa7a93d951ebaa076fcb40f7ea7e04b1
data/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## 2.1.0 - 2022-05-20
8
+ ### Added
9
+ - Handle new response format without blowing up
10
+
7
11
  ## 2.0.2 - 2019-06-05
8
12
  ### Added
9
13
  - Updated upload and replace endpoints
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Flickr [![Build Status](https://travis-ci.org/cyclotron3k/flickr.svg?branch=master)](https://travis-ci.org/cyclotron3k/flickr)
1
+ # Flickr
2
2
 
3
3
  Flickr (formerly FlickRaw) is a library to access the [Flickr](https://flickr.com) API in a simple way.
4
4
  It maps exactly the methods described in [the official API documentation](https://www.flickr.com/services/api/).
@@ -228,24 +228,6 @@ info = flickr.photos.getInfo(:photo_id => "3839885270")
228
228
  Flickr.url_photostream(info) # => "https://www.flickr.com/photos/41650587@N02/"
229
229
  ```
230
230
 
231
- ## Troubleshooting
232
-
233
- If you see an error like this:
234
-
235
- There was an error while loading `flickr.gemspec`: invalid byte sequence in US-ASCII. Bundler cannot continue.
236
-
237
- It probably means you're trying to use `Flickr` in a default Ruby docker container. The official Ruby Docker image does not specify a locale, and so it defaults to `US-ASCII`. This causes issues because the `Flickr` gem includes `UTF-8` encoded characters.
238
-
239
- If you were affected by this problem, you will need to set your container's environment variables to something like the following:
240
-
241
- export LANG=C.UTF-8
242
- export LC_ALL=C.UTF-8
243
- export LC_CTYPE=C.UTF-8
244
-
245
- A popular alternative to `C.UTF-8` would be `en_US.UTF-8`
246
-
247
- Also please consider adding a +1 to [this issue](https://github.com/docker-library/ruby/issues/45) on GitHub.
248
-
249
231
  ## Examples
250
232
 
251
233
  See the *examples* directory to find more examples.
data/examples/sinatra.rb CHANGED
@@ -24,8 +24,8 @@ get '/authenticated' do
24
24
  @auth_flickr = session[:auth_flickr]
25
25
 
26
26
  login = @auth_flickr.test.login
27
- %{
28
- You are now authenticated as <em>#{login.username}</em>
29
- with token <strong>#{@auth_flickr.access_token}</strong> and secret <strong>#{@auth_flickr.access_secret}</strong>.
30
- }
27
+ <<~HTML
28
+ You are now authenticated as <em>#{login.username}</em>
29
+ with token <strong>#{@auth_flickr.access_token}</strong> and secret <strong>#{@auth_flickr.access_secret}</strong>.
30
+ HTML
31
31
  end
data/flickr.gemspec CHANGED
@@ -20,13 +20,13 @@ Gem::Specification.new do |s|
20
20
  "source_code_uri" => "https://github.com/cyclotron3k/flickr",
21
21
  }
22
22
 
23
- s.add_development_dependency "rake", "~> 12.0"
24
- s.add_development_dependency "pry", "~> 0.11"
23
+ s.add_development_dependency "rake", "~> 13.0"
24
+ s.add_development_dependency "pry", "~> 0.14"
25
25
  s.add_development_dependency "nokogiri", "~> 1.0"
26
- s.add_development_dependency "webmock", "~> 2.0"
26
+ s.add_development_dependency "webmock", "~> 3.0"
27
27
  s.add_development_dependency "minitest", "~> 5.0"
28
- s.add_development_dependency "bundler-audit", "~> 0.6"
29
- s.add_development_dependency "vcr", "~> 4.0"
28
+ s.add_development_dependency "bundler-audit", "~> 0.9"
29
+ s.add_development_dependency "vcr", "~> 6.0"
30
30
 
31
31
  s.required_ruby_version = '>= 2.3'
32
32
 
@@ -7,7 +7,7 @@ class Flickr
7
7
  if h.is_a? Response
8
8
  h
9
9
  elsif type =~ /s$/ and (a = h[$`]).is_a? Array
10
- ResponseList.new(h, type, a.collect { |e| Response.build(e, $`) })
10
+ ResponseList.new(h, type, a.map { |e| Response.build(e, $`) })
11
11
  elsif h.keys == ['_content']
12
12
  h['_content']
13
13
  else
@@ -20,8 +20,10 @@ class Flickr
20
20
  methods = 'class << self;'
21
21
  h.each do |k, v|
22
22
  @h[k] = case v
23
- when Hash then Response.build(v, k)
24
- when Array then v.collect { |e| Response.build(e, k) }
23
+ when Hash
24
+ Response.build(v, k)
25
+ when Array
26
+ v.all? { |e| String === e } ? v : v.map { |e| Response.build(e, k) }
25
27
  else v
26
28
  end
27
29
  methods << "def #{k}; @h['#{k}'] end;" if Util.safe_for_eval?(k)
@@ -1,3 +1,3 @@
1
1
  class Flickr
2
- VERSION = '2.0.2'
2
+ VERSION = '2.1.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flickr
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mael Clerambault
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-06-05 00:00:00.000000000 Z
12
+ date: 2022-05-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -17,28 +17,28 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '12.0'
20
+ version: '13.0'
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '12.0'
27
+ version: '13.0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: pry
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: '0.11'
34
+ version: '0.14'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: '0.11'
41
+ version: '0.14'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: nokogiri
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -59,14 +59,14 @@ dependencies:
59
59
  requirements:
60
60
  - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: '2.0'
62
+ version: '3.0'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: '2.0'
69
+ version: '3.0'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: minitest
72
72
  requirement: !ruby/object:Gem::Requirement
@@ -87,28 +87,28 @@ dependencies:
87
87
  requirements:
88
88
  - - "~>"
89
89
  - !ruby/object:Gem::Version
90
- version: '0.6'
90
+ version: '0.9'
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - "~>"
96
96
  - !ruby/object:Gem::Version
97
- version: '0.6'
97
+ version: '0.9'
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: vcr
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - "~>"
103
103
  - !ruby/object:Gem::Version
104
- version: '4.0'
104
+ version: '6.0'
105
105
  type: :development
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - "~>"
110
110
  - !ruby/object:Gem::Version
111
- version: '4.0'
111
+ version: '6.0'
112
112
  description:
113
113
  email: aidan.samuel@gmail.com
114
114
  executables: []
@@ -116,7 +116,6 @@ extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
118
  - ".gitignore"
119
- - ".travis.yml"
120
119
  - CHANGELOG.md
121
120
  - Gemfile
122
121
  - LICENSE
@@ -144,7 +143,7 @@ licenses:
144
143
  metadata:
145
144
  bug_tracker_uri: https://github.com/cyclotron3k/flickr/issues
146
145
  changelog_uri: https://github.com/cyclotron3k/flickr/blob/master/CHANGELOG.md
147
- documentation_uri: https://github.com/cyclotron3k/flickr/blob/v2.0.2/README.md
146
+ documentation_uri: https://github.com/cyclotron3k/flickr/blob/v2.1.0/README.md
148
147
  source_code_uri: https://github.com/cyclotron3k/flickr
149
148
  post_install_message:
150
149
  rdoc_options: []
@@ -161,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
160
  - !ruby/object:Gem::Version
162
161
  version: '0'
163
162
  requirements: []
164
- rubygems_version: 3.0.3
163
+ rubygems_version: 3.3.7
165
164
  signing_key:
166
165
  specification_version: 4
167
166
  summary: Flickr (formerly FlickRaw) is full-featured client for the Flickr API
data/.travis.yml DELETED
@@ -1,11 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
- rvm:
4
- - 2.3
5
- - 2.4
6
- - 2.5
7
- - 2.6
8
- - jruby
9
- script:
10
- - bundle exec rake
11
- - bundle exec bundle-audit check --update