Skip to content

Instantly share code, notes, and snippets.

View ciembor's full-sized avatar

Maciej Ciemborowicz ciembor

View GitHub Profile
# we don't have knapsack in our :production gems group, so the deploy would fail without this condition
if Rails.env.development? || Rails.env.test?
require 'knapsack'
# we have multiple nodes, so we need different files for each node
def failing_scenarios_filename
"failing_scenarios_#{ENV['CIRCLE_NODE_INDEX']}.txt"
end
namespace :knapsack do
test:
override:
- bundle exec rake knapsack:rspec:
parallel: true
- bundle exec rake knapsack:cucumber_record_failing:
parallel: true
- bundle exec rake knapsack:cucumber_rerun:
parallel: true
Scenario: xxx # features/xxx.feature:19
PhantomJS has crashed. Please read the crash reporting guide at https://github.com/ariya/phantomjs/wiki/Crash-Reporting and file a bug report at https://github.com/ariya/phantomjs/issues/new with the crash dump file attached: /tmp/1a24bbe0-87e2-2753-3444a3a4-65f405d9.dmp
[1.78] Given Logged in User # features/step_definitions/support_steps.rb:9
PhantomJS client died while processing {"name":"visit","args":["http://127.0.0.1:39185/users/sign_in"]} (Capybara::Poltergeist::DeadClient)
./features/step_definitions/support_steps.rb:13:in `/^Logged in User$/'
features/xxx.feature:20:in `Given Logged in User'
failing_scenarios_*.txt
namespace :failing_cucumber_specs do
# we have multiple nodes, so we need different file for each node
FAILING_SCENARIOS_FILENAME = "failing_scenarios_#{ENV['CIRCLE_NODE_INDEX']}.txt"
task :record do
# run cucumber and record failing scenarios to the file
begin
Rake::Task['knapsack:cucumber'].invoke("-f rerun --out #{FAILING_SCENARIOS_FILENAME}")
rescue SystemExit => e
# exit 0, we don't want failed build because of this task
test:
override:
- bundle exec rake failing_cucumber_specs:record:
parallel: true
- bundle exec rake failing_cucumber_specs:rerun:
parallel: true
namespace :failing_cucumber_specs do
FAILING_SCENARIOS_FILENAME = 'failing_scenarios.txt'
task :record do
# run cucumber and record failing scenarios to the file
begin
Rake::Task['knapsack:cucumber'].invoke("-f rerun --out #{FAILING_SCENARIOS_FILENAME}")
rescue SystemExit => e
# exit 0, we don't want failed build because of this task
puts "#{e.class}: #{e.message}"
failing_scenarios.txt
@ciembor
ciembor / cstrike
Created June 7, 2011 06:02
CouterStrike and Windows .xinit
#!/bin/sh
######################
# ~/.xinit/cstrike #
######################
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
@ciembor
ciembor / broadcast.php
Created June 7, 2011 06:07
Broadcast Messaging System based on BotApi (Gadu-Gadu protocol)
<?php
require_once 'GGBotApi/PushConnection.php';
/********************************/
/******* LISTA ROZMÓWCÓW ********/
/********************************/
$interlocutors = array(
8112393 => array('Asia', 149, 179, 0),