From a58e0778113f3217ae8f995a1ba1e90016e0aa69 Mon Sep 17 00:00:00 2001 From: Gareth Davis Date: Sat, 10 Aug 2013 08:55:49 +0100 Subject: [PATCH] remove direct dependency on thin as the rack implementation the main reason for this is to allow compatibility with jruby as thin is not really compatible out of the box with jruby. --- bin/dashing | 2 +- dashing.gemspec | 3 +-- lib/dashing.rb | 2 +- templates/project/Gemfile | 6 ++++++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/bin/dashing b/bin/dashing index 9d97700a..8fc53c68 100755 --- a/bin/dashing +++ b/bin/dashing @@ -86,7 +86,7 @@ module Dashing 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 rackup config.ru #{port_option} #{args}" command.prepend "export JOB_PATH=#{options[:job_path]}; " if options[:job_path] system(command) end diff --git a/dashing.gemspec b/dashing.gemspec index 050266b1..231134f4 100644 --- a/dashing.gemspec +++ b/dashing.gemspec @@ -20,10 +20,9 @@ Gem::Specification.new do |s| s.add_dependency('coffee-script', '>=1.6.2') s.add_dependency('sinatra') s.add_dependency('sinatra-contrib') - s.add_dependency('thin') s.add_dependency('rufus-scheduler') s.add_dependency('thor') s.add_dependency('sprockets') s.add_dependency('rack') -end \ No newline at end of file +end diff --git a/lib/dashing.rb b/lib/dashing.rb index 2c3a8108..bd40283e 100644 --- a/lib/dashing.rb +++ b/lib/dashing.rb @@ -18,7 +18,7 @@ settings.sprockets.append_path path end -set server: 'thin', connections: [], history_file: 'history.yml' +set connections: [], history_file: 'history.yml' # Persist history in tmp file at exit at_exit do diff --git a/templates/project/Gemfile b/templates/project/Gemfile index e6ccd848..408430c9 100644 --- a/templates/project/Gemfile +++ b/templates/project/Gemfile @@ -1,6 +1,12 @@ source 'https://rubygems.org' gem 'dashing' +platform :jruby do + gem 'puma' +end +platform :ruby do + gem 'thin' +end ## Remove this if you don't need a twitter widget. gem 'twitter' \ No newline at end of file