omniauth-cronofy 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/omniauth/strategies/cronofy.rb +17 -4
- data/lib/omniauth-cronofy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3106a33cc7553b2805b62242104a5cfc40264b9e
|
4
|
+
data.tar.gz: a8341ec2afd4f42d0cb71b258a920dddd72a8d2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11ceef177c7f7447d1c26c94b6630839b932400ebbf412fa6c0db9d65a1926f379ae36a911029cfc2004601a4057d395da12a56bcb9134a96df80b6ce1bcc4f1
|
7
|
+
data.tar.gz: f1b661653378a6bf548193d88267fce95a3767be12d699c0fe773b1986e6e22c3ce482c3523dbb681dc95b42b8c33c1458080444b8e62d5bfecab51a03649bde
|
@@ -5,11 +5,24 @@ module OmniAuth
|
|
5
5
|
class Cronofy < OmniAuth::Strategies::OAuth2
|
6
6
|
option :name, "cronofy"
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
def self.api_url
|
9
|
+
@api_url ||= (ENV['CRONOFY_API_URL'] || "https://api.cronofy.com")
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.api_url=(value)
|
13
|
+
@api_url = value
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.app_url
|
17
|
+
@app_url ||= (ENV['CRONOFY_APP_URL'] || "https://app.cronofy.com")
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.app_url=(value)
|
21
|
+
@app_url = value
|
22
|
+
end
|
10
23
|
|
11
24
|
option :client_options, {
|
12
|
-
:site =>
|
25
|
+
:site => ::OmniAuth::Strategies::Cronofy.app_url
|
13
26
|
}
|
14
27
|
|
15
28
|
uid{ raw_info['account_id'] }
|
@@ -27,7 +40,7 @@ module OmniAuth
|
|
27
40
|
end
|
28
41
|
|
29
42
|
def raw_info
|
30
|
-
@raw_info ||= access_token.get("#{
|
43
|
+
@raw_info ||= access_token.get("#{::OmniAuth::Strategies::Cronofy.api_url}/v1/account").parsed['account']
|
31
44
|
end
|
32
45
|
end
|
33
46
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-cronofy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Bird
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|