omniauth-samaritan 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Y2NiMzY1YTU3NmY2ZTk4MjU5MjE1MDJjMzNjZWFhNzlmYjEwNDUwZA==
4
+ NGUzOTdiY2EwODdjNTdhYjRlNGQyOWZhNGM2NmFjYTY1NTE4MjNhMg==
5
5
  data.tar.gz: !binary |-
6
- NjIwNGE4OWRlNzM5YzQ2ZmQ5MDllYTg5MzQ0NmI4MzYzMzVkYzY1ZA==
6
+ NGY0NmZkNWY0NjYzYmRiNDNmNGNhY2M1YWI4OGM3MmExNWI3ZmJkMw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YmE2MTQ1NjFlNGFjNDFhYmFlODBhODNjYzRjOTBkYWI1YjQ5ZjkyMzg1ZDNm
10
- ZWM1M2EzMjAzM2Y4M2M1OThlY2VlMGRjOTg4ZDI3M2FhYTdjNGQ4MTQzNWM3
11
- NDExMzA5ODY2MjhmYWMzYTlkNWY1ZTNkODcyMjRiNjgwZDEwZmY=
9
+ ZWY2NzJiYTJmOWIwZDI2YTZiMjllNjUwM2QxMzBkNzY2YjRlMTExMjQ4NTdm
10
+ ZjFmNTMyM2FmZDFmNWM5NjQ3YWNmZjBiZjBiZDBiODEwZWMzZTg0ODc5MGFk
11
+ YWY1MmM1MTgyNGIxZWYxOGQyYzU1NjgwNjRkYTFmNzcwZjM3YmU=
12
12
  data.tar.gz: !binary |-
13
- ZDdmN2IxNDNjYjBlOTQ5NzY3ZmMyYTZjZDYzOTc2Y2UzZjRjOTgxYmEyOTRk
14
- NDFlOTJlMzBhM2FiNzgwMjU5ZjA5Y2U1NGY3MzYyOGY5MzFiMzc4NWU0Mjhm
15
- NWY5MTcwNmM5YzE1MThjY2ZlYTkxYmI0MDUwNGMwNjE1YzFjMWM=
13
+ N2VlZTQ3OWFiYTBkYjIwN2ZlM2RhODMzMzFjNjg4MWFmZmJhMmY1YWNkMzFk
14
+ NTkyMzk3YzBhZWQwMjNjZTYxYTg3MzFmY2U2YTQzMmYwMzNlZGU3ZDlkY2Ni
15
+ YWMxMTdhOWNiNWU4M2E5OTI3NzBjOTYwODViZGQ3MjNkNTRlZDE=
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Samaritan
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -10,16 +10,14 @@ module OmniAuth
10
10
  option :client_options, {}
11
11
 
12
12
  option :sandbox_client_options, {
13
- :site => 'https://sandbox.smchcn.net/',
14
- :authorize_url => '/asrv/smi/oauth/authorize',
15
- :token_url => '/asrv/smi/oauth/token',
16
- :identity_url => '/smi/api/identity/mine'}
13
+ :authorize_url => 'https://sandbox.smchcn.net/asrv/smi/oauth/authorize',
14
+ :token_url => 'https://sandbox.smchcn.net/asrv/smi/oauth/token',
15
+ :identity_url => 'https://sandbox.smchcn.net/smi/api/identity/mine'}
17
16
 
18
17
  option :production_client_options, {
19
- :site => 'https://platformapi.samaritanministries.org/',
20
- :authorize_url => '/asrv/smi/oauth/authorize',
21
- :token_url => '/asrv/smi/oauth/token',
22
- :identity_url => '/smi/api/identity/mine'}
18
+ :authorize_url => 'https://accounts.samaritanministries.org/auth',
19
+ :token_url => 'https://accounts.samaritanministries.org/auth/smi/oauth/token',
20
+ :identity_url => 'https://platformapi.samaritanministries.org/smi/api/identity/mine'}
23
21
 
24
22
  def client_options
25
23
  client_options = options.client_options
@@ -26,24 +26,14 @@ describe OmniAuth::Strategies::Samaritan do
26
26
  end
27
27
 
28
28
  describe '#client_options' do
29
- it 'has correct site for sandbox' do
30
- @options = {:environment => :sandbox}
31
- subject.client.site.should eq('https://sandbox.smchcn.net/')
32
- end
33
-
34
- it 'has correct site for production' do
35
- @options = {:environment => :production}
36
- subject.client.site.should eq('https://api.smchcn.net/')
37
- end
38
-
39
29
  it 'has correct authorize_url' do
40
30
  @options = {:environment => :production}
41
- subject.client.options[:authorize_url].should eq('/asrv/smi/oauth/authorize')
31
+ subject.client.options[:authorize_url].should eq('https://accounts.samaritanministries.org/auth')
42
32
  end
43
33
 
44
34
  it 'has correct token_url' do
45
35
  @options = {:environment => :production}
46
- subject.client.options[:token_url].should eq('/asrv/smi/oauth/token')
36
+ subject.client.options[:token_url].should eq('https://accounts.samaritanministries.org/auth/smi/oauth/token')
47
37
  end
48
38
 
49
39
  describe "overrides" do
@@ -92,7 +82,7 @@ describe OmniAuth::Strategies::Samaritan do
92
82
  OAuth2::Client.new('abc', 'def') do |builder|
93
83
  builder.request :url_encoded
94
84
  builder.adapter :test do |stub|
95
- stub.get('/SmiIdentity/api/identity/mine') {|env| [200, {'content-type' => 'application/json'}, '{"id": "12345"}']}
85
+ stub.get('/smi/api/identity/mine') {|env| [200, {'content-type' => 'application/json'}, '{"id": "12345"}']}
96
86
  end
97
87
  end
98
88
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-samaritan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Doug Bradbury
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-22 00:00:00.000000000 Z
12
+ date: 2014-07-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: omniauth