This file contains hidden or 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
# encoding: utf-8 | |
require 'rails/railtie' | |
module Development | |
module Environment | |
class Railtie < ::Rails::Railtie | |
config.before_initialize do | |
env_path = File.expand_path("../../.env", __FILE__) | |
if File.exist?(env_path) | |
File.open(env_path) do |file| |
This file contains hidden or 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 'tweetstream' | |
require 'yajl' | |
TweetStream.configure do |config| | |
config.consumer_key = ENV['consumer_key'] | |
config.consumer_secret = ENV['consumer_secret'] | |
config.oauth_token = ENV['oauth_token'] | |
config.oauth_token_secret = ENV['oauth_token_secret'] | |
config.parser = :yajl | |
config.auth_method = :oauth |
This file contains hidden or 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
bug #F11700 | |
invalid #E6E6E6 | |
change #3B812F | |
duplicate #AEAEAE | |
enhancement #6EAFEF | |
fixed #000000 | |
frozen #C7FF80 | |
question #E572BB | |
wontfix #FFFFFF |
This file contains hidden or 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 'feedzirra' | |
module ItunesFeed | |
module Music | |
DEFAULT_FEED_TYPE = 'topalbums' | |
def music | |
@feed_type = ItunesFeed::Music::DEFAULT_FEED_TYPE | |
self |
This file contains hidden or 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
Feature: Authentication | |
In order to attract interest and users to Futureish | |
As a product development team | |
I want users to login via twitter | |
So that they can create a Futureish account | |
Scenario: Authentication via Twitter | |
Given I am logged in on twitter | |
When I go to the homepage | |
And I follow "Login with Twitter" |
This file contains hidden or 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
post_data = {} | |
post_data[:name] = 'Title for my link' | |
post_data[:link] = 'http://path.to/my/link' | |
post_data[:caption] = 'A caption' | |
post_data[:description] = 'A description' | |
post_data[:picture] = 'http://path.to/myimage.jpg' | |
post_data[:actions] = { :name => 'My site name', :link => 'http://link.to/my/site'}.to_json | |
client.post("feed", nil, post_data) |
This file contains hidden or 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
source "http://rubygems.org" | |
gem 'tweetstream' | |
gem 'yajl-ruby' | |
gem 'growl' |
This file contains hidden or 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 'rubygems' | |
gem 'httparty', '= 0.4.3' | |
require 'httparty' | |
require 'tinder' | |
require 'feedzirra' | |
require 'nokogiri' | |
current_woot = nil | |
woot_url = 'http://woot.com/Blog/Feed.ashx' |
This file contains hidden or 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
if defined?(PhusionPassenger) | |
PhusionPassenger.on_event(:starting_worker_process) do |forked| | |
if forked | |
# We're in smart spawning mode. | |
Member.connection.reconnect! | |
Rails.cache.instance_variable_get(:@cache).quit if Rails.cache.class == ActiveSupport::Cache::LibmemcachedStore | |
else | |
# We're in conservative spawning mode. We don't need to do anything. | |
end | |
end |