Browse files

get the cucumber working again - switch from mvn to rmvn

  • Loading branch information...
1 parent 1f08289 commit 7b1b1643da539d20bba54e917000b09dce1c6ba2 @mkristian committed Mar 18, 2011
View
6 features/generators.feature
@@ -2,12 +2,12 @@ Feature: Generators for slf4r
Scenario: The slf4r rails template creates a rails application which uses slf4r-wrapper
Given I create new rails application with template "simple.template"
- Then the output should contain "setup slf4r logger wrapper with ActiveSupport::BufferedLogger"
+ Then the output should contain "setup slf4r logger wrapper"
Scenario: The slf4r rails template creates a rails application which uses logging gem
Given I create new rails application with template "logging.template"
- Then the output should contain "INFO \(Rails\) - setup slf4r logger categories for Logging::Logger"
+ Then the output should contain "setup slf4r logger Logging::Logger"
Scenario: The slf4r rails template creates a rails application which uses log4j
Given I create new rails application with template "log4j.template"
- Then the output should contain "INFO \(Rails\) - setup slf4r logger categories for org.slf4j.impl.Log4jLoggerAdapter"
+ Then the output should contain "setup slf4r logger org.slf4j.impl.Log4jLoggerAdapter"
View
2 features/step_definitions/simple_steps.rb
@@ -2,7 +2,7 @@
Given /^I create new rails application with template "(.*)"$/ do |template|
name = template.sub(/.template$/, '')
directory = File.join('target', name)
- rails_version = ENV['RAILS_VERSION'] || '3.0.1'
+ rails_version = '3.0.1'
ruby = defined?(JRUBY_VERSION) ? "jruby" : "ruby"
rails_command = "#{ENV['GEM_HOME']}/bin/rails"
View
3 templates/helper.rb
@@ -23,7 +23,8 @@ def run_generate(*args)
end
def run_mvn(goal, *args)
- run "mvn de.saumya.mojo:rails3-maven-plugin:0.23.0-SNAPSHOT:#{goal} #{args.join(' ')} -Dgem.home=#{ENV['GEM_HOME']} -Dgem.path=#{ENV['GEM_PATH']} >> error.txt"
+ separator = args.member?('--') ? ' ' : ' -- '
+ run "rmvn rails #{goal} #{args.join(' ')}#{separator}-Dgem.home=#{ENV['GEM_HOME']} -Dgem.path=#{ENV['GEM_PATH']} >> error.txt"
end
def bundle_install
View
3 templates/jruby.template
@@ -1,4 +1,7 @@
#-*- mode: ruby -*-
+
+# this is tailered to rails 3.0.1 (and maybe others)
+
db_gem_line = "gem '#{gem_for_database}'"
db_gem_line << ", :require => '#{require_for_database}'" if require_for_database
db_gem_regexp = Regexp::quote(db_gem_line).gsub("'", "['\"]")
View
4 templates/log4j.template
@@ -4,8 +4,8 @@ apply File.join(File.dirname(__FILE__), 'slf4r.template')
require File.join(File.dirname(__FILE__), 'helper.rb')
run_mvn 'pom'
-run_mvn 'generate', '-Dargs=slf4r:log4j'
-run_mvn 'pom', '-Drails.pom.force'
+run_mvn 'generate', 'slf4r:log4j'
+run_mvn 'pom', '--', '-Dpom.force'
run_mvn 'generate'
# vim: syntax=Ruby
View
2 templates/logging.template
@@ -6,7 +6,7 @@ require File.join(File.dirname(__FILE__), 'helper.rb')
gem 'logging'
run_mvn 'pom'
-run_mvn 'generate', '-Dargs=slf4r:logging'
+run_mvn 'generate', 'slf4r:logging'
run_mvn 'pom'
run_mvn 'generate'

0 comments on commit 7b1b164

Please sign in to comment.