Commit 32f7ff12 authored by John E. Vincent's avatar John E. Vincent

bumping sinatra to 1.3 and matching deps

parent 997752f2
...@@ -17,6 +17,7 @@ module Noah ...@@ -17,6 +17,7 @@ module Noah
set :run, false set :run, false
set :redis_url, ENV['REDIS_URL'] || 'redis://localhost:6379/0' set :redis_url, ENV['REDIS_URL'] || 'redis://localhost:6379/0'
set :ephemeral_size, ENV['NOAH_ESIZE'] || 512 set :ephemeral_size, ENV['NOAH_ESIZE'] || 512
disable :protection
end end
configure(:development) do configure(:development) do
......
...@@ -88,6 +88,8 @@ module Noah ...@@ -88,6 +88,8 @@ module Noah
self.name.nil? ? name=@deleted_name : name=self.name self.name.nil? ? name=@deleted_name : name=self.name
# Pulling out dbnum for now. Need to rethink it # Pulling out dbnum for now. Need to rethink it
#pub_category = "#{db}:noah.#{self.class.to_s}[#{name}].#{meth}" #pub_category = "#{db}:noah.#{self.class.to_s}[#{name}].#{meth}"
# TODO
# Add a url in the message body containing the URL to the item
pub_category = "#{self.patternize_me}" pub_category = "#{self.patternize_me}"
Ohm.redis.publish(pub_category, self.to_hash.merge({"action" => meth, "pubcategory" => pub_category}).to_json) Ohm.redis.publish(pub_category, self.to_hash.merge({"action" => meth, "pubcategory" => pub_category}).to_json)
......
...@@ -31,7 +31,7 @@ module Noah ...@@ -31,7 +31,7 @@ module Noah
if obj.valid? if obj.valid?
obj.save obj.save
end end
obj obj if obj.valid?
rescue Exception => e rescue Exception => e
e.message e.message
end end
......
...@@ -47,7 +47,7 @@ class Noah::App ...@@ -47,7 +47,7 @@ class Noah::App
end end
if app.valid? if app.valid?
action = app.is_new? ? "create" : "update" action = app.is_new? ? "create" : "update"
app.save #app.save
r = {"result" => "success","id" => app.id, "action" => action, "name" => app.name } r = {"result" => "success","id" => app.id, "action" => action, "name" => app.name }
r.to_json r.to_json
else else
......
...@@ -13,8 +13,9 @@ class Noah::App ...@@ -13,8 +13,9 @@ class Noah::App
get '/configurations/:configname/?' do |configname| get '/configurations/:configname/?' do |configname|
c = Noah::Configuration.find(:name => configname).first c = Noah::Configuration.find(:name => configname).first
(halt 404) if c.nil? (halt 404) if c.nil?
#content_type c.format.to_sym
content_type content_type_mapping[c.format.to_sym] if content_type_mapping[c.format.to_sym] content_type content_type_mapping[c.format.to_sym] if content_type_mapping[c.format.to_sym]
c.body c.body.to_s
end end
# GET all configurations # GET all configurations
......
...@@ -24,10 +24,14 @@ Gem::Specification.new do |s| ...@@ -24,10 +24,14 @@ Gem::Specification.new do |s|
s.add_dependency("eventmachine", ["1.0.0.beta.3"]) s.add_dependency("eventmachine", ["1.0.0.beta.3"])
s.add_dependency("em-http-request", ["1.0.0.beta.4"]) s.add_dependency("em-http-request", ["1.0.0.beta.4"])
s.add_dependency("redis", ["= 2.2.0"]) s.add_dependency("redis", ["= 2.2.0"])
s.add_dependency("nest", ["= 1.1.0"]) s.add_dependency("nest", "= 1.1.0")
s.add_dependency("rack", ["= 1.2.2"]) s.add_dependency("rack", "= 1.3.4")
s.add_dependency("tilt", ["= 1.2.2"]) s.add_dependency("tilt", "= 1.3.3")
s.add_dependency("sinatra", ["= 1.2.3"]) s.add_dependency("sinatra", "= 1.3.1")
s.add_dependency("rack-protection", "= 1.1.4")
#s.add_dependency("rack", ["= 1.2.2"])
#s.add_dependency("tilt", ["= 1.2.2"])
#s.add_dependency("sinatra", ["= 1.2.3"])
s.add_dependency("ohm", ["= 0.1.3"]) s.add_dependency("ohm", ["= 0.1.3"])
s.add_dependency("ohm-contrib", ["= 0.1.1"]) s.add_dependency("ohm-contrib", ["= 0.1.1"])
s.add_dependency("haml", ["= 3.0.25"]) s.add_dependency("haml", ["= 3.0.25"])
...@@ -51,6 +55,7 @@ Gem::Specification.new do |s| ...@@ -51,6 +55,7 @@ Gem::Specification.new do |s|
s.add_development_dependency("sinatra-reloader", ["= 0.5.0"]) s.add_development_dependency("sinatra-reloader", ["= 0.5.0"])
s.add_development_dependency("rspec", ["~> 2.5"]) s.add_development_dependency("rspec", ["~> 2.5"])
# s.add_development_dependency("rcov", ["= 0.9.9"]) # s.add_development_dependency("rcov", ["= 0.9.9"])
s.add_development_dependency("rack-test", ["= 0.5.7"]) s.add_development_dependency("rack-test", "= 0.6.1")
# s.add_development_dependency("rack-test", ["= 0.5.7"])
s.add_development_dependency("rake", ["= 0.8.7"]) s.add_development_dependency("rake", ["= 0.8.7"])
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment