Rakefile in sdoc_all-1.0.7 vs Rakefile in sdoc_all-1.3.1

- old
+ new

@@ -1,43 +1,34 @@ -begin - require 'jeweler' +require 'rake' +require 'jeweler' +require 'rake/gem_ghost_task' +require 'rspec/core/rake_task' - name = 'sdoc_all' - summary = 'Documentation for everything' - description = 'Command line tool to get documentation for ruby, rails, gems and plugins in one place' +name = 'sdoc_all' - jewel = Jeweler::Tasks.new do |j| - j.name = name - j.summary = summary - j.description = description - j.homepage = "http://github.com/toy/#{name}" - j.authors = ["Boba Fat"] - j.add_dependency 'activesupport' - j.add_dependency 'colored' - j.add_dependency 'progress', '>= 0.0.8' - j.add_dependency 'rake' - j.add_dependency 'rubigen' - j.add_dependency 'sdoc' - end +Jeweler::Tasks.new do |gem| + gem.name = name + gem.summary = %Q{Documentation for everything} + gem.description = %Q{Command line tool to get documentation for ruby, rails, gems and plugins in one place} + gem.homepage = "http://github.com/toy/#{name}" + gem.license = 'MIT' + gem.authors = ['Ivan Kuchin'] - Jeweler::GemcutterTasks.new + gem.add_runtime_dependency 'activesupport', '~> 2.3.0' + gem.add_runtime_dependency 'colored' + gem.add_runtime_dependency 'progress', '>= 0.0.8' + gem.add_runtime_dependency 'rake' + gem.add_runtime_dependency 'rubigen' + gem.add_runtime_dependency 'sdoc' - require 'pathname' - desc "Replace system gem with symlink to this folder" - task 'ghost' do - gem_path = Pathname(Gem.searcher.find(name).full_gem_path) - current_path = Pathname('.').expand_path - cmd = gem_path.writable? && gem_path.parent.writable? ? %w() : %w(sudo) - system(*cmd + %W[rm -r #{gem_path}]) - system(*cmd + %W[ln -s #{current_path} #{gem_path}]) - end - -rescue LoadError - puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler" + gem.add_development_dependency 'jeweler', '~> 1.5.1' + gem.add_development_dependency 'rake-gem-ghost' + gem.add_development_dependency 'rspec' end +Jeweler::RubygemsDotOrgTasks.new +Rake::GemGhostTask.new -require 'spec/rake/spectask' -Spec::Rake::SpecTask.new(:spec) do |spec| - spec.libs << 'lib' << 'spec' - spec.spec_files = FileList['spec/**/*_spec.rb'] +RSpec::Core::RakeTask.new(:spec) do |spec| + spec.rspec_opts = ['--colour --format progress'] + spec.pattern = 'spec/**/*_spec.rb' end task :default => :spec