I hereby claim:
- I am tibbon on github.
- I am tibbon (https://keybase.io/tibbon) on keybase.
- I have a public key whose fingerprint is B234 4A25 8C8E D30E 8FA0 D104 6723 7CA6 BD17 D4D5
To claim this, I am signing this object:
# This creates your rails site in the directory called 'davesite'. You can replace 'davesite' with anything that starts with a letter. | |
rails new davesite | |
#Change to the davesite directory. | |
cd davesite | |
#Logs you onto Heroku. You only really need to do this once unless you have multiple accounts | |
heroku login |
<article> | |
<header> | |
<hgroup> | |
<h1>Name of my post</h1> | |
<h2>subheading</h2> | |
</hgroup> | |
<p>By <author><a href="/bio/David_Fisher" rel="author">David Fisher</a></author></p> | |
<p><time>June 23, 2012</time></p> | |
</header> | |
<p> |
source :rubygems | |
# We are not loading Active Record, nor Active Resources etc. | |
# We can do this in any app by simply replacing the rails gem | |
# by the parts we want to use. | |
gem "actionpack", "~> 3.2" | |
gem "railties", "~> 3.2" | |
gem "tzinfo" | |
# Let's use thin |
describe "#friends" do | |
context "with a screen_name passed" do | |
before do | |
stub_get("/1.1/friends/list.json").with(:query => {:cursor => "-1", :screen_name => "sferik"}).to_return(:body => fixture("friends_list.json"), :headers => {:content_type => "application/json; charset=utf-8"}) | |
end | |
it "requests the correct resource" do | |
@client.friends("sferik") | |
expect(a_get("/1.1/friends/list.json").with(:query => {:cursor => "-1", :screen_name => "sferik"})).to have_been_made | |
end | |
Failures: | |
1) Twitter::API::FriendsAndFollowers#friends with a screen_name passed requests the correct resource | |
Failure/Error: @client.friends("sferik") | |
WebMock::NetConnectNotAllowedError: | |
Real HTTP connections are disabled. Unregistered request: GET https://api.twitter.com/1.1/friends/list.json?screen_name=sferik with headers {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'OAuth oauth_nonce="3d48576db86a5390bdc1deaec65c4a13", oauth_signature="h5gsi6Xj8li8Jqn7VzivG399rQc%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1354227722", oauth_version="1.0"', 'User-Agent'=>'Twitter Ruby Gem 4.3.0'} | |
You can stub this request with the following snippet: | |
stub_request(:get, "https://api.twitter.com/1.1/friends/list.json?screen_name=sferik"). |
# In lib/twitter/api/friends_and_followers.rb | |
def friends(*args) | |
options = extract_options!(args) | |
merge_user!(options, args.pop || screen_name) | |
merge_default_cursor!(options) | |
cursor_from_response(:users, Twitter::User, :get, "/1.1/friends/list.json", options) | |
end | |
# In spec/twitter/api/friends_and_followers.rb |
def friends(*args) | |
options = extract_options!(args) | |
merge_default_cursor!(options) | |
users_from_response(:get, "/1.1/friends/list.json", options) | |
end | |
1) Twitter::API::FriendsAndFollowers#friends with a screen_name passed requests the correct resource | |
Failure/Error: @client.friends("sferik") |
I hereby claim:
To claim this, I am signing this object:
# What the timeout for killing busy workers is, in seconds | |
timeout 60 | |
# Whether the app should be pre-loaded | |
preload_app true | |
# How many worker processes | |
worker_processes 3 | |
before_fork do |server, worker| |
Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU
Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys
Consumer key: CjulERsDeqhhjSme66ECg