Skip to content

Commit

Permalink
extract rails support to spork-rails
Browse files Browse the repository at this point in the history
  • Loading branch information
timcharper committed Jan 22, 2012
1 parent ff24425 commit 9dfc1d9
Show file tree
Hide file tree
Showing 36 changed files with 283 additions and 1,072 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -8,3 +8,4 @@ tmp/
ext/Rakefile
.bundle
TAGS
*.gem
4 changes: 3 additions & 1 deletion Gemfile
@@ -1,7 +1,9 @@
source :gemcutter
gemspec
gem 'cucumber', '~> 1.0.0'
gem 'rspec', '~> 2.6'
gem 'rspec', '~> 2.8'
gem 'rake'
gem "spork", :path => File.expand_path("../", __FILE__)

if RUBY_VERSION =~ /^1\.9/
gem 'ruby-debug19'
Expand Down
43 changes: 27 additions & 16 deletions Gemfile.lock
@@ -1,30 +1,40 @@
PATH
remote: .
specs:
spork (0.9.0)

PATH
remote: .
specs:
spork (0.9.0)

GEM
remote: http://rubygems.org/
specs:
archive-tar-minitar (0.5.2)
builder (3.0.0)
columnize (0.3.6)
cucumber (1.0.0)
cucumber (1.0.6)
builder (>= 2.1.2)
diff-lcs (>= 1.1.2)
gherkin (~> 2.4.1)
gherkin (~> 2.4.18)
json (>= 1.4.6)
term-ansicolor (>= 1.0.5)
diff-lcs (1.1.2)
gherkin (2.4.1)
term-ansicolor (>= 1.0.6)
diff-lcs (1.1.3)
gherkin (2.4.21)
json (>= 1.4.6)
json (1.5.3)
json (1.6.5)
linecache19 (0.5.12)
ruby_core_source (>= 0.1.4)
rake (0.8.7)
rspec (2.6.0)
rspec-core (~> 2.6.0)
rspec-expectations (~> 2.6.0)
rspec-mocks (~> 2.6.0)
rspec-core (2.6.3)
rspec-expectations (2.6.0)
rake (0.9.2.2)
rspec (2.8.0)
rspec-core (~> 2.8.0)
rspec-expectations (~> 2.8.0)
rspec-mocks (~> 2.8.0)
rspec-core (2.8.0)
rspec-expectations (2.8.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)
rspec-mocks (2.8.0)
ruby-debug-base19 (0.11.25)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
Expand All @@ -35,13 +45,14 @@ GEM
ruby-debug-base19 (>= 0.11.19)
ruby_core_source (0.1.5)
archive-tar-minitar (>= 0.5.2)
term-ansicolor (1.0.5)
term-ansicolor (1.0.7)

PLATFORMS
ruby

DEPENDENCIES
cucumber (~> 1.0.0)
rake
rspec (~> 2.6)
rspec (~> 2.8)
ruby-debug19
spork!
36 changes: 19 additions & 17 deletions README.rdoc
Expand Up @@ -20,40 +20,42 @@ Spork runs on POSIX systems using fork. It also runs on windows by pre-populatin

== Supported Application Frameworks

Actually, Spork ~can~ work with any application framework. But, it ships with hooks and helpers to make an "out of the box" experience.
Spork can work with any application framework, but needs work to prevent application files from being eager loaded.

* Rails 3.0 (for Rails 2.{1,2,3}.x, please try spork 0.8.x)
* Padrino
See https://github.com/sporkrb/spork/wiki/Supported-Application-Frameworks for a list of supported frameworks and their gems.

== INSTALL:

=== rubygems:

[sudo] gem install spork --prerelease

(Rails 2.x)

[sudo] gem install spork --version 0.8.4
[sudo] gem install spork

=== bundler:

Add to your Gemfile:

gem 'spork', '~> 0.9.0.rc'

(Rails 2.x, use this)

gem 'spork', '~> 0.8'
gem 'spork', '~> 0.9.0'

== Usage

From a terminal, change to your project directory.

Then, bootstrap your spec/spec_helper.rb file.
Then, bootstrap your test helper file. If running rspec,

spork rspec --bootstrap

Cucumber:

spork cucumber --bootstrap

TestUnit:

(Install the spork-testunit gem)
spork test_unit --bootstrap

spork --bootstrap
If you don't specifiy a test framework, spork will find one and pick it.

Next, edit spec/spec_helper.rb and follow the instructions that were put at the top.
Follow the instructions.

Finally, run spork. A spec DRb server will be running!

Expand Down Expand Up @@ -131,4 +133,4 @@ See http://wiki.github.com/sporkrb/spork/troubleshooting
* Roger Pack - JRuby support / Windows
* Donald Parish - Windows support (Magazine strategy)

Spork (c) 2011 Tim Harper, released under the MIT license
Spork (c) 2012 Tim Harper, released under the MIT license
107 changes: 0 additions & 107 deletions features/cucumber_rails_integration.feature

This file was deleted.

3 changes: 1 addition & 2 deletions features/diagnostic_mode.feature
Expand Up @@ -11,7 +11,7 @@ Feature: Diagnostic Mode
require 'spork'
Spork.prefork do
require 'lib/awesome.rb'
require './lib/awesome.rb'
require '../external_dependency/super_duper.rb'
end
Expand All @@ -38,4 +38,3 @@ Feature: Diagnostic Mode
And the output should contain "spec/spec_helper.rb:5"
And the output should not contain "super_duper.rb"
And the output should not contain "diagnose.rb"

14 changes: 0 additions & 14 deletions features/gemfiles/rails3.0/Gemfile

This file was deleted.

0 comments on commit 9dfc1d9

Please sign in to comment.