SimBot 0.1.37 → 0.1.38

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
  SHA256:
3
- metadata.gz: c06abc25699c0e07964a7a640a2d887ef91b2a2d98b472128916722bcd194245
4
- data.tar.gz: a0c54890f711b1ecc361077cfe17f754d9c8fe0862b4a444b1945820092f50a8
3
+ metadata.gz: 6759fbd90ae23168dfc1dd2ac91828a120f71e1e2165803042499c70a8118077
4
+ data.tar.gz: ae8d4d29f2b339f4557210ba54a68d497bb5d9a7ccde16788e087368919accbf
5
5
  SHA512:
6
- metadata.gz: 0a16954c01f0d434c78ec85a4f926a7e3e08a8a92d3298fadd1c4da5348c93f0833794b60b57241c8a46cf65e20a0dcfbacadecb9de0217a54a59fad672dd4ad
7
- data.tar.gz: 67bffb1ab6337ce4c5f35f88c8eab5abccb50019c602836f16200791f5bcbe74e18369fa856c322e17eb021a7ea09a3edb952bacd829db533b22112277c1b9aa
6
+ metadata.gz: 5b333da4a0374119505092f62a997358aa896742a1ac5a56a3510eef1e85693d002259d21b6c5cd1847f9bc2c96cae08ef2a16ca61e756fee8a6ef65cf1754da
7
+ data.tar.gz: bc0135a7d4443530c549a71377077d59bbcd440c24a93da6927a3369f911ee0da3cf0abc734ab5f5575a99cc2f3b01f3f5943899acb112fca50510d0ec5435f2
data/.idea/workspace.xml CHANGED
@@ -113,8 +113,8 @@
113
113
  <file leaf-file-name="SimBot.rb" pinned="false" current-in-tab="false">
114
114
  <entry file="file://$PROJECT_DIR$/lib/SimBot.rb">
115
115
  <provider selected="true" editor-type-id="text-editor">
116
- <state relative-caret-position="-408">
117
- <caret line="15" column="13" selection-start-line="15" selection-start-column="13" selection-end-line="15" selection-end-column="13" />
116
+ <state relative-caret-position="166">
117
+ <caret line="15" column="13" lean-forward="true" selection-start-line="15" selection-start-column="13" selection-end-line="15" selection-end-column="13" />
118
118
  </state>
119
119
  </provider>
120
120
  </entry>
@@ -122,8 +122,8 @@
122
122
  <file leaf-file-name="utils.rb" pinned="false" current-in-tab="false">
123
123
  <entry file="file://$PROJECT_DIR$/lib/utils.rb">
124
124
  <provider selected="true" editor-type-id="text-editor">
125
- <state relative-caret-position="170">
126
- <caret line="9" column="18" lean-forward="true" selection-start-line="9" selection-start-column="18" selection-end-line="9" selection-end-column="18" />
125
+ <state relative-caret-position="336">
126
+ <caret line="18" column="17" lean-forward="true" selection-start-line="18" selection-start-column="17" selection-end-line="18" selection-end-column="17" />
127
127
  </state>
128
128
  </provider>
129
129
  </entry>
@@ -208,8 +208,8 @@
208
208
  <option value="$PROJECT_DIR$/SimBot.gemspec" />
209
209
  <option value="$PROJECT_DIR$/.ruby-version" />
210
210
  <option value="$PROJECT_DIR$/lib/SimBot.rb" />
211
- <option value="$PROJECT_DIR$/lib/utils.rb" />
212
211
  <option value="$PROJECT_DIR$/lib/Deamons/wash_trade.rb" />
212
+ <option value="$PROJECT_DIR$/lib/utils.rb" />
213
213
  <option value="$PROJECT_DIR$/lib/SimBot/version.rb" />
214
214
  </list>
215
215
  </option>
@@ -346,12 +346,12 @@
346
346
  <workItem from="1540392568366" duration="1094000" />
347
347
  <workItem from="1543308539466" duration="4000" />
348
348
  <workItem from="1543413426007" duration="137000" />
349
- <workItem from="1543938137760" duration="1196000" />
349
+ <workItem from="1543938137760" duration="1857000" />
350
350
  </task>
351
351
  <servers />
352
352
  </component>
353
353
  <component name="TimeTrackingManager">
354
- <option name="totallyTimeSpent" value="182894000" />
354
+ <option name="totallyTimeSpent" value="183555000" />
355
355
  </component>
356
356
  <component name="TodoView">
357
357
  <todo-panel id="selected-file">
@@ -373,9 +373,9 @@
373
373
  <window_info anchor="right" id="Database" order="3" />
374
374
  <window_info anchor="bottom" id="Database Changes" order="8" show_stripe_button="false" />
