Permalink
Browse files

Remove support for Rails2

  • Loading branch information...
1 parent 79f943c commit ea033b2053143ca610b61a3165fb724a4f57ce51 @aslakhellesoy aslakhellesoy committed May 9, 2011
Showing with 171 additions and 496 deletions.
  1. +0 −22 HACKING.rdoc
  2. +3 −2 History.txt
  3. +74 −0 README.md
  4. +0 −68 README.rdoc
  5. +0 −1 VERSION
  6. +18 −19 cucumber-rails.gemspec
  7. +1 −0 features/no_database.feature
  8. +0 −13 generators/cucumber/USAGE
  9. +0 −46 generators/cucumber/cucumber_generator.rb
  10. +0 −12 generators/feature/USAGE
  11. +0 −47 generators/feature/feature_generator.rb
  12. +1 −5 lib/cucumber/rails.rb
  13. +0 −23 lib/cucumber/rails/version.rb
  14. +0 −16 lib/cucumber/rails2.rb
  15. +0 −29 lib/cucumber/rails2/action_controller.rb
  16. +0 −31 lib/generators/cucumber/feature/feature_base.rb
  17. +7 −16 lib/generators/cucumber/feature/feature_generator.rb
  18. 0 {templates/feature → lib/generators/cucumber/feature/templates}/feature.erb
  19. 0 {templates/feature → lib/generators/cucumber/feature/templates}/steps.erb
  20. +0 −133 lib/generators/cucumber/install/install_base.rb
  21. +67 −13 lib/generators/cucumber/install/install_generator.rb
  22. 0 {templates/install → lib/generators/cucumber/install/templates}/config/cucumber.yml.erb
  23. 0 {templates/install → lib/generators/cucumber/install/templates}/environments/cucumber.rb.erb
  24. 0 {templates/install → lib/generators/cucumber/install/templates}/script/cucumber
  25. 0 ...pybara_steps.rb.erb → lib/generators/cucumber/install/templates/step_definitions/web_steps.rb.erb
  26. 0 {templates/install → lib/generators/cucumber/install/templates}/step_definitions/web_steps_cs.rb.erb
  27. 0 {templates/install → lib/generators/cucumber/install/templates}/step_definitions/web_steps_da.rb.erb
  28. 0 {templates/install → lib/generators/cucumber/install/templates}/step_definitions/web_steps_de.rb.erb
  29. 0 {templates/install → lib/generators/cucumber/install/templates}/step_definitions/web_steps_es.rb.erb
  30. 0 {templates/install → lib/generators/cucumber/install/templates}/step_definitions/web_steps_ja.rb.erb
  31. 0 {templates/install → lib/generators/cucumber/install/templates}/step_definitions/web_steps_ko.rb.erb
  32. 0 {templates/install → lib/generators/cucumber/install/templates}/step_definitions/web_steps_no.rb.erb
  33. 0 ...ates/install → lib/generators/cucumber/install/templates}/step_definitions/web_steps_pt-BR.rb.erb
  34. 0 {templates/install → lib/generators/cucumber/install/templates}/support/_rails_each_run.rb.erb
  35. 0 {templates/install → lib/generators/cucumber/install/templates}/support/_rails_prefork.rb.erb
  36. 0 {templates/install → lib/generators/cucumber/install/templates}/support/capybara.rb
  37. 0 {templates/install → lib/generators/cucumber/install/templates}/support/edit_warning.txt
  38. 0 {templates/install → lib/generators/cucumber/install/templates}/support/paths.rb
  39. 0 {templates/install → lib/generators/cucumber/install/templates}/support/rails.rb.erb
  40. 0 {templates/install → lib/generators/cucumber/install/templates}/support/rails_spork.rb.erb
  41. 0 {templates/install → lib/generators/cucumber/install/templates}/support/selectors.rb
  42. 0 {templates/install → lib/generators/cucumber/install/templates}/support/web_steps_warning.txt
  43. 0 {templates/install → lib/generators/cucumber/install/templates}/tasks/cucumber.rake.erb
