Permalink
Browse files

Merge master into widgets

  • Loading branch information...
1 parent c18106d commit a9c7c41300adf95518549a2b5495e1a7d5a87921 tashian committed Jul 6, 2011
Showing with 3,105 additions and 238 deletions.
  1. 0 .gitmodules
  2. +24 −1 Gemfile
  3. +59 −33 Gemfile.lock
  4. +27 −2 app/controllers/account_controller.rb
  5. +7 −0 app/controllers/admin/contact_congress_controller.rb
  6. +62 −1 app/controllers/application_controller.rb
  7. +87 −0 app/controllers/battle_royale_controller.rb
  8. +125 −0 app/controllers/contact_congress_letters_controller.rb
  9. +1 −0 app/controllers/contact_controller.rb
  10. +11 −2 app/controllers/districts_controller.rb
  11. +7 −13 app/helpers/application_helper.rb
  12. +2 −0 app/helpers/contact_congress_letters_helper.rb
  13. +5 −0 app/helpers/contact_helper.rb
  14. +37 −0 app/models/bill.rb
  15. +2 −0 app/models/bill_text_node.rb
  16. +2 −2 app/models/bill_text_version.rb
  17. +14 −0 app/models/contact_congress_letter.rb
  18. +4 −0 app/models/contact_congress_letters_formageddon_thread.rb
  19. +21 −0 app/models/crp_interest_group.rb
  20. +1 −2 app/models/district.rb
  21. +35 −0 app/models/person.rb
  22. +8 −0 app/models/state.rb
  23. +10 −1 app/models/user.rb
  24. +1 −1 app/models/user_observer.rb
  25. +33 −0 app/views/account/facebook_complete.html.haml
  26. +0 −69 app/views/account/login.html.erb
  27. +40 −0 app/views/account/login.html.haml
  28. +16 −0 app/views/admin/contact_congress/index.html.haml
  29. +4 −4 app/views/bill/major.rxml
  30. +50 −0 app/views/bill/show.html.erb
  31. +13 −0 app/views/contact_congress_letters/_contact_congress_share.html.haml
  32. +10 −0 app/views/contact_congress_letters/_contact_congress_status_bar.html.haml
  33. +38 −0 app/views/contact_congress_letters/_contact_recipients.html.haml
  34. +7 −0 app/views/contact_congress_letters/_message_builder_commentary.html.haml
  35. +39 −0 app/views/contact_congress_letters/_message_builder_contribution_data.html.haml
  36. +5 −0 app/views/contact_congress_letters/_will_add_text_box.html.haml
  37. +65 −0 app/views/contact_congress_letters/create.html.haml
  38. +10 −0 app/views/contact_congress_letters/get_recipients.js.erb
  39. +173 −0 app/views/contact_congress_letters/new.html.haml
  40. +35 −0 app/views/contact_congress_letters/select_position.html.haml
  41. +48 −0 app/views/contact_congress_letters/show.html.haml
  42. +18 −0 app/views/contact_congress_letters/showthread.html.haml
  43. +0 −5 app/views/districts/index.html.erb
  44. +11 −1 app/views/districts/show.html.erb
  45. +11 −5 app/views/layouts/_header.html.erb
  46. +1 −1 app/views/layouts/frontpage.html.erb
  47. +18 −0 app/views/people/_person.html.haml
  48. +1 −1 app/views/person/_topic.html.erb
  49. +3 −4 app/views/shared/_comments.html.haml
  50. +4 −0 app/views/shared/_comments_list.html.haml
  51. +6 −0 app/views/shared/_error_messages.html.haml
  52. +12 −31 app/views/shared/_user_content.html.erb
  53. +6 −38 app/views/states/show.html.erb
  54. +256 −0 bin/build_formageddon_recipients.rb
  55. +16 −11 bin/get_sunlightlabs_data.rb
  56. +1 −1 config/assets.yml
  57. +1 −0 config/initializers/facebooker2.rb
  58. +19 −0 config/initializers/formageddon.rb
  59. +25 −0 config/routes.rb
  60. +10 −0 db/migrate/20110306192052_comments_trigger_modify.rb
  61. +19 −0 db/migrate/20110526181158_contact_congress_letters.rb
  62. +93 −0 db/migrate/20110526194928_create_formageddon_tables.rb
  63. +11 −0 db/migrate/20110610165044_user_facebook.rb
  64. BIN public/images/comment.png
  65. BIN public/images/facebook-bg.png
  66. BIN public/images/letter-approve.png
  67. BIN public/images/letter-oppose.png
  68. BIN public/images/letter-tracking.png
  69. BIN public/images/letters.png
  70. BIN public/images/pencil.png
  71. BIN public/images/people-arrow.png
  72. BIN public/images/promo.gif
  73. BIN public/images/tiny-arrow.png
  74. BIN public/images/triangle.png
  75. BIN public/images/widg-bg.jpg
  76. +19 −0 public/stylesheets/account.css
  77. +120 −7 public/stylesheets/bill.css
  78. +2 −1 public/stylesheets/contact.css
  79. +1,196 −0 public/stylesheets/contact_congress_letters.css
  80. +76 −0 public/stylesheets/master.css
  81. +12 −1 public/stylesheets/states.css
