flickrie 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Flickrie changelog
2
2
 
3
+ ## Version 0.5.2
4
+
5
+ - the gem now also works with Faraday 0.7 (I apologize for not
6
+ making Faraday >= 0.8 a dependency before)
7
+
3
8
  ## Version 0.5.1
4
9
 
5
10
  - fixed a documentation error
data/Gemfile CHANGED
@@ -2,6 +2,8 @@ source :rubygems
2
2
 
3
3
  gemspec
4
4
 
5
+ gem "faraday", "~> 0.7.6"
6
+
5
7
  group :development, :test do
6
8
  gem "activesupport"
7
9
  gem "flickrie", :path => "~/Projects/flickrie"
data/flickrie.gemspec CHANGED
@@ -17,8 +17,8 @@ Gem::Specification.new do |gem|
17
17
  gem.license = "MIT"
18
18
 
19
19
  gem.add_dependency "faraday_middleware"
20
- gem.add_dependency "simple_oauth"
21
- gem.add_dependency "multi_xml"
20
+ gem.add_dependency "simple_oauth", '~> 0.1'
21
+ gem.add_dependency "multi_xml", '~> 0.4'
22
22
 
23
23
  gem.add_development_dependency "activesupport"
24
24
  end
@@ -18,14 +18,14 @@ module Flickrie
18
18
 
19
19
  def client(access_token_hash = {})
20
20
  @client ||= Client.new(params) do |conn|
21
- conn.request :oauth,
21
+ conn.use FaradayMiddleware::OAuth,
22
22
  :consumer_key => api_key,
23
23
  :consumer_secret => shared_secret,
24
24
  :token => access_token_hash[:token] || access_token,
25
25
  :token_secret => access_token_hash[:secret] || access_secret
26
26
 
27
27
  conn.use StatusCheck
28
- conn.response :json, :content_type => /(text\/plain)|(json)$/
28
+ conn.use FaradayMiddleware::ParseJson, :content_type => /(text\/plain)|(json)$/
29
29
  conn.use OAuthStatusCheck
30
30
 
31
31
  conn.adapter Faraday.default_adapter
@@ -12,14 +12,14 @@ module Flickrie
12
12
  :consumer_secret => Flickrie.shared_secret
13
13
  }.merge(additional_oauth_params)
14
14
 
15
- Faraday.new(URL) do |connection|
16
- connection.request :oauth, oauth_params
17
- connection.use ParseResponseParams
18
- connection.adapter Faraday.default_adapter
19
- end.
20
- tap do |connection|
21
- connection.builder.insert_before ParseResponseParams, StatusCheck
22
- end
15
+ Faraday.new(URL) do |conn|
16
+ conn.use FaradayMiddleware::OAuth, oauth_params
17
+
18
+ conn.use StatusCheck
19
+ conn.use ParseResponseParams
20
+
21
+ conn.adapter Faraday.default_adapter
22
+ end
23
23
  end
24
24
 
25
25
  class StatusCheck < Faraday::Response::Middleware
@@ -2,7 +2,7 @@ module Flickrie
2
2
  class << self
3
3
  def upload_client(access_token_hash = {})
4
4
  @upload_client ||= UploadClient.new(upload_params) do |conn|
5
- conn.request :oauth,
5
+ conn.use FaradayMiddleware::OAuth,
6
6
  :consumer_key => api_key,
7
7
  :consumer_secret => shared_secret,
8
8
  :token => access_token_hash[:token] || access_token,
@@ -10,7 +10,7 @@ module Flickrie
10
10
  conn.request :multipart
11
11
 
12
12
  conn.use UploadStatusCheck
13
- conn.response :xml
13
+ conn.use FaradayMiddleware::ParseXml
14
14
 
15
15
  conn.adapter Faraday.default_adapter
16
16
  end
@@ -1,3 +1,3 @@
1
1
  module Flickrie
2
- VERSION = '0.5.1'
2
+ VERSION = '0.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: 0.5.1
4
+ version: 0.5.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-05-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday_middleware
16
- requirement: &70100275626120 !ruby/object:Gem::Requirement
16
+ requirement: &70275161967080 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,32 +21,32 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70100275626120
24
+ version_requirements: *70275161967080
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: simple_oauth
27
- requirement: &70100275625500 !ruby/object:Gem::Requirement
27
+ requirement: &70275161964780 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
- - - ! '>='
30
+ - - ~>
31
31
  - !ruby/object:Gem::Version
32
- version: '0'
32
+ version: '0.1'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70100275625500
35
+ version_requirements: *70275161964780
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: multi_xml
38
- requirement: &70100275625040 !ruby/object:Gem::Requirement
38
+ requirement: &70275161961880 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
- - - ! '>='
41
+ - - ~>
42
42
  - !ruby/object:Gem::Version
43
- version: '0'
43
+ version: '0.4'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70100275625040
46
+ version_requirements: *70275161961880
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: activesupport
49
- requirement: &70100275624620 !ruby/object:Gem::Requirement
49
+ requirement: &70275161959640 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70100275624620
57
+ version_requirements: *70275161959640
58
58
  description: This gem is a nice wrapper for the Flickr API with an intuitive interface.
59
59
  email: janko.marohnic@gmail.com
60
60
  executables: []