omniauth-calendly 0.2.0 → 1.0.2

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: 0224efdc8167465b506edfd5b26150c043978289b475769bd29b1134135377f9
4
- data.tar.gz: 720dd99b7cb5f60e7e335e2dbf633532766e168bce948b805268a4b8ca401589
3
+ metadata.gz: 4dfdfdb426733c302eda5e39ff4c146ca66e4cb75735ac3c2293e9b003f95fdf
4
+ data.tar.gz: 9e6113425525e11ba962be121cdc6bc5674a7a0eafb09da7158261fe24841176
5
5
  SHA512:
6
- metadata.gz: 4be26ce0f04f8ead6b42b2a3ac2d660534d46722ac71cd794e38b07d4cf0c104800b39d408f9f2d5ac50bf2d932ff7b67abdedf850afbacfc84c1e33400ca1ea
7
- data.tar.gz: b3b7a6a3a5470beff93a3f4267bf0a27c765c10f3f6f297f8887d3c040dd94c37bfd2f26c48ccb8b07bf0b9c0fecfd55e96a937aabf5568ef25ef8c3e1585c40
6
+ metadata.gz: 826ec1db7c85ca3737f1cb3b60875981c8e99023f09c9610376b337b4f46ab63f7e7c206b9c80893d83c0c7a1a194388a5a84b1157441b093029cc385cf64b72
7
+ data.tar.gz: 03517ac7909d98658cb781eb9d1aab7a340e3f4d923c527f1b807c2fbf653d41618de4b1677f84ee8050e7ec001ba7afbd46a4f04a66a2a3cef25013214aceeb
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
@@ -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
68
  EnforcedStyle: compact
69
+
70
+ Style/AsciiComments:
71
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,13 +1,27 @@
1
- # 0.2.0
1
+ # CHANGELOG
2
+
3
+ ## 1.0.0
4
+
5
+ - allowed for omniauth 2.0 series.
6
+
7
+ ## 0.3.0
8
+
9
+ - be specified dependency for omniauth 1.9.
10
+
11
+ ## 0.2.1
12
+
13
+ - fix rubocop warnings.
14
+
15
+ ## 0.2.0
2
16
 
3
17
  - refs #5 fix dependencies.
4
18
  - remove minitest-reporter.
5
19
 
6
- # 0.1.0
20
+ ## 0.1.0
7
21
 
8
22
  - #1 extract uid from user api response.
9
23
  - #2 make coverage 100%.
10
24
 
11
- # 0.0.1.alpha
25
+ ## 0.0.1.alpha
12
26
 
13
27
  - Initial release
data/Rakefile CHANGED
@@ -9,4 +9,4 @@ Rake::TestTask.new(:test) do |t|
9
9
  t.test_files = FileList['test/**/*_test.rb']
10
10
  end
11
11
 
12
- task :default => :test
12
+ task default: :test
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAuth
4
4
  module Calendly
5
- VERSION = '0.2.0'
5
+ VERSION = '1.0.2'
6
6
  end
7
7
  end
@@ -7,12 +7,12 @@ module OmniAuth
7
7
  # OmniAuth strategy for Calendly
8
8
  class Calendly < OmniAuth::Strategies::OAuth2
9
9
  option :name, 'calendly'
10
- option :client_options, :site => 'https://auth.calendly.com'
10
+ option :client_options, site: 'https://auth.calendly.com'
11
11
 
12
12
  USER_API_URL = 'https://api.calendly.com/users/'
13
13
 
14
14
  uid { extract_uid }
15
- extra { {:raw_info => raw_info} }
15
+ extra { {raw_info: raw_info} }
16
16
 
17
17
  private
18
18
 
@@ -22,23 +22,22 @@ module OmniAuth
22
22
  @raw_info = access_token.get("#{USER_API_URL}me").parsed
23
23
  end
24
24
 
25
- def callback_url
26
- full_host + script_name + callback_path
27
- end
28
-
29
25
  def extract_uid
30
- user_info = raw_info
31
- return unless user_info
32
- return unless raw_info['resource']
33
- return unless raw_info['resource']['uri']
26
+ return unless raw_info.respond_to?(:dig)
27
+
28
+ uri = raw_info.dig('resource', 'uri')
29
+ return unless uri
34
30
 
35
- uri = raw_info['resource']['uri']
36
31
  re = /\A#{USER_API_URL}(.+)\z/
37
32
  m = re.match uri
38
33
  return if m.nil?
39
34
 
40
35
  m[1]
41
36
  end
37
+
38
+ def callback_url
39
+ full_host + callback_path
40
+ end
42
41
  end
43
42
  end
44
43
  end
@@ -28,7 +28,8 @@ 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 'omniauth-oauth2', '>= 1.6.0'
31
+ spec.add_runtime_dependency 'omniauth', '~> 2.0'
32
+ spec.add_runtime_dependency 'omniauth-oauth2', '~> 1.7.1'
32
33
 
33
34
  spec.add_development_dependency 'bundler'
34
35
  spec.add_development_dependency 'codecov'
metadata CHANGED
@@ -1,29 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-calendly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 1.0.2
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-08-19 00:00:00.000000000 Z
11
+ date: 2021-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: omniauth
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: omniauth-oauth2
15
29
  requirement: !ruby/object:Gem::Requirement
16
30
  requirements:
17
- - - ">="
31
+ - - "~>"
18
32
  - !ruby/object:Gem::Version
19
- version: 1.6.0
33
+ version: 1.7.1
20
34
  type: :runtime
21
35
  prerelease: false
22
36
  version_requirements: !ruby/object:Gem::Requirement
23
37
  requirements:
24
- - - ">="
38
+ - - "~>"
25
39
  - !ruby/object:Gem::Version
26
- version: 1.6.0
40
+ version: 1.7.1
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -166,7 +180,7 @@ metadata:
166
180
  homepage_uri: https://github.com/koshilife/omniauth-calendly
167
181
  source_code_uri: https://github.com/koshilife/omniauth-calendly
168
182
  changelog_uri: https://github.com/koshilife/omniauth-calendly/blob/master/CHANGELOG.md
169
- documentation_uri: https://www.rubydoc.info/gems/omniauth-calendly/0.2.0
183
+ documentation_uri: https://www.rubydoc.info/gems/omniauth-calendly/1.0.2
170
184
  post_install_message:
171
185
  rdoc_options: []
172
186
  require_paths: