bitex 0.3 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +63 -0
  3. data/.rubocop.yml +32 -0
  4. data/.ruby-version +1 -0
  5. data/bitex.gemspec +21 -18
  6. data/lib/bitex.rb +7 -1
  7. data/lib/bitex/api.rb +34 -41
  8. data/lib/bitex/ask.rb +74 -0
  9. data/lib/bitex/base_order.rb +106 -0
  10. data/lib/bitex/bid.rb +72 -0
  11. data/lib/bitex/buy.rb +8 -5
  12. data/lib/bitex/kyc_file.rb +31 -9
  13. data/lib/bitex/kyc_profile.rb +113 -38
  14. data/lib/bitex/{market.rb → market_data.rb} +3 -3
  15. data/lib/bitex/match.rb +30 -15
  16. data/lib/bitex/order.rb +6 -238
  17. data/lib/bitex/payment.rb +30 -18
  18. data/lib/bitex/rates.rb +6 -8
  19. data/lib/bitex/sell.rb +5 -5
  20. data/lib/bitex/specie_deposit.rb +9 -4
  21. data/lib/bitex/specie_withdrawal.rb +29 -28
  22. data/lib/bitex/trade.rb +4 -5
  23. data/lib/bitex/transaction.rb +7 -8
  24. data/lib/bitex/usd_deposit.rb +46 -47
  25. data/lib/bitex/usd_withdrawal.rb +33 -34
  26. data/lib/bitex/version.rb +1 -1
  27. data/spec/ask_spec.rb +17 -5
  28. data/spec/bid_spec.rb +17 -5
  29. data/spec/buy_spec.rb +14 -4
  30. data/spec/kyc_file_spec.rb +34 -18
  31. data/spec/kyc_profile_spec.rb +158 -122
  32. data/spec/order_spec.rb +1 -1
  33. data/spec/payment_spec.rb +51 -45
  34. data/spec/sell_spec.rb +14 -4
  35. data/spec/spec_helper.rb +7 -6
  36. data/spec/specie_deposit_spec.rb +10 -4
  37. data/spec/specie_withdrawal_spec.rb +26 -25
  38. data/spec/support/from_json_shared_examples.rb +20 -22
  39. data/spec/support/order_shared_examples.rb +14 -17
  40. data/spec/support/request_stubs.rb +18 -12
  41. data/spec/trade_spec.rb +5 -5
  42. data/spec/transaction_spec.rb +12 -13
  43. data/spec/usd_deposit_spec.rb +120 -105
  44. data/spec/usd_withdrawal_spec.rb +89 -79
  45. metadata +57 -10
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitex
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.3'
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nubis
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-05-09 00:00:00.000000000 Z
12
+ date: 2018-05-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -67,6 +67,20 @@ dependencies:
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: byebug
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
70
84
  - !ruby/object:Gem::Dependency
71
85
  name: rspec
72
86
  requirement: !ruby/object:Gem::Requirement
@@ -82,7 +96,7 @@ dependencies:
82
96
  - !ruby/object:Gem::Version
83
97
  version: '0'
84
98
  - !ruby/object:Gem::Dependency
85
- name: rspec-mocks
99
+ name: rspec_junit_formatter
86
100
  requirement: !ruby/object:Gem::Requirement
87
101
  requirements:
88
102
  - - ">="
@@ -96,7 +110,7 @@ dependencies:
96
110
  - !ruby/object:Gem::Version
97
111
  version: '0'
98
112
  - !ruby/object:Gem::Dependency
99
- name: timecop
113
+ name: rspec-mocks
100
114
  requirement: !ruby/object:Gem::Requirement
101
115
  requirements:
102
116
  - - ">="
@@ -110,7 +124,7 @@ dependencies:
110
124
  - !ruby/object:Gem::Version
111
125
  version: '0'
112
126
  - !ruby/object:Gem::Dependency
113
- name: webmock
127
+ name: rubocop
114
128
  requirement: !ruby/object:Gem::Requirement
115
129
  requirements:
116
130
  - - ">="
@@ -137,9 +151,36 @@ dependencies:
137
151
  - - ">="
138
152
  - !ruby/object:Gem::Version
139
153
  version: '0'
140
- description: |-
141
- API client library for bitex.la. Fetch public market
142
- data and build trading robots
154
+ - !ruby/object:Gem::Dependency
155
+ name: timecop
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - ">="
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
161
+ type: :development
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
168
+ - !ruby/object:Gem::Dependency
169
+ name: webmock
170
+ requirement: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - ">="
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
175
+ type: :development
176
+ prerelease: false
177
+ version_requirements: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - ">="
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ description: API client library for bitex.la. Fetch public market data and build trading
183
+ robots
143
184
  email:
144
185
  - nb@bitex.la
145
186
  - tr@bitex.la
@@ -147,8 +188,11 @@ executables: []
147
188
  extensions: []
148
189
  extra_rdoc_files: []
149
190
  files:
191
+ - ".circleci/config.yml"
150
192
  - ".gitignore"
151
193
  - ".rspec"
194
+ - ".rubocop.yml"
195
+ - ".ruby-version"
152
196
  - Gemfile
153
197
  - LICENSE.txt
154
198
  - README.md
@@ -156,10 +200,13 @@ files:
156
200
  - bitex.gemspec
157
201
  - lib/bitex.rb
158
202
  - lib/bitex/api.rb
203
+ - lib/bitex/ask.rb
204
+ - lib/bitex/base_order.rb
205
+ - lib/bitex/bid.rb
159
206
  - lib/bitex/buy.rb
160
207
  - lib/bitex/kyc_file.rb
161
208
  - lib/bitex/kyc_profile.rb
162
- - lib/bitex/market.rb
209
+ - lib/bitex/market_data.rb
163
210
  - lib/bitex/match.rb
164
211
  - lib/bitex/order.rb
165
212
  - lib/bitex/payment.rb
@@ -246,7 +293,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
246
293
  version: '0'
247
294
  requirements: []
248
295
  rubyforge_project:
249
- rubygems_version: 2.4.5
296
+ rubygems_version: 2.6.11
250
297
  signing_key:
251
298
  specification_version: 4
252
299
  summary: API client library for bitex.la