omniauth-orcid 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- OTUxMmYyMzNkMWQ5MDY2NWY4MzlkZWY3Yjk2ZDljNDA3ZmU5YTQzZA==
5
- data.tar.gz: !binary |-
6
- ODFjZjAxOTA3MjFlMWY5ZDVkOGE2Y2MxMmNhOGI2NDg3YzZmN2VkMg==
2
+ SHA1:
3
+ metadata.gz: 89a7bba826b507b5fd68ed5062727df72aeee266
4
+ data.tar.gz: bff85eb2afdb39874dc9e2490b9c92b61d7c6194
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- MDE4YWFmMWVjODJiNTUwMDYzZGJjNDRjZDY5MmQ0NDU3OGZmM2ExYjYxMWEx
10
- MTU5MjA1ZWQ5MmZhZTViZjQyYTE0NGU4MzAyYjUyODAxYTI1NzhlNGRiZjZk
11
- OTYzNGYwNzAxNDczYzYwYzhhYzM1MWUxZWYxYTcyMTVlOWFhYTg=
12
- data.tar.gz: !binary |-
13
- MWFhYjZhNTQxNDNhMDcwYTE1OWQ4Zjc5OWJjZGZmZjdkZDdmNDkyNTE3YTNm
14
- MjEzMjMxZDlhYjM5NWMzZDU1NGFhZDY4NWRkZDQxZTRmOWJhYzllZDA5ZjUw
15
- NWQ0MWNmYzg0YTY3MjMyMzRkYmM2ZjlhNDNkNThkNzIxOGIzMTI=
6
+ metadata.gz: 267e7355f5af7477bc86a23e2a8dbb200f3e687abc586598eb5fd69ec02690d041e99d5f3dd15c928b9c29c3152e683699d483cb215353b09b7a1e0389aaf597
7
+ data.tar.gz: 24153c67918ada3b3aec994db21a24037d4eb5772e76ca0026ad84acf81a8ec975dadc77e044e8bc5f156c7d884d84f68e33f3a1f6d48d85744fb95557cc83d6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## v.1.2.2 (November 6, 2016)
2
+
3
+ [onmiauth-orcid 1.2.2](https://github.com/datacite/omniauth-orcid/releases/tag/v.1.2.2) was released on November, 2016 with the following changes:
4
+
5
+ * changed default member scopes to `/read-limited /activities/update /person/update`
6
+ * upgrade to new `codeclimate-test-reporter` workflow
7
+
8
+ ## v.1.2.1 (September 4, 2016)
9
+
10
+ [onmiauth-orcid 1.2.1](https://github.com/datacite/omniauth-orcid/releases/tag/v.1.2.1) was released on September 3, 2016 with the following changes:
11
+
12
+ * fixed missing scope. Scope can be manually set via `param[:scope]`.
13
+ * polished rspec tests
14
+
1
15
  ## v.1.1.5 (August 11, 2016)
2
16
 
3
17
  [onmiauth-orcid 1.1.5](https://github.com/datacite/omniauth-orcid/releases/tag/v.1.1.5) was released on August 11, 2016 with the following changes:
data/README.md CHANGED
@@ -33,7 +33,6 @@ You can also install the gem system-wide in the usual way:
33
33
  gem install omniauth-orcid
34
34
  ```
35
35
 
36
-
37
36
  ## Getting started
38
37
 
39
38
  Like other OmniAuth strategies, `OmniAuth::Strategies::ORCID` is a piece of Rack middleware. Please read the OmniAuth documentation for detailed instructions: https://github.com/intridea/omniauth.
@@ -60,6 +59,13 @@ use OmniAuth::Builder do
60
59
  end
61
60
  ```
62
61
 
62
+ `omniauth-orcid` sets the appropriate default scope depending on the `member` falg:
63
+
64
+ * non-member: `/authenticate`
65
+ * member: `/read-limited /activities/update /orcid-bio/update`
66
+
67
+ You can override the scope via the `scope` query param.
68
+
63
69
  OmniAuth takes care of the OAuth external-authentication handshake or "dance". All that the gem does is grab the identifier and tokens at the end of the dance and stick it into the OmniAuth hash which is subsequently accessible to your app via `request.env['omniauth.auth']` (see [AuthHashSchema](https://github.com/intridea/omniauth/wiki/Auth-Hash-Schema)). The hash looks something like this:
64
70
 
65
71
  ```json
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Orcid
3
- VERSION = "1.2.1"
3
+ VERSION = "1.2.2"
4
4
  end
5
5
  end
@@ -96,7 +96,7 @@ module OmniAuth
96
96
 
97
97
  def scope
98
98
  if options[:member]
99
- '/read-limited /activities/update /orcid-bio/update'
99
+ '/read-limited /activities/update /person/update'
100
100
  else
101
101
  '/authenticate'
102
102
  end
@@ -24,5 +24,6 @@ Gem::Specification.new do |s|
24
24
  s.add_development_dependency 'rspec', '~> 3.4'
25
25
  s.add_development_dependency 'rack-test', '~> 0.6.3'
26
26
  s.add_development_dependency 'webmock', '~> 1.22', '>= 1.22.3'
27
- s.add_development_dependency 'codeclimate-test-reporter'
27
+ s.add_development_dependency 'codeclimate-test-reporter', "~> 1.0.0"
28
+ s.add_development_dependency 'simplecov'
28
29
  end
@@ -87,7 +87,7 @@ describe OmniAuth::Strategies::ORCID do
87
87
  end
88
88
 
89
89
  it 'should have correct scope' do
90
- expect(subject.authorize_params['scope']).to eq('/read-limited /activities/update /orcid-bio/update')
90
+ expect(subject.authorize_params['scope']).to eq('/read-limited /activities/update /person/update')
91
91
  end
92
92
 
93
93
  it 'should have correct token url' do
@@ -105,7 +105,7 @@ describe OmniAuth::Strategies::ORCID do
105
105
  end
106
106
 
107
107
  it 'should have correct scope' do
108
- expect(subject.authorize_params['scope']).to eq('/read-limited /activities/update /orcid-bio/update')
108
+ expect(subject.authorize_params['scope']).to eq('/read-limited /activities/update /person/update')
109
109
  end
110
110
 
111
111
  it 'should have correct token url' do
data/spec/spec_helper.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  require 'bundler/setup'
2
2
  Bundler.setup
3
3
 
4
- require "codeclimate-test-reporter"
5
- CodeClimate::TestReporter.start
4
+ require 'simplecov'
5
+ SimpleCov.start
6
6
 
7
7
  require 'omniauth-orcid'
8
8
  require 'rspec'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-orcid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gudmundur A. Thorisson
@@ -9,96 +9,110 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-09-04 00:00:00.000000000 Z
12
+ date: 2016-11-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: omniauth-oauth2
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
20
  version: '1.3'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ~>
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: '1.3'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: bundler
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ~>
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
34
  version: '1.0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ~>
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: '1.0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rspec
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ~>
46
+ - - "~>"
47
47
  - !ruby/object:Gem::Version
48
48
  version: '3.4'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ~>
53
+ - - "~>"
54
54
  - !ruby/object:Gem::Version
55
55
  version: '3.4'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rack-test
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ~>
60
+ - - "~>"
61
61
  - !ruby/object:Gem::Version
62
62
  version: 0.6.3
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ~>
67
+ - - "~>"
68
68
  - !ruby/object:Gem::Version
69
69
  version: 0.6.3
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: webmock
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ~>
74
+ - - "~>"
75
75
  - !ruby/object:Gem::Version
76
76
  version: '1.22'
77
- - - ! '>='
77
+ - - ">="
78
78
  - !ruby/object:Gem::Version
79
79
  version: 1.22.3
80
80
  type: :development
81
81
  prerelease: false
82
82
  version_requirements: !ruby/object:Gem::Requirement
83
83
  requirements:
84
- - - ~>
84
+ - - "~>"
85
85
  - !ruby/object:Gem::Version
86
86
  version: '1.22'
87
- - - ! '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: 1.22.3
90
90
  - !ruby/object:Gem::Dependency
91
91
  name: codeclimate-test-reporter
92
92
  requirement: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ! '>='
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 1.0.0
97
+ type: :development
98
+ prerelease: false
99
+ version_requirements: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 1.0.0
104
+ - !ruby/object:Gem::Dependency
105
+ name: simplecov
106
+ requirement: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
95
109
  - !ruby/object:Gem::Version
96
110
  version: '0'
97
111
  type: :development
98
112
  prerelease: false
99
113
  version_requirements: !ruby/object:Gem::Requirement
100
114
  requirements:
101
- - - ! '>='
115
+ - - ">="
102
116
  - !ruby/object:Gem::Version
103
117
  version: '0'
104
118
  description: Enables third-party client apps to connect to the ORCID API and access/update
@@ -111,8 +125,8 @@ extensions: []
111
125
  extra_rdoc_files:
112
126
  - README.md
113
127
  files:
114
- - .gitignore
115
- - .travis.yml
128
+ - ".gitignore"
129
+ - ".travis.yml"
116
130
  - CHANGELOG.md
117
131
  - Gemfile
118
132
  - LICENSE.txt
@@ -136,12 +150,12 @@ require_paths:
136
150
  - lib
137
151
  required_ruby_version: !ruby/object:Gem::Requirement
138
152
  requirements:
139
- - - ! '>='
153
+ - - ">="
140
154
  - !ruby/object:Gem::Version
141
155
  version: '0'
142
156
  required_rubygems_version: !ruby/object:Gem::Requirement
143
157
  requirements:
144
- - - ! '>='
158
+ - - ">="
145
159
  - !ruby/object:Gem::Version
146
160
  version: '0'
147
161
  requirements: []