Rakefile in trop-0.4.27 vs Rakefile in trop-0.5.33

- old
+ new

@@ -1,109 +1,30 @@ require 'rubygems' -require 'bundler/gem_tasks' -require 'bundler/endpoint_specification' require 'rake' -require 'bump' require 'fileutils' -require 'gem_version' +require_relative './lib/trop' + + begin Bundler.setup(:default, :development) rescue Bundler::BundlerError => e warn e.message warn 'Run `bundle install` to install missing gems' exit e.status_code end -desc 'Generate a gemspecx file.' -task :gemspecx do - spec_dir = File.join( FileUtils.getwd,"*.gemspec") - spec_path = Dir.glob( spec_dir ).first - spec_gem = Gem::Specification::load(spec_path) - spec_str = pp spec_gem - puts spec_str - puts spec_path - File.open("gemspecx.gemspecx", 'w') do |f| - f.write spec_gem.to_ruby - end -end - -desc 'Generate a gemspec file.' -task :gemspec do - spec_dir = File.join( FileUtils.getwd,"*.gemspec") - spec_path = Dir.glob( spec_dir ).first - spec_gem = Gem::Specification::load(spec_path) do |s| - s.version = Trop::VERSION - end - File.open(spec_path, 'w') do |f| - f.write spec_gem.to_ruby - end - GemVersion.increment_version - GemVersion.commit_and_push - GemVersion.next_version -end - -task :patch do - system 'bump patch --replace-in trop.gemspec --replace-in ./lib/trop/version.rb --replace-in next_gem_version' -end -task :min do - system 'bump minor --replace-in trop.gemspec --replace-in ./lib/trop/version.rb --replace-in next_gem_version' -end - -task gembox: :build do - Dir.chdir('./pkg') do - system 'gem inabox *.gem --host=http://localhost:9292 -o ' - end -end -#Jeweler::Tasks.new do |gem| - # gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options -# gem.name = 'trop' -# gem.homepage = 'http://gitlab.wfschmitt.net/rails/trop' -# gem.license = 'MIT' -# gem.summary = %(trop is troppuS) -# gem.description = %(trop is support) -# gem.email = 'wfschmittx@gmail.com' -# gem.authors = ['werner'gcaa -# gem.files = %w[LICENSE.txt README.md README.rakes.md Gemfile Rakefile TODO.md VERSION lib/trop/config.bundler.tpl lib/trop/core-ext.rb lib/trop/file_finder.rb lib/trop/filefind.rb lib/trop/infogit.rb lib/trop/os.rb lib/trop/shell_deb_verb.rb lib/trop/version.rb] -#end -#$SAFE = 0 -#Jeweler::RubygemsDotOrgTasks.new - - require 'rake/testtask' Rake::TestTask.new(:test) do |test| test.libs << 'lib' << 'test' test.pattern = 'test/*_test.rb' test.verbose = true end -task :nexta do - puts 'hallo nexta' - puts `rake patch` - puts `rake gemspec` - puts `git add --all` - puts `git commit -m"save" --all` - puts `git save` - puts `git push` - # puts `git commit -m"save"` -end - -task next: %i[test build] do - Rake::Task['nexta'].execute - Rake::Task['build'].execute - Rake::Task['install'].execute - puts `gem inabox` -end - -desc 'prepare deployment in public' -task :deploy do - `mkdir -p ./public` - FileUtils.cp(%w[LICENSE.txt README.md README.rakes.md TODO.md], 'public', verbose: true) -end - desc 'Code coverage detail' task :simplecov do ENV['COVERAGE'] = 'true' Rake::Task['test'].execute end + task default: :test