I hereby claim:
- I am phoet on github.
- I am phoet (https://keybase.io/phoet) on keybase.
- I have a public key whose fingerprint is 7B53 845B DBA6 25B2 FE4F FA16 09FA 59FF FDB3 84F6
To claim this, I am signing this object:
| #!/usr/bin/env ruby | |
| require 'net/http' | |
| require 'uri' | |
| require 'digest/md5' | |
| require 'json' | |
| require 'byebug' | |
| key = ARGV[0] | |
| abort("key is required") if key.nil? |
| begin | |
| require "bundler/inline" | |
| rescue LoadError => e | |
| $stderr.puts "Bundler is required. Please update your Bundler" | |
| raise e | |
| end | |
| gemfile(true) do | |
| source "https://rubygems.org" | |
| gem "rails", "~> 6.0.3" |
| begin | |
| require "bundler/inline" | |
| rescue LoadError => e | |
| $stderr.puts "Bundler is required. Please update your Bundler" | |
| raise e | |
| end | |
| gemfile(true) do | |
| source "https://rubygems.org" | |
| gem "rails", '6.0.0.rc2' |
| # inspired by https://github.com/golang/go/wiki/Iota | |
| module IOTA | |
| class Counter | |
| def initialize(start, increment, max) | |
| @start = start | |
| @times = 0 | |
| @increment = increment | |
| @max = max | |
| end |
| 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" | |
| gem "rails", '6.0.0.beta1' |
| Gem::Specification.new do |s| | |
| s.name = 'retry' | |
| s.version = '0.0.1' | |
| s.platform = Gem::Platform::RUBY | |
| s.author = 'Peter Schröder' | |
| s.email = '[email protected]' | |
| s.license = 'MIT' | |
| s.homepage = 'https://gist.github.com/phoet/92767354f7d78a9f8e2985bc29df88c4' | |
| s.description = s.summary = 'retry helper as a gist' |
| # heroku expects all gems to be vendored. | |
| # bundler/inline has some quirks that don't play nice with it | |
| # so the best alternative is to just do a fresh install every time, dyno time is cheap! | |
| require 'bundler' | |
| require 'bundler/inline' | |
| if ENV['DYNO'] | |
| # on heroku, we don't care about their bundler config! | |
| # alternatively, you could `rm -rf /app/.bundle` the bundler config before loading it |
I hereby claim:
To claim this, I am signing this object:
| # In order to make testing of environment variables easier, | |
| # you can use this helper to temporarily change the ENV to something you expect. | |
| # | |
| # As an example: | |
| # | |
| # Imagine you have some ENV variable that changes based on the current runtime environment. | |
| # | |
| # def user_id | |
| # ENV['TEST_USER_ID'].present? ? ENV['TEST_USER_ID'] : session[:user_id] | |
| # end |