snaptrade 2.0.208 → 2.0.209
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/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/lib/snaptrade/api_client_custom.rb +1 -1
- data/lib/snaptrade/configuration.rb +2 -2
- data/lib/snaptrade/version.rb +1 -1
- data/spec/configuration_spec.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a009156ebfbccb7558cd45becce68abd7b63622314e147a8f3d9c225425a3757
|
|
4
|
+
data.tar.gz: 0cbcf215d6d402960bd396bbed3b3a89ed0cef04d949d30da7b717744810f221
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 737e2816f20b8660f392371a380bd035ae7d29f3b12d6a08860602e55079399eae07ec46b434b2080f24f35cea9b6fc644c86fe875b19e9cf8631051496a2009
|
|
7
|
+
data.tar.gz: 312ae2fb08e645ad3c082b1d5e82000eac30cac4fafcbca5a8a86b1fd688f4c84460db41182455bb6e2da34f3accf75dc12458c2734978966501d81653f056fa
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Connect brokerage accounts to your app for live positions and trading
|
|
8
8
|
|
|
9
|
-
[](https://rubygems.org/gems/snaptrade/versions/2.0.209)
|
|
10
10
|
[](https://snaptrade.com/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
@@ -94,7 +94,7 @@ Connect brokerage accounts to your app for live positions and trading
|
|
|
94
94
|
Add to Gemfile:
|
|
95
95
|
|
|
96
96
|
```ruby
|
|
97
|
-
gem 'snaptrade', '~> 2.0.
|
|
97
|
+
gem 'snaptrade', '~> 2.0.209'
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
## Getting Started<a id="getting-started"></a>
|
|
@@ -16,7 +16,7 @@ module SnapTrade
|
|
|
16
16
|
class ApiClientCustom
|
|
17
17
|
def self.request_hook(request, configuration)
|
|
18
18
|
request.params[:timestamp] = Time.now.to_i
|
|
19
|
-
path = request.path
|
|
19
|
+
path = URI.parse(request.path).path
|
|
20
20
|
query = Faraday::Utils.build_query(request.params)
|
|
21
21
|
sig_object = {
|
|
22
22
|
"content" => request.body.nil? || request.body.empty? ? nil : Hash[JSON.parse(request.body).sort],
|
|
@@ -146,7 +146,7 @@ module SnapTrade
|
|
|
146
146
|
def initialize
|
|
147
147
|
@scheme = 'https'
|
|
148
148
|
@host = 'api.snaptrade.com'
|
|
149
|
-
@base_path = '
|
|
149
|
+
@base_path = ''
|
|
150
150
|
@server_index = 0
|
|
151
151
|
@server_operation_index = {}
|
|
152
152
|
@server_variables = {}
|
|
@@ -260,7 +260,7 @@ module SnapTrade
|
|
|
260
260
|
def server_settings
|
|
261
261
|
[
|
|
262
262
|
{
|
|
263
|
-
url: "https://api.snaptrade.com
|
|
263
|
+
url: "https://api.snaptrade.com",
|
|
264
264
|
description: "SnapTrade Production API",
|
|
265
265
|
}
|
|
266
266
|
]
|
data/lib/snaptrade/version.rb
CHANGED
data/spec/configuration_spec.rb
CHANGED
|
@@ -15,7 +15,7 @@ describe SnapTrade::Configuration do
|
|
|
15
15
|
before(:each) do
|
|
16
16
|
# uncomment below to setup host and base_path
|
|
17
17
|
# require 'URI'
|
|
18
|
-
# uri = URI.parse("https://api.snaptrade.com
|
|
18
|
+
# uri = URI.parse("https://api.snaptrade.com")
|
|
19
19
|
# SnapTrade.configure do |c|
|
|
20
20
|
# c.host = uri.host
|
|
21
21
|
# c.base_path = uri.path
|
|
@@ -25,14 +25,14 @@ describe SnapTrade::Configuration do
|
|
|
25
25
|
describe '#base_url' do
|
|
26
26
|
it 'should have the default value' do
|
|
27
27
|
# uncomment below to test default value of the base path
|
|
28
|
-
# expect(config.base_url).to eq("https://api.snaptrade.com
|
|
28
|
+
# expect(config.base_url).to eq("https://api.snaptrade.com")
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
it 'should remove trailing slashes' do
|
|
32
32
|
[nil, '', '/', '//'].each do |base_path|
|
|
33
33
|
config.base_path = base_path
|
|
34
34
|
# uncomment below to test trailing slashes
|
|
35
|
-
# expect(config.base_url).to eq("https://api.snaptrade.com
|
|
35
|
+
# expect(config.base_url).to eq("https://api.snaptrade.com")
|
|
36
36
|
end
|
|
37
37
|
end
|
|
38
38
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: snaptrade
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.209
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- SnapTrade
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-06-
|
|
11
|
+
date: 2026-06-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|