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
# This beeing a plain ruby file do whatever you what | |
# like requiring some organization wide baseline rubocop config | |
# or a todo file | |
PoC.configure do |config| | |
# I've yet to find a better solution for the namespaceing issue so I can | |
# directly access the Metrics module | |
# even with a instance_eval/instance_exec from within the PoC module I have | |
# to call PoC::Cop::Metrics... | |
include PoC::Cop |
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
ruby-2.2.0 |
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 'bundler/inline' | |
gemfile true do | |
source 'https://rubygems.org' | |
gem 'active_model_serializers', github: 'rails-api/active_model_serializers', ref: 'd30aa4c' | |
end | |
print "==================================================\n\n" | |
class Shoe | |
attr_accessor :id, :name, :vendor |
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 'bundler/inline' | |
gemfile true do | |
source "https://rubygems.org" | |
gem 'msgpack' | |
end | |
puts "#" * 90 | |
puts "#{RUBY_ENGINE} #{RUBY_VERSION} #{RUBY_PLATFORM}" | |
puts "MessagePack::VERSION: #{MessagePack::VERSION}" |
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
#!/usr/bin/env ruby | |
require "bundler/inline" | |
gemfile true do | |
source "https://rubygems.org" | |
gem "dry-validation", github: "dry-rb/dry-validation" | |
end | |
module Types | |
include Dry::Types.module |
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 'bundler/inline' | |
gemfile true do | |
gem 'dry-types' | |
end | |
include Dry::Types.module | |
class A < Dry::Types::Struct | |
attribute :a, Strict::Int | |
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
git clone https://github.com/andreaseger/dot-files /tmp/dot-files --no-checkout | |
mv /tmp/dot-files/.git ~/.git | |
rm /tmp/dot-files -rf | |
cd ~ | |
git reset HEAD | |
git checkout . | |
git submodule update --init |
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
defmodule DynamicRoutingTest do | |
use ExUnit.Case | |
doctest DynamicRouting | |
test "match" do | |
:routes = :ets.new(:routes, [:named_table, :bag, :public]) | |
method = :get | |
service = :articles | |
[["v1", "users"], | |
["v2", "users"], |
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 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'minitest', require: false | |
end | |
require 'minitest/autorun' | |
module DeepMerge |