adsk_auth_service 1.0.3 → 1.0.4

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
  SHA1:
3
- metadata.gz: effa32363f0d027b695405fda938cbac5a936b28
4
- data.tar.gz: 9afc6fed8ae49018b44f634113c6eea804004123
3
+ metadata.gz: 1a55ab83859f06356d1b19a5e2ac19b3aede8746
4
+ data.tar.gz: 923e0a23ad353028b393b633174676acfc121be2
5
5
  SHA512:
6
- metadata.gz: a17e07610a6c05a390a30ba284c30d853e24c573e5afc90d648d1ebe3dbdcc8384ab45403cbfb355b8330e6a4d875b9559001b4024703fb3cd3d55d71dc7dd71
7
- data.tar.gz: 2c5e30235326810a8b436c498f4eb72cbf8c1a0d83ab7c7f80281a5dff75f92c2f7f3bc8a76b6710b6519871f6a88d12da3410a7e11a378a1f71d2f652b35c4a
6
+ metadata.gz: c8d2a579842c7b4b40ed03466535c543ab6d09cc2a7236b75d8f2beb2e18dca4d4ba982e4404a0d29d3ccdc883b1841c3fc086cc246a15cb453d168080fb7382
7
+ data.tar.gz: f0996543cf958428bde18989e72fd395d301025b6e00bfc6d5e8d9091b6c1476ff0eeec6b03c61422fbefebf79f1f80cdb2a441f84882f0abdcb855fce378ed1
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'adsk_auth_service'
3
- s.version = '1.0.3'
3
+ s.version = '1.0.4'
4
4
  s.summary = "Autodesk second phase token retrieval"
5
5
  s.description = "A gem for Autodesk 2-phase authentication service."
6
6
  s.authors = ['Linh Chau']
@@ -5,19 +5,7 @@ require_relative '../utils/net_util'
5
5
  class AuthService
6
6
  class << self
7
7
  def load_config
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]
8
+ @@config ||= ConfigService.load_config('auth_keys.yml')[ConfigService.environment]
21
9
  end
22
10
 
23
11
  def oauth_token
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adsk_auth_service
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Linh Chau