View
No changes.
View
@@ -1,6 +1,7 @@
source 'http://rubygems.org'
gem 'rails', '3.0.7'
+gem 'rake', '0.8.7'
# database gems -- need both pg and mysql for app and wiki
gem 'pg'
@@ -12,6 +13,9 @@ gem "settingslogic"
# HAML support
gem "haml"
+# RABL for API / JSON
+gem 'rabl'
+
# RMagick
gem 'rmagick', '2.13.1'
gem 'simple_captcha', :git => 'git://github.com/galetahub/simple-captcha.git'
@@ -47,6 +51,7 @@ gem 'RedCloth'
gem 'bluecloth'
gem 'htmlentities'
gem "json"
+gem "nokogiri"
# Deployment
gem 'capistrano'
@@ -57,13 +62,31 @@ gem 'newrelic_rpm'
# oauth
gem 'oauth'
+gem 'facebooker2'
gem 'will_paginate', '~> 3.0.pre2'
gem "validates_captcha"
gem "okkez-open_id_authentication"
-gem "acts-as-taggable-on", :git => 'git://github.com/mbleigh/acts-as-taggable-on.git'
+gem "acts-as-taggable-on", :git => 'http://github.com/mbleigh/acts-as-taggable-on.git'
+
+### temp just for showing to drm
+gem 'mechanize'
+#gem 'formageddon', '0.0.0', :require => 'formageddon', :path => '/Users/aross/pcf-work/gitbranches/formageddon'
+gem 'formageddon', :git => 'git://github.com/opencongress/formageddon.git'
+
+gem 'rspec'
+gem 'rspec-rails', '~> 2.4'
+gem 'cucumber', '0.8.5'
+gem 'cucumber-rails'
+gem 'webrat'
+gem 'selenium-client'
+
+gem 'capybara'
+gem 'capybara-envjs'
+
+gem 'autotest'
# Testing
group :test, :development do
View
@@ -5,7 +5,16 @@ GIT
simple_captcha (0.1.1)
GIT
- remote: git://github.com/mbleigh/acts-as-taggable-on.git
+ remote: git://github.com/opencongress/formageddon.git
+ revision: 887a36965fb1ec87c54c36128d6ae7fbff7380dd
+ specs:
+ formageddon (0.0.0)
+ delayed_job (~> 2.1)
+ haml
+ mechanize
+
+GIT
+ remote: http://github.com/mbleigh/acts-as-taggable-on.git
revision: 2752cfef4c66318d0925fbe880d5392ad188bb50
specs:
acts-as-taggable-on (2.0.6)
@@ -46,18 +55,18 @@ GEM
activemodel (= 3.0.7)
activesupport (= 3.0.7)
activesupport (3.0.7)
- addressable (2.2.5)
- arel (2.0.9)
+ addressable (2.2.6)
+ arel (2.0.10)
autotest (4.4.6)
ZenTest (>= 4.4.1)
bluecloth (2.1.0)
builder (2.1.2)
- capistrano (2.5.21)
+ capistrano (2.6.0)
highline
net-scp (>= 1.0.0)
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
- net-ssh-gateway (>= 1.0.0)
+ net-ssh-gateway (>= 1.1.0)
capistrano-ext (1.2.1)
capistrano (>= 1.0.0)
capybara (0.4.1.2)
@@ -72,10 +81,10 @@ GEM
capybara-envjs (0.4.0)
capybara (~> 0.4.0)
envjs (>= 0.3.7)
- carrierwave (0.5.3)
+ carrierwave (0.5.4)
activesupport (~> 3.0)
celerity (0.8.9)
- childprocess (0.1.8)
+ childprocess (0.1.9)
ffi (~> 1.0.6)
closure-compiler (1.1.1)
crack (0.1.8)
@@ -88,6 +97,10 @@ GEM
cucumber-rails (0.3.2)
cucumber (>= 0.8.0)
culerity (0.2.15)
+ daemons (1.1.3)
+ delayed_job (2.1.4)
+ activesupport (~> 3.0)
+ daemons
diff-lcs (1.1.2)
em-websocket (0.2.1)
addressable (>= 2.1.1)
@@ -98,10 +111,12 @@ GEM
abstract (>= 1.0.0)
eventmachine (0.12.10)
excon (0.6.3)
+ facebooker2 (0.0.11)
+ mogli (>= 0.0.12)
+ ruby-hmac
fastercsv (1.5.4)
- ffi (1.0.7)
- rake (>= 0.8.7)
- fog (0.8.1)
+ ffi (1.0.9)
+ fog (0.8.2)
builder
excon (~> 0.6.1)
formatador (>= 0.1.3)
@@ -110,33 +125,32 @@ GEM
net-ssh (>= 2.1.3)
nokogiri (>= 1.4.4)
ruby-hmac
- formatador (0.1.3)
+ formatador (0.1.4)
gherkin (2.1.5)
trollop (~> 1.16.2)
govkit (0.6.1)
fastercsv (>= 1.5.3)
httparty (>= 0.5.2)
json (>= 1.4.3)
nokogiri (>= 1.4.4)
- guard (0.3.4)
+ guard (0.4.1)
thor (~> 0.14.6)
- guard-livereload (0.1.10)
+ guard-livereload (0.1.11)
em-websocket (~> 0.2.0)
guard (>= 0.2.2)
json (~> 1.5.1)
- haml (3.1.1)
- highline (1.6.1)
- hoptoad_notifier (2.4.9)
+ haml (3.1.2)
+ highline (1.6.2)
+ hoptoad_notifier (2.4.11)
activesupport
builder
hpricot (0.8.4)
htmlentities (4.3.0)
- httparty (0.7.7)
+ httparty (0.7.8)
crack (= 0.1.8)
i18n (0.5.0)
- jammit (0.6.0)
- closure-compiler (>= 0.1.0)
- yui-compressor (>= 0.9.1)
+ jammit (0.6.3)
+ yui-compressor (>= 0.9.3)
johnson (2.0.0.pre3)
stackdeck (~> 0.2)
json (1.5.1)
@@ -146,27 +160,32 @@ GEM
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
+ mechanize (1.0.0)
+ nokogiri (>= 1.2.1)
mediacloth (0.0.3)
memcache (1.2.13)
memcache-client (1.8.5)
mime-types (1.16)
+ mogli (0.0.28)
+ httparty (>= 0.4.3)
mysql (2.8.1)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
net-sftp (2.0.5)
net-ssh (>= 2.0.9)
net-ssh (2.1.4)
- net-ssh-gateway (1.0.1)
+ net-ssh-gateway (1.1.0)
net-ssh (>= 1.99.1)
- newrelic_rpm (2.14.1)
+ newrelic_rpm (3.0.1)
nokogiri (1.4.4)
oauth (0.4.4)
okkez-open_id_authentication (1.0.1)
ruby-openid (>= 2.0.4)
open4 (1.0.1)
pg (0.11.0)
polyglot (0.3.1)
- rack (1.2.2)
+ rabl (0.2.8)
+ rack (1.2.3)
rack-mount (0.6.14)
rack (>= 1.0.0)
rack-openid (1.3.1)
@@ -189,24 +208,24 @@ GEM
thor (~> 0.14.4)
rake (0.8.7)
rmagick (2.13.1)
- rspec (2.5.0)
- rspec-core (~> 2.5.0)
- rspec-expectations (~> 2.5.0)
- rspec-mocks (~> 2.5.0)
- rspec-core (2.5.1)
- rspec-expectations (2.5.0)
+ 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.5.0)
- rspec-rails (2.5.0)
+ rspec-mocks (2.6.0)
+ rspec-rails (2.6.1)
actionpack (~> 3.0)
activesupport (~> 3.0)
railties (~> 3.0)
- rspec (~> 2.5.0)
+ rspec (~> 2.6.0)
ruby-hmac (0.4.0)
ruby-openid (2.1.8)
rubyzip (0.9.4)
selenium-client (1.2.18)
- selenium-webdriver (0.2.0)
+ selenium-webdriver (0.2.1)
childprocess (>= 0.1.7)
ffi (>= 1.0.7)
json_pure
@@ -253,7 +272,9 @@ DEPENDENCIES
closure-compiler
cucumber (= 0.8.5)
cucumber-rails
+ facebooker2
fog
+ formageddon!
govkit
guard
guard-livereload
@@ -263,17 +284,22 @@ DEPENDENCIES
htmlentities
jammit
json
+ mechanize
mediacloth
memcache
memcache-client
mysql
newrelic_rpm
+ nokogiri
oauth
okkez-open_id_authentication
pg
+ rabl
rack-openid
rails (= 3.0.7)
+ rake (= 0.8.7)
rmagick (= 2.13.1)
+ rspec
rspec-rails (~> 2.4)
ruby-openid
selenium-client
@@ -36,7 +36,7 @@ def get_user_full_name
end
end
- def login
+ def login
if params[:login_action]
session[:login_action] = {:url => session[:return_to], :action_result => params[:login_action]}
end
@@ -104,8 +104,32 @@ def accept_tos
end
end
+ def facebook_complete
+ @page_title = 'Facebook Connect'
+
+ @user = User.where(['facebook_uid=?', @facebook_user.id]).first
+ if @user.nil?
+ @user = User.new
+ end
+
+ if request.post?
+ @user.facebook_uid = @facebook_user.id
+ @user.email = @facebook_user.email
+ @user.update_attributes(params[:user])
+
+ if @user.save
+ @user.activate
+ self.current_user = @user
+ flash[:notice] = 'You have successfully signed up with your Facebook Account!'
+
+ redirect_to welcome_url
+ return
+ end
+ end
+ end
+
def signup
- @page_title = "Create a New Account"
+ @page_title = "Create a New Account"
logger.info session.inspect
@@ -178,6 +202,7 @@ def activate
end
def welcome
+ @page_title = 'Welcome to OpenCongress!'
@user = current_user
@show_tracked_list = true
@@ -0,0 +1,7 @@
+class Admin::ContactCongressController < Admin::IndexController
+ before_filter :admin_login_required
+
+ def index
+ @people = Person.all_sitting
+ end
+end
Oops, something went wrong.

0 comments on commit a9c7c41

Please sign in to comment.