Skip to content

Commit

Permalink
Fix subtle build script bug
Browse files Browse the repository at this point in the history
  • Loading branch information
aslakhellesoy committed Jun 14, 2010
1 parent 69e39e2 commit 423b551
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
8 changes: 4 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ begin
gem.homepage = "http://github.com/aslakhellesoy/gherkin"
gem.authors = ["Mike Sassak", "Gregory Hnatiuk", "Aslak Hellesøy"]
gem.executables = ["gherkin"]
gem.add_dependency "trollop", ">= 1.16.2"
gem.add_development_dependency 'rspec', '>= 2.0.0.beta.11'
gem.add_development_dependency "cucumber", ">= 0.8.1"
gem.add_development_dependency "rake-compiler", ">= 0.7.0" unless defined?(JRUBY_VERSION)
gem.add_dependency "trollop", "~> 1.16.2"
gem.add_development_dependency 'rspec', '~> 2.0.0.beta.11'
gem.add_development_dependency "cucumber", "~> 0.8.1"
gem.add_development_dependency "rake-compiler", "~> 0.7.0" unless defined?(JRUBY_VERSION)

gem.files -= FileList['ikvm/**/*']
gem.files -= FileList['java/**/*']
Expand Down
26 changes: 12 additions & 14 deletions tasks/compile.rake
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,20 @@ langs.each do |i18n|
java = RagelTask.new('java', i18n)
rb = RagelTask.new('rb', i18n)

file 'lib/gherkin.jar' => [java.target, rb.target]

begin
if defined?(JRUBY_VERSION)
java_properties = "java/src/main/resources/gherkin/I18nKeywords_#{i18n.iso_code.gsub(/-/, '_')}.properties"
file java_properties => 'lib/gherkin/i18n.yml' do
File.open(java_properties, 'wb') do |io|
io.puts("# Generated file. Do not edit.")
Gherkin::I18n::KEYWORD_KEYS.each do |key|
value = Gherkin::I18n.unicode_escape(i18n.keywords(key).join("|"))
io.puts("#{key}:#{value}")
end
java_properties = "java/src/main/resources/gherkin/I18nKeywords_#{i18n.iso_code.gsub(/-/, '_')}.properties"
file java_properties => 'lib/gherkin/i18n.yml' do
File.open(java_properties, 'wb') do |io|
io.puts("# Generated file. Do not edit.")
Gherkin::I18n::KEYWORD_KEYS.each do |key|
value = Gherkin::I18n.unicode_escape(i18n.keywords(key).join("|"))
io.puts("#{key}:#{value}")
end
end
file 'lib/gherkin.jar' => java_properties
else
end
file 'lib/gherkin.jar' => [java.target, rb.target, java_properties]

begin
if !defined?(JRUBY_VERSION)
require 'rake/extensiontask'

c = RagelTask.new('c', i18n)
Expand Down

0 comments on commit 423b551

Please sign in to comment.