Skip to content
Browse files

Added hacking instructions

  • Loading branch information...
1 parent 3ede58b commit 1198cd8e1e09eaab98da906aecac06b7301e9996 @aslakhellesoy aslakhellesoy committed Aug 18, 2011
Showing with 55 additions and 29 deletions.
  1. +1 −1 .rvmrc
  2. +0 −1 Gemfile
  3. +1 −2 Gemfile.lock
  4. +1 −1 LICENCE
  5. +20 −1 README.md
  6. +8 −0 Rakefile
  7. 0 TODO
  8. +10 −9 groovy/Rakefile
  9. +13 −14 java/Rakefile
  10. +1 −0 pom.xml
View
2 .rvmrc
@@ -1 +1 @@
-rvm @cucumber-jvm --create
+rvm gemset use cucumber-jvm
View
1 Gemfile
@@ -1,5 +1,4 @@
source 'http://rubygems.org'
-gem 'bundler', '1.0.17'
gem 'rake', '0.9.2'
gem 'cucumber', '1.0.2'
gem 'aruba', '0.4.6'
View
3 Gemfile.lock
@@ -20,7 +20,7 @@ GEM
term-ansicolor (>= 1.0.5)
diff-lcs (1.1.2)
ffi (1.0.9)
- gherkin (2.4.6)
+ gherkin (2.4.11)
json (>= 1.4.6)
json (1.5.3)
rack (1.3.2)
@@ -41,6 +41,5 @@ PLATFORMS
DEPENDENCIES
aruba (= 0.4.6)
- bundler (= 1.0.17)
cucumber (= 1.0.2)
rake (= 0.9.2)
View
2 LICENCE
@@ -1,6 +1,6 @@
The MIT License
-Copyright (c) 2008,2009,2010,2011 Aslak Hellesøy
+Copyright (c) 2008,2009,2010,2011 Aslak Hellesøy and contributors
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
View
21 README.md
@@ -20,4 +20,23 @@ Cucumber-JVM also integrates with the following Dependency Injection containers:
* PicoContainer
* Spring
-## Hacking
+## Hacking
+
+To hack on Cucumber-JVM you need a JDK and a Ruby interpreter. Ruby is only used for code generation (Cucumber-JVM does not have any Ruby runtime dependencies). Both MRI and JRuby will do.
+
+### Code generation
+
+With Ruby installed and on your path, install some gems that are needed for code generation:
+
+ gem install bundler
+ bundle install
+
+Now you can generate code:
+
+ rake generate
+
+### Building Cucumber-JVM
+
+You'll need Maven to build the Java code (we're happily accepting patches for other build systems). To build and run tests, run:
+
+ mvn clean install
View
8 Rakefile
@@ -1,6 +1,14 @@
require 'bundler/setup'
require 'cucumber/rake/task'
+task :generate do
+ Dir['*/Rakefile'].each do |rakefile|
+ Dir.chdir(File.dirname(rakefile)) do
+ sh "bundle exec rake generate"
+ end
+ end
+end
+
Cucumber::Rake::Task.new(:picocontainer) do |t|
t.cucumber_opts = '-r java/src/test/resources/cucumber-features -r cucumber-features cucumber-features'
end
View
0 TODO
No changes.
View
19 groovy/Rakefile
@@ -1,16 +1,17 @@
require 'gherkin/i18n'
require 'erb'
-task :default => ['generate:groovy']
+task :default => :generate
-namespace :generate do
- desc 'Generate Groovy code'
- task :groovy do
- groovy = ERB.new(IO.read(File.dirname(__FILE__) + '/src/main/code_generator/I18n.groovy.erb'), nil, '-')
- Gherkin::I18n.all.each do |i18n|
- File.open(File.dirname(__FILE__) + "/src/main/java/cucumber/runtime/groovy/#{i18n.underscored_iso_code.upcase}.java", 'wb') do |io|
- io.write(groovy.result(binding))
- end
+desc 'Generate Groovy code'
+task :generate do
+ puts "== Generating Groovy"
+ groovy = ERB.new(IO.read(File.dirname(__FILE__) + '/src/main/code_generator/I18n.groovy.erb'), nil, '-')
+ Gherkin::I18n.all.each do |i18n|
+ file = File.dirname(__FILE__) + "/src/main/java/cucumber/runtime/groovy/#{i18n.underscored_iso_code.upcase}.java"
+ puts "* #{File.expand_path(file)}"
+ File.open(file, 'wb') do |io|
+ io.write(groovy.result(binding))
end
end
end
View
27 java/Rakefile
@@ -1,21 +1,20 @@
require 'gherkin/i18n'
require 'erb'
-task :default => ['generate:java']
+task :default => :generate
-namespace :generate do
- desc 'Generate Java code'
- task :java do
- java = ERB.new(IO.read(File.dirname(__FILE__) + '/src/main/code_generator/I18n.java.erb'), nil, '-')
- Gherkin::I18n.all.each do |i18n|
- i18n.code_keywords.each do |kw|
- file = File.dirname(__FILE__) + "/src/main/java/cucumber/annotation/#{i18n.underscored_iso_code}/#{kw}.java"
- mkdir_p(File.dirname(file))
- File.open(file, 'wb') do |io|
- io.write(java.result(binding))
- end
+desc 'Generate Java code'
+task :generate do
+ puts "== Generating Java"
+ java = ERB.new(IO.read(File.dirname(__FILE__) + '/src/main/code_generator/I18n.java.erb'), nil, '-')
+ Gherkin::I18n.all.each do |i18n|
+ i18n.code_keywords.each do |kw|
+ file = File.dirname(__FILE__) + "/src/main/java/cucumber/annotation/#{i18n.underscored_iso_code}/#{kw}.java"
+ puts "* #{File.expand_path(file)}"
+ mkdir_p(File.dirname(file))
+ File.open(file, 'wb') do |io|
+ io.write(java.result(binding))
end
end
end
-
- end
+end
View
1 pom.xml
@@ -269,6 +269,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
+ <version>2.1.2</version>
<executions>
<execution>
<id>bind-sources</id>

0 comments on commit 1198cd8

Please sign in to comment.
Something went wrong with that request. Please try again.