Permalink
Browse files

openmissouri

  • Loading branch information...
0 parents commit 40cc46973267ac0b3a508ea263a6320811968325 @blueroot blueroot committed Jan 19, 2011
Showing with 23,381 additions and 0 deletions.
  1. +8 −0 .gitignore
  2. +1 −0 .rspec
  3. +1 −0 .rvmrc
  4. +37 −0 Gemfile
  5. +277 −0 Gemfile.lock
  6. +1 −0 README.rdoc
  7. +7 −0 Rakefile
  8. +8 −0 app/controllers/application_controller.rb
  9. +10 −0 app/controllers/dashboard_controller.rb
  10. +9 −0 app/controllers/data_sets_controller.rb
  11. +21 −0 app/controllers/omniauth_callbacks_controller.rb
  12. +9 −0 app/controllers/organizations_controller.rb
  13. +15 −0 app/helpers/application_helper.rb
  14. +4 −0 app/models/data_set.rb
  15. +4 −0 app/models/organization.rb
  16. +16 −0 app/models/user.rb
  17. +57 −0 app/models/user/omni_auth_extension.rb
  18. +3 −0 app/models/user_identity.rb
  19. +1 −0 app/views/dashboard/about.html.erb
  20. +25 −0 app/views/dashboard/index.html.erb
  21. +14 −0 app/views/data_sets/_form.html.erb
  22. +3 −0 app/views/data_sets/edit.html.erb
  23. +52 −0 app/views/data_sets/index.html.erb
  24. +3 −0 app/views/data_sets/new.html.erb
  25. +66 −0 app/views/data_sets/show.html.erb
  26. +11 −0 app/views/devise/confirmations/new.html.erb
  27. +5 −0 app/views/devise/mailer/confirmation_instructions.html.erb
  28. +8 −0 app/views/devise/mailer/reset_password_instructions.html.erb
  29. +7 −0 app/views/devise/mailer/unlock_instructions.html.erb
  30. +14 −0 app/views/devise/passwords/edit.html.erb
  31. +11 −0 app/views/devise/passwords/new.html.erb
  32. +19 −0 app/views/devise/registrations/edit.html.erb
  33. +18 −0 app/views/devise/registrations/new.html.erb
  34. +15 −0 app/views/devise/sessions/new.html.erb
  35. +25 −0 app/views/devise/shared/_links.erb
  36. +11 −0 app/views/devise/unlocks/new.html.erb
  37. +3 −0 app/views/layouts/_messages.html.erb
  38. +4 −0 app/views/layouts/_navigation.html.erb
  39. +35 −0 app/views/layouts/application.html.erb
  40. +25 −0 app/views/organizations/_form.html.erb
  41. +3 −0 app/views/organizations/edit.html.erb
  42. +39 −0 app/views/organizations/index.html.erb
  43. +3 −0 app/views/organizations/new.html.erb
  44. +111 −0 app/views/organizations/show.html.erb
  45. +61 −0 app/views/styleguides/_tabletastic.html.erb
  46. +2 −0 autotest/discover.rb
  47. +4 −0 config.ru
  48. +46 −0 config/application.rb
  49. +13 −0 config/boot.rb
  50. +19 −0 config/config.yml
  51. +10 −0 config/cucumber.yml
  52. +5 −0 config/environment.rb
  53. +25 −0 config/environments/development.rb
  54. +49 −0 config/environments/production.rb
  55. +35 −0 config/environments/test.rb
  56. +7 −0 config/initializers/backtrace_silencers.rb
  57. +1 −0 config/initializers/config.rb
  58. +173 −0 config/initializers/devise.rb
  59. +54 −0 config/initializers/formtastic.rb
  60. +14 −0 config/initializers/generators.rb
  61. +10 −0 config/initializers/inflections.rb
  62. +1 −0 config/initializers/mailer.rb
  63. +5 −0 config/initializers/mime_types.rb
  64. +5 −0 config/initializers/requires.rb
  65. +7 −0 config/initializers/secret_token.rb
  66. +8 −0 config/initializers/session_store.rb
  67. +1 −0 config/initializers/simple_navigation.rb
  68. +8 −0 config/initializers/tabletastic.rb
  69. +9 −0 config/initializers/time_formats.rb
  70. +5 −0 config/locales/en.yml
  71. +15 −0 config/navigations/main_navigation.rb
  72. +15 −0 config/navigations/user_navigation.rb
  73. +18 −0 config/routes.rb
  74. +20 −0 db/migrate/20100713113845_devise_create_users.rb
  75. +15 −0 db/migrate/20101122224015_create_user_identities.rb
  76. +32 −0 db/migrate/20110112194032_create_organizations.rb
  77. +23 −0 db/migrate/20110112195718_create_data_sets.rb
  78. +85 −0 db/schema.rb
  79. +7 −0 db/seeds.rb
  80. +287 −0 doc/README_FOR_APP
  81. +29 −0 features/authentication/sign_in.feature
  82. +15 −0 features/authentication/sign_in_using_twitter.feature
  83. +10 −0 features/authentication/sign_out.feature
  84. +31 −0 features/step_definitions/authentication_steps.rb
  85. +7 −0 features/step_definitions/common/app_steps.rb
  86. +191 −0 features/step_definitions/common/email_steps.rb
  87. +220 −0 features/step_definitions/common/web_steps.rb
  88. +22 −0 features/step_definitions/twitter_authentication_steps.rb
  89. +92 −0 features/step_definitions/user_steps.rb
  90. +2 −0 features/support/email_spec.rb
  91. +58 −0 features/support/env.rb
  92. +2 −0 features/support/factory_girl.rb
  93. +46 −0 features/support/paths.rb
  94. +32 −0 features/support/vcr.rb
  95. +11 −0 features/support/webmock.rb
  96. +13 −0 features/user/cancel_account.feature
  97. +24 −0 features/user/create_user.feature
  98. +16 −0 features/user/create_user_using_twitter.feature
  99. +17 −0 features/user/update_account.feature
  100. +17 −0 features/user/update_account_without_current_password.feature
  101. 0 lib/tasks/.gitkeep
  102. +53 −0 lib/tasks/cucumber.rake
  103. +38 −0 lib/tasks/rcov.rake
  104. +35 −0 lib/templates/cucumber/feature/feature.erb
  105. +43 −0 lib/templates/cucumber/feature/steps.erb
  106. +9 −0 lib/templates/erb/scaffold/_form.html.erb
  107. +3 −0 lib/templates/erb/scaffold/edit.html.erb
  108. +16 −0 lib/templates/erb/scaffold/index.html.erb
  109. +3 −0 lib/templates/erb/scaffold/new.html.erb
  110. +12 −0 lib/templates/rails/inherited_resources_controller/controller.rb
  111. +26 −0 public/404.html
  112. +26 −0 public/422.html
  113. +26 −0 public/500.html
  114. 0 public/favicon.ico
  115. +86 −0 public/flutie/stylesheets/defaults.css
  116. +458 −0 public/flutie/stylesheets/flutie.css
  117. +152 −0 public/flutie/stylesheets/forms.css
  118. +25 −0 public/flutie/stylesheets/lists.css
  119. +49 −0 public/flutie/stylesheets/reset.css
  120. +95 −0 public/flutie/stylesheets/sass/_defaults.scss
  121. +191 −0 public/flutie/stylesheets/sass/_forms.scss
  122. +40 −0 public/flutie/stylesheets/sass/_lists.scss
  123. +53 −0 public/flutie/stylesheets/sass/_reset.scss
  124. 0 public/flutie/stylesheets/sass/_screen.scss
  125. +35 −0 public/flutie/stylesheets/sass/_tables.scss
  126. +137 −0 public/flutie/stylesheets/sass/_type.scss
  127. +7 −0 public/flutie/stylesheets/sass/flutie.scss
  128. 0 public/flutie/stylesheets/screen.css
  129. +43 −0 public/flutie/stylesheets/tables.css
  130. +90 −0 public/flutie/stylesheets/type.css
  131. BIN public/images/button_bg.gif
  132. BIN public/images/icon_add.gif
  133. BIN public/images/icon_delete.gif
  134. BIN public/images/icon_edit.gif
  135. BIN public/images/icon_view.gif
  136. BIN public/images/logo.jpg
  137. BIN public/images/rails.png
  138. +2 −0 public/javascripts/application.js
  139. +11,273 −0 public/javascripts/jquery-ui.js
  140. +399 −0 public/javascripts/jquery-ui.min.js
  141. +6,240 −0 public/javascripts/jquery.js
  142. +154 −0 public/javascripts/jquery.min.js
  143. +132 −0 public/javascripts/rails.js
  144. +5 −0 public/robots.txt
  145. 0 public/stylesheets/.gitkeep
  146. +128 −0 public/stylesheets/application.css
  147. +6 −0 script/rails
  148. +15 −0 spec/factories/data_sets.rb
  149. +24 −0 spec/factories/organizations.rb
  150. +6 −0 spec/factories/sequences.rb
  151. +4 −0 spec/factories/user_identities.rb
  152. +19 −0 spec/factories/users.rb
  153. +5 −0 spec/models/data_set_spec.rb
  154. +5 −0 spec/models/organization_spec.rb
  155. +217 −0 spec/models/user/omni_auth_extension_spec.rb
  156. +5 −0 spec/models/user_identity_spec.rb
  157. +10 −0 spec/models/user_spec.rb
  158. +13 −0 spec/spec_helper.rb
  159. 0 vendor/plugins/.gitkeep
