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
set :run, false
set :redis_url, ENV['REDIS_URL'] || 'redis://localhost:6379/0'
set :ephemeral_size, ENV['NOAH_ESIZE'] || 512
disable :protection
end
configure(:development) do
......
......@@ -88,6 +88,8 @@ module Noah
self.name.nil? ? name=@deleted_name : name=self.name
# Pulling out dbnum for now. Need to rethink it
#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}"
Ohm.redis.publish(pub_category, self.to_hash.merge({"action" => meth, "pubcategory" => pub_category}).to_json)
......
......@@ -31,7 +31,7 @@ module Noah
if obj.valid?
obj.save
end
obj
obj if obj.valid?
rescue Exception => e
e.message
end
......
......@@ -47,7 +47,7 @@ class Noah::App
end
if app.valid?
action = app.is_new? ? "create" : "update"
app.save
#app.save
r = {"result" => "success","id" => app.id, "action" => action, "name" => app.name }
r.to_json
else
......
......@@ -13,8 +13,9 @@ class Noah::App
get '/configurations/:configname/?' do |configname|
c = Noah::Configuration.find(:name => configname).first
(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]
c.body
c.body.to_s
end
# GET all configurations
......
......@@ -24,10 +24,14 @@ Gem::Specification.new do |s|
s.add_dependency("eventmachine", ["1.0.0.beta.3"])
s.add_dependency("em-http-request", ["1.0.0.beta.4"])
s.add_dependency("redis", ["= 2.2.0"])
s.add_dependency("nest", ["= 1.1.0"])
s.add_dependency("rack", ["= 1.2.2"])
s.add_dependency("tilt", ["= 1.2.2"])
s.add_dependency("sinatra", ["= 1.2.3"])
s.add_dependency("nest", "= 1.1.0")
s.add_dependency("rack", "= 1.3.4")
s.add_dependency("tilt", "= 1.3.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-contrib", ["= 0.1.1"])
s.add_dependency("haml", ["= 3.0.25"])
......@@ -51,6 +55,7 @@ Gem::Specification.new do |s|
s.add_development_dependency("sinatra-reloader", ["= 0.5.0"])
s.add_development_dependency("rspec", ["~> 2.5"])
# 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"])
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