Skip to content

Instantly share code, notes, and snippets.

View ciembor's full-sized avatar

Maciej Ciemborowicz ciembor

View GitHub Profile
irb(main):053:0> AlcoholLicense.where('reported_at > ? AND license_category_id=1 AND business_category_id=2', Time.now - 26.months).where(location_id: Location.kazimierz.ids).map{|a| {nazwa: a.busin
ess.name, ulica: a.location.address_1, numer: a.location.address_2}}
[
{
"nazwa": "POPLAWSKA DOROTA",
"ulica": "AUGUSTIAŃSKA",
"numer": "4"
},
{
@ciembor
ciembor / antykwa_poltawskiego.json
Created December 12, 2019 11:47
Report from fontbakery check-googlefonts of Antykwa Półtawskiego font quality.
This file has been truncated, but you can view the full file.
{
"result": {
"FAIL": 466,
"INFO": 218,
"PASS": 1644,
"SKIP": 2658,
"WARN": 323
},
"sections": [
{
@ciembor
ciembor / usb_urb.md
Created May 28, 2019 22:47
SoundLab usb urb

URB_INTERRUPT out

Frame 692: 35 bytes on wire (280 bits), 35 bytes captured (280 bits) on interface 0
    Interface id: 0 (\\.\pipe\wireshark_extcap_\\.\USBPcap1_20190528224209)
    Encapsulation type: USB packets with USBPcap header (152)
    Arrival Time: May 28, 2019 22:42:48.857235000 Środkowoeuropejski czas letni
    [Time shift for this packet: 0.000000000 seconds]
    Epoch Time: 1559076168.857235000 seconds
    [Time delta from previous captured frame: 0.045329000 seconds]
    [Time delta from previous displayed frame: 0.000000000 seconds]
require "pundit/version"
require "active_support/concern"
require "active_support/core_ext/string/inflections"
require "active_support/core_ext/object/blank"
require "active_support/core_ext/module/introspection"
require "active_support/dependencies/autoload"
module Pundit
  class PolicyFinder
    attr_reader :object
failing_scenarios.txt
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}"
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
# 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
failing_scenarios_*.txt
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'