View
@@ -1,22 +0,0 @@
-= Hacking on Cucumber-Rails
-
-If you have a bugfix or a new feature you want to contribute, please fork on Github and make your own feature branch:
-
- git clone git@github.com:you/cucumber-rails.git
- git checkout -b 87-my-awesome-bugfix
-
-The feature branch should contain a ticket number (if appliccable) and a descriptive name that aligns with the ticket name.
-When you think you're done send a pull request.
-
-== Setting up your environment
-
-I strongly recommend rvm and ruby 1.9.2. When you have that, cd into your cucumber-rails repository and:
-
- gem install bundler
- bundle install
-
-== Running all features
-
- rake cucumber
-
-One of the features uses MongoDB, which needs to be running in order to make features/mongoid.feature to pass.
View
@@ -1,7 +1,8 @@
-== In Git
+== 0.5.0.beta1
-* Removed database cleaner strategy overrides (#134 Daniel Morrison, Daniel Duvall)
+* Dropped support for Rails 2 (Aslak Hellesøy)
* Dropped support for Webrat (Aslak Hellesøy)
+* Removed database cleaner strategy overrides (#134 Daniel Morrison, Daniel Duvall)
* Upgrade to Capybara 1.0.0.beta1 or newer (#130 Simon Menke, Klaus Hartl, Aslak Hellesøy)
* Generated paths.rb cleanup (#133 Tim Pope)
* Allow css pseudo-classes in scopers (#122 twalpole)
View
@@ -0,0 +1,74 @@
+# Cucumber-Rails
+
+Cucumber-Rails brings Cucumber to Rails3. It contains 2 generators - one
+for bootstrapping your Rails app for Cucumber, and a second one for generating features.
+
+Cucumber-Rails also contains Cucumber Step Definitions that wrap Capybara,
+giving you a head start for writing Cucumber features against your Rails app.
+
+## Installation
+
+Before you can use the generator, add the gem to your project's Gemfile as follows:
+
+ group :test do
+ gem 'cucumber-rails'
+ # database_cleaner is not required, but highly recommended
+ gem 'database_cleaner'
+ end
+
+Then install it by running:
+
+ bundle install
+
+Learn about the various options:
+
+ ruby rails generate cucumber:install --help
+
+Finally, bootstrap your Rails app, for example:
+
+ rails generate cucumber:install
+
+## Generating a Cucumber feature
+
+IMPORTANT: Only do this if you are new to Cucumber. We recommend you write your
+Cucumber features by hand once you get the hang of it.
+
+Example:
+
+ ruby rails generate cucumber:feature post title:string body:text published:boolean
+ ruby rails generate scaffold post title:string body:text published:boolean
+ rake db:migrate
+ rake cucumber
+
+## Running Cucumber
+
+With Rake:
+
+ rake cucumber
+
+Without Rake:
+
+ [bundle exec] cucumber
+
+## Hacking on Cucumber-Rails
+
+If you have a bugfix or a new feature you want to contribute, please fork on Github and make your own feature branch:
+
+ git clone git@github.com:you/cucumber-rails.git
+ git checkout -b 87-my-awesome-bugfix
+
+The feature branch should contain a ticket number (if applicable) and a descriptive name that aligns with the ticket name.
+When you think you're done send a pull request.
+
+### Setting up your environment
+
+I strongly recommend rvm and ruby 1.9.2. When you have that, cd into your cucumber-rails repository and:
+
+ gem install bundler
+ bundle install
+
+### Running all features
+
+ rake cucumber
+
+One of the features uses MongoDB, which needs to be running in order to make features/mongoid.feature to pass.
View
@@ -1,68 +0,0 @@
-= Cucumber-Rails
-
-Cucumber-Rails brings Cucumber to Rails2 and Rails3. It contains 2 generators - one
-for bootstrapping your Rails app for Cucumber, and a second one for generating features.
-
-Cucumber-Rails also contains Cucumber Step Definitions that wrap Capybara or Webrat,
-giving you a head start for writing Cucumber features against your Rails app.
-
-== Installation
-
-=== Rails 3:
-
-Before you can use the generator, add the gem to your project's Gemfile as follows:
-
- group :test do
- gem 'cucumber-rails'
- gem 'capybara'
- gem 'database_cleaner'
- end
-
-Then install it by running:
-
- bundle install
-
-Learn about the various options:
-
- ruby script/rails generate cucumber:install --help
-
-Finally, bootstrap your Rails app, for example:
-
- rails generate cucumber:install
-
-=== Rails 2.x:
-
-Before you can use the generator, install the gem by running:
-
- gem install cucumber-rails
-
-Learn about the various options:
-
- ruby script/generate cucumber --help
-
-Finally, bootstrap your Rails app, for example:
-
- ruby script/generate cucumber --rspec --capybara
-
-== Generating a Cucumber feature
-
-IMPORTANT: Only do this if you are new to Cucumber. We recommend you write your
-Cucumber features by hand once you get the hang of it.
-
-=== Rails 3:
-
-Example:
-
- ruby script/rails generate cucumber:feature post title:string body:text published:boolean
- ruby script/rails generate scaffold post title:string body:text published:boolean
- rake db:migrate
- rake cucumber
-
-=== Rails 2:
-
-Example:
-
- ruby script/generate feature post title:string body:text published:boolean
- ruby script/generate scaffold post title:string body:text published:boolean
- rake db:migrate
- rake cucumber
View
@@ -1 +0,0 @@
-0.3.2
View
@@ -1,37 +1,36 @@
# -*- encoding: utf-8 -*-
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
-require 'cucumber/rails/version'
Gem::Specification.new do |s|
s.name = 'cucumber-rails'
- s.version = Cucumber::Rails::VERSION
+ s.version = '0.5.0.beta1'
s.authors = ["Aslak Hellesøy", "Dennis Blöte", "Rob Holland"]
s.description = "Cucumber Generators and Runtime for Rails"
- s.summary = "cucumber-rails-#{s.version}"
+ s.summary = "#{s.name}-#{s.version}"
s.email = 'cukes@googlegroups.com'
s.homepage = "http://cukes.info"
- s.add_dependency('cucumber', Cucumber::Rails::DEPS['cucumber'])
- s.add_dependency('rack-test', Cucumber::Rails::DEPS['rack-test'])
- s.add_dependency('nokogiri', Cucumber::Rails::DEPS['nokogiri'])
- s.add_dependency('capybara', Cucumber::Rails::DEPS['capybara'])
- s.add_development_dependency('bundler', Cucumber::Rails::DEPS['bundler'])
- s.add_development_dependency('aruba', Cucumber::Rails::DEPS['aruba'])
- s.add_development_dependency('rails', Cucumber::Rails::DEPS['rails'])
- s.add_development_dependency('sqlite3-ruby', Cucumber::Rails::DEPS['sqlite3-ruby'])
- s.add_development_dependency('rspec', Cucumber::Rails::DEPS['rspec'])
- s.add_development_dependency('rspec-rails', Cucumber::Rails::DEPS['rspec-rails'])
- s.add_development_dependency('factory_girl', Cucumber::Rails::DEPS['capybara'])
- s.add_development_dependency('database_cleaner', Cucumber::Rails::DEPS['database_cleaner'])
- s.add_development_dependency('mongoid', Cucumber::Rails::DEPS['mongoid'])
- s.add_development_dependency('bson_ext', Cucumber::Rails::DEPS['bson_ext'])
- # s.add_development_dependency('akephalos', Cucumber::Rails::DEPS['akephalos'])
+ s.add_dependency('cucumber', '>= 0.10.2')
+ s.add_dependency('rack-test', '>= 0.5.7')
+ s.add_dependency('nokogiri', '>= 1.4.4')
+ s.add_dependency('capybara', '>= 1.0.0.beta1')
+ s.add_development_dependency('bundler', '>= 1.0.12')
+ s.add_development_dependency('aruba', '>= 0.3.6')
+ s.add_development_dependency('rails', '>= 3.0.7')
+ s.add_development_dependency('sqlite3-ruby', '>= 1.3.3')
+ s.add_development_dependency('rspec', '>= 2.6.0.rc6')
+ s.add_development_dependency('rspec-rails', '>= 2.2.0')
+ s.add_development_dependency('factory_girl', '>= 2.0.0.beta2')
+ s.add_development_dependency('database_cleaner', '>= 0.6.7')
+ s.add_development_dependency('mongoid', '>= 2.0.1')
+ s.add_development_dependency('bson_ext', '>= 1.3.0')
+ # s.add_development_dependency('akephalos', '>= 0.2.5')
s.rubygems_version = ">= 1.6.1"
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
- s.extra_rdoc_files = ["LICENSE", "README.rdoc", "History.txt"]
+ s.extra_rdoc_files = ["LICENSE", "README.md", "History.txt"]
s.rdoc_options = ["--charset=UTF-8"]
s.require_path = "lib"
end
@@ -1,3 +1,4 @@
+@announce
Feature: No Database
Allow Cucumber to work with a Rails app without a database
View
@@ -1,13 +0,0 @@
-Description:
- Sets up Cucumber in your Rails project. After running this generator you will
- get a new rake task called features.
-
- This also generates the necessary files in the features directory.
-
- Also see the feature generator
-
-Examples:
- `./script/generate cucumber`
-
-You can also provide a language argument for localized capybara_steps:
- `./script/generate cucumber de`
@@ -1,46 +0,0 @@
-require File.expand_path(File.join(File.dirname(__FILE__), '../../lib/generators/cucumber/install/install_base'))
-
-# This generator bootstraps a Rails project for use with Cucumber
-class CucumberGenerator < Rails::Generator::Base
- include Cucumber::Generators::InstallBase
-
- attr_reader :language, :template_dir
-
- def initialize(runtime_args, runtime_options = {})
- super
- @language = @args.empty? ? 'en' : @args.first
- end
-
- def manifest
- record do |m|
- install_cucumber_rails(m)
- end
- end
-
- def self.gem_root
- File.expand_path('../../../', __FILE__)
- end
-
- def self.source_root
- File.join(gem_root, 'templates', 'install')
- end
-
- def source_root
- self.class.source_root
- end
-
- private
-
- def banner
- "Usage: #{$0} cucumber (language)"
- end
-
- def add_options!(opt)
- opt.separator ''
- opt.separator 'Options:'
- opt.on('--spork', 'Use Spork to run features') do
- options[:spork] = true
- end
- end
-
-end
View
@@ -1,12 +0,0 @@
-Description:
- Generates a skeleton for a new feature. Both a simple .feature file and
- a steps.rb file is generated. This generator should be used with moderation.
- See http://github.com/aslakhellesoy/cucumber/wikis/feature-coupled-steps-antipattern
- for details about the dangers involved.
-
- This generator can take an optional list of attribute pairs similar to Rails'
- built-in resource generator.
-
-Examples:
- `./script/generate feature post` # no attributes
- `./script/generate feature post title:string body:text published:boolean`
@@ -1,47 +0,0 @@
-require File.join(File.dirname(__FILE__), '../../lib/generators/cucumber/feature/named_arg')
-require File.join(File.dirname(__FILE__), '../../lib/generators/cucumber/feature/feature_base')
-
-# This generator generates a baic feature.
-class FeatureGenerator < Rails::Generator::NamedBase
-
- include Cucumber::Generators::FeatureBase
-
- def manifest
- record do |m|
- create_directory(m, true)
- create_feature_file(m)
- create_steps_file(m)
- create_support_file(m)
- end
- end
-
- def self.gem_root
- File.expand_path('../../../', __FILE__)
- end
-
- def self.source_root
- File.join(gem_root, 'templates', 'feature')
- end
-
- def source_root
- self.class.source_root
- end
-
- def named_args
- args.map { |arg| NamedArg.new(arg) }
- end
-
- private
-
- def banner
- "Usage: #{$0} feature ModelName [field:type, field:type]"
- end
-
- def add_options!(opt)
- opt.separator ''
- opt.separator 'Options:'
- opt.on('--capybara=BACKEND', 'Generate a feature that uses a particular Capybara backend') do |backend|
- options[:capybara] = backend
- end
- end
-end
View
@@ -1,9 +1,5 @@
require 'rails'
-if Rails.version.to_f < 3.0
- require 'cucumber/rails2'
-else
- require 'cucumber/rails3'
-end
+require 'cucumber/rails3'
require 'cucumber/rails/world'
require 'cucumber/rails/hooks'
@@ -1,23 +0,0 @@
-module Cucumber
- module Rails
- VERSION = '0.4.1'
- DEPS = {
- 'aruba' => '>= 0.3.6',
- 'cucumber' => '>= 0.10.2',
-
- 'bundler' => '>= 1.0.12',
- 'rack-test' => '>= 0.5.7',
- 'nokogiri' => '>= 1.4.4',
- 'rails' => '>= 3.0.7',
- 'capybara' => '>= 1.0.0.beta1',
- 'factory_girl' => '>= 2.0.0.beta2',
- 'rspec' => '>= 2.6.0.rc6',
- 'rspec-rails' => '>= 2.2.0',
- 'database_cleaner' => '>= 0.6.7',
- 'sqlite3-ruby' => '>= 1.3.3',
- 'mongoid' => '>= 2.0.1',
- 'bson_ext' => '>= 1.3.0',
- 'akephalos' => '>= 0.2.5'
- }
- end
-end
Oops, something went wrong.

0 comments on commit ea033b2

Please sign in to comment.