Browse files

rake-compiler and bundler integration fixes

  • Loading branch information...
1 parent 9a571f7 commit 81a57a86f6fcd9993e54001541c342bf3d2da81c @hparra committed Oct 25, 2013
Showing with 29 additions and 20 deletions.
  1. +2 −0 Gemfile
  2. +18 −4 Rakefile
  3. +9 −16 serialport.gemspec
View
2 Gemfile
@@ -1 +1,3 @@
+source "https://rubygems.org"
+source "http://gems.github.com"
gemspec
View
22 Rakefile
@@ -1,13 +1,27 @@
+
+# :build
+# :install
+# :release
require "bundler/gem_tasks"
+
+# :clean
+# :clobber
+# :compile
+# :compile:serialport
require "rake/extensiontask"
-Rake::ExtensionTask.new "serialport" do |ext|
+CLOBBER << FileList["doc"]
+CLOBBER << FileList["pkg"]
+
+GEMSPEC = eval File.read File.expand_path("../serialport.gemspec", __FILE__)
+
+Rake::ExtensionTask.new "serialport", GEMSPEC do |ext|
ext.lib_dir = File.join(*['lib', ENV['FAT_DIR']].compact)
ext.ext_dir = "ext/native"
end
-task :clean do
- rm_rf(Dir['doc'], :verbose => true)
- rm_rf(Dir['pkg'], :verbose => true)
+# add your default gem packing task
+Gem::PackageTask.new(GEMSPEC) do |pkg|
end
+task :default => [:clean, :clobber, :compile, :test]
View
25 serialport.gemspec
@@ -9,22 +9,15 @@ Gem::Specification.new do |s|
s.description = "Ruby/SerialPort is a Ruby library that provides a class for using RS-232 serial ports."
s.email = "hector@hectorparra.com"
s.homepage = "http://github.com/hparra/ruby-serialport/"
- s.require_paths = ["lib"]
- s.extensions = ["ext/native/extconf.rb", "ext/native/extconf.rb"]
- s.files = `git ls-files`.split($\)
- s.extra_rdoc_files = [
- "LICENSE",
- "README"
- ]
+ s.add_runtime_dependency "serialport"
+ s.add_development_dependency "bundler"
+ s.add_development_dependency "rake"
+ s.add_development_dependency "rake-compiler", ">= 0.4.1"
- s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
-
- s.add_runtime_dependency(%q<serialport>, [">= 0"])
- s.add_development_dependency(%q<rake>, [">= 0"])
- s.add_development_dependency(%q<rake-compiler>, [">= 0.4.1"])
- s.add_development_dependency(%q<rake>, [">= 0"])
- s.add_development_dependency(%q<rake-compiler>, [">= 0.4.1"])
- s.add_development_dependency(%q<jeweler>, [">= 0"])
+ s.require_paths = ["lib"]
+ s.files = `git ls-files`.split($\)
+ s.extensions = "ext/native/extconf.rb"
+ s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
+ s.extra_rdoc_files = ["LICENSE", "README"]
end
-

0 comments on commit 81a57a8

Please sign in to comment.