Skip to content

Commit

Permalink
remove reliance on erlectricity
Browse files Browse the repository at this point in the history
  • Loading branch information
mojombo committed Oct 24, 2009
1 parent 1ba84eb commit 4150346
Show file tree
Hide file tree
Showing 15 changed files with 806 additions and 57 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
coverage
rdoc
pkg
ext/bert/c/Makefile
ext/bert/c/*.bundle
ext/bert/c/*.o
4 changes: 4 additions & 0 deletions History.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
=
* Major Changes
* Remove reliance on Erlectricity.

= 1.0.0 / 2009-10-19
* No changes. Production ready!

Expand Down
27 changes: 24 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,42 @@ begin
gem.authors = ["Tom Preston-Werner"]
gem.add_dependency('erlectricity', '>= 1.1.0')
gem.add_development_dependency("thoughtbot-shoulda")
gem.require_paths = ["lib", "ext"]
gem.files.include("ext")
gem.extensions << 'ext/bert/c/extconf.rb'
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
end

require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
Rake::TestTask.new(:runtests) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/*_test.rb'
test.verbose = true
end

task :test => :check_dependencies do
require 'fileutils'

puts "\nCleaning extension build files and running all specs in native ruby mode..."
['rm -f ext/bert/c/*.bundle', 'rm -f ext/bert/c/*.o'].each do |cmd|
`#{cmd}` && puts(cmd)
end
pid = fork do
exec 'rake runtests'
end
Process.waitpid(pid)

puts "\nRunning `make` to build extensions and rerunning decoder specs..."
Dir.chdir('ext/bert/c') { `make` }
pid = fork do
exec 'rake runtests'
end
Process.waitpid(pid)
end

begin
require 'rcov/rcovtask'
Rcov::RcovTask.new do |test|
Expand All @@ -38,8 +61,6 @@ rescue LoadError
end
end

task :test => :check_dependencies

task :default => :test

require 'rake/rdoctask'
Expand Down
Loading

0 comments on commit 4150346

Please sign in to comment.