omniauth-drchrono-oauth2 1.1.0 → 1.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9fdd321753e9533b5ec756071a13d5e1dc012df9
4
- data.tar.gz: de14303245e9a995e39f137fb5bdfc739165c6a3
3
+ metadata.gz: 3b62c977ba1571c2f878f0d50c56fcb59e727e70
4
+ data.tar.gz: d66b8d32a744334828269b7a334be822b95785a3
5
5
  SHA512:
6
- metadata.gz: 90d3a63373861fed4ea5ac560b1dcf935f46b82c56582a9250ef42c4f929211e31a9ef5d0f01c3f664bd4750159cb929c96bf9683abada5036fd7ab6a7bf61d5
7
- data.tar.gz: d8e639045de1aac0abb8ab5b56e8673d3f0b84e083ba8523d7b294e7c16c7847a5b74881fd6f374184ada590225859119dbdc862f609c9d980362a7d13c5e584
6
+ metadata.gz: 4096d42c7fc3e0e66cb8726d2dadf1036e2b1bbac119d1a60df53f9083875cbb73306063de10418ee30ad8644b10545f44782be9728aced9de3a3363c5d69166
7
+ data.tar.gz: c9acc00d9934b4a9362eada0d8c66d8aa32b9ce211ff109500a54ce6c50397e6bcc52fed6c591a4fa62aeb0835e1fcc47bc847431cc0bf470067da04147a4c61
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # OmniAuth DrChrono OAuth2 Strategy
2
2
 
3
3
  [![Build Status](https://travis-ci.org/bartimaeus/omniauth-drchrono-oauth2.svg?branch=master)](https://travis-ci.org/bartimaeus/omniauth-drchrono-oauth2)
4
+ [![Gem Version](https://badge.fury.io/rb/omniauth-drchrono-oauth2.svg)](https://badge.fury.io/rb/omniauth-drchrono-oauth2)
4
5
 
5
6
  A DrChrono OAuth2 strategy for OmniAuth.
6
7
 
@@ -30,7 +31,7 @@ This is an example that you might put into a Rails initializer at `config/initia
30
31
 
31
32
  ```ruby
32
33
  Rails.application.config.middleware.use OmniAuth::Builder do
33
- provider :drchrono, ENV['DRCHRONO_CLIENT_ID'], ENV['DRCHRONO_CLIENT_SECRET'], :scope => 'user:read patients:read patients:summary:read'
34
+ provider :drchrono, ENV['DRCHRONO_CLIENT_ID'], ENV['DRCHRONO_CLIENT_SECRET'], :scope => 'patients:read settings:read user:read'
34
35
  end
35
36
  ```
36
37
 
@@ -44,7 +45,7 @@ For more details, read the DrChrono documentation: https://www.drchrono.com/api/
44
45
  You can configure the scope option:
45
46
 
46
47
  ```ruby
47
- provider :drchrono, ENV['DRCHRONO_CLIENT_ID'], ENV['DRCHRONO_CLIENT_SECRET'], :scope => 'user:read'
48
+ provider :drchrono, ENV['DRCHRONO_CLIENT_ID'], ENV['DRCHRONO_CLIENT_SECRET'], :scope => 'settings:read user:read'
48
49
  ```
49
50
 
50
51
  ## Contributing
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module DrChronoOauth2
3
- VERSION = '1.1.0'
3
+ VERSION = '1.2.0'
4
4
  end
5
5
  end
@@ -11,7 +11,7 @@ module OmniAuth
11
11
  :token_url => 'https://drchrono.com/o/token/'
12
12
  }
13
13
 
14
- option :scope, 'user:read'
14
+ option :scope, 'settings:read user:read'
15
15
 
16
16
  uid do
17
17
  raw_info['id']
@@ -59,15 +59,15 @@ module OmniAuth
59
59
  private
60
60
 
61
61
  def profile_endpoint
62
- '/users/current'
62
+ 'users/current'
63
63
  end
64
64
 
65
65
  def doctors_endpoint
66
- "/doctors/#{raw_info['doctor']}"
66
+ "doctors/#{raw_info['doctor']}"
67
67
  end
68
68
 
69
69
  def offices_endpoint
70
- '/offices'
70
+ 'offices'
71
71
  end
72
72
  end
73
73
  end
@@ -43,9 +43,9 @@ describe OmniAuth::Strategies::DrChrono do
43
43
 
44
44
  let(:parsed_response) { Hash['doctor' => 14234, 'id' => 43456, 'is_doctor' => true, 'is_staff' => false, 'practice_group' => 8765544, 'username' => 'drchrono'] }
45
45
 
46
- let(:doctors_endpoint) { "/doctors/14234" }
47
- let(:offices_endpoint) { '/offices' }
48
- let(:profile_endpoint) { '/users/current' }
46
+ let(:doctors_endpoint) { "doctors/14234" }
47
+ let(:offices_endpoint) { 'offices' }
48
+ let(:profile_endpoint) { 'users/current' }
49
49
 
50
50
  let(:doctors_response) { instance_double OAuth2::Response, parsed: parsed_response }
51
51
  let(:offices_response) { instance_double OAuth2::Response, parsed: parsed_response }
@@ -115,7 +115,7 @@ describe OmniAuth::Strategies::DrChrono do
115
115
  end
116
116
 
117
117
  it 'sets default scope' do
118
- expect(subject.authorize_params['scope']).to eq('user:read')
118
+ expect(subject.authorize_params['scope']).to eq('settings:read user:read')
119
119
  end
120
120
  end
121
121
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-drchrono-oauth2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Shelley