This file contains 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
module Validation | |
class UniqueAccountEmail | |
def initialize(data:, model: Account::Model) | |
@data = data | |
@model = model | |
end | |
def valid? | |
@model.pluck("email").include?(@data) | |
end |
This file contains 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
author "Kurtis Rainbolt-Greene <kurtis@difference-engineers.com>" | |
description "A service for harvesting social data with specific keywords" | |
version "1.0.0" | |
env TWITTER_CONSUMER_KEY="twitter_consumer_key" | |
env TWITTER_CONSUMER_SECRET="twitter_consumer_secret" | |
env TWITTER_ACCESS_KEY="twitter_access_key" | |
env TWITTER_ACCESS_SECRET="twitter_access_secret" | |
expect fork |
This file contains 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 "benchmark/ips" | |
require "json" | |
require "oj" | |
require "yajl" | |
require "yajl/version" | |
puts "OS Name: #{`uname -a`}" | |
puts `sw_vers` | |
puts "Ruby Version: #{`ruby -v`}" | |
puts "RubyGems Version: #{`gem -v`}" |
This file contains 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 "benchmark/ips" | |
puts "OS Name: #{`uname -a`}" | |
puts `sw_vers` | |
puts "Ruby Version: #{`ruby -v`}" | |
puts "RubyGems Version: #{`gem -v`}" | |
puts "RVM Version: #{`rvm -v`}" | |
SMALL = (1..100).to_a | |
BIG = (1..100000).to_a |
This file contains 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
PATH | |
remote: . | |
specs: | |
lack (2.0.0) | |
GEM | |
remote: https://rubygems.org/ | |
specs: | |
coderay (1.1.0) | |
diff-lcs (1.2.5) |
This file contains 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
▶ bundle exec rake | |
/Users/krainboltgreene/.rvm/rubies/ruby-2.1.2/bin/ruby -I/Users/krainboltgreene/.rvm/gems/ruby-2.1.2@rack/gems/rspec-core-3.1.4/lib:/Users/krainboltgreene/.rvm/gems/ruby-2.1.2@rack/gems/rspec-support-3.1.0/lib /Users/krainboltgreene/.rvm/gems/ruby-2.1.2@rack/gems/rspec-core-3.1.4/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb | |
/Users/krainboltgreene/Code/krainboltgreene/lack/spec:1:in `<top (required)>': undefined local variable or method `aksdfalksjfnalksdjfn' for main:Object (NameError) | |
from /Users/krainboltgreene/.rvm/gems/ruby-2.1.2@rack/gems/rspec-core-3.1.4/lib/rspec/core/configuration.rb:1105:in `load' | |
from /Users/krainboltgreene/.rvm/gems/ruby-2.1.2@rack/gems/rspec-core-3.1.4/lib/rspec/core/configuration.rb:1105:in `block in load_spec_files' | |
from /Users/krainboltgreene/.rvm/gems/ruby-2.1.2@rack/gems/rspec-core-3.1.4/lib/rspec/core/configuration.rb:1105:in `each' | |
from /Users/krainboltgreene/.rvm/gems/ruby-2.1.2@rack/gems/rspec-core-3.1.4/lib/rspec/core/configuration.rb:1105 |
This file contains 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
class Calculator | |
def doubler(number) | |
number * 2 | |
end | |
def runner(number) | |
yield(number) | |
end | |
def input(number, operation) |
This file contains 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 "webstack/client" | |
uri = "http://api.endorsemint.com/accounts" | |
Webstack::Client.new(verb: "GET", uri: uri) do | |
# Request middleware | |
request.stack do | |
Client::Transaction::Middleware.new(self) | |
end | |
This file contains 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
{ | |
"accounts": [ | |
{ | |
"id": "1", | |
"name": "Kurtis Rainbolt-Greene", | |
"href": "http://api.endorsemint.com/accounts/1", | |
"links": { | |
"fundings": "http://api.endorsemint.com/fundings/?accounts=1", | |
"organizations": "http://api.endorsemint.com/organizations/?accounts=1" |