Skip to content

Instantly share code, notes, and snippets.

@ylansegal
ylansegal / run_changed_specs
Last active March 9, 2018 17:56
Ruby dev scripts
#!/usr/bin/env bash
set -e
if [ $1 ];
then
BRANCH=${1:-"develop"}
shift # Get rid of first parameters, which should not pass on to smart_rspec
else
@ylansegal
ylansegal / consumer.rb
Last active April 2, 2020 23:22
Kafka POC
require "bundler/inline"
require 'yaml'
# require 'pry'
require "./person"
gemfile do
source "https://rubygems.org"
gem 'ruby-kafka'
end
@ylansegal
ylansegal / example.rb
Last active November 26, 2022 05:08
Expose difference in behaviour in MRI vs JRuby
require 'nokogiri'
puts "Ruby: #{RUBY_DESCRIPTION}"
puts "Nokogiri: #{Nokogiri::VersionInfo.instance.to_hash['nokogiri']}"
puts
schema = <<-SCHEMA
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>
<xs:element name="addresses">
<xs:complexType>