I hereby claim:
- I am codenamev on github.
- I am codenamev (https://keybase.io/codenamev) on keybase.
- I have a public key ASDzv4NQL0JUfXukZXDekrRgxzinhVKU78V-mLSv9JAewwo
To claim this, I am signing this object:
#!/usr/bin/env bash | |
# | |
# Usage: set any of the following environment variables to get run before | |
# tests or after success/failure | |
# | |
# PASS_FAIL_INIT_COMMAND - is run before tests run | |
# PASS_COMMAND - is run after tests if they all pass | |
# FAIL_COMMAND - is run after tests if there are any failrues | |
set -e |
for v in $(rbenv versions --bare); do echo "-----> Upgrading $v"; rbenv shell $v; gem update --system; done |
-I app |
I hereby claim:
To claim this, I am signing this object:
/** | |
* Given a pre-defined set of coordinates as {latitude: ..., longitude: ...} | |
* and a pre-defined center point with {latitude: ..., longitude: ...} | |
* Find the zoom deltas needed for maps | |
** | |
// Example: | |
var center = {latitude: 40.0348483, longitude: -73.00318473}; | |
var points = [{latitude: ..., longitude: ...}, {latitude: ..., longitude: ...}, ...] |
require "timeout" | |
module WaitSteps | |
extend RSpec::Matchers::DSL | |
matcher :become_true do | |
match do |block| | |
begin | |
Timeout.timeout(ENV['CAPYBARA_TIMEOUT'] || Capybara.default_wait_time) do | |
sleep(0.1) until value = block.call |
# Ways to execute a shell script in Ruby | |
# Example Script - Joseph Pecoraro | |
cmd = "echo 'hi'" # Sample string that can be used | |
# 1. Kernel#` - commonly called backticks - `cmd` | |
# This is like many other languages, including bash, PHP, and Perl | |
# Returns the result of the shell command | |
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111 |
# spec/support/rspec_stub_helpers.rb | |
# | |
# include in spec_helper.rb like so: | |
# Rspec.configure do |config| | |
# config.include RspecStubHelpers | |
# end | |
# | |
# usage example: | |
# stub_with_fallback(File, :exist?).with(/txt/).and_return(true) | |
module RspecStubHelpers |
module Rollout | |
def self.features | |
@features ||= YAML.load_file(Rails.root.join("config", "rollout.yml"))[Rails.env] | |
end | |
def self.features=(value) | |
@features = value | |
end | |
def self.active?(key) |
require 'open-uri' | |
require 'json' | |
language = 'en' | |
unless article = ARGV.shift | |
print 'What do you need to know? : ' | |
article = URI::encode gets.chomp | |
end |