omniauth-untappd 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -3
- data/lib/omniauth/strategies/untappd.rb +2 -1
- data/lib/omniauth-untappd/version.rb +1 -1
- data/lib/omniauth-untappd.rb +0 -1
- data/omniauth-untappd.gemspec +1 -0
- data/spec/omniauth/strategies/untappd_spec.rb +20 -1
- data/spec/spec_helper.rb +7 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0ad89682af8fc3f04471b69b3fac0aefe63fdcf
|
4
|
+
data.tar.gz: 996d3516d2fb95b5b1f28a7a866aad18842c438b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b298cf46d7883aa58488b6852995aad9e22caf4a7ad6b824a73ad6d473aa0d4e6f97ed8c21562b60d6572ccdecb70281ca8499395bea043170a585997ab1c4a
|
7
|
+
data.tar.gz: d9ceea445eb339182d85c8530229cd6188802930bc7e222c5a8ffb97a8cb22881de8f11683a7345b7e35883fc5661d373019997e8105b318f401b69770d89eb0
|
data/README.md
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
# Omniauth::Untappd
|
2
2
|
|
3
|
-
|
3
|
+
[](http://badge.fury.io/rb/omniauth-untappd)
|
4
|
+
[](https://gemnasium.com/sabotatore/omniauth-untappd)
|
5
|
+
[](https://codeclimate.com/github/sabotatore/omniauth-untappd)
|
4
6
|
|
5
|
-
|
7
|
+
Untappd OAuth2 Strategy for OmniAuth.
|
6
8
|
|
7
9
|
## Installation
|
8
10
|
|
@@ -32,7 +34,8 @@ See more details on the omniauth module: https://github.com/intridea/omniauth#re
|
|
32
34
|
|
33
35
|
OmniAuth Untappd is tested under 1.9.2, 1.9.3 and 2.0.0
|
34
36
|
|
35
|
-
[](https://travis-ci.org/sabotatore/omniauth-untappd)
|
37
|
+
[](https://travis-ci.org/sabotatore/omniauth-untappd)
|
38
|
+
[](https://coveralls.io/r/sabotatore/omniauth-untappd)
|
36
39
|
|
37
40
|
## License
|
38
41
|
|
data/lib/omniauth-untappd.rb
CHANGED
data/omniauth-untappd.gemspec
CHANGED
@@ -3,6 +3,9 @@ require 'spec_helper'
|
|
3
3
|
describe OmniAuth::Strategies::Untappd do
|
4
4
|
subject(:strategy) { OmniAuth::Strategies::Untappd.new('client_id', 'client_secret') }
|
5
5
|
|
6
|
+
before { OmniAuth.config.test_mode = true }
|
7
|
+
after { OmniAuth.config.test_mode = false }
|
8
|
+
|
6
9
|
let(:parsed_response) {{ 'response' => {
|
7
10
|
'user' => {
|
8
11
|
'id' => '123',
|
@@ -36,7 +39,23 @@ describe OmniAuth::Strategies::Untappd do
|
|
36
39
|
|
37
40
|
its(:parse) { should eql :json }
|
38
41
|
end
|
42
|
+
end
|
43
|
+
|
44
|
+
describe 'add redirect_url to params' do
|
45
|
+
let(:callback_url) { 'callback_url' }
|
46
|
+
before { expect(strategy).to receive(:callback_url).and_return(callback_url) }
|
47
|
+
|
48
|
+
context '#token_params' do
|
49
|
+
subject { strategy.token_params }
|
50
|
+
|
51
|
+
its(:redirect_url) { should eql callback_url }
|
52
|
+
end
|
39
53
|
|
54
|
+
context '#authorize_params' do
|
55
|
+
subject { strategy.authorize_params }
|
56
|
+
|
57
|
+
its(:redirect_url) { should eql callback_url }
|
58
|
+
end
|
40
59
|
end
|
41
60
|
|
42
61
|
context '#raw_info' do
|
@@ -46,7 +65,7 @@ describe OmniAuth::Strategies::Untappd do
|
|
46
65
|
let(:user_info_url) { 'http://api.untappd.com/v4/user/info' }
|
47
66
|
|
48
67
|
before { strategy.stub(access_token: access_token) }
|
49
|
-
before { access_token.
|
68
|
+
before { expect(access_token).to receive(:get).with(user_info_url).and_return(response) }
|
50
69
|
|
51
70
|
it { should eql(parsed_response['response']['user']) }
|
52
71
|
|
data/spec/spec_helper.rb
CHANGED
@@ -1,7 +1,14 @@
|
|
1
1
|
$:.unshift File.expand_path('..', __FILE__)
|
2
2
|
$:.unshift File.expand_path('../../lib', __FILE__)
|
3
|
+
|
3
4
|
require 'simplecov'
|
5
|
+
require 'coveralls'
|
6
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
7
|
+
SimpleCov::Formatter::HTMLFormatter,
|
8
|
+
Coveralls::SimpleCov::Formatter
|
9
|
+
]
|
4
10
|
SimpleCov.start
|
11
|
+
|
5
12
|
require 'rspec'
|
6
13
|
require 'rack/test'
|
7
14
|
require 'webmock/rspec'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-untappd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vitali Kulikou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: coveralls
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
111
125
|
description: Untappd OAuth2 Strategy for OmniAuth.
|
112
126
|
email:
|
113
127
|
- sabotatore@gmail.com
|