lib/cryptum/option.rb in cryptum-0.0.266 vs lib/cryptum/option.rb in cryptum-0.0.267

- old
+ new

@@ -54,11 +54,11 @@ ) { |n| option_choice.sandbox = n } options.on( '-tSECONDS', '--time-between-market-trend-reset=SECONDS', - '<Optional - Seconds Between Market Trend Reset (Default 86_400 i.e. 1 day)>' + '<Optional - Seconds Between Market Trend Reset (Default 3_600 i.e. 1 hour)>' ) { |t| option_choice.market_trend_reset = t.to_i } end.parse! input_validation(option_choice: option_choice) @@ -87,12 +87,13 @@ unless Dir.exist?(option_choice.repo_root) usage = true reason = :repo_root end - option_choice.market_trend_reset = 86_400 if option_choice.market_trend_reset.to_i.zero? - unless option_choice.market_trend_reset.to_i.positive? + option_choice.market_trend_reset = 3_600 if option_choice.market_trend_reset.to_i.zero? + unless option_choice.market_trend_reset.to_i >= 60 && + option_choice.market_trend_reset <= 86_400 usage = true reason = :market_trend_reset end case option_choice.market_trend_reset @@ -111,10 +112,10 @@ when :symbol puts "ERROR: --symbol Flag is Required.\n\n" when :repo_root puts "ERROR: #{option_choice.repo_root} does not exist.\n\n" when :market_trend_reset - puts "ERROR: #{option_choice.market_trend_reset} Must be a positive floating point number.\n\n" + puts "ERROR: #{option_choice.market_trend_reset} Must be a positive integer between 60-86_400.\n\n" end puts `#{option_choice.driver_name} --help` exit 1 end