This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CUCUMBER_PROFILES = %w{desktop mobile tablet_landscape tablet_portrait} | |
if [ :development, :test, :cucumber ].include?( Rails.env.to_sym ) | |
# the 'require' calls are here on a purpose. On staging the rspec and cucumber gems are not | |
# present and since rake reads up the content of the .rake files, it will fail, because it | |
# will try to load things, which are not there | |
require 'rspec/core/rake_task' | |
require 'cucumber/rake/task' | |
namespace :ci do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ :development, :test, :cucumber ].include?( Rails.env.to_sym ) | |
# the 'require' calls are here on a purpose. On staging the rspec and cucumber gems are not | |
# present and since rake reads up the content of the .rake files, it will fail, because it | |
# will try to load things, which are not there | |
require 'rspec/core/rake_task' | |
require 'cucumber/rake/task' | |
namespace :ci do | |
namespace :build do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% | |
CUCUMBER_PROFILES = %w{desktop mobile tablet_landscape tablet_portrait} | |
rerun = File.file?('tmp/rerun.txt') ? IO.read('tmp/rerun.txt') : "" | |
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}" | |
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --tags ~@wip -r features" | |
%> | |
default: <%= std_opts %> features | |
wip: --tags @wip:3 --wip features | |
rerun: <%= rerun_opts %> --format rerun --out tmp/rerun.txt --strict --tags ~@wip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# overwrited Copy strategy | |
# after source.sync it's running bundler with deployment mode, precompiling gems into vendor/bundle | |
require 'capistrano/recipes/deploy/strategy/copy' | |
require 'fileutils' | |
require 'tempfile' | |
Capistrano::Deploy::Strategy::Copy.class_eval do | |
def deploy! | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
# Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } | |
load 'config/deploy' # remove this line to skip loading any of the default tasks | |
after 'deploy:finalize_code', 'deploy:web:disable' | |
after 'deploy:start', 'deploy:web:enable' | |
namespace :deploy do |