Rakefile in rspec-instafail-0.2.4 vs Rakefile in rspec-instafail-0.2.5
- old
+ new
@@ -1,25 +1,12 @@
-require "bundler"
-Bundler::GemHelper.install_tasks
+require "bundler/setup"
+require "bundler/gem_tasks"
+require "bump/tasks"
task :default do
- sh "cd spec/rspec_1 && (bundle || bundle install) > /dev/null"
- sh "cd spec/rspec_2 && (bundle || bundle install) > /dev/null"
+ Bundler.with_clean_env do
+ sh "cd spec/rspec_1 && (bundle check || bundle) > /dev/null"
+ sh "cd spec/rspec_2 && (bundle check || bundle) > /dev/null"
+ sh "cd spec/rspec_3 && (bundle check || bundle) > /dev/null"
+ end
sh "rspec spec/"
-end
-
-rule /^version:bump:.*/ do |t|
- file = 'lib/rspec/instafail/version.rb'
-
- sh "git status | grep 'nothing to commit'" # ensure we are not dirty
- index = ['major', 'minor','patch'].index(t.name.split(':').last)
-
- version_file = File.read(file)
- old_version, *version_parts = version_file.match(/(\d+)\.(\d+)\.(\d+)/).to_a
- version_parts[index] = version_parts[index].to_i + 1
- version_parts[2] = 0 if index < 2
- version_parts[1] = 0 if index < 1
- new_version = version_parts * '.'
- File.open(file,'w'){|f| f.write(version_file.sub(old_version, new_version)) }
-
- sh "git add #{file} && git commit -m 'bump version to #{new_version}'"
end