This file contains hidden or 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
desc "Regenerates a rails 3 app for testing" | |
task :test_app do | |
SPREE_PATH = ENV['SPREE_PATH'] | |
raise "SPREE_PATH should be specified" unless SPREE_PATH | |
require File.join(SPREE_PATH, 'lib/generators/spree/test_app_generator') | |
class FlagPromotionTestAppGenerator < Spree::Generators::TestAppGenerator | |
def tweak_gemfile | |
append_file 'Gemfile' do | |
<<-gems |
This file contains hidden or 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
require "xpath" # XPath is a separate gem now | |
module Cucumber | |
module Rails | |
module CapybaraSelectDatesAndTimes | |
def select_date (date, options = {}) | |
date = Date.parse(date) | |
# lookup id prefix by label | |
id_prefix = id_prefix_for(options[:label]) |
This file contains hidden or 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
require 'sinatra' | |
get '/process' do | |
erb :process | |
end |
This file contains hidden or 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
# Get your spec rake tasks working in RSpec 2.0 | |
require 'rspec/core/rake_task' | |
desc 'Default: run specs.' | |
task :default => :spec | |
desc "Run specs" | |
RSpec::Core::RakeTask.new do |t| | |
t.pattern = "./spec/**/*_spec.rb" # don't need this, it's default. |
This file contains hidden or 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
# Setup QEMU for x86-64 Docker images on Raspberry Pi 4 | |
# Install Python3 and Docker first: https://dev.to/rohansawant/installing-docker-and-docker-compose-on-the-raspberry-pi-in-5-simple-steps-3mgl | |
# Install QUEMU (https://www.qemu.org/) | |
sudo apt-get install qemu binfmt-support qemu-user-static | |
# Use QUS in Docker (https://github.com/dbhi/qus) to configure x86_64 architecture | |
docker run --rm --privileged aptman/qus -s -- -p x86_64 | |
# Test x86-64 image: |