wealthforge-ruby 2.2.0 → 2.2.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: c5816c4918518a60d056748d8feeb291250bbc74
4
- data.tar.gz: ff78302cca2b0a22ca233f471436461d7eb73643
3
+ metadata.gz: afc102e953da2cca4fe96e62d2af7d181f885595
4
+ data.tar.gz: 33bd2b75d9e2ae8629912c9e76e7c8ac4ea731ed
5
5
  SHA512:
6
- metadata.gz: e93a3fe38af61ecffa2d7a48ae954916aba6b7266c7f792f16cac47a2cdbdb8169feffe890ba6a3937d639023b056b58841b9debc2a8f86e259c4d9543dce872
7
- data.tar.gz: b195700b48a434e21a8d968c788f7c072527bbb7cbcd92d1242163e8ea452ead9b54fa5f2ebb638bd4189788d86ad4d97edd9a9a62c83c587493678572234fee
6
+ metadata.gz: d331338bad4fed189730efb90039afb71c4c5e1608ccf98438b022ae1e39c11f934b594443553c600c7212a66377318779472b548e76497cb7f9e4625c44ce0a
7
+ data.tar.gz: cc869ec3983322675c70b598fba9d65900474ff67894521b89398dd71467a4d716b95ff9f265218c7f89fd79e98d32649cb6c5e164da49d40d35b2aeddcc12a1
@@ -21,6 +21,8 @@ module WealthForge
21
21
 
22
22
  def self.configure
23
23
  yield(configuration)
24
+ configuration.api_url = configuration.environment == 'production' ? configuration.production_url : configuration.sandbox_url
25
+ configuration.token_url = "#{configuration.api_url}/auth/tokens"
24
26
  end
25
27
 
26
28
  end
@@ -8,14 +8,18 @@ module WealthForge
8
8
  attr_accessor :api_url
9
9
  attr_accessor :token_url
10
10
  attr_accessor :version
11
+ attr_accessor :production_url
12
+ attr_accessor :sandbox_url
11
13
 
12
14
  def initialize
13
- @client_id = nil
14
- @client_secret = nil
15
- @api_url = 'https://api.wealthforge.org/v1/'
16
- @token_url = 'https://api.wealthforge.org/v1/auth/tokens'
17
- @environment = 'development'
18
- @version = 'v2'
15
+ @client_id = nil
16
+ @client_secret = nil
17
+ @environment = nil
18
+ @api_url = nil
19
+ @token_url = nil
20
+ @production_url = 'https://api.wealthforge.com/v1'
21
+ @staging_url = 'https://api.wealthforge.org/v1'
22
+ @version = 'v1'
19
23
  end
20
24
 
21
25
  end
@@ -74,11 +74,11 @@ class WealthForge::Connection
74
74
 
75
75
  def self.set_token
76
76
  if @wf_token == nil
77
- @wf_client_id = WealthForge.configuration.client_id
77
+ @wf_client_id = WealthForge.configuration.client_id
78
78
  @wf_client_secret = WealthForge.configuration.client_secret
79
- @api_url = WealthForge.configuration.api_url
80
- @token_url = WealthForge.configuration.token_url
81
- @wf_token = retrieve_token
79
+ @api_url = WealthForge.configuration.api_url
80
+ @token_url = WealthForge.configuration.token_url
81
+ @wf_token = retrieve_token
82
82
  end
83
83
 
84
84
  # test to see if token has expired
@@ -1,3 +1,3 @@
1
1
  module WealthForge
2
- VERSION = '2.2.0'
2
+ VERSION = '2.2.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wealthforge-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dino Simone | dinosimone.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-13 00:00:00.000000000 Z
11
+ date: 2018-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday