itbit 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 93a2a11e017a8d9050ed59d9d3f8ffa16625a8a4
4
- data.tar.gz: ff55f359fe89998a745b49cfc2da16cb06dbad85
3
+ metadata.gz: e2215c9628c7f7023ffa8bcf05ae6102cce091c7
4
+ data.tar.gz: 74642ea25a8f924c8259ce686f035bcb2d1c1a77
5
5
  SHA512:
6
- metadata.gz: 96c4782330c4119eae9a266538d84bd71b57a7dcdc78d6a7a721a5d34d6c033298c5110078ed8b3407da41d36b7c61b63e93730668607a95eb0ddbf32e40c2b5
7
- data.tar.gz: b30c3fbcb307ae0628ea9b0600d37423f1e77352498349957bcb8bc55454fe10d27df704a598b51b23d9aa77ec9a188c86fb29ea1e531cf521a24d1cd8a541f4
6
+ metadata.gz: 7bdcfae8e37052d70c9dfb127e41f2e78d3d609ffa3b8951b196eaa7bef460a9b093b0e1155cc6ddc2ec66d49d2e46d62a40b5faec75f2ad6125fddeca40fe80
7
+ data.tar.gz: bde43064e0c773f72aa6f48b02355c07c2bc651d84175e0d74bb2f408fc3ab7427bffc6292cc6b4d2d058106eff739467fb1b55995ce76a28bdd131e891046ba
@@ -19,15 +19,15 @@ Gem::Specification.new do |spec|
19
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_dependency "activesupport", "~> 4.2"
23
- spec.add_dependency "rest-client", "~> 1.8"
22
+ spec.add_dependency "activesupport"
23
+ spec.add_dependency "rest-client"
24
24
 
25
25
  spec.required_ruby_version = '>= 1.9.3'
26
26
  spec.add_development_dependency "bundler", "~> 1.3"
27
- spec.add_development_dependency "rake", "~> 0"
28
- spec.add_development_dependency "rspec", "~> 0"
29
- spec.add_development_dependency "rspec-mocks", "~> 0"
30
- spec.add_development_dependency "timecop", "~> 0"
31
- spec.add_development_dependency "webmock", "~> 0"
32
- spec.add_development_dependency "shoulda-matchers", "~> 0"
27
+ spec.add_development_dependency "rake"
28
+ spec.add_development_dependency "rspec"
29
+ spec.add_development_dependency "rspec-mocks"
30
+ spec.add_development_dependency "timecop"
31
+ spec.add_development_dependency "webmock"
32
+ spec.add_development_dependency "shoulda-matchers"
33
33
  end
@@ -5,11 +5,11 @@ module Itbit
5
5
  :rebates_applied, :currency2, :instrument, :rate, :currency1,
6
6
  :rebate_currency, :currency1_amount, :currency2_amount,
7
7
  :commission_currency
8
-
8
+
9
9
  def initialize(attrs)
10
10
  attrs.each{|k, v| send("#{k.underscore}=", v)}
11
11
  end
12
-
12
+
13
13
  %w(direction instrument currency1 currency2
14
14
  rebate_currency commission_currency).each do |attr|
15
15
  define_method("#{attr}=") do |value|
@@ -23,14 +23,14 @@ module Itbit
23
23
  instance_variable_set("@#{attr}", value.to_d)
24
24
  end
25
25
  end
26
-
26
+
27
27
  def timestamp=(value)
28
28
  @timestamp = value.is_a?(String) ? Time.parse(value).to_i : value
29
29
  end
30
30
 
31
31
  # Lists all trades for a wallet
32
32
  # Results can be filtered and paginated by passing in these options.
33
- # wallet_id: String, defaults to Itbit.default_wallet_id
33
+ # wallet_id: String, defaults to Itbit.default_wallet_id
34
34
  # page: Integer, starting page for pagination.
35
35
  # per_page: Integer, how many to show per page.
36
36
  # range_start: Integer timestamp, start showing at this date.
@@ -39,7 +39,7 @@ module Itbit
39
39
  def self.all(opts = {})
40
40
  wallet_id = opts[:wallet_id] || Itbit.default_wallet_id
41
41
  params = {}
42
- %w(range_start range_end page per_page).each do |a|
42
+ %w(range_start range_end page per_page last_execution_id).each do |a|
43
43
  params[a.camelize(:lower)] = opts[a.to_sym].to_i if opts[a.to_sym]
44
44
  end
45
45
  response = Api.request(:get, "/wallets/#{wallet_id}/trades", params)
@@ -1,3 +1,3 @@
1
1
  module Itbit
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -28,13 +28,15 @@ describe Itbit::Trade do
28
28
  rangeStart: 0,
29
29
  rangeEnd: 100000,
30
30
  page: '1',
31
- perPage: '200')
31
+ perPage: '200',
32
+ lastExecutionId: 300)
32
33
  trades = Itbit::Trade.all(
33
34
  wallet_id: 'wallet-001',
34
35
  range_start: 0,
35
36
  range_end: 100000,
36
37
  page: 1,
37
- per_page: 200)
38
+ per_page: 200,
39
+ last_execution_id: 300)
38
40
  trades[:trading_history].size.should == 2
39
41
  trades[:trading_history].each{|o| o.should be_an Itbit::Trade}
40
42
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itbit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nubis
@@ -9,36 +9,36 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-04-09 00:00:00.000000000 Z
12
+ date: 2016-09-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '4.2'
20
+ version: '0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - "~>"
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: '4.2'
27
+ version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rest-client
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - "~>"
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: '1.8'
34
+ version: '0'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - "~>"
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
- version: '1.8'
41
+ version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: bundler
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -57,84 +57,84 @@ dependencies:
57
57
  name: rake
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - "~>"
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - "~>"
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rspec
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - "~>"
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - "~>"
81
+ - - ">="
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: rspec-mocks
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - "~>"
88
+ - - ">="
89
89
  - !ruby/object:Gem::Version
90
90
  version: '0'
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - "~>"
95
+ - - ">="
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: timecop
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - "~>"
102
+ - - ">="
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  type: :development
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - "~>"
109
+ - - ">="
110
110
  - !ruby/object:Gem::Version
111
111
  version: '0'
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: webmock
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - "~>"
116
+ - - ">="
117
117
  - !ruby/object:Gem::Version
118
118
  version: '0'
119
119
  type: :development
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
- - - "~>"
123
+ - - ">="
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: shoulda-matchers
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  requirements:
130
- - - "~>"
130
+ - - ">="
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0'
133
133
  type: :development
134
134
  prerelease: false
135
135
  version_requirements: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - "~>"
137
+ - - ">="
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  description: |-