Permalink
Browse files

Fix extension building tasks.

  • Loading branch information...
1 parent d612b70 commit 9bf278936fafa04ae3ef577270c1e12878810095 @oggy committed Mar 14, 2011
Showing with 12 additions and 18 deletions.
  1. +5 −10 .gitignore
  2. +5 −6 Rakefile
  3. +2 −2 looksee.gemspec
View
@@ -3,17 +3,12 @@ lib/looksee/mri.bundle
lib/looksee/rbx.bundle
lib/looksee/jruby.jar
-ext/mri/Makefile
-ext/mri/*.o
-ext/mri/*.so
-ext/mri/*.bundle
-ext/mri/*.dll
+ext/Makefile
-ext/rbx/Makefile
-ext/rbx/*.o
-ext/rbx/*.so
-ext/rbx/*.bundle
-ext/rbx/*.dll
+ext/*.o
+ext/*.so
+ext/*.bundle
+ext/*.dll
ext/jruby/**/*.class
View
@@ -1,10 +1,9 @@
require 'ritual'
-case (Object.const_defined?(:RUBY_ENGINE) ? RUBY_ENGINE : 'ruby')
-when 'ruby'
- extension :mri
-when 'rbx'
- extension :rbx
-when 'jruby'
+ruby_engine = (Object.const_defined?(:RUBY_ENGINE) ? RUBY_ENGINE : 'ruby')
+if ruby_engine == 'jruby'
extension :jruby, :type => :jruby
+else
+ name = ruby_engine == 'ruby' ? 'mri' : ruby_engine
+ extension :build_as => "ext/#{name}", :install_as => "lib/looksee/#{name}"
end
View
@@ -22,8 +22,8 @@ Gem::Specification.new do |s|
s.require_path = 'lib'
s.specification_version = 3
- s.add_development_dependency 'ritual', '>= 0.2.0'
- s.add_development_dependency 'rspec', '>= 2.0.0'
+ s.add_development_dependency 'ritual', '0.2.1'
+ s.add_development_dependency 'rspec', '2.5.0'
s.add_development_dependency 'mocha'
s.add_development_dependency 'wirble'
end

0 comments on commit 9bf2789

Please sign in to comment.