omniauth-artsy 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +1 -1
- data/CHANGELOG.md +6 -1
- data/lib/omniauth-artsy/config.rb +9 -1
- data/lib/omniauth-artsy/version.rb +1 -1
- data/lib/omniauth/strategies/artsy.rb +8 -4
- data/spec/lib/config_spec.rb +1 -0
- data/spec/omniauth/strategies/artsy_spec.rb +5 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 360b4024520d1f3647d0feba0f33c40094851ce6
|
4
|
+
data.tar.gz: 16328ef3f26ff9c2fb9f9f28d00ce706d65bf674
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f533ad7818486e00ae4fe4e51ad0523d9164a9260bec46916600e44481cc90119e66f4e736b6e4ec95718552b6928b980240f52a08efe27ac46dc77d5002b2ec
|
7
|
+
data.tar.gz: b9cf21862d613d73aa2f4d5a7f0bbbcfeeddd79e5feb568b45b6eaa52ae90c7e0939fe7fef29a38010bace81472d2a393aece0a0182264b4c81d5bc5f4f420ab
|
data/.rubocop_todo.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,13 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.3 (Next)
|
2
2
|
============
|
3
3
|
|
4
4
|
* Your contribution here.
|
5
5
|
|
6
|
+
0.2.2
|
7
|
+
============
|
8
|
+
|
9
|
+
* [#7](https://github.com/artsy/omniauth-artsy/pull/7): Fix issue in configuring Artsy's strategy when using new config - [@ashkan18](https://github.com/ashkan18).
|
10
|
+
|
6
11
|
0.2.1
|
7
12
|
============
|
8
13
|
|
@@ -14,7 +14,15 @@ module OmniAuth
|
|
14
14
|
|
15
15
|
class << self
|
16
16
|
def configure
|
17
|
-
block_given?
|
17
|
+
if block_given?
|
18
|
+
yield(Config)
|
19
|
+
reconfigure_strategy
|
20
|
+
end
|
21
|
+
Config
|
22
|
+
end
|
23
|
+
|
24
|
+
def reconfigure_strategy
|
25
|
+
Strategies::Artsy.configure
|
18
26
|
end
|
19
27
|
|
20
28
|
def config
|
@@ -3,10 +3,14 @@ require 'omniauth-oauth2'
|
|
3
3
|
module OmniAuth
|
4
4
|
module Strategies
|
5
5
|
class Artsy < OmniAuth::Strategies::OAuth2
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
def self.configure
|
7
|
+
option :client_options,
|
8
|
+
site: OmniAuth::Artsy.config.artsy_api_url || ENV['ARTSY_API_URL'] || ENV['gravity_url'],
|
9
|
+
authorize_url: '/oauth2/authorize?scope=offline_access&response_type=code',
|
10
|
+
token_url: '/oauth2/access_token?scope=offline_access&response_type=code&grant_type=authorization_code'
|
11
|
+
end
|
12
|
+
|
13
|
+
configure
|
10
14
|
|
11
15
|
def request_phase
|
12
16
|
super
|
data/spec/lib/config_spec.rb
CHANGED
@@ -22,8 +22,11 @@ describe OmniAuth::Strategies::Artsy do
|
|
22
22
|
end
|
23
23
|
|
24
24
|
describe '#client_options' do
|
25
|
-
it 'returns
|
26
|
-
|
25
|
+
it 'returns correct url for Artsy API URL when it was set' do
|
26
|
+
OmniAuth::Artsy.configure do |config|
|
27
|
+
config.artsy_api_url = 'http://api.test.url'
|
28
|
+
end
|
29
|
+
expect(subject.options.client_options.site).to eq 'http://api.test.url'
|
27
30
|
end
|
28
31
|
|
29
32
|
it 'has correct authorize url' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-artsy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dylan Fareed
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03
|
11
|
+
date: 2017-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|
127
127
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.
|
128
|
+
rubygems_version: 2.5.2
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: Omniauth plugin for Artsy authentication.
|