Skip to content

Commit

Permalink
bring in latest from master
Browse files Browse the repository at this point in the history
  • Loading branch information
brianmario committed Feb 18, 2011
2 parents 0b54501 + 78386cd commit e37e040
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 24 deletions.
7 changes: 4 additions & 3 deletions .gitignore
@@ -1,9 +1,10 @@
_10lines_
doc
ext/Makefile
ext/*.o
ext/*.so
ext/*.bundle
*.o
*.so
*.bundle
pkg
.bundle
tmp
Gemfile.lock
2 changes: 2 additions & 0 deletions .rspec
@@ -0,0 +1,2 @@
--colour
--format=documentation
35 changes: 28 additions & 7 deletions Rakefile
@@ -1,14 +1,35 @@
require 'bundler'
Bundler::GemHelper.install_tasks

desc "Build the C extension"
task :build_extensions do
Dir.chdir File.expand_path('../ext', __FILE__) do
system 'make distclean' if File.exists?('Makefile')
system 'ruby extconf.rb && make'
# rspec
begin
require 'rspec'
require 'rspec/core/rake_task'

desc "Run all examples with RCov"
RSpec::Core::RakeTask.new('spec:rcov') do |t|
t.rcov = true
end
RSpec::Core::RakeTask.new('spec') do |t|
t.verbose = true
end

task :default => :spec
rescue LoadError
puts "rspec, or one of its dependencies, is not available. Install it with: sudo gem install rspec"
end

require 'rspec/core/rake_task'
# rake-compiler
require 'rake' unless defined? Rake

gem 'rake-compiler', '>= 0.7.5'
require "rake/extensiontask"

Rake::ExtensionTask.new('bzip2') do |ext|
ext.cross_compile = true
ext.cross_platform = ['x86-mingw32', 'x86-mswin32-60']

ext.lib_dir = File.join 'lib', 'bzip2'
end

RSpec::Core::RakeTask.new(:spec)
Rake::Task[:spec].prerequisites << :compile
24 changes: 14 additions & 10 deletions bzip2-ruby.gemspec
@@ -1,20 +1,24 @@
# -*- encoding: utf-8 -*-
$:.push File.expand_path('../lib', __FILE__)
require 'bzip2/version'
require './lib/bzip2/version'

Gem::Specification.new do |s|
s.name = 'bzip2-ruby'
s.version = Bzip2::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ['Guy Decoux', 'Brian Lopezs']
s.date = Time.now.utc.strftime("%Y-%m-%d")
s.email = ['seniorlopez@gmail.com']
s.extensions = ['ext/extconf.rb']
s.extra_rdoc_files = [
"README.rdoc"
]
s.files = `git ls-files`.split("\n")
s.homepage = 'http://github.com/brianmario/bzip2-ruby'
s.summary = 'Ruby C bindings to libbzip2.'

s.extensions = ['ext/extconf.rb']
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- spec/*`.split("\n")
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ['lib', 'ext']
s.rubygems_version = %q{1.4.2}
s.summary = 'Ruby C bindings to libbzip2.'
s.test_files = `git ls-files spec`.split("\n")

s.add_development_dependency 'rspec', '>= 2.0.0'
# tests
s.add_development_dependency 'rake-compiler', ">= 0.7.5"
s.add_development_dependency 'rspec', ">= 2.0.0"
end
4 changes: 2 additions & 2 deletions ext/bzip2/extconf.rb
Expand Up @@ -14,8 +14,8 @@
if RUBY_VERSION =~ /1.9/
$CFLAGS << ' -DRUBY_19_COMPATIBILITY'
end

create_makefile('bzip2_ext')
create_makefile('bzip2')
else
puts "libbz2 not found, maybe try manually specifying --with-bz2-dir to find it?"
end
1 change: 0 additions & 1 deletion lib/bzip2-ruby.rb

This file was deleted.

2 changes: 1 addition & 1 deletion lib/bzip2.rb
@@ -1,4 +1,4 @@
require 'bzip2_ext'
require 'bzip2/bzip2'
require 'bzip2/version'

# This is the base module for the +bzip2-ruby+ gem. Beneath it are the classes
Expand Down

0 comments on commit e37e040

Please sign in to comment.