Skip to content

Instantly share code, notes, and snippets.

View mvz's full-sized avatar

Matijs van Zuijlen mvz

View GitHub Profile
#!/bin/bash
set -ex
mkdir /tmp/repro-5430
cd /tmp/repro-5430
bundle env
cat > Gemfile <<EOF
@mvz
mvz / Dockerfile
Last active March 1, 2017 08:51
Reproduction of openssl issue with Bundler 1.14.5
# Reproduction of https://github.com/ruby/openssl/issues/103 with bundler 1.14.5
FROM ruby:2.4.0
RUN apt-get update
RUN apt-get install -y nodejs
RUN gem update openssl
RUN gem install rails
RUN rails new bbug
WORKDIR /bbug
RUN echo "gem 'cucumber-rails', group: :test, require: false" >> Gemfile
@mvz
mvz / Dockerfile
Created March 5, 2017 06:24
Demonstration of bundler issue with nested bundle exec combined with openssl
# Reproduction of nested call bug with bundler 1.14.6
FROM ruby:2.4.0
RUN gem update openssl
RUN mkdir bbug
WORKDIR /bbug
RUN gem install bundler --version '1.14.6'
RUN echo "#!/usr/bin/env ruby\nrequire 'openssl'\np OpenSSL::VERSION" > a.rb
RUN touch Gemfile
@mvz
mvz / habtm_failure_active_record_4_2_8.rb
Created April 24, 2017 12:14
Assigning ids for HABTM relation can't handle duplicates in ActiveRecord 4.2.8
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
# Activate the gem you are reporting the issue against.
@mvz
mvz / gtg-export.rb
Created June 6, 2018 12:50
Export Getting Things Gnome tasks to Taskwarrior
#!/usr/bin/env ruby
require 'happymapper'
require 'json'
class Task
include HappyMapper
attribute :id, String
attribute :status, String