Sha256: 9577b939906fe692d6453e984018dfb60dce8e948d4d312cc4c1d7cbf558aebd
Contents?: true
Size: 1.55 KB
Versions: 4
Compression:
Stored size: 1.55 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", "Thibaud Guillaume-Gentil"] 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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
guillaumegentil-rspactor-0.4.1 | Rakefile |
guillaumegentil-rspactor-0.4.2 | Rakefile |
guillaumegentil-rspactor-0.4.3 | Rakefile |
guillaumegentil-rspactor-0.4 | Rakefile |