Skip to content

Commit

Permalink
fixup for ruby 1.8 + 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Aug 16, 2012
1 parent bd2d1ae commit 5c80232
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 45 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
language: ruby
rvm:
- 1.8.7
- 1.9.3
- ree
- jruby-18mode
- jruby-19mode
script: bundle exec rake
20 changes: 9 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@ GEM
specs:
diff-lcs (1.1.3)
rake (0.9.2.2)
rcov (0.9.11)
rspec (2.7.0)
rspec-core (~> 2.7.0)
rspec-expectations (~> 2.7.0)
rspec-mocks (~> 2.7.0)
rspec-core (2.7.1)
rspec-expectations (2.7.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.7.0)
yard (0.7.3)
rspec (2.11.0)
rspec-core (~> 2.11.0)
rspec-expectations (~> 2.11.0)
rspec-mocks (~> 2.11.0)
rspec-core (2.11.1)
rspec-expectations (2.11.2)
diff-lcs (~> 1.1.3)
rspec-mocks (2.11.2)
yard (0.8.2.1)

PLATFORMS
ruby
Expand All @@ -26,6 +25,5 @@ DEPENDENCIES
bundler
checkm!
rake
rcov
rspec
yard
6 changes: 3 additions & 3 deletions README.textile → README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
= checkm
# checkm

Ruby implementation of Checkm, a general-purpose text-based file manifest format.

== Contributing to checkm
## Contributing to checkm

* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
Expand All @@ -12,7 +12,7 @@ Ruby implementation of Checkm, a general-purpose text-based file manifest format
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

== Copyright
## Copyright

Copyright (c) 2010 Chris Beer. See LICENSE.txt for
further details.
Expand Down
54 changes: 25 additions & 29 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
require 'rake'
require 'rubygems'
require 'bundler'
require 'rspec/core/rake_task'
begin
Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
Expand All @@ -12,38 +10,36 @@ end

Bundler::GemHelper.install_tasks

namespace :checkm do
RSpec::Core::RakeTask.new(:rspec) do |t|
t.pattern = "./spec/**/*_spec.rb"
end
require 'rake'
require 'rspec'
require 'rspec/core/rake_task'

RSpec::Core::RakeTask.new(:rcov) do |t|
t.pattern = "./spec/**/*_spec.rb"
desc 'Default: run specs.'
task :default => :spec

RSpec::Core::RakeTask.new do |t|
if ENV['COVERAGE'] and RUBY_VERSION =~ /^1.8/
t.rcov = true
t.rcov_opts = ["--exclude", "gems\/,spec\/"]
t.rcov_opts = ['--exclude', 'spec', '--exclude', 'gems']
end
end

# Use yard to build docs
begin
require 'yard'
require 'yard/rake/yardoc_task'
project_root = File.expand_path("#{File.dirname(__FILE__)}")
doc_destination = File.join(project_root, 'doc')
# Use yard to build docs
begin
require 'yard'
require 'yard/rake/yardoc_task'
project_root = File.expand_path(File.dirname(__FILE__))
doc_destination = File.join(project_root, 'doc')

YARD::Rake::YardocTask.new(:doc) do |yt|
yt.files = Dir.glob(File.join(project_root, 'lib', '**', '*.rb')) +
[ File.join(project_root, 'README.textile') ]
yt.options = ['--output-dir', doc_destination, '--readme', 'README.textile']
end
rescue LoadError
desc "Generate YARD Documentation"
task :doc do
abort "Please install the YARD gem to generate rdoc."
end
YARD::Rake::YardocTask.new(:doc) do |yt|
yt.files = Dir.glob(File.join(project_root, 'lib', '**', '*.rb')) +
[ File.join(project_root, 'README.md') ]
yt.options = ['--output-dir', doc_destination, '--readme', 'README.md']
end
rescue LoadError
desc "Generate YARD Documentation"
task :doc do
abort "Please install the YARD gem to generate rdoc."
end
end

desc "Run the rspec tests, aggregate coverage data, and build the Yard docs"
task :hudson => ["rspec:rcov","rspec:doc"]

task :default => ["checkm:rspec"]
1 change: 0 additions & 1 deletion checkm.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ Gem::Specification.new do |s|
s.add_development_dependency "rake"
s.add_development_dependency "bundler"
s.add_development_dependency "rspec"
s.add_development_dependency 'rcov'
s.add_development_dependency 'yard'
end

0 comments on commit 5c80232

Please sign in to comment.