Sha256: 9a37f66b14cd24ac622a76469378752d9a66e92e8f2366779288d8d770fb263e
Contents?: true
Size: 1.2 KB
Versions: 5
Compression:
Stored size: 1.2 KB
Contents
# encoding: utf-8 $LOAD_PATH.unshift File.expand_path('../lib', __FILE__) windows = RUBY_PLATFORM =~ /mswin|mingw/ desc "run specs" task(:spec) { ruby "-S rspec spec#{" -c" unless windows}" } desc "generate gemspec" task 'travis.gemspec' do require 'travis/version' content = File.read('travis.gemspec') # fetch data fields = { :authors => `git shortlog -sn`.b.scan(/[^\d\s].*/), :email => `git shortlog -sne`.b.scan(/[^<]+@[^>]+/), :files => `git ls-files`.b.split("\n").reject { |f| f =~ /^(\.|Gemfile)/ } } # :( fields[:email].delete("konstantin.haase@gmail.com") # insert data fields.each do |field, values| updated = " s.#{field} = [" updated << values.map { |v| "\n %p" % v }.join(',') updated << "\n ]" content.sub!(/ s\.#{field} = \[\n( .*\n)* \]/, updated) end # set version content.sub! /(s\.version.*=\s+).*/, "\\1\"#{Travis::VERSION}\"" # escape unicode content.gsub!(/./) { |c| c.bytesize > 1 ? "\\u{#{c.codepoints.first.to_s(16)}}" : c } File.open('travis.gemspec', 'w') { |f| f << content } end task :gemspec => 'travis.gemspec' task :default => :spec task :default => :gemspec unless windows or ENV['CI'] task :test => :spec
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
travis-1.3.1 | Rakefile |
travis-1.3.0 | Rakefile |
travis-1.2.8 | Rakefile |
travis-1.2.7 | Rakefile |
travis-1.2.6 | Rakefile |