Sha256: 2e1f2d2e4e1e6f25548c2042dbac2fc9cc6159254225cae372c4517329844779
Contents?: true
Size: 811 Bytes
Versions: 5
Compression:
Stored size: 811 Bytes
Contents
#!/usr/bin/env ruby require 'rubygems' require 'fileutils' begin require 'cucumber/rake/task' Cucumber::Rake::Task.new do |t| t.cucumber_opts = "--require features/" end rescue LoadError end desc "build gem" task :build do system("gem build cucumber-nagios.gemspec") FileUtils.mkdir_p('pkg') puts Dir.glob("cucumber-nagios-*.gem").each do |gem| dest = File.join('pkg', gem) FileUtils.mv(gem, dest) puts "New gem in #{dest}" end end desc "push gem" task :push do filenames = Dir.glob("pkg/*.gem") filenames_with_times = filenames.map do |filename| [filename, File.mtime(filename)] end oldest = filenames_with_times.sort_by { |tuple| tuple.last }.last oldest_filename = oldest.first command = "gem push #{oldest_filename}" system(command) end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
cucumber-nagios-0.6.8 | Rakefile |
cucumber-nagios-0.6.7 | Rakefile |
cucumber-nagios-0.6.6 | Rakefile |
cucumber-nagios-0.6.5 | Rakefile |
cucumber-nagios-0.6.4 | Rakefile |