omniauth-flickr 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -6,6 +6,10 @@ For more information see the following:
6
6
 
7
7
  Release notes:
8
8
 
9
+ * Version 0.0.8
10
+
11
+ - Use authenticated version of flickr.people.getInfo (contrary to flickr docs, api_key must not be specified on url)
12
+
9
13
  * Version 0.0.7
10
14
 
11
15
  - Documentation and comment change only
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Flickr
3
- VERSION = "0.0.7"
3
+ VERSION = "0.0.8"
4
4
  end
5
5
  end
@@ -40,31 +40,25 @@ module OmniAuth
40
40
  end
41
41
 
42
42
  extra do
43
- {
43
+ {
44
44
  :raw_info => raw_info
45
- }
45
+ }
46
46
  end
47
47
 
48
48
  # Return info gathered from the flickr.people.getInfo API call
49
- # (not authenticated) in its raw JSON form
50
-
49
+
51
50
  def raw_info
52
51
  # This is a public API and does not need signing or authentication
53
- url = "/services/rest/?api_key=#{options.consumer_key}&format=json&method=flickr.people.getInfo&nojsoncallback=1&user_id=#{uid}"
54
- @raw_info ||= Net::HTTP.get(options.client_options[:site].gsub(/.*:\/\//, ""), url)
52
+ request = "/services/rest/?format=json&method=flickr.people.getInfo&nojsoncallback=1&user_id=#{uid}"
53
+ @raw_info ||= MultiJson.decode(access_token.get(request).body)
55
54
  rescue ::Errno::ETIMEDOUT
56
55
  raise ::Timeout::Error
57
56
  end
58
57
 
59
- # Parse the "Person" portion of the raw_info JSON into a hash
58
+ # Provide the "Person" portion of the raw_info
60
59
 
61
60
  def user_info
62
- unless @user_info
63
- @user_info = {}
64
- info = MultiJson.decode(raw_info)
65
- @user_info = info["person"] unless info.nil?
66
- end
67
- @user_info
61
+ @user_info ||= raw_info.nil? ? {} : raw_info["person"]
68
62
  end
69
63
  end
70
64
  end
metadata CHANGED
@@ -1,46 +1,34 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: omniauth-flickr
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 0
8
- - 7
9
- version: 0.0.7
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.8
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Tim Breitkreutz
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2011-12-05 00:00:00 -07:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2011-12-06 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: omniauth-oauth
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70261248638380 !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
18
+ requirements:
26
19
  - - ~>
27
- - !ruby/object:Gem::Version
28
- segments:
29
- - 1
30
- - 0
31
- version: "1.0"
20
+ - !ruby/object:Gem::Version
21
+ version: '1.0'
32
22
  type: :runtime
33
- version_requirements: *id001
23
+ prerelease: false
24
+ version_requirements: *70261248638380
34
25
  description: OmniAuth strategy for Flickr
35
- email:
26
+ email:
36
27
  - tim@sbrew.com
37
28
  executables: []
38
-
39
29
  extensions: []
40
-
41
30
  extra_rdoc_files: []
42
-
43
- files:
31
+ files:
44
32
  - .gitignore
45
33
  - Gemfile
46
34
  - LICENSE
@@ -51,37 +39,28 @@ files:
51
39
  - lib/omniauth-flickr/version.rb
52
40
  - lib/omniauth/strategies/flickr.rb
53
41
  - omniauth-flickr.gemspec
54
- has_rdoc: true
55
42
  homepage: https://github.com/timbreitkreutz/omniauth-flickr
56
43
  licenses: []
57
-
58
44
  post_install_message:
59
45
  rdoc_options: []
60
-
61
- require_paths:
46
+ require_paths:
62
47
  - lib
63
- required_ruby_version: !ruby/object:Gem::Requirement
48
+ required_ruby_version: !ruby/object:Gem::Requirement
64
49
  none: false
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- segments:
69
- - 0
70
- version: "0"
71
- required_rubygems_version: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
55
  none: false
73
- requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- segments:
77
- - 0
78
- version: "0"
56
+ requirements:
57
+ - - ! '>='
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
79
60
  requirements: []
80
-
81
61
  rubyforge_project: omniauth-flickr
82
- rubygems_version: 1.3.7
62
+ rubygems_version: 1.8.10
83
63
  signing_key:
84
64
  specification_version: 3
85
65
  summary: OmniAuth strategy for Flickr
86
66
  test_files: []
87
-