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
<html> | |
<head> | |
</head> | |
<body> | |
<main> | |
<header> | |
<h1>I CAN HAZ TODO</h1> | |
</header> | |
<section> | |
<nav> |
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
# After authenticating with OAuth and getting the auth object | |
response = HTTParty.get('https://a.wunderlist.com/api/v1/lists', | |
headers: { | |
'X-Client-ID' => "#{auth.uid}", | |
'X-Access-Token' => auth.credentials.token | |
}) | |
# response will look like so at the moment: | |
# <HTTParty::Response:0x7faf31dad288 parsed_response={"server_unavailable"=>true}, | |
# @response=#<Net::HTTPServiceUnavailable 503 Service Temporarily Unavailable readbody=true>, |
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 A | |
def self.ouch | |
raise "blarrrghhh" | |
end | |
end | |
class B | |
def self.ouch | |
begin | |
A.ouch |
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 Someclass < Struct.new(:listener) | |
def sign_up attributes | |
post '/sign-up', attributes, | |
success: ->(response) { listener.user_signed_up attributes.merge(response) }, | |
error: ->(cause) {listener.error_signing_up_user cause} | |
end | |
... | |
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
Dir.glob("#{File.dirname(__FILE__) + '/../../posts/*.yml'}") do |file| | |
post = Post.load_from_file(file) | |
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
Dir.should_receive(:glob).and_yield(post_name) | |
Post.should_receive(:load_from_file).and_return(post) |
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 Cucumber | |
module Impersonators | |
class BankManager | |
def initialize(world) | |
@world = world | |
end | |
def login | |
@world.visit '/login' | |
@world.fill_in 'username', with: 'me' |
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 Cucumber | |
module Impersonators | |
class BankManager | |
def initialize(world) | |
@world = world | |
end | |
def method_missing(method, *args, &block) | |
@world.send(method, *args, &block) | |
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
def a_method(required_arguments, optional_arguments, | |
*additional_required_arguments, | |
keyword_arguments: "with_defaults", | |
**rest_of_keyword_arguments, | |
&block_capture) | |
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
def show_project(username, project_name) | |
user = User.with(username) | |
project = Project.for(user).named(project_name) | |
Presenter::Board.new(project, user).render | |
end |
OlderNewer