Sha256: 6559506e9ab31664646a1543fa2002037bc4e0513fb4f4cc014f1cad4f5f6060

Contents?: true

Size: 1.36 KB

Versions: 13

Compression:

Stored size: 1.36 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 'rspec/core/rake_task'
desc "Run the specs."
RSpec::Core::RakeTask.new do |t|
  t.pattern = "spec/**/*_spec.rb"
  t.verbose = false
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 => [:yard, :spec, :features]
# task :default => [:spec]

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
pinpress-1.6.3 Rakefile
pinpress-1.6.2 Rakefile
pinpress-1.6.1 Rakefile
pinpress-1.6.0 Rakefile
pinpress-1.5.2 Rakefile
pinpress-1.5.1 Rakefile
pinpress-1.5.0 Rakefile
pinpress-1.4.2 Rakefile
pinpress-1.4.1 Rakefile
pinpress-1.4.0 Rakefile
pinpress-1.3.3 Rakefile
pinpress-1.3.2 Rakefile
pinpress-1.3.0 Rakefile