|
| 1 | +require 'rubygems' |
| 2 | +require 'bundler' |
| 3 | +begin |
| 4 | + Bundler.setup(:default, :development) |
| 5 | +rescue Bundler::BundlerError => e |
| 6 | + $stderr.puts e.message |
| 7 | + $stderr.puts "Run `bundle install` to install missing gems" |
| 8 | + exit e.status_code |
| 9 | +end |
| 10 | +require 'rake' |
| 11 | + |
| 12 | +require 'jeweler' |
| 13 | +Jeweler::Tasks.new do |gem| |
| 14 | + # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options |
| 15 | + gem.name = "crontab-ruby" |
| 16 | + gem.homepage = "https://github.com/tt25/crontab-ruby" |
| 17 | + gem.license = "MIT" |
| 18 | + gem.summary = %Q{TODO: one-line summary of your gem} |
| 19 | + gem.description = %Q{TODO: longer description of your gem} |
| 20 | + gem.email = "a@tt25.org" |
| 21 | + gem.authors = ["uu59"] |
| 22 | + # Include your dependencies below. Runtime dependencies are required when using your gem, |
| 23 | + # and development dependencies are only needed for development (ie running rake tasks, tests, etc) |
| 24 | + # gem.add_runtime_dependency 'jabber4r', '> 0.1' |
| 25 | + # gem.add_development_dependency 'rspec', '> 1.2.3' |
| 26 | +end |
| 27 | +Jeweler::RubygemsDotOrgTasks.new |
| 28 | + |
| 29 | +require 'rspec/core' |
| 30 | +require 'rspec/core/rake_task' |
| 31 | +RSpec::Core::RakeTask.new(:spec) do |spec| |
| 32 | + spec.pattern = FileList['spec/**/*_spec.rb'] |
| 33 | +end |
| 34 | + |
| 35 | +RSpec::Core::RakeTask.new(:rcov) do |spec| |
| 36 | + spec.pattern = 'spec/**/*_spec.rb' |
| 37 | + spec.rcov = true |
| 38 | +end |
| 39 | + |
| 40 | +require 'reek/rake/task' |
| 41 | +Reek::Rake::Task.new do |t| |
| 42 | + t.fail_on_error = true |
| 43 | + t.verbose = false |
| 44 | + t.source_files = 'lib/**/*.rb' |
| 45 | +end |
| 46 | + |
| 47 | +task :default => :spec |
| 48 | + |
| 49 | +require 'rake/rdoctask' |
| 50 | +Rake::RDocTask.new do |rdoc| |
| 51 | + version = File.exist?('VERSION') ? File.read('VERSION') : "" |
| 52 | + |
| 53 | + rdoc.rdoc_dir = 'rdoc' |
| 54 | + rdoc.title = "crontab-ruby #{version}" |
| 55 | + rdoc.rdoc_files.include('README*') |
| 56 | + rdoc.rdoc_files.include('lib/**/*.rb') |
| 57 | +end |
0 commit comments