poloniex_api 0.0.2 → 0.0.3

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: b9dc6f92ad54feb3b6fd28fc8c68514010a1f20a
4
- data.tar.gz: 2d0c918530cbac989d065417f35d2c563c840c60
3
+ metadata.gz: d67e0b5029e2cf691571bb8e164dfc71f3cc762f
4
+ data.tar.gz: b17f7d6c8b83a7c726f9858be42bc4a5e3dd1da2
5
5
  SHA512:
6
- metadata.gz: 4eb532356fc687cfa06ec7dd5261b7f5940d6daf6b8e1a2c35f7ee01f7ab006e6897f4f33c14b105e4d175e49a1d6c29c64ef3ef328721ff9e129bfc6f168a68
7
- data.tar.gz: fd8c5aa587ff4a7a67b0327ddba0eb125692c9b36cf12b09a23e34c5e0bb8944a107920cba8d0eb4be0d760dff722d822bb44ceb10b8e5fcb63600ceb3c2c446
6
+ metadata.gz: ee30d2d735508fc43205aa5ea7d1b27b47f6e687472b0e3e97a201373cf32623edd22f8285932595b7e3dd43a35cce92619bc688aacdc5a0ec9e39da38274ee2
7
+ data.tar.gz: 0ed9c4f50b66b9ed894ad3f07eda3c6e316228c440a9377e0a6592b27878e57656ccde31ce883dd64d07e4c70e7418bee63bb5663758446221a893f354400ebc
@@ -1,7 +1,11 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
- ## [Unreleased]
4
+ ## [0.0.3] - 2017-08-30
5
+
6
+ ### Changed
7
+ - Fixed logger calls on timeouts
8
+ - Replaced `Digest::HMAC` with `OpenSSL::HMAC` for Ruby 2.2+ support
5
9
 
6
10
  ## [0.0.2] - 2017-08-29
7
11
 
@@ -18,3 +22,4 @@ All notable changes to this project will be documented in this file.
18
22
 
19
23
  [Unreleased]: https://github.com/brianmcmichael/poloniex_api/compare/v0.0.2...HEAD
20
24
  [0.0.2]: https://github.com/brianmcmichael/poloniex_api/compare/v0.0.1...v0.0.2
25
+ [0.0.3]: https://github.com/brianmcmichael/poloniex_api/compare/v0.0.2...v0.0.3
@@ -93,6 +93,7 @@ module Poloniex
93
93
  # if an error is returned from poloniex.com
94
94
  # - returns decoded json api message """
95
95
  def call(command, args = {})
96
+ puts command
96
97
  # Get command type
97
98
  cmd_type = self.check_command(command)
98
99
 
@@ -113,12 +114,12 @@ module Poloniex
113
114
  # Add args to payload
114
115
  payload['data'] = args
115
116
 
116
- digest = Digest::SHA512
117
+ digest = OpenSSL::Digest.new(SHA512)
117
118
  # Sign data with secret key
118
- sign = Digest::HMAC.hexdigest(
119
- URI.encode_www_form(args).encode(UTF_8),
120
- secret.encode(UTF_8),
121
- digest
119
+ sign = OpenSSL::HMAC.hexdigest(
120
+ digest,
121
+ secret.encode(UTF_8),
122
+ URI.encode_www_form(args).encode(UTF_8)
122
123
  )
123
124
 
124
125
  # Add headers to payload
@@ -141,12 +142,10 @@ module Poloniex
141
142
  if delay == RETRY_DELAYS.last
142
143
  raise Poloniex::RetryException.new "Retry delays exhausted #{problem}"
143
144
  else
144
- LOGGER.debug(problem)
145
- LOGGER.info("-- delaying for #{delay} seconds")
145
+ self.logger.debug(problem)
146
+ self.logger.info("-- delaying for #{delay} seconds")
146
147
  sleep(delay)
147
148
  end
148
- rescue => e
149
- puts e
150
149
  end
151
150
 
152
151
 
@@ -168,8 +167,8 @@ module Poloniex
168
167
  if delay == RETRY_DELAYS.last
169
168
  raise Poloniex::RetryException.new "Retry delays exhausted #{problem}"
170
169
  else
171
- LOGGER.debug(problem)
172
- LOGGER.info("-- delaying for #{delay} seconds")
170
+ self.logger.debug(problem)
171
+ self.logger.info("-- delaying for #{delay} seconds")
173
172
  sleep(delay)
174
173
  end
175
174
  end
@@ -1,3 +1,3 @@
1
1
  module Poloniex
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poloniex_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian McMichael