bitex_bot 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,10 +14,7 @@ module BitexBot
14
14
  cattr_accessor :cooldown_until
15
15
  cattr_accessor :test_mode
16
16
  cattr_accessor :logger do
17
- logfile = Settings.log.try(:file) ? File.open(Settings.log.file, 'a') : STDOUT
18
- logfile.sync = true
19
- $stderr = logfile
20
- Logger.new(logfile, 10, 10240000).tap do |l|
17
+ Logger.new(Settings.log.try(:file) || STDOUT, 10, 10240000).tap do |l|
21
18
  l.level = Logger.const_get(Settings.log.level.upcase)
22
19
  l.formatter = proc do |severity, datetime, progname, msg|
23
20
  date = datetime.strftime("%m/%d %H:%M:%S.%L")
@@ -37,7 +34,7 @@ module BitexBot
37
34
 
38
35
  while true
39
36
  start_time = Time.now
40
- return if start_time < cooldown_until
37
+ next if start_time < cooldown_until
41
38
  self.current_cooldowns = 0
42
39
  bot.trade!
43
40
  self.cooldown_until = start_time + current_cooldowns.seconds
@@ -1,3 +1,3 @@
1
1
  module BitexBot
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitex_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-08-11 00:00:00.000000000 Z
13
+ date: 2014-08-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: settingslogic