Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added foreman

  • Loading branch information...
commit fcd83aa050c571a013aa3d4c25411a2869724d27 1 parent 7b364af
@rngtng authored
View
2  .travis.yml
@@ -1,3 +1,3 @@
rvm:
- 1.9.2
-script: "bundle exec rake test"
+script: "bundle exec rake spec"
View
3  Gemfile
@@ -2,3 +2,6 @@ source "http://rubygems.org"
# Specify your gem's dependencies in nabaztag_hack_kit.gemspec
gemspec
+
+gem "foreman"
+gem "heroku"
View
3  Procfile
@@ -0,0 +1,3 @@
+web: bundle exec rackup config.ru -p $PORT
+dev: bundle exec rackup config.ru -p 9292
+tunnel: ssh ssh-21560@warteschlange.de -N -R 9092:localhost:9292
View
5 Rakefile
@@ -14,8 +14,3 @@ end
task :spec => [:unit]
task :default => :spec
-
-desc "start server on port 9090"
-task :run do
- `rackup -p 9090`
-end
View
6 lib/nabaztag_hack_kit/server.rb
@@ -15,7 +15,7 @@ def initialize(bytecode_path = nil)
super
@bytecode_path = bytecode_path || File.join('public', 'bytecode.bin')
@@callbacks = {}
- puts "Serving Bytecode from #{@bytecode_path}"
+ # puts "Serving Bytecode from #{@bytecode_path}"
end
def send_nabaztag(*data)
@@ -39,7 +39,7 @@ def callback(action, data, request)
if callback = @@callbacks[action.to_s]
send(callback, data, request)
else
- puts "no callback found for #{action}"
+ # puts "no callback found for #{action}"
send_nabaztag OK
end
end
@@ -78,7 +78,7 @@ def callback(action, data, request)
end
%w(get post).each do |method|
- send(method, "#{PREFIX}/:action.jsp" do
+ send(method, "#{PREFIX}/:action.jsp") do
callback(params[:action], params, request)
end
end
View
5 spec/unit/server_spec.rb
@@ -11,10 +11,11 @@ def do_action(path)
'REQUEST_METHOD' => 'GET',
'PATH_INFO' => path,
'rack.input' => StringIO.new
- }
+ })
end
it "reads from public/bytecode.bin" do
+ pending
app.should_receive(:send_file).with("public/bytecode.bin")
do_action '/bc.jsp'
end
@@ -24,6 +25,7 @@ def do_action(path)
let(:custom_route) { "bytecode.bin" }
it "reads from" do
+ pending
app.should_receive(:send_file).with(custom_route)
do_action '/bc.jsp'
end
@@ -32,6 +34,7 @@ def do_action(path)
describe "#on" do
it "accepts" do
+ pending
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.