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 +4 -4
- data/lib/wealthforge-ruby.rb +2 -0
- data/lib/wealthforge/configuration.rb +10 -6
- data/lib/wealthforge/connection.rb +4 -4
- data/lib/wealthforge/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: afc102e953da2cca4fe96e62d2af7d181f885595
|
|
4
|
+
data.tar.gz: 33bd2b75d9e2ae8629912c9e76e7c8ac4ea731ed
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d331338bad4fed189730efb90039afb71c4c5e1608ccf98438b022ae1e39c11f934b594443553c600c7212a66377318779472b548e76497cb7f9e4625c44ce0a
|
|
7
|
+
data.tar.gz: cc869ec3983322675c70b598fba9d65900474ff67894521b89398dd71467a4d716b95ff9f265218c7f89fd79e98d32649cb6c5e164da49d40d35b2aeddcc12a1
|
data/lib/wealthforge-ruby.rb
CHANGED
|
@@ -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
|
|
14
|
-
@client_secret
|
|
15
|
-
@
|
|
16
|
-
@
|
|
17
|
-
@
|
|
18
|
-
@
|
|
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
|
|
77
|
+
@wf_client_id = WealthForge.configuration.client_id
|
|
78
78
|
@wf_client_secret = WealthForge.configuration.client_secret
|
|
79
|
-
@api_url
|
|
80
|
-
@token_url
|
|
81
|
-
@wf_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
|
data/lib/wealthforge/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2018-08-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|