Sha256: 3fc58302ca4a3b1cb75b0ab28855232e8eb5517936889f1dc53db1063d8c9073
Contents?: true
Size: 1.53 KB
Versions: 3
Compression:
Stored size: 1.53 KB
Contents
task :default => :spec desc "starts RSpactor" task :spec do system "ruby -Ilib bin/rspactor" end desc "generates .gemspec file" task :gemspec => "version:read" do spec = Gem::Specification.new do |gem| gem.name = "rspactor" gem.summary = "RSpactor is a command line tool to automatically run your changed specs (much like autotest)." gem.email = "mislav.marohnic@gmail.com" gem.homepage = "http://github.com/mislav/rspactor" gem.authors = ["Mislav Marohnić", "Andreas Wolff", "Pelle Braendgaard"] gem.has_rdoc = false gem.version = GEM_VERSION gem.files = FileList['Rakefile', '{bin,lib,images,spec}/**/*', 'README*', 'LICENSE*'] gem.executables = Dir['bin/*'].map { |f| File.basename(f) } end spec_string = spec.to_ruby begin Thread.new { eval("$SAFE = 3\n#{spec_string}", binding) }.join rescue abort "unsafe gemspec: #{$!}" else File.open("#{spec.name}.gemspec", 'w') { |file| file.write spec_string } end end task :bump => ["version:bump", :gemspec] namespace :version do task :read do unless defined? GEM_VERSION GEM_VERSION = File.read("VERSION") end end task :bump => :read do if ENV['VERSION'] GEM_VERSION.replace ENV['VERSION'] else GEM_VERSION.sub!(/\d+$/) { |num| num.to_i + 1 } end File.open("VERSION", 'w') { |v| v.write GEM_VERSION } end end task :release => :bump do system %(git commit VERSION *.gemspec -m "release v#{GEM_VERSION}") system %(git tag -am "release v#{GEM_VERSION}" v#{GEM_VERSION}) end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
lacomartincik-rspactor-0.3.3.1 | Rakefile |
lacomartincik-rspactor-0.3.3.2 | Rakefile |
mislav-rspactor-0.3.3 | Rakefile |