375
375
  <window_info anchor="bottom" id="Version Control" order="10" weight="0.3292683" />
376
- <window_info anchor="bottom" id="Run" order="2" sideWeight="0.6044349" visible="true" weight="0.35262594" />
376
+ <window_info anchor="bottom" id="Run" order="2" sideWeight="0.6044349" weight="0.35262594" />
377
377
  <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
378
- <window_info anchor="bottom" id="Terminal" order="9" sideWeight="0.6988555" weight="0.44097695" />
378
+ <window_info anchor="bottom" id="Terminal" order="9" sideWeight="0.6988555" visible="true" weight="0.44051448" />
379
379
  <window_info id="Favorites" order="2" side_tool="true" />
380
380
  <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
381
381
  <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
@@ -605,24 +605,24 @@
605
605
  </state>
606
606
  </provider>
607
607
  </entry>
608
- <entry file="file://$PROJECT_DIR$/lib/SimBot.rb">
608
+ <entry file="file://$PROJECT_DIR$/lib/Deamons/wash_trade.rb">
609
609
  <provider selected="true" editor-type-id="text-editor">
610
- <state relative-caret-position="-408">
611
- <caret line="15" column="13" selection-start-line="15" selection-start-column="13" selection-end-line="15" selection-end-column="13" />
610
+ <state relative-caret-position="381">
611
+ <caret line="29" column="16" lean-forward="true" selection-start-line="29" selection-start-column="16" selection-end-line="29" selection-end-column="16" />
612
612
  </state>
613
613
  </provider>
614
614
  </entry>
615
- <entry file="file://$PROJECT_DIR$/lib/utils.rb">
615
+ <entry file="file://$PROJECT_DIR$/lib/SimBot.rb">
616
616
  <provider selected="true" editor-type-id="text-editor">
617
- <state relative-caret-position="170">
618
- <caret line="9" column="18" lean-forward="true" selection-start-line="9" selection-start-column="18" selection-end-line="9" selection-end-column="18" />
617
+ <state relative-caret-position="166">
618
+ <caret line="15" column="13" lean-forward="true" selection-start-line="15" selection-start-column="13" selection-end-line="15" selection-end-column="13" />
619
619
  </state>
620
620
  </provider>
621
621
  </entry>
622
- <entry file="file://$PROJECT_DIR$/lib/Deamons/wash_trade.rb">
622
+ <entry file="file://$PROJECT_DIR$/lib/utils.rb">
623
623
  <provider selected="true" editor-type-id="text-editor">
624
- <state relative-caret-position="381">
625
- <caret line="29" column="16" lean-forward="true" selection-start-line="29" selection-start-column="16" selection-end-line="29" selection-end-column="16" />
624
+ <state relative-caret-position="336">
625
+ <caret line="18" column="17" lean-forward="true" selection-start-line="18" selection-start-column="17" selection-end-line="18" selection-end-column="17" />
626
626
  </state>
627
627
  </provider>
628
628
  </entry>
@@ -1,3 +1,3 @@
1
1
  module SimBot
2
- VERSION = "0.1.37"
2
+ VERSION = "0.1.38"
3
3
  end
data/lib/utils.rb CHANGED
@@ -8,12 +8,14 @@ class Utils
8
8
  case market
9
9
  when 'bchxrp'
10
10
  bchxrp_price
11
- when 'xrpzar'
12
- xrpusd_price*14
13
11
  when 'tusdzar'
14
- bchxrp_price
12
+ tusdzar_price
13
+ when 'xrpzar'
14
+ xrpusd_price*tusdzar_price
15
+ when 'ethzar'
16
+ ethusd_price*tusdzar_price
15
17
  when 'btczar'
16
- btcusd_price*14
18
+ btcusd_price*tusdzar_price
17
19
  when 'bchbtc'
18
20
  bchbtc_price
19
21
  when 'btcxrp'
@@ -37,6 +39,15 @@ class Utils
37
39
  end
38
40
  end
39
41
 
42
+ # fetch btc/usd price from coin market cap
43
+ # @return [float] rate
44
+ def self.tusdzar_price
45
+ response = RestClient.get('https://free.currencyconverterapi.com/api/v6/convert?q=USD_ZAR')
46
+ hash = JSON.parse(response.body)
47
+ hash['results']['USD_ZAR']['val'].to_f.round(4)
48
+ end
49
+
50
+
40
51
  # fetch btc/usd price from coin market cap
41
52
  # @return [float] rate
42
53
  def self.xrpusd_price
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: SimBot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.37
4
+ version: 0.1.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Ovadia
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-04 00:00:00.000000000 Z
11
+ date: 2018-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler