Skip to content

Instantly share code, notes, and snippets.

View oriolbcn's full-sized avatar

Oriol Collell oriolbcn

View GitHub Profile
@oriolbcn
oriolbcn / keybase.md
Created December 15, 2017 10:03
Keybase Proof

Keybase proof

I hereby claim:

  • I am oriolbcn on github.
  • I am oriolbcn (https://keybase.io/oriolbcn) on keybase.
  • I have a public key ASCcU8VZSpxjFh3hI185UwSycY0AjC8CNfPk90EfPodIxgo

To claim this, I am signing this object:

@oriolbcn
oriolbcn / reload.rb
Created July 25, 2018 09:19
Reload gem from library in Rails 5+
if Rails.env.development?
localistico_files = Dir['lib/localistico/*.rb'] + ['lib/localistico.rb']
reloader = ActiveSupport::FileUpdateChecker.new(localistico_files) do
localistico_files.each { |file| load file }
end
ActiveSupport::Reloader.to_prepare do
reloader.execute_if_updated
end
end
# frozen_string_literal: true
class Candidate::SendTest
Result = Struct.new(:errors, keyword_init: true)
def initialize(candidate:, url:)
@candidate = candidate
@url = url
end