summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2014-02-23 19:41:38 +0200
committerSaku Ytti <saku@ytti.fi>2014-02-23 19:41:38 +0200
commitd750967f1abd8748b48ac3172fe4016361c3d97e (patch)
tree9ae6b503304acf79780a07ea998a9570f1d494b5
parent8880188001da23a5f0960e3970c4eb9bbd448306 (diff)
Fix sleep and return ability to not run rest/web
-rw-r--r--Gemfile.lock25
-rw-r--r--lib/oxidized/core.rb8
-rw-r--r--oxidized.gemspec2
3 files changed, 26 insertions, 9 deletions
diff --git a/Gemfile.lock b/Gemfile.lock
index f9034e8..c467382 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,25 +1,40 @@
PATH
remote: .
specs:
- oxidized (0.0.20)
+ oxidized (0.0.22)
grit
+ haml
net-ssh
+ puma
sequel
+ sinatra
sqlite3
GEM
remote: https://rubygems.org/
specs:
- diff-lcs (1.2.4)
+ diff-lcs (1.2.5)
grit (2.5.0)
diff-lcs (~> 1.1)
mime-types (~> 1.15)
posix-spawn (~> 0.3.6)
+ haml (4.0.5)
+ tilt
mime-types (1.25)
- net-ssh (2.7.0)
- posix-spawn (0.3.6)
- sequel (4.4.0)
+ net-ssh (2.8.0)
+ posix-spawn (0.3.8)
+ puma (2.7.1)
+ rack (>= 1.1, < 2.0)
+ rack (1.5.2)
+ rack-protection (1.5.2)
+ rack
+ sequel (4.7.0)
+ sinatra (1.4.4)
+ rack (~> 1.4)
+ rack-protection (~> 1.4)
+ tilt (~> 1.3, >= 1.3.4)
sqlite3 (1.3.8)
+ tilt (1.4.1)
PLATFORMS
ruby
diff --git a/lib/oxidized/core.rb b/lib/oxidized/core.rb
index 70e9e42..14de9ab 100644
--- a/lib/oxidized/core.rb
+++ b/lib/oxidized/core.rb
@@ -16,8 +16,10 @@ module Oxidized
Oxidized.mgr = Manager.new
nodes = Nodes.new
@worker = Worker.new nodes
- @rest = API::Web.new nodes, CFG.rest if CFG.rest
- @rest.run
+ if CFG.rest
+ @rest = API::Web.new nodes, CFG.rest
+ @rest.run
+ end
run
end
@@ -26,7 +28,7 @@ module Oxidized
def run
while true
@worker.work
- Config::Sleep
+ sleep Config::Sleep
end
end
end
diff --git a/oxidized.gemspec b/oxidized.gemspec
index 4c6839a..ff3ebe5 100644
--- a/oxidized.gemspec
+++ b/oxidized.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'oxidized'
- s.version = '0.0.21'
+ s.version = '0.0.22'
s.platform = Gem::Platform::RUBY
s.authors = [ 'Saku Ytti' ]
s.email = %w( saku@ytti.fi )