omniauth-zoom 0.1.1 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a1f3099d19df722ab4f801ddda9e44eaff4d4d96c8497cd810633004ef92effa
4
- data.tar.gz: 0a019d86402f77b45752e1ef700d9dd6a99ac1dedd10a2bd9db047fc2d7b547d
3
+ metadata.gz: 0d246403d1f6fa5b2f75b5795caf6c83cf1a0561b9a6b2d80c43e282eea43a8f
4
+ data.tar.gz: f2c62caf65239376375485788145294c047c54c0ac1505b8090ce6293840b668
5
5
  SHA512:
6
- metadata.gz: f4bca33dbe6596ce2d61984173b871088fdd7bcbc77d866c23c982cd1b874836208a5ce24f8ec54a7a7eee97e815060b66dab6aed3b6548c985bdfb2b7f57998
7
- data.tar.gz: a74b0c8f8be96b354be15d4750646a8cd6cab70b6fef9600325e359eda11858133a90a54d7b818bf193cb653ec58cdc82b3efa542161a17edc4dba50115d3359
6
+ metadata.gz: 4edcc421f602e976b2050e980b094f1b81a856550ed69d17b47a12303dfa6192a19f4f74ea78d043d39be3348c3eb832c14c612797d65ad8562e784710137287
7
+ data.tar.gz: 2b4f7eb1c700336785a906f54c5f974d1da0d0dd178c643a56caa0f8d8611e9c2d74e5c8ecebd62bdbf2b548f33e5419af1218b8d0f04912a6724d530d56db5d
@@ -32,5 +32,6 @@ jobs:
32
32
  printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
33
33
  gem build *.gemspec
34
34
  gem push *.gem
35
+ continue-on-error: true
35
36
  env:
36
37
  GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
data/.rubocop.yml CHANGED
@@ -23,12 +23,11 @@ Metrics/BlockNesting:
23
23
  Max: 2
24
24
 
25
25
  Layout/LineLength:
26
- AllowURI: true
27
- Enabled: false
26
+ Max: 120
28
27
 
29
28
  Metrics/MethodLength:
30
29
  CountComments: false
31
- Max: 15
30
+ Max: 20
32
31
 
33
32
  Metrics/ParameterLists:
34
33
  Max: 4
@@ -39,10 +38,10 @@ Metrics/AbcSize:
39
38
 
40
39
  Style/CollectionMethods:
41
40
  PreferredMethods:
42
- map: 'collect'
43
- reduce: 'inject'
44
- find: 'detect'
45
- find_all: 'select'
41
+ map: "collect"
42
+ reduce: "inject"
43
+ find: "detect"
44
+ find_all: "select"
46
45
 
47
46
  Style/Documentation:
48
47
  Enabled: false
@@ -60,10 +59,13 @@ Style/ExpandPathArguments:
60
59
  Enabled: false
61
60
 
62
61
  Style/HashSyntax:
63
- EnforcedStyle: hash_rockets
62
+ EnforcedStyle: ruby19
64
63
 
65
64
  Style/Lambda:
66
65
  Enabled: false
67
66
 
68
67
  Style/RaiseArgs:
69
- EnforcedStyle: compact
68
+ EnforcedStyle: compact
69
+
70
+ Style/AsciiComments:
71
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,7 +1,26 @@
1
- # 0.1.1
1
+ # CHANGELOG
2
+
3
+ ## 0.3.0
4
+
5
+ - be specified dependency for omniauth 1.9.
6
+
7
+ ## 0.2.1
8
+
9
+ - fix rubocop warnings.
10
+
11
+ ## 0.2.0
12
+
13
+ - refs #11 fix library dependencies.
14
+ - remove minitest-reporter.
15
+
16
+ ## 0.1.2
17
+
18
+ - make the error handling when missing scope for reading user info better.
19
+
20
+ ## 0.1.1
2
21
 
3
22
  - refs #4 Add tests and make code coverage 100%.
4
23
 
5
- # 0.1.0
24
+ ## 0.1.0
6
25
 
7
26
  - Initial release
data/Rakefile CHANGED
@@ -1,10 +1,12 @@
1
- require "bundler/gem_tasks"
2
- require "rake/testtask"
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rake/testtask'
3
5
 
4
6
  Rake::TestTask.new(:test) do |t|
5
- t.libs << "test"
6
- t.libs << "lib"
7
- t.test_files = FileList["test/**/*_test.rb"]
7
+ t.libs << 'test'
8
+ t.libs << 'lib'
9
+ t.test_files = FileList['test/**/*_test.rb']
8
10
  end
9
11
 
