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 +4 -4
- data/.rubocop.yml +6 -4
- data/CHANGELOG.md +17 -3
- data/Rakefile +1 -1
- data/lib/omniauth-calendly/version.rb +1 -1
- data/lib/omniauth/strategies/calendly.rb +10 -11
- data/omniauth-calendly.gemspec +2 -1
- metadata +21 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4dfdfdb426733c302eda5e39ff4c146ca66e4cb75735ac3c2293e9b003f95fdf
|
4
|
+
data.tar.gz: 9e6113425525e11ba962be121cdc6bc5674a7a0eafb09da7158261fe24841176
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
27
|
-
Enabled: false
|
26
|
+
Max: 120
|
28
27
|
|
29
28
|
Metrics/MethodLength:
|
30
29
|
CountComments: false
|
31
|
-
Max:
|
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:
|
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
|
-
#
|
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
|
-
|
20
|
+
## 0.1.0
|
7
21
|
|
8
22
|
- #1 extract uid from user api response.
|
9
23
|
- #2 make coverage 100%.
|
10
24
|
|
11
|
-
|
25
|
+
## 0.0.1.alpha
|
12
26
|
|
13
27
|
- Initial release
|
data/Rakefile
CHANGED
@@ -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, :
|
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 { {:
|
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
|
-
|
31
|
-
|
32
|
-
|
33
|
-
return unless
|
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
|
data/omniauth-calendly.gemspec
CHANGED
@@ -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
|
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
|
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:
|
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.
|
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.
|
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
|
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:
|