summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2014-02-27 13:58:15 +0200
committerSaku Ytti <saku@ytti.fi>2014-02-27 13:58:15 +0200
commitc16616f80c6756d407795498335ba779c11e5fbb (patch)
treee5d62b3e6012cbc7fc0e9f3ba652bef169162920
parent7fd0f552bc88e128b9f4090ee6b89beb3d6d837d (diff)
Redirect / to /nodes
-rw-r--r--Gemfile.lock2
-rw-r--r--lib/oxidized/api/web/webapp.rb4
-rw-r--r--oxidized.gemspec2
3 files changed, 6 insertions, 2 deletions
diff --git a/Gemfile.lock b/Gemfile.lock
index 38cb78e..789cf65 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- oxidized (0.0.26)
+ oxidized (0.0.28)
grit
haml
net-ssh
diff --git a/lib/oxidized/api/web/webapp.rb b/lib/oxidized/api/web/webapp.rb
index 13bd0ab..4cec200 100644
--- a/lib/oxidized/api/web/webapp.rb
+++ b/lib/oxidized/api/web/webapp.rb
@@ -6,6 +6,10 @@ module Oxidized
module API
class WebApp < Sinatra::Base
+ get '/' do
+ redirect '/nodes'
+ end
+
get '/nodes.?:format?' do
@data = nodes.list.map do |node|
node[:status] = 'never'
diff --git a/oxidized.gemspec b/oxidized.gemspec
index 62c709f..de59ea6 100644
--- a/oxidized.gemspec
+++ b/oxidized.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'oxidized'
- s.version = '0.0.27'
+ s.version = '0.0.28'
s.platform = Gem::Platform::RUBY
s.authors = [ 'Saku Ytti' ]
s.email = %w( saku@ytti.fi )