poloniex.rb 0.0.0 → 0.1.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/Gemfile +7 -8
- data/README.md +150 -5
- data/lib/Hash/x_www_form_urlencode.rb +7 -0
- data/lib/Object/inQ.rb +18 -0
- data/lib/Poloniex/Client.rb +6 -1
- data/lib/Poloniex/V1/Client.rb +570 -87
- data/lib/Poloniex/V1.rb +12 -0
- data/lib/Poloniex/VERSION.rb +1 -1
- data/lib/Thoran/Hash/XWwwFormUrlencode/x_www_form_urlencode.rb +26 -0
- data/lib/Thoran/String/UrlEncode/url_encode.rb +26 -0
- data/lib/poloniex.rb +3 -3
- data/poloniex.rb.gemspec +1 -1
- data/test/Poloniex/Configuration_test.rb +70 -9
- data/test/Poloniex/V1/Client/test_account_endpoints.rb +69 -0
- data/test/Poloniex/V1/Client/test_margin_endpoints.rb +57 -0
- data/test/Poloniex/V1/{Client_test.rb → Client/test_public_endpoints.rb} +22 -57
- data/test/Poloniex/V1/Client/test_trading_endpoints.rb +139 -0
- data/test/Poloniex/V1/Client/test_wallet_endpoints.rb +60 -0
- data/test/Poloniex/VERSION_test.rb +16 -0
- data/test/helper.rb +8 -10
- metadata +14 -6
- data/test/Poloniex/Client_test.rb +0 -26
- data/test/poloniex_test.rb +0 -23
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: poloniex.rb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- thoran
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-
|
|
10
|
+
date: 2025-08-15 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: http.rb
|
|
@@ -31,18 +31,26 @@ extra_rdoc_files: []
|
|
|
31
31
|
files:
|
|
32
32
|
- Gemfile
|
|
33
33
|
- README.md
|
|
34
|
+
- lib/Hash/x_www_form_urlencode.rb
|
|
35
|
+
- lib/Object/inQ.rb
|
|
34
36
|
- lib/Poloniex/Client.rb
|
|
35
37
|
- lib/Poloniex/Configuration.rb
|
|
36
38
|
- lib/Poloniex/Error.rb
|
|
39
|
+
- lib/Poloniex/V1.rb
|
|
37
40
|
- lib/Poloniex/V1/Client.rb
|
|
38
41
|
- lib/Poloniex/VERSION.rb
|
|
42
|
+
- lib/Thoran/Hash/XWwwFormUrlencode/x_www_form_urlencode.rb
|
|
43
|
+
- lib/Thoran/String/UrlEncode/url_encode.rb
|
|
39
44
|
- lib/poloniex.rb
|
|
40
45
|
- poloniex.rb.gemspec
|
|
41
|
-
- test/Poloniex/Client_test.rb
|
|
42
46
|
- test/Poloniex/Configuration_test.rb
|
|
43
|
-
- test/Poloniex/V1/
|
|
47
|
+
- test/Poloniex/V1/Client/test_account_endpoints.rb
|
|
48
|
+
- test/Poloniex/V1/Client/test_margin_endpoints.rb
|
|
49
|
+
- test/Poloniex/V1/Client/test_public_endpoints.rb
|
|
50
|
+
- test/Poloniex/V1/Client/test_trading_endpoints.rb
|
|
51
|
+
- test/Poloniex/V1/Client/test_wallet_endpoints.rb
|
|
52
|
+
- test/Poloniex/VERSION_test.rb
|
|
44
53
|
- test/helper.rb
|
|
45
|
-
- test/poloniex_test.rb
|
|
46
54
|
homepage: http://github.com/thoran/poloniex.rb
|
|
47
55
|
licenses:
|
|
48
56
|
- Ruby
|
|
@@ -61,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
61
69
|
- !ruby/object:Gem::Version
|
|
62
70
|
version: '0'
|
|
63
71
|
requirements: []
|
|
64
|
-
rubygems_version: 3.
|
|
72
|
+
rubygems_version: 3.7.1
|
|
65
73
|
specification_version: 4
|
|
66
74
|
summary: Access the Poloniex API with Ruby.
|
|
67
75
|
test_files: []
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
require_relative '../helper'
|
|
2
|
-
|
|
3
|
-
describe Poloniex::Client do
|
|
4
|
-
subject do
|
|
5
|
-
Poloniex::Client.new
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
before do
|
|
9
|
-
Poloniex.configure do |config|
|
|
10
|
-
config.api_key = "test_api_key"
|
|
11
|
-
config.api_secret = "test_api_secret"
|
|
12
|
-
config.debug = false
|
|
13
|
-
end
|
|
14
|
-
WebMock.disable_net_connect!(allow_localhost: true)
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
it "inherits from Poloniex::V1::Client" do
|
|
18
|
-
_(subject).must_be_kind_of(Poloniex::V1::Client)
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
it "can make API calls" do
|
|
22
|
-
VCR.use_cassette('v1/markets') do
|
|
23
|
-
_(subject.markets).must_be_kind_of(Array)
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
end
|
data/test/poloniex_test.rb
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
require_relative './helper'
|
|
2
|
-
|
|
3
|
-
describe Poloniex do
|
|
4
|
-
it "has a version number" do
|
|
5
|
-
_(Poloniex::VERSION).must_be_kind_of(String)
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
describe ".configure" do
|
|
9
|
-
it "allows setting configuration values" do
|
|
10
|
-
Poloniex.configure do |config|
|
|
11
|
-
config.api_key = "test_key"
|
|
12
|
-
config.api_secret = "test_secret"
|
|
13
|
-
config.debug = true
|
|
14
|
-
config.logger = './log.txt'
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
_(Poloniex.configuration.api_key).must_equal("test_key")
|
|
18
|
-
_(Poloniex.configuration.api_secret).must_equal("test_secret")
|
|
19
|
-
_(Poloniex.configuration.debug).must_equal(true)
|
|
20
|
-
_(Poloniex.configuration.logger).must_equal('./log.txt')
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
end
|