stock_price_imitation 0.0.2 → 0.0.3

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: fcbefe942a877e0597a831fd5f1862c9a4bc84dd
4
- data.tar.gz: 28261e06db49d73c4f84a55431c2d29b47d0beae
3
+ metadata.gz: 1441ccf9e8c47dc75b7a4601aa6d304a530efc10
4
+ data.tar.gz: 8d5a7da82e6b0caa6a8207be2d3e9c016b3d8c45
5
5
  SHA512:
6
- metadata.gz: 683a913af8ceb7613f7b24e8709d8946d2c1356314fca686003b8d9c105322e9fa137d52a68519c190a40737bed718ce25c3e7a5510aba485e2b5a262b75b333
7
- data.tar.gz: 9189b5b5c4502e516f4519ca3ce15a2730921eb0cc231b473b2bda539d89ecd6c6b23c6c4426141cb4f5858c87489b79725bd0b92e2a59e9abe8cab4dce492b7
6
+ metadata.gz: 2ac8da1f71993ca846143d1206a6484d248136b8f2736c5ecbe0ad40030ed5a1de0543f764f6078aff1338338c74d03fefa7a8965abbee8d4518a9b1e96ea45b
7
+ data.tar.gz: 1a9f83b4912f818a6f6f7f8aa249717133ea664c90a689c5bb7a4dc6d73610271eb838e7c1c1ca1d52a76f152be0c3e0c30b8cdf819f38aba32df20df3a62f03
data/bin/price-imi CHANGED
@@ -3,11 +3,16 @@
3
3
  $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
4
4
  require 'stock_price_imitation'
5
5
 
6
- step = ARGV.pop || 100
6
+ step = 100 # default
7
+ step = ARGV.first.to_i if !ARGV.empty?
7
8
  first_seed_price = 1000
8
9
 
9
10
  prices = StockPriceImitation::Generator.new(step, first_seed_price).execute
10
11
 
12
+ if prices.empty?
13
+ exit(0)
14
+ end
15
+
11
16
  header = prices.first.keys.join("\t")
12
17
  puts header
13
18
 
@@ -1,3 +1,3 @@
1
1
  module StockPriceImitation
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: stock_price_imitation
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
  - Shinya131