diff --git a/dashing.gemspec b/dashing.gemspec index 2f9df4a5..04ec6a31 100644 --- a/dashing.gemspec +++ b/dashing.gemspec @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- Gem::Specification.new do |s| - s.name = 'dashing' + s.name = 'dashing-jruby' s.version = '1.3.4' s.date = '2014-05-30' s.executables = %w(dashing) @@ -20,7 +20,7 @@ Gem::Specification.new do |s| s.add_dependency('execjs', '~> 2.0.2') s.add_dependency('sinatra', '~> 1.4.4') s.add_dependency('sinatra-contrib', '~> 1.4.2') - s.add_dependency('thin', '~> 1.6.1') + s.add_dependency('puma') s.add_dependency('rufus-scheduler', '~> 2.0.24') s.add_dependency('thor', '~> 0.18.1') s.add_dependency('sprockets', '~> 2.10.1') diff --git a/lib/dashing/app.rb b/lib/dashing/app.rb index 921bf9c6..033849c7 100644 --- a/lib/dashing/app.rb +++ b/lib/dashing/app.rb @@ -6,7 +6,6 @@ require 'sass' require 'json' require 'yaml' -require 'thin' SCHEDULER = Rufus::Scheduler.new @@ -120,16 +119,6 @@ def protected! end end -Thin::Server.class_eval do - def stop_with_connection_closing - Sinatra::Application.settings.connections.dup.each(&:close) - stop_without_connection_closing - end - - alias_method :stop_without_connection_closing, :stop - alias_method :stop, :stop_with_connection_closing -end - def send_event(id, body, target=nil) body[:id] = id body[:updatedAt] ||= Time.now.to_i diff --git a/lib/dashing/cli.rb b/lib/dashing/cli.rb index 27d8f6b0..7085eccb 100644 --- a/lib/dashing/cli.rb +++ b/lib/dashing/cli.rb @@ -59,17 +59,11 @@ def install(gist_id) def start(*args) port_option = args.include?('-p') ? '' : ' -p 3030' args = args.join(' ') - command = "bundle exec thin -R config.ru start#{port_option} #{args}" + command = "bundle exec puma #{port_option} #{args} config.ru" command.prepend "export JOB_PATH=#{options[:job_path]}; " if options[:job_path] run_command(command) end - desc "stop", "Stops the thin server" - def stop - command = "bundle exec thin stop" - run_command(command) - end - desc "job JOB_NAME AUTH_TOKEN(optional)", "Runs the specified job. Make sure to supply your auth token if you have one set." def job(name, auth_token = "") Dir[File.join(Dir.pwd, 'lib/**/*.rb')].each {|file| require_file(file) }