Skip to content

Commit

Permalink
Clean Rakefile, switch to using Bundler's tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
radar committed Dec 26, 2010
1 parent e36bc41 commit 5d10963
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 57 deletions.
5 changes: 4 additions & 1 deletion Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
dotiw (0.4.0)
dotiw (0.6.0)
actionpack (~> 3.0.0)
activerecord (~> 3.0.0)
chronic (~> 0.3)
Expand Down Expand Up @@ -77,3 +77,6 @@ DEPENDENCIES
dotiw!
rspec (~> 2.0)
ruby-debug19 (~> 0.0)

METADATA
version: 1.0.6
60 changes: 4 additions & 56 deletions Rakefile
@@ -1,65 +1,13 @@
require 'rubygems'
require 'rake'
require 'bundler'
Bundler::GemHelper.install_tasks

# begin
# require 'jeweler'
# Jeweler::Tasks.new do |gem|
# gem.name = "dotiw"
# gem.summary = %Q{Better distance_of_time_in_words for Rails}
# gem.description = %Q{Better distance_of_time_in_words for Rails}
# gem.email = "radarlistener@gmail.com"
# gem.homepage = "http://github.com/radar/dotiw"
# gem.authors = ["Ryan Bigg"]
# gem.add_development_dependency "rspec"
# # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
# end
# Jeweler::GemcutterTasks.new
# rescue LoadError
# puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
# end

# require 'spec/rake/spectask'
# Spec::Rake::SpecTask.new(:spec) do |spec|
# spec.libs << 'lib' << 'spec'
# spec.spec_files = FileList['spec/**/*_spec.rb']
# end
#
# Spec::Rake::SpecTask.new(:rcov) do |spec|
# spec.libs << 'lib' << 'spec'
# spec.pattern = 'spec/**/*_spec.rb'
# spec.rcov = true
# end

begin
require 'rspec/core/rake_task'

RSpec::Core::RakeTask.new(:spec) do |t|
t.ruby_opts = '-w'
end

RSpec::Core::RakeTask.new(:rcov) do |t|
t.ruby_opts = '-w'
t.rcov = true
end

[:spec, :rcov].each { |task| RSpec::Core::RakeTask.new(task) }
task :default => :spec
rescue LoadError
raise 'RSpec could not be loaded. Run `bundle install` to get all development dependencies.'
end

task :default => :spec

require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
if File.exist?('VERSION')
version = File.read('VERSION')
else
version = ""
end

rdoc.rdoc_dir = 'rdoc'
rdoc.title = "dotiw #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end

end

0 comments on commit 5d10963

Please sign in to comment.