poloniex.rb 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1239f3d75f8740ef02db2a214b2386023efae92bb70faea016f20b5fcac7729a
4
- data.tar.gz: 9503597302ddf026382009e652a81ed8a48f91b9c08cca55ddfa0e863d16ebf0
3
+ metadata.gz: b947fd07cc798d17972bfe2f482cd2f75dffbf5c26fdee98ce70e851bf1a1415
4
+ data.tar.gz: 27e4eb04f6fd550aa31d50b7e38ab20b17f3f9019c7e01f279cd6404663b7a80
5
5
  SHA512:
6
- metadata.gz: a0f92490b48e172724cf090d32d378d3d9be32d2a996de5b148cef49394a4a73ffdb9c5a49ade5e0f88e03b3590af58dde9d7a9cd7f404312ddba53dca7670ef
7
- data.tar.gz: 1a93ff086f6efce266fa5006e0cdb3e0c3f8008bddb83499a90c1c818ed117ba07a6f74bde5765352fadce7b13b02b30af23a2bf1b2a4ec012fd0e0e2f3f13fe
6
+ metadata.gz: f5eedd1104ca24edb35f3a6f91c724fc9c37cf8f6f7f520ceb8b2afa4ce7e2b7777ffe6ec70e5c692458879177d804689014b60c9e794be6e1d68be32c0128f2
7
+ data.tar.gz: f465259b0e560aa90cae6ade75d42b82466ab9ddc6a8502e31f6e763c308f49099de8822e5662d4db935cff98c92172141cf0129c306a962200f76c81d8ce4b1
@@ -0,0 +1,13 @@
1
+ # Poloniex/Client.rb
2
+ # Poloniex::Client
3
+
4
+ require_relative './V1/Client'
5
+
6
+ module Poloniex
7
+ class Client < Poloniex::V1::Client
8
+
9
+ ALLOWABLE_VERBS = %w{GET POST PUT DELETE}
10
+ API_HOST = 'api.poloniex.com'
11
+
12
+ end
13
+ end
@@ -10,6 +10,7 @@ require 'openssl'
10
10
 
11
11
  require_relative '../Configuration'
12
12
  require_relative '../Error'
13
+ require_relative '../V1'
13
14
  require_relative '../../Hash/x_www_form_urlencode'
14
15
  require_relative '../../Object/inQ'
15
16
 
@@ -17,9 +18,6 @@ module Poloniex
17
18
  module V1
18
19
  class Client
19
20
 
20
- ALLOWABLE_VERBS = %w{GET POST PUT DELETE}
21
- API_HOST = 'api.poloniex.com'
22
-
23
21
  class << self
24
22
  def path_prefix
25
23
  ''
@@ -547,7 +545,7 @@ module Poloniex
547
545
 
548
546
  def do_request(verb:, path:, args: {})
549
547
  verb = verb.to_s.upcase
550
- raise ArgumentError, "Unsupported HTTP method: #{verb}" unless verb.in?(Poloniex::V1::Client::ALLOWABLE_VERBS)
548
+ raise ArgumentError, "Unsupported HTTP method: #{verb}" unless verb.in?(Poloniex::Client::ALLOWABLE_VERBS)
551
549
  request_string = request_string(path:)
552
550
  args = args(verb: verb, path: path, supplied_args: args)
553
551
  headers = headers(verb: verb, path: path, args: args)
@@ -564,7 +562,7 @@ module Poloniex
564
562
  end
565
563
 
566
564
  def request_string(path:)
567
- "https://#{Poloniex::V1::Client::API_HOST}#{self.class.path_prefix}#{path}"
565
+ "https://#{Poloniex::Client::API_HOST}#{self.class.path_prefix}#{path}"
568
566
  end
569
567
 
570
568
  def args(verb:, path:, supplied_args:)
data/lib/Poloniex/V1.rb CHANGED
@@ -1,8 +1,6 @@
1
1
  # Poloniex/V1.rb
2
2
  # Poloniex::V1
3
3
 
4
- require_relative './V1/Client'
5
-
6
4
  module Poloniex
7
5
  module V1
8
6
  PUBLIC_PATH_PREFIXES = [
@@ -2,5 +2,5 @@
2
2
  # Poloniex::VERSION
3
3
 
4
4
  module Poloniex
5
- VERSION = '0.1.0'
5
+ VERSION = '0.1.1'
6
6
  end
data/lib/poloniex.rb CHANGED
@@ -5,6 +5,5 @@ $LOAD_PATH.unshift(lib_dir) unless $LOAD_PATH.include?(lib_dir)
5
5
 
6
6
  module Poloniex; end
7
7
 
8
- require 'Poloniex/Configuration'
9
- require 'Poloniex/V1'
8
+ require 'Poloniex/Client'
10
9
  require 'Poloniex/VERSION'
data/poloniex.rb.gemspec CHANGED
@@ -4,7 +4,7 @@ Gem::Specification.new do |spec|
4
4
  spec.name = 'poloniex.rb'
5
5
 
6
6
  spec.version = Poloniex::VERSION
7
- spec.date = '2025-08-13'
7
+ spec.date = '2025-08-15'
8
8
 
9
9
  spec.summary = "Access the Poloniex API with Ruby."
10
10
  spec.description = "Access the Poloniex API with Ruby."
data/test/helper.rb CHANGED
@@ -7,15 +7,14 @@ require 'webmock'
7
7
  require_relative '../lib/poloniex'
8
8
 
9
9
  VCR.configure do |config|
10
- config.cassette_library_dir = 'test/fixtures/vcr_cassettes'
11
-
10
+ config.cassette_library_dir = File.join(__dir__, 'fixtures', 'vcr_cassettes')
12
11
  config.hook_into :webmock
13
12
 
14
13
  config.filter_sensitive_data('<API_KEY>'){ENV['POLONIEX_API_KEY']}
15
14
  config.filter_sensitive_data('<API_SECRET>'){ENV['POLONIEX_API_SECRET'] }
16
15
 
17
- # Allow localhost connections for debugging
18
- config.ignore_localhost = true
16
+ config.ignore_localhost = true # Allow localhost connections for debugging.
17
+ # config.debug_logger = $stderr # Uncomment for debug output from VCR.
19
18
 
20
19
  config.default_cassette_options = {
21
20
  record: :new_episodes,
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.1.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-08-13 00:00:00.000000000 Z
10
+ date: 2025-08-15 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: http.rb
@@ -33,6 +33,7 @@ files:
33
33
  - README.md
34
34
  - lib/Hash/x_www_form_urlencode.rb
35
35
  - lib/Object/inQ.rb
36
+ - lib/Poloniex/Client.rb
36
37
  - lib/Poloniex/Configuration.rb
37
38
  - lib/Poloniex/Error.rb
38
39
  - lib/Poloniex/V1.rb