omniauth-cronofy 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b00e9495c03cd165c67b9b1bf5f68a8e2cca653e
4
- data.tar.gz: 2bb40105e0c7628c1d373dbf0f854f5db6b22bce
3
+ metadata.gz: 3106a33cc7553b2805b62242104a5cfc40264b9e
4
+ data.tar.gz: a8341ec2afd4f42d0cb71b258a920dddd72a8d2f
5
5
  SHA512:
6
- metadata.gz: 2e8634404a0b5d257d625bb0ac31259c22712405eda88ac027a3a3caeee8aca73aa7a0fc88e0779bb0d94bcd020c21f170e6adb8775486a71b093c7f2107e34c
7
- data.tar.gz: f21db7f94018b8b63c02573eb665a81dc84d54d7b19b0614202b4b5757380a4d47728882e92191da55862e8f9ce94fb165e2919039330aff360b2c7097a35d29
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
- APP_HOST = "https://app.cronofy.com"
9
- API_HOST = "https://api.cronofy.com"
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 => APP_HOST
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("#{API_HOST}/v1/account").parsed['account']
43
+ @raw_info ||= access_token.get("#{::OmniAuth::Strategies::Cronofy.api_url}/v1/account").parsed['account']
31
44
  end
32
45
  end
33
46
  end
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Cronofy
3
- VERSION = '0.1.0'
3
+ VERSION = '0.1.1'
4
4
  end
5
5
  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.0
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-20 00:00:00.000000000 Z
11
+ date: 2015-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth