Sha256: 6985acc956a8ff444f431a27616c6945b387303d5a86be5155385549f802fa8e
Contents?: true
Size: 1.34 KB
Versions: 4
Compression:
Stored size: 1.34 KB
Contents
require 'rake/clean' require 'rubygems' def version contents = File.read File.expand_path('../lib/pinpress/constants.rb', __FILE__) contents[/\sVERSION = '([^']+)'/, 1] end spec = eval(File.read('pinpress.gemspec')) require 'rake/testtask' desc 'Run unit tests' Rake::TestTask.new do |t| t.libs << "test" t.test_files = FileList['test/*_test.rb'] end require 'cucumber' require 'cucumber/rake/task' CUKE_RESULTS = 'results.html' CLEAN << CUKE_RESULTS desc 'Run Cucumber features' Cucumber::Rake::Task.new(:features) do |t| opts = "features --format html -o #{CUKE_RESULTS} --format progress -x" opts += " --tags @active" t.cucumber_opts = opts t.fork = false end require 'yard' desc 'Create YARD documentation' YARD::Rake::YardocTask.new do |t| end desc "Release PinPress version #{ version }" task :release => :build do unless `git branch` =~ /^\* master$/ puts "You must be on the master branch to release!" exit! end sh "git commit --allow-empty -a -m 'Release #{ version }'" sh "git tag v#{ version }" sh "git push origin master" sh "git push origin v#{ version }" sh "gem push pkg/pinpress-#{ version }.gem" end desc "Build the gem" task :build do FileUtils.mkdir_p "pkg" sh "gem build pinpress.gemspec" FileUtils.mv("./pinpress-#{ version }.gem", "pkg") end task :default => [:features] #:yard, :test, :features
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
pinpress-1.2.2 | Rakefile |
pinpress-1.2.1 | Rakefile |
pinpress-1.2.0 | Rakefile |
pinpress-1.1.2 | Rakefile |