summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--History.txt8
-rw-r--r--features/compile.feature8
-rwxr-xr-xlib/rake/extensiontask.rb2
3 files changed, 17 insertions, 1 deletions
diff --git a/History.txt b/History.txt
index 533561d..4923708 100644
--- a/History.txt
+++ b/History.txt
@@ -1,3 +1,11 @@
+=== (In Git)
+
+* Enhancements:
+ * Invocation from command line now support extra options similar to RubyGems.
+ Closes #4 from pull #47 [jonforums]
+
+ $ rake compile -- --with-opt-dir=/opt/local
+
=== 0.7.9 / 2011-06-08
* Enhancements:
diff --git a/features/compile.feature b/features/compile.feature
index 2d2dc22..eff7900 100644
--- a/features/compile.feature
+++ b/features/compile.feature
@@ -13,6 +13,14 @@ Feature: Compile C code into Ruby extensions.
And binary extension 'extension_one' do exist in 'lib'
And 'tmp' folder is created
+ Scenario: compile an extension with extra options
+ Given a safe project directory
+ And a extension named 'extension_one'
+ And 'tmp' folder is deleted
+ When rake task 'compile -- --with-opt-dir=/opt/local' is invoked
+ Then rake task 'compile -- --with-opt-dir=/opt/local' succeeded
+ And output of rake task 'compile -- --with-opt-dir=/opt/local' contains /with-opt-dir/
+
Scenario: not recompile unmodified extension
Given a safe project directory
And a extension named 'extension_one'
diff --git a/lib/rake/extensiontask.rb b/lib/rake/extensiontask.rb
index d1d752d..a38ab59 100755
--- a/lib/rake/extensiontask.rb
+++ b/lib/rake/extensiontask.rb
@@ -142,7 +142,7 @@ Rerun `rake` under MRI Ruby 1.8.x/1.9.x to cross/native compile.
# add any extra command line options
unless extra_options.empty?
- cmd.push('--', *extra_options)
+ cmd.push(*extra_options)
end
chdir tmp_path do