omniauth-deezer 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 66e5f17c8761b9988e235a45b1191ddea10a6a42
4
+ data.tar.gz: 298a63833cbacc47c3ad77d847126fdf9ca27599
5
+ SHA512:
6
+ metadata.gz: 49108151e01bccd8f76574551bd5e030a2d032d51302be2b6bc822634f5d1c1252fdec3254c7eb9242973ede6676461d0361001c4405d68582f7e9af98f8be38
7
+ data.tar.gz: eacb1ad5f4a8d2025a28389096dd49e766d06c6bf4c2074dd5e59290719759ea35ac037efa7e4ccb89fa58ca22a505a9f1ddb604c19dc135d4f31597e1cf7ef4
data/Readme.md CHANGED
@@ -113,16 +113,10 @@ The precise information available may depend on the permissions which you reques
113
113
  You can find a sample app that use this GEM here :
114
114
  https://github.com/geoffroymontel/omniauth-deezer-test
115
115
 
116
- ## Supported Rubies
117
-
118
- Actively tested with the following Ruby versions:
119
-
120
- - MRI 1.9.2
121
-
122
116
  ## Tests
123
117
 
124
118
  This first version does not have any automated test. I'm really sorry.
125
- But you're really welcome to help me add some !
119
+ But you're really welcome to help me add any !
126
120
 
127
121
  ## Contributing
128
122
 
@@ -130,7 +124,8 @@ This is my first GEM, so don't hesitate to raise bugs, fork, and submit bug fixe
130
124
 
131
125
  ## License
132
126
 
133
- Copyright 2012 by Geoffroy Montel
127
+ Copyright 2012 by [Geoffroy Montel](https://github.com/geoffroymontel)
128
+ Contributions from [Jacek Tomaszewski](https://github.com/jtomaszewski) and [Simone Dall'Angelo](https://github.com/simo2409)
134
129
 
135
130
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
136
131
 
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Deezer
3
- VERSION = "0.2.0"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
@@ -43,7 +43,7 @@ module OmniAuth
43
43
  token_url = options.client_options.token_url
44
44
  token_url = options.client_options.token_url+'?app_id='+options.app_id+'&secret='+options.app_secret+'&code='+request.params['code']
45
45
  connection = nil
46
- if options.client_options.ssl.ca_path then
46
+ if options.client_options.ssl && options.client_options.ssl.ca_path then
47
47
  connection = Faraday::Connection.new token_url, :ssl => {:ca_path => options.client_options.ssl.ca_path }
48
48
  else
49
49
  connection = Faraday::Connection.new token_url
@@ -52,7 +52,8 @@ module OmniAuth
52
52
 
53
53
  response_hash = CGI::parse(response.body.chomp)
54
54
  @access_token = response_hash['access_token'][0]
55
- @token_expires_at = response_hash['expires'][0].to_i
55
+ expires_in = response_hash['expires'][0].to_i
56
+ @token_expires_at = Time.now + expires_in if expires_in > 0
56
57
 
57
58
  # get info from current user
58
59
  me_path = options.client_options.me_url+'?access_token='+@access_token
@@ -95,7 +96,7 @@ module OmniAuth
95
96
  credentials do
96
97
  {
97
98
  :token => @access_token,
98
- :expires => @token_expires_at > 0 ? 'true' : 'false',
99
+ :expires => @token_expires_at ? 'true' : 'false',
99
100
  :expires_at => @token_expires_at
100
101
  }
101
102
  end
@@ -118,4 +119,4 @@ module OmniAuth
118
119
 
119
120
  end
120
121
  end
121
- end
122
+ end
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.require_paths = ["lib"]
20
20
 
21
21
  # specify any dependencies here; for example:
22
- s.add_runtime_dependency 'omniauth', '~> 1.0.0'
22
+ s.add_runtime_dependency 'omniauth', '>= 1.1.0'
23
23
  s.add_runtime_dependency 'faraday'
24
24
 
25
25
  # s.add_development_dependency "rspec"
metadata CHANGED
@@ -1,38 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-deezer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
5
- prerelease:
4
+ version: 0.3.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Geoffroy Montel
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-02-10 00:00:00.000000000Z
11
+ date: 2014-05-25 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: omniauth
16
- requirement: &73909590 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - ~>
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
- version: 1.0.0
19
+ version: 1.1.0
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *73909590
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 1.1.0
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: faraday
27
- requirement: &73909300 !ruby/object:Gem::Requirement
28
- none: false
29
+ requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
- - - ! '>='
31
+ - - '>='
31
32
  - !ruby/object:Gem::Version
32
33
  version: '0'
33
34
  type: :runtime
34
35
  prerelease: false
35
- version_requirements: *73909300
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
36
41
  description: Deezer strategy for Omniauth 1.0
37
42
  email:
38
43
  - coder@minizza.com
@@ -51,26 +56,25 @@ files:
51
56
  - omniauth-deezer.gemspec
52
57
  homepage: https://github.com/geoffroymontel/omniauth-deezer
53
58
  licenses: []
59
+ metadata: {}
54
60
  post_install_message:
55
61
  rdoc_options: []
56
62
  require_paths:
57
63
  - lib
58
64
  required_ruby_version: !ruby/object:Gem::Requirement
59
- none: false
60
65
  requirements:
61
- - - ! '>='
66
+ - - '>='
62
67
  - !ruby/object:Gem::Version
63
68
  version: '0'
64
69
  required_rubygems_version: !ruby/object:Gem::Requirement
65
- none: false
66
70
  requirements:
67
- - - ! '>='
71
+ - - '>='
68
72
  - !ruby/object:Gem::Version
69
73
  version: '0'
70
74
  requirements: []
71
75
  rubyforge_project: omniauth-deezer
72
- rubygems_version: 1.8.15
76
+ rubygems_version: 2.0.3
73
77
  signing_key:
74
- specification_version: 3
78
+ specification_version: 4
75
79
  summary: Deezer strategy for Omniauth 1.0
76
80
  test_files: []