adsk_auth_service 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/adsk_auth_service.gemspec +1 -1
- data/lib/services/auth_service.rb +13 -1
- data/lib/services/sdk_logger.rb +9 -3
- 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: 9a5ce71ed42e6704a80403654d3b6f9748d9488c
|
4
|
+
data.tar.gz: db1fbd30c00594ad1d285ca84f16e8744b61806f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 173745f99944fd833e002e527100e39c545ec5d3110f9d28c9ca6039408f320c1143ef0e83f630d11092f9eac5d846cf452f75fa70e64dc127f8e6d9571879cd
|
7
|
+
data.tar.gz: c4bde4a2737f69f8fcb08dca49806ae5c0cf041828d6016153d1b8f86b9ee6b26bf65b33f3ddfb6d29a1fdbae90743a21062b8b080a35136c294700e30797653
|
data/adsk_auth_service.gemspec
CHANGED
@@ -5,7 +5,19 @@ require_relative '../utils/net_util'
|
|
5
5
|
class AuthService
|
6
6
|
class << self
|
7
7
|
def load_config
|
8
|
-
|
8
|
+
env = ENV['RACK_ENV'] || 'local'
|
9
|
+
base_path = File.expand_path('.')
|
10
|
+
|
11
|
+
config_file = nil
|
12
|
+
['conf', 'config'].each do |sub_path|
|
13
|
+
if File.exist?("#{base_path}/#{sub_path}/auth_keys.yml")
|
14
|
+
config_file = "#{base_path}/#{sub_path}/auth_keys.yml"
|
15
|
+
break
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
raise("You must have the file auth_keys.yml in either 'conf' or 'config' directory of your application") unless config_file
|
20
|
+
@@config ||= YAML.load_file(config_file)[env]
|
9
21
|
end
|
10
22
|
|
11
23
|
def oauth_token
|
data/lib/services/sdk_logger.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adsk_auth_service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Linh Chau
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A gem for Autodesk 2-phase authentication service.
|
14
14
|
email: chauhonglinh@gmail.com
|