10
- task :default => :test
12
+ task default: :test
data/bin/console CHANGED
@@ -1,14 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
- require "bundler/setup"
4
- require "omniauth-zoom"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
4
+ require 'bundler/setup'
5
+ require 'omniauth-zoom'
6
+ require 'irb'
14
7
  IRB.start(__FILE__)
data/bin/setup CHANGED
@@ -4,5 +4,3 @@ IFS=$'\n\t'
4
4
  set -vx
5
5
 
6
6
  bundle install
7
-
8
- # Do any other automated setup that you need to do here
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAuth
4
4
  module Zoom
5
- VERSION = '0.1.1'
5
+ VERSION = '0.3.1'
6
6
  end
7
7
  end
@@ -9,22 +9,22 @@ module OmniAuth
9
9
  # OmniAuth strategy for zoom.us
10
10
  class Zoom < OmniAuth::Strategies::OAuth2
11
11
  option :name, 'zoom'
12
- option :client_options, :site => 'https://zoom.us'
12
+ option :client_options, site: 'https://zoom.us'
13
13
 
14
14
  uid { raw_info['id'] }
15
- extra { {:raw_info => raw_info} }
15
+ extra { {raw_info: raw_info} }
16
16
 
17
17
  protected
18
18
 
19
19
  def build_access_token
20
20
  params = {
21
- :grant_type => 'authorization_code',
22
- :code => request.params['code'],
23
- :redirect_uri => callback_url
21
+ grant_type: 'authorization_code',
22
+ code: request.params['code'],
23
+ redirect_uri: callback_url
24
24
  }
25
25
  path = "#{client.options[:token_url]}?#{URI.encode_www_form(params)}"
26
26
  headers_secret = Base64.strict_encode64("#{client.id}:#{client.secret}")
27
- opts = {:headers => {:Authorization => "Basic #{headers_secret}"}}
27
+ opts = {headers: {Authorization: "Basic #{headers_secret}"}}
28
28
 
29
29
  res = client.request(:post, path, opts)
30
30
  ::OAuth2::AccessToken.from_hash(client, res.parsed)
@@ -36,7 +36,10 @@ module OmniAuth
36
36
  return @raw_info if defined?(@raw_info)
37
37
 
38
38
  @raw_info = access_token.get('/v2/users/me').parsed || {}
39
- rescue StandardError => e
39
+ rescue ::OAuth2::Error => e
40
+ raise e unless e.response.status == 400
41
+
42
+ # in case of missing a scope for reading current user info
40
43
  log(:error, "#{e.class} occured. message:#{e.message}")
41
44
  @raw_info = {}
42
45
  end
@@ -28,16 +28,15 @@ Gem::Specification.new do |spec|
28
28
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
29
  spec.require_paths = ['lib']
30
30
 
31
- spec.add_runtime_dependency 'oauth2', '~> 1.4.4'
32
- spec.add_runtime_dependency 'omniauth-oauth2', '~> 1.6.0'
31
+ spec.add_runtime_dependency 'omniauth', '~> 1.9'
32
+ spec.add_runtime_dependency 'omniauth-oauth2', '>= 1.6.0'
33
33
 
34
- spec.add_development_dependency 'bundler', '~> 2.1'
35
- spec.add_development_dependency 'codecov', '~> 0.1.17'
36
- spec.add_development_dependency 'minitest', '~> 5.14.1'
37
- spec.add_development_dependency 'minitest-reporters', '~> 1.4.2'
38
- spec.add_development_dependency 'omniauth', '~> 1.9.1'
39
- spec.add_development_dependency 'rack-test', '~> 1.1.0'
40
- spec.add_development_dependency 'rake', '~> 13.0'
41
- spec.add_development_dependency 'simplecov', '~> 0.18.5'
42
- spec.add_development_dependency 'webmock', '~> 3.7.6'
34
+ spec.add_development_dependency 'bundler'
35
+ spec.add_development_dependency 'codecov'
36
+ spec.add_development_dependency 'minitest'
37
+ spec.add_development_dependency 'omniauth'
38
+ spec.add_development_dependency 'rack-test'
39
+ spec.add_development_dependency 'rake'
40
+ spec.add_development_dependency 'simplecov'
41
+ spec.add_development_dependency 'webmock'
43
42
  end
metadata CHANGED
@@ -1,169 +1,155 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-zoom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenji Koshikawa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-08 00:00:00.000000000 Z
11
+ date: 2021-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: oauth2
14
+ name: omniauth
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.4.4
19
+ version: '1.9'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.4.4
26
+ version: '1.9'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: omniauth-oauth2
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.6.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 1.6.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '2.1'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '2.1'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: codecov
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 0.1.17
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: 0.1.17
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: minitest
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 5.14.1
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 5.14.1
83
- - !ruby/object:Gem::Dependency
84
- name: minitest-reporters
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
73
+ - - ">="
88
74
  - !ruby/object:Gem::Version
89
- version: 1.4.2
75
+ version: '0'
90
76
  type: :development
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
- - - "~>"
80
+ - - ">="
95
81
  - !ruby/object:Gem::Version
96
- version: 1.4.2
82
+ version: '0'
97
83
  - !ruby/object:Gem::Dependency
98
84
  name: omniauth
99
85
  requirement: !ruby/object:Gem::Requirement
100
86
  requirements:
101
- - - "~>"
87
+ - - ">="
102
88
  - !ruby/object:Gem::Version
103
- version: 1.9.1
89
+ version: '0'
104
90
  type: :development
105
91
  prerelease: false
106
92
  version_requirements: !ruby/object:Gem::Requirement
107
93
  requirements:
108
- - - "~>"
94
+ - - ">="
109
95
  - !ruby/object:Gem::Version
110
- version: 1.9.1
96
+ version: '0'
111
97
  - !ruby/object:Gem::Dependency
112
98
  name: rack-test
113
99
  requirement: !ruby/object:Gem::Requirement
114
100
  requirements:
115
- - - "~>"
101
+ - - ">="
116
102
  - !ruby/object:Gem::Version
117
- version: 1.1.0
103
+ version: '0'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
107
  requirements:
122
- - - "~>"
108
+ - - ">="
123
109
  - !ruby/object:Gem::Version
124
- version: 1.1.0
110
+ version: '0'
125
111
  - !ruby/object:Gem::Dependency
126
112
  name: rake
127
113
  requirement: !ruby/object:Gem::Requirement
128
114
  requirements:
129
- - - "~>"
115
+ - - ">="
130
116
  - !ruby/object:Gem::Version
131
- version: '13.0'
117
+ version: '0'
132
118
  type: :development
133
119
  prerelease: false
134
120
  version_requirements: !ruby/object:Gem::Requirement
135
121
  requirements:
136
- - - "~>"
122
+ - - ">="
137
123
  - !ruby/object:Gem::Version
138
- version: '13.0'
124
+ version: '0'
139
125
  - !ruby/object:Gem::Dependency
140
126
  name: simplecov
141
127
  requirement: !ruby/object:Gem::Requirement
142
128
  requirements:
143
- - - "~>"
129
+ - - ">="
144
130
  - !ruby/object:Gem::Version
145
- version: 0.18.5
131
+ version: '0'
146
132
  type: :development
147
133
  prerelease: false
148
134
  version_requirements: !ruby/object:Gem::Requirement
149
135
  requirements:
150
- - - "~>"
136
+ - - ">="
151
137
  - !ruby/object:Gem::Version
152
- version: 0.18.5
138
+ version: '0'
153
139
  - !ruby/object:Gem::Dependency
154
140
  name: webmock
155
141
  requirement: !ruby/object:Gem::Requirement
156
142
  requirements:
157
- - - "~>"
143
+ - - ">="
158
144
  - !ruby/object:Gem::Version
159
- version: 3.7.6
145
+ version: '0'
160
146
  type: :development
161
147
  prerelease: false
162
148
  version_requirements: !ruby/object:Gem::Requirement
163
149
  requirements:
164
- - - "~>"
150
+ - - ">="
165
151
  - !ruby/object:Gem::Version
166
- version: 3.7.6
152
+ version: '0'
167
153
  description: ''
168
154
  email:
169
155
  - koshikawa2009@gmail.com
@@ -194,7 +180,7 @@ metadata:
194
180
  homepage_uri: https://github.com/koshilife/omniauth-zoom
195
181
  source_code_uri: https://github.com/koshilife/omniauth-zoom
196
182
  changelog_uri: https://github.com/koshilife/omniauth-zoom/blob/master/CHANGELOG.md
197
- documentation_uri: https://www.rubydoc.info/gems/omniauth-zoom/0.1.1
183
+ documentation_uri: https://www.rubydoc.info/gems/omniauth-zoom/0.3.1
198
184
  post_install_message:
199
185
  rdoc_options: []
200
186
  require_paths:
@@ -210,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
196
  - !ruby/object:Gem::Version
211
197
  version: '0'
212
198
  requirements: []
213
- rubygems_version: 3.0.3
199
+ rubygems_version: 3.1.4
214
200
  signing_key:
215
201
  specification_version: 4
216
202
  summary: OmniAuth strategy for zoom.us