@@ -0,0 +1,8 @@
+.bundle
+db/*.sqlite3
+log/*.log
+tmp/*
+coverage/*
+rerun.txt
+config/database.yml
+doc/**/*
1 .rspec
@@ -0,0 +1 @@
+--colour
1 .rvmrc
@@ -0,0 +1 @@
+rvm use ree-1.8.7-2010.02@rails-3-base
37 Gemfile
@@ -0,0 +1,37 @@
+source :rubygems
+
+gem 'mysql', '2.8.1'
+gem 'rails', '3.0.3'
+gem 'jquery-rails', '0.2.5'
+gem 'configatron', '2.6.4'
+gem 'devise', '1.2.rc'
+gem 'omniauth', '0.1.6'
+gem 'simple-navigation', '3.0.2'
+gem 'formtastic', '1.2.0'
+gem 'tabletastic', '0.2.1'
+gem 'flutie', '1.1.2'
+gem 'inherited_resources', '1.1.2'
+gem 'will_paginate', '3.0.pre2'
+
+group :test, :development do
+ gem 'mongrel', '1.2.0.pre2'
+ gem 'sqlite3-ruby', '1.3.2'
+ gem 'redgreen', '1.2.2'
+ gem 'rr', '1.0.2'
+ gem 'factory_girl_rails', '1.0'
+ gem 'rspec-rails', '2.2.1'
+ gem 'cucumber', '0.9.4'
+ gem 'cucumber-rails', '0.3.2'
+ gem 'shoulda', '2.11.3'
+ gem 'email_spec', '1.0.0'
+ gem 'launchy', '0.3.7'
+ gem 'capybara', '0.3.9'
+ gem 'capybara-mechanize', '0.2.3'
+ gem 'autotest-rails', '4.1.0'
+ gem 'autotest', '4.4.1'
+ gem 'vcr', '1.3.3'
+ gem 'webmock', '1.6.1', :require => false
+ gem 'rails_best_practices', '0.4.5'
+ gem 'rails3-generators', '0.14.0'
+ gem 'rcov', '0.9.9'
+end
@@ -0,0 +1,277 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ ZenTest (4.4.0)
+ abstract (1.0.0)
+ actionmailer (3.0.3)
+ actionpack (= 3.0.3)
+ mail (~> 2.2.9)
+ actionpack (3.0.3)
+ activemodel (= 3.0.3)
+ activesupport (= 3.0.3)
+ builder (~> 2.1.2)
+ erubis (~> 2.6.6)
+ i18n (~> 0.4)
+ rack (~> 1.2.1)
+ rack-mount (~> 0.6.13)
+ rack-test (~> 0.5.6)
+ tzinfo (~> 0.3.23)
+ activemodel (3.0.3)
+ activesupport (= 3.0.3)
+ builder (~> 2.1.2)
+ i18n (~> 0.4)
+ activerecord (3.0.3)
+ activemodel (= 3.0.3)
+ activesupport (= 3.0.3)
+ arel (~> 2.0.2)
+ tzinfo (~> 0.3.23)
+ activeresource (3.0.3)
+ activemodel (= 3.0.3)
+ activesupport (= 3.0.3)
+ activesupport (3.0.3)
+ addressable (2.2.2)
+ arel (2.0.4)
+ autotest (4.4.1)
+ autotest-rails (4.1.0)
+ ZenTest
+ bcrypt-ruby (2.1.2)
+ builder (2.1.2)
+ capybara (0.3.9)
+ culerity (>= 0.2.4)
+ mime-types (>= 1.16)
+ nokogiri (>= 1.3.3)
+ rack (>= 1.0.0)
+ rack-test (>= 0.5.4)
+ selenium-webdriver (>= 0.0.3)
+ capybara-mechanize (0.2.3)
+ capybara (= 0.3.9)
+ mechanize (= 1.0.0)
+ childprocess (0.1.4)
+ ffi (~> 0.6.3)
+ colored (1.2)
+ configatron (2.6.4)
+ yamler (>= 0.1.0)
+ configuration (1.2.0)
+ crack (0.1.8)
+ cucumber (0.9.4)
+ builder (~> 2.1.2)
+ diff-lcs (~> 1.1.2)
+ gherkin (~> 2.2.9)
+ json (~> 1.4.6)
+ term-ansicolor (~> 1.0.5)
+ cucumber-rails (0.3.2)
+ cucumber (>= 0.8.0)
+ culerity (0.2.12)
+ daemons (1.0.10)
+ devise (1.2.rc)
+ bcrypt-ruby (~> 2.1.2)
+ orm_adapter (~> 0.0.2)
+ warden (~> 1.0.2)
+ diff-lcs (1.1.2)
+ email_spec (1.0.0)
+ erubis (2.6.6)
+ abstract (>= 1.0.0)
+ factory_girl (1.3.2)
+ factory_girl_rails (1.0)
+ factory_girl (~> 1.3)
+ rails (>= 3.0.0.beta4)
+ faraday (0.5.3)
+ addressable (~> 2.2.2)
+ multipart-post (~> 1.0.1)
+ rack (>= 1.1.0, < 2)
+ ffi (0.6.3)
+ rake (>= 0.8.7)
+ flutie (1.1.2)
+ formtastic (1.2.0)
+ actionpack (>= 2.3.7)
+ activesupport (>= 2.3.7)
+ i18n (>= 0.4.0)
+ gem_plugin (0.2.3)
+ gherkin (2.2.9)
+ json (~> 1.4.6)
+ term-ansicolor (~> 1.0.5)
+ has_scope (0.5.0)
+ i18n (0.4.2)
+ inherited_resources (1.1.2)
+ has_scope (~> 0.5.0)
+ responders (~> 0.6.0)
+ jquery-rails (0.2.5)
+ rails (~> 3.0)
+ thor (~> 0.14.4)
+ json (1.4.6)
+ json_pure (1.4.6)
+ launchy (0.3.7)
+ configuration (>= 0.0.5)
+ rake (>= 0.8.1)
+ mail (2.2.10)
+ activesupport (>= 2.3.6)
+ i18n (~> 0.4.1)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mechanize (1.0.0)
+ nokogiri (>= 1.2.1)
+ mime-types (1.16)
+ mongrel (1.2.0.pre2)
+ daemons (~> 1.0.10)
+ gem_plugin (~> 0.2.3)
+ multi_json (0.0.5)
+ multipart-post (1.0.1)
+ mysql (2.8.1)
+ net-ldap (0.1.1)
+ nokogiri (1.4.4)
+ oa-basic (0.1.6)
+ multi_json (~> 0.0.2)
+ nokogiri (~> 1.4.2)
+ oa-core (= 0.1.6)
+ rest-client (~> 1.6.0)
+ oa-core (0.1.6)
+ rack (~> 1.1)
+ oa-enterprise (0.1.6)
+ net-ldap (~> 0.1.1)
+ nokogiri (~> 1.4.2)
+ oa-core (= 0.1.6)
+ pyu-ruby-sasl (~> 0.0.3.1)
+ rubyntlm (~> 0.1.1)
+ oa-oauth (0.1.6)
+ multi_json (~> 0.0.2)
+ nokogiri (~> 1.4.2)
+ oa-core (= 0.1.6)
+ oauth (~> 0.4.0)
+ oauth2 (~> 0.1.0)
+ oa-openid (0.1.6)
+ oa-core (= 0.1.6)
+ rack-openid (~> 1.2.0)
+ ruby-openid-apps-discovery
+ oauth (0.4.4)
+ oauth2 (0.1.0)
+ faraday (~> 0.5.0)
+ multi_json (~> 0.0.4)
+ omniauth (0.1.6)
+ oa-basic (= 0.1.6)
+ oa-core (= 0.1.6)
+ oa-enterprise (= 0.1.6)
+ oa-oauth (= 0.1.6)
+ oa-openid (= 0.1.6)
+ orm_adapter (0.0.3)
+ polyglot (0.3.1)
+ progressbar (0.9.0)
+ pyu-ruby-sasl (0.0.3.2)
+ rack (1.2.1)
+ rack-mount (0.6.13)
+ rack (>= 1.0.0)
+ rack-openid (1.2.0)
+ rack (>= 1.1.0)
+ ruby-openid (>= 2.1.8)
+ rack-test (0.5.6)
+ rack (>= 1.0)
+ rails (3.0.3)
+ actionmailer (= 3.0.3)
+ actionpack (= 3.0.3)
+ activerecord (= 3.0.3)
+ activeresource (= 3.0.3)
+ activesupport (= 3.0.3)
+ bundler (~> 1.0)
+ railties (= 3.0.3)
+ rails3-generators (0.14.0)
+ rails_best_practices (0.4.5)
+ colored (~> 1.2)
+ progressbar (~> 0.9.0)
+ ruby2ruby (~> 1.2.4)
+ ruby_parser (~> 2.0.4)
+ railties (3.0.3)
+ actionpack (= 3.0.3)
+ activesupport (= 3.0.3)
+ rake (>= 0.8.7)
+ thor (~> 0.14.4)
+ rake (0.8.7)
+ rcov (0.9.9)
+ redgreen (1.2.2)
+ responders (0.6.2)
+ rest-client (1.6.1)
+ mime-types (>= 1.16)
+ rr (1.0.2)
+ rspec (2.2.0)
+ rspec-core (~> 2.2)
+ rspec-expectations (~> 2.2)
+ rspec-mocks (~> 2.2)
+ rspec-core (2.2.1)
+ rspec-expectations (2.2.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.2.0)
+ rspec-rails (2.2.1)
+ actionpack (~> 3.0)
+ activesupport (~> 3.0)
+ railties (~> 3.0)
+ rspec (~> 2.2.0)
+ ruby-openid (2.1.8)
+ ruby-openid-apps-discovery (1.2.0)
+ ruby-openid (>= 2.1.7)
+ ruby2ruby (1.2.5)
+ ruby_parser (~> 2.0)
+ sexp_processor (~> 3.0)
+ ruby_parser (2.0.5)
+ sexp_processor (~> 3.0)
+ rubyntlm (0.1.1)
+ rubyzip (0.9.4)
+ selenium-webdriver (0.1.0)
+ childprocess (= 0.1.4)
+ ffi (~> 0.6.3)
+ json_pure
+ rubyzip
+ sexp_processor (3.0.5)
+ shoulda (2.11.3)
+ simple-navigation (3.0.2)
+ activesupport (>= 2.3.2)
+ sqlite3-ruby (1.3.2)
+ tabletastic (0.2.1)
+ activesupport (~> 3.0.0)
+ term-ansicolor (1.0.5)
+ thor (0.14.6)
+ treetop (1.4.9)
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.23)
+ vcr (1.3.3)
+ warden (1.0.2)
+ rack (>= 1.0.0)
+ webmock (1.6.1)
+ addressable (>= 2.2.2)
+ crack (>= 0.1.7)
+ will_paginate (3.0.pre2)
+ yamler (0.1.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ autotest (= 4.4.1)
+ autotest-rails (= 4.1.0)
+ capybara (= 0.3.9)
+ capybara-mechanize (= 0.2.3)
+ configatron (= 2.6.4)
+ cucumber (= 0.9.4)
+ cucumber-rails (= 0.3.2)
+ devise (= 1.2.rc)
+ email_spec (= 1.0.0)
+ factory_girl_rails (= 1.0)
+ flutie (= 1.1.2)
+ formtastic (= 1.2.0)
+ inherited_resources (= 1.1.2)
+ jquery-rails (= 0.2.5)
+ launchy (= 0.3.7)
+ mongrel (= 1.2.0.pre2)
+ mysql (= 2.8.1)
+ omniauth (= 0.1.6)
+ rails (= 3.0.3)
+ rails3-generators (= 0.14.0)
+ rails_best_practices (= 0.4.5)
+ rcov (= 0.9.9)
+ redgreen (= 1.2.2)
+ rr (= 1.0.2)
+ rspec-rails (= 2.2.1)
+ shoulda (= 2.11.3)
+ simple-navigation (= 3.0.2)
+ sqlite3-ruby (= 1.3.2)
+ tabletastic (= 0.2.1)
+ vcr (= 1.3.3)
+ webmock (= 1.6.1)
+ will_paginate (= 3.0.pre2)
@@ -0,0 +1,7 @@
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+require 'rake'
+
+Rails3Base::Application.load_tasks
@@ -0,0 +1,8 @@
+class ApplicationController < ActionController::Base
+ protect_from_forgery
+ layout 'application'
+
+ def after_sign_out_path_for(resource_or_scope)
+ new_user_session_path
+ end
+end
@@ -0,0 +1,10 @@
+class DashboardController < ApplicationController
+ before_filter :authenticate_user!
+
+ def index
+ end
+
+ def about
+
+ end
+end
@@ -0,0 +1,9 @@
+class DataSetsController < ApplicationController
+ inherit_resources
+
+ protected
+
+ def collection
+ @data_sets ||= end_of_association_chain.paginate(:page => params[:page])
+ end
+end
@@ -0,0 +1,21 @@
+class OmniauthCallbacksController < Devise::OmniauthCallbacksController
+ def twitter
+ callback
+ end
+
+ private
+
+ def callback
+ auth = env['omniauth.auth']
+ provider = auth['provider']
+ user = User.find_by_identity_for(provider, auth['uid'], current_user)
+
+ if user.present?
+ flash[:notice] = I18n.t 'devise.omniauth_callbacks.success', :kind => provider
+ sign_in_and_redirect(user, :event => :authentication)
+ else
+ session['devise.omniauth_data'] = auth.except('extra')
+ redirect_to(new_user_registration_url)
+ end
+ end
+end
Oops, something went wrong.

0 comments on commit 40cc469

Please sign in to comment.