Permalink
Browse files

major round of v2 work.

  • Loading branch information...
1 parent d2d1ebc commit 89f30d811087d99f056d739c9bffb755930b11c3 @kyleshank committed Jul 25, 2011
Showing 7,336 changed files with 908,866 additions and 904 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
View
@@ -1,2 +1,5 @@
+---
-BUNDLE_PATH: vendor/bundle
-BUNDLE_DISABLE_SHARED_GEMS: "1"
+BUNDLE_PATH: vendor/bundle
+BUNDLE_DISABLE_SHARED_GEMS: "1"
View
@@ -1,6 +1,7 @@
+.DS_Store
db/*.sqlite3
log/*.log
tmp/**/*
config/database.yml
.idea
-config/environments/production.rb
+config/environments/production.rb
View
1 .rspec
@@ -0,0 +1 @@
+--colour
View
28 Gemfile
@@ -1,13 +1,35 @@
source 'http://rubygems.org'
gem 'rails', '3.0.7'
-gem 'mysql2'
+gem 'mysql2', '0.2.11'
gem 'oauth'
gem 'oauth-plugin'
+gem 'oauth2'
gem 'twitter'
-gem "delayed_job", :git => 'git://github.com/collectiveidea/delayed_job.git'
+gem "delayed_job", :git => 'git://github.com/pda/delayed_job.git', :ref => "b7068aa67dd2602a2c2e09d448c3f072f266dde9"
gem 'will_paginate'
gem 'jquery-rails'
gem 'authlogic'
-gem 'unicorn'
+gem 'unicorn'
+
+group :test, :development do
+ gem 'rspec-rails'
+ gem 'factory_girl_rails'
+ gem 'cucumber-rails'
+end
+
+group :test, :cucumber do
+ gem 'rspec'
+ gem 'rcov'
+ gem 'capybara'
+ gem 'database_cleaner'
+ gem 'cucumber-rails'
+ gem 'cucumber'
+ gem 'gherkin'
+ gem 'rspec-rails'
+ gem 'spork'
+ gem 'launchy' # So you can do Then show me the page
+ gem 'rack-test' #, :git => "git://github.com/brynary/rack-test.git"
+ gem 'mongrel', '1.2.0.pre2'
+end
View
@@ -1,8 +1,9 @@
GIT
- remote: git://github.com/collectiveidea/delayed_job.git
- revision: 411719b38c51a7fbd060ea139fd64adb20107a5d
+ remote: git://github.com/pda/delayed_job.git
+ revision: b7068aa67dd2602a2c2e09d448c3f072f266dde9
+ ref: b7068aa67dd2602a2c2e09d448c3f072f266dde9
specs:
- delayed_job (2.1.2)
+ delayed_job (2.1.3)
activesupport (~> 3.0)
daemons
@@ -36,39 +37,79 @@ GEM
activemodel (= 3.0.7)
activesupport (= 3.0.7)
activesupport (3.0.7)
- addressable (2.2.2)
+ addressable (2.2.6)
arel (2.0.10)
- authlogic (2.1.6)
- activesupport
+ authlogic (3.0.3)
+ activerecord (>= 3.0.7)
+ activerecord (>= 3.0.7)
builder (2.1.2)
- daemons (1.1.0)
+ capybara (1.0.0)
+ mime-types (>= 1.16)
+ nokogiri (>= 1.3.3)
+ rack (>= 1.0.0)
+ rack-test (>= 0.5.4)
+ selenium-webdriver (~> 0.2.0)
+ xpath (~> 0.1.4)
+ childprocess (0.2.0)
+ ffi (~> 1.0.6)
+ cucumber (1.0.2)
+ builder (>= 2.1.2)
+ diff-lcs (>= 1.1.2)
+ gherkin (~> 2.4.5)
+ json (>= 1.4.6)
+ term-ansicolor (>= 1.0.5)
+ cucumber-rails (1.0.2)
+ capybara (>= 1.0.0)
+ cucumber (~> 1.0.0)
+ nokogiri (>= 1.4.6)
+ daemons (1.0.10)
+ database_cleaner (0.6.7)
+ diff-lcs (1.1.2)
erubis (2.6.6)
abstract (>= 1.0.0)
- faraday (0.5.3)
- addressable (~> 2.2.2)
- multipart-post (~> 1.0.1)
+ factory_girl (1.3.3)
+ factory_girl_rails (1.0.1)
+ factory_girl (~> 1.3)
+ railties (>= 3.0.0)
+ faraday (0.6.1)
+ addressable (~> 2.2.4)
+ multipart-post (~> 1.1.0)
rack (>= 1.1.0, < 2)
- faraday_middleware (0.3.1)
- faraday (~> 0.5.3)
- hashie (0.4.0)
+ faraday_middleware (0.6.5)
+ faraday (~> 0.6.0)
+ ffi (1.0.9)
+ gem_plugin (0.2.3)
+ gherkin (2.4.5)
+ json (>= 1.4.6)
+ hashie (1.0.0)
i18n (0.5.0)
- jquery-rails (0.2.6)
- rails (~> 3.0)
- thor (~> 0.14.4)
- kgio (2.1.1)
+ jquery-rails (1.0.12)
+ railties (~> 3.0)
+ thor (~> 0.14)
+ json (1.5.3)
+ json_pure (1.5.3)
+ kgio (2.6.0)
+ launchy (2.0.3)
mail (2.2.19)
activesupport (>= 2.3.6)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
- multi_json (0.0.5)
- multi_xml (0.2.0)
- multipart-post (1.0.1)
- mysql2 (0.2.6)
- oauth (0.4.4)
+ mongrel (1.2.0.pre2)
+ daemons (~> 1.0.10)
+ gem_plugin (~> 0.2.3)
+ multi_json (1.0.3)
+ multi_xml (0.2.2)
+ multipart-post (1.1.2)
+ mysql2 (0.2.11)
+ nokogiri (1.5.0)
+ oauth (0.4.5)
oauth-plugin (0.3.14)
oauth (>= 0.3.5)
+ oauth2 (0.4.1)
+ faraday (~> 0.6.1)
+ multi_json (>= 0.0.5)
polyglot (0.3.1)
rack (1.2.3)
rack-mount (0.6.14)
@@ -88,35 +129,75 @@ GEM
activesupport (= 3.0.7)
rake (>= 0.8.7)
thor (~> 0.14.4)
+ raindrops (0.7.0)
rake (0.9.2)
- simple_oauth (0.1.3)
+ rcov (0.9.9)
+ rspec (2.6.0)
+ rspec-core (~> 2.6.0)
+ rspec-expectations (~> 2.6.0)
+ rspec-mocks (~> 2.6.0)
+ rspec-core (2.6.4)
+ rspec-expectations (2.6.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.6.0)
+ rspec-rails (2.6.1)
+ actionpack (~> 3.0)
+ activesupport (~> 3.0)
+ railties (~> 3.0)
+ rspec (~> 2.6.0)
+ rubyzip (0.9.4)
+ selenium-webdriver (0.2.2)
+ childprocess (>= 0.1.9)
+ ffi (>= 1.0.7)
+ json_pure
+ rubyzip
+ simple_oauth (0.1.5)
+ spork (0.8.5)
+ term-ansicolor (1.0.6)
thor (0.14.6)
treetop (1.4.9)
polyglot (>= 0.3.1)
- twitter (1.0.0)
- faraday (~> 0.5.3)
- faraday_middleware (~> 0.3.0)
- hashie (~> 0.4.0)
- multi_json (~> 0.0.5)
+ twitter (1.6.0)
+ faraday (~> 0.6.1)
+ faraday_middleware (~> 0.6.3)
+ hashie (~> 1.0.0)
+ multi_json (~> 1.0.0)
multi_xml (~> 0.2.0)
- simple_oauth (~> 0.1.2)
+ simple_oauth (~> 0.1.5)
tzinfo (0.3.29)
- unicorn (3.2.1)
- kgio (~> 2.1)
+ unicorn (4.0.1)
+ kgio (~> 2.4)
rack
+ raindrops (~> 0.6)
will_paginate (2.3.15)
+ xpath (0.1.4)
+ nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
authlogic
+ capybara
+ cucumber
+ cucumber-rails
+ database_cleaner
delayed_job!
+ factory_girl_rails
+ gherkin
jquery-rails
- mysql2
+ launchy
+ mongrel (= 1.2.0.pre2)
+ mysql2 (= 0.2.11)
oauth
oauth-plugin
+ oauth2
+ rack-test
rails (= 3.0.7)
+ rcov
+ rspec
+ rspec-rails
+ spork
twitter
unicorn
will_paginate
@@ -1,84 +0,0 @@
-##
-# Donate Your Account (donateyouraccount.com)
-# Copyright (C) 2011 Kyle Shank (kyle.shank@gmail.com)
-# http://www.gnu.org/licenses/agpl.html
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-##
-class AccountsController < ApplicationController
- include AccountsHelper
-
- before_filter :login_required, :only => [:index]
-
- def index
- @donated_statuses = Status.donated_through_account(current_account).desc.paginate(:page => params[:page], :per_page=>10)
- @campaign = current_account.campaign
- @status = Status.new
- @campaigns = Campaign.suggest_for(current_account.id).desc.limit(4)
- end
-
- def new
- redirect_to get_twitter_request_token.authorize_url.gsub("authorize","authenticate")
- end
-
- def create
- consumer = OAuth::Consumer.new(Twitter.consumer_key, Twitter.consumer_secret, {:site=>"http://twitter.com" })
- request_token = OAuth::RequestToken.new(consumer, session[:request_token], session[:request_token_secret])
-
- begin
- access_token = request_token.get_access_token(:oauth_verifier => params[:oauth_verifier])
- response = consumer.request(:get, '/account/verify_credentials.json', access_token, { :scheme => :query_string })
-
- case response
- when Net::HTTPSuccess
- user_info = JSON.parse(response.body)
-
- @account = Account.first(:conditions => {:uid => user_info["id"]})
-
- unless @account
- @account = Account.new(
- :uid => user_info["id"],
- :screen_name => user_info["screen_name"],
- :token => access_token.token,
- :secret => access_token.secret
- )
- end
-
- @account.name = user_info["name"]
- @account.followers = (user_info["followers_count"] || 0).to_i
- @account.url = user_info["url"]
- @account.description = user_info["description"]
- @account.location = user_info["location"]
- @account.profile_sidebar_border_color = user_info["profile_sidebar_border_color"]
- @account.profile_sidebar_fill_color = user_info["profile_sidebar_fill_color"]
- @account.profile_link_color = user_info["profile_link_color"]
- @account.profile_image_url = user_info["profile_image_url"]
- @account.profile_background_color = user_info["profile_background_color"]
- @account.profile_background_image_url = user_info["profile_background_image_url"]
- @account.profile_text_color = user_info["profile_text_color"]
- @account.profile_background_tile = user_info["profile_background_tile"]
- @account.profile_use_background_image = user_info["profile_use_background_image"]
-
- if @account.save
- self.current_account=@account
- end
-
- redirect_back_or_default dashboard_path
- end
- rescue OAuth::Unauthorized
- request.flash.now["notice"] = "Oops! OAuth Unauthorized error."
- redirect_to "/"
- end
- end
-end
Oops, something went wrong.

0 comments on commit 89f30d8

Please sign in to comment.