Permalink
Browse files

Upgrade to Rails 3.2.

  • Loading branch information...
1 parent 3dd66d0 commit 2df21ee74447b9c2696e6138899ed7d296ff4b8d @tylerhunt committed Oct 25, 2012
Showing with 462 additions and 7,773 deletions.
  1. +15 −3 .gitignore
  2. +14 −0 Gemfile
  3. +113 −0 Gemfile.lock
  4. +1 −1 README.markdown
  5. +3 −6 Rakefile
  6. BIN {public → app/assets}/images/h1_background.gif
  7. +15 −0 app/assets/javascripts/application.js
  8. 0 {public → app/assets}/stylesheets/admin.css
  9. 0 {public → app/assets}/stylesheets/application.css
  10. +0 −1 app/controllers/application_controller.rb
  11. +0 −1 app/helpers/application_helper.rb
  12. +0 −2 app/helpers/talks_helper.rb
  13. +0 −2 app/helpers/venues_helper.rb
  14. +1 −1 app/views/admin/talks/edit.html.erb
  15. +1 −1 app/views/admin/talks/new.html.erb
  16. +1 −1 app/views/admin/venues/edit.html.erb
  17. +1 −1 app/views/admin/venues/new.html.erb
  18. +2 −1 app/views/layouts/application.html.erb
  19. +4 −0 config.ru
  20. +22 −0 config/application.rb
  21. +4 −108 config/boot.rb
  22. +12 −14 config/database.yml
  23. +0 −31 config/deploy.rb
  24. +4 −9 config/environment.rb
  25. +33 −13 config/environments/development.rb
  26. +59 −20 config/environments/production.rb
  27. +37 −28 config/environments/test.rb
  28. +2 −2 config/initializers/backtrace_silencers.rb
  29. +6 −1 config/initializers/inflections.rb
  30. +0 −19 config/initializers/new_rails_defaults.rb
  31. +7 −0 config/initializers/secret_token.rb
  32. +3 −10 config/initializers/session_store.rb
  33. +14 −0 config/initializers/wrap_parameters.rb
  34. +5 −0 config/locales/en.yml
  35. +12 −9 config/routes.rb
  36. +14 −14 db/schema.rb
  37. +7 −0 db/seeds.rb
  38. 0 lib/assets/.gitkeep
  39. 0 log/.gitkeep
  40. +15 −19 public/404.html
  41. +15 −19 public/422.html
  42. +14 −19 public/500.html
  43. +0 −2 public/javascripts/application.js
  44. +0 −963 public/javascripts/controls.js
  45. +0 −973 public/javascripts/dragdrop.js
  46. +0 −1,128 public/javascripts/effects.js
  47. +0 −4,320 public/javascripts/prototype.js
  48. +0 −4 script/about
  49. +0 −3 script/console
  50. +0 −3 script/dbconsole
  51. +0 −3 script/destroy
  52. +0 −3 script/generate
  53. +0 −3 script/performance/benchmarker
  54. +0 −3 script/performance/profiler
  55. +0 −3 script/plugin
  56. +6 −0 script/rails
  57. +0 −3 script/runner
  58. +0 −3 script/server
  59. 0 vendor/assets/javascripts/.gitkeep
  60. 0 vendor/assets/stylesheets/.gitkeep
  61. 0 vendor/plugins/.gitkeep
View
@@ -1,3 +1,15 @@
-db/*.sqlite3
-log
-tmp
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+#
+# If you find yourself ignoring temporary files generated by your text editor
+# or operating system, you probably want to add a global ignore instead:
+# git config --global core.excludesfile ~/.gitignore_global
+
+# Ignore bundler config
+/.bundle
+
+# Ignore the default SQLite database.
+/db/*.sqlite3
+
+# Ignore all logfiles and tempfiles.
+/log/*.log
+/tmp
View
14 Gemfile
@@ -0,0 +1,14 @@
+source 'https://rubygems.org'
+
+gem 'rails', '3.2.8'
+
+gem 'dynamic_form' # for form.error_messages
+gem 'pg'
+
+group :assets do
+ gem 'sass-rails', '~> 3.2.3'
+ gem 'coffee-rails', '~> 3.2.1'
+ gem 'jquery-rails'
+ gem 'uglifier', '>= 1.0.3'
+end
+
View
@@ -0,0 +1,113 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ actionmailer (3.2.8)
+ actionpack (= 3.2.8)
+ mail (~> 2.4.4)
+ actionpack (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ journey (~> 1.0.4)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.2)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.1.3)
+ activemodel (3.2.8)
+ activesupport (= 3.2.8)
+ builder (~> 3.0.0)
+ activerecord (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
+ arel (~> 3.0.2)
+ tzinfo (~> 0.3.29)
+ activeresource (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
+ activesupport (3.2.8)
+ i18n (~> 0.6)
+ multi_json (~> 1.0)
+ arel (3.0.2)
+ builder (3.0.4)
+ coffee-rails (3.2.2)
+ coffee-script (>= 2.2.0)
+ railties (~> 3.2.0)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.4.0)
+ dynamic_form (1.1.4)
+ erubis (2.7.0)
+ execjs (1.4.0)
+ multi_json (~> 1.0)
+ hike (1.2.1)
+ i18n (0.6.1)
+ journey (1.0.4)
+ jquery-rails (2.1.3)
+ railties (>= 3.1.0, < 5.0)
+ thor (~> 0.14)
+ json (1.7.5)
+ mail (2.4.4)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.19)
+ multi_json (1.3.6)
+ pg (0.14.1)
+ polyglot (0.3.3)
+ rack (1.4.1)
+ rack-cache (1.2)
+ rack (>= 0.4)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.2)
+ rack (>= 1.0)
+ rails (3.2.8)
+ actionmailer (= 3.2.8)
+ actionpack (= 3.2.8)
+ activerecord (= 3.2.8)
+ activeresource (= 3.2.8)
+ activesupport (= 3.2.8)
+ bundler (~> 1.0)
+ railties (= 3.2.8)
+ railties (3.2.8)
+ actionpack (= 3.2.8)
+ activesupport (= 3.2.8)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (>= 0.14.6, < 2.0)
+ rake (0.9.2.2)
+ rdoc (3.12)
+ json (~> 1.4)
+ sass (3.2.1)
+ sass-rails (3.2.5)
+ railties (~> 3.2.0)
+ sass (>= 3.1.10)
+ tilt (~> 1.3)
+ sprockets (2.1.3)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ thor (0.16.0)
+ tilt (1.3.3)
+ treetop (1.4.11)
+ polyglot
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.33)
+ uglifier (1.3.0)
+ execjs (>= 0.3.0)
+ multi_json (~> 1.0, >= 1.0.2)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ coffee-rails (~> 3.2.1)
+ dynamic_form
+ jquery-rails
+ pg
+ rails (= 3.2.8)
+ sass-rails (~> 3.2.3)
+ uglifier (>= 1.0.3)
View
@@ -17,5 +17,5 @@ This will give you a nice starting point. The data set is from BarCampOrlando 20
Next, start the development server and check out the app in your browser:
- * `./script/server`
+ * `./script/rails s`
* `open http://localhost:3000/`
View
@@ -1,10 +1,7 @@
+#!/usr/bin/env rake
# 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.join(File.dirname(__FILE__), 'config', 'boot'))
+require File.expand_path('../config/application', __FILE__)
-require 'rake'
-require 'rake/testtask'
-require 'rake/rdoctask'
-
-require 'tasks/rails'
+BarCampLive::Application.load_tasks
@@ -0,0 +1,15 @@
+// This is a manifest file that'll be compiled into application.js, which will include all the files
+// listed below.
+//
+// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
+// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
+//
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
+// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
+// GO AFTER THE REQUIRES BELOW.
+//
+//= require jquery
+//= require jquery_ujs
+//= require_tree .
File renamed without changes.
@@ -1,5 +1,4 @@
class ApplicationController < ActionController::Base
- helper :all
protect_from_forgery
def verify_access
@@ -1,4 +1,3 @@
-# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
def admin?
session[:admin]
@@ -1,2 +0,0 @@
-module TalksHelper
-end
@@ -1,2 +0,0 @@
-module VenuesHelper
-end
@@ -2,7 +2,7 @@
Editing Talk for <%= @venue.name %> at <%= @talk.starts_at.to_s(:time) %>
</h2>
-<% form_for([:admin, @venue, @talk]) do |form| %>
+<%= form_for([:admin, @venue, @talk]) do |form| %>
<%= render :partial => form %>
<p>
@@ -1,6 +1,6 @@
<h2>New Talk for <%= @venue.name %></h2>
-<% form_for([:admin, @venue, @talk]) do |form| %>
+<%= form_for([:admin, @venue, @talk]) do |form| %>
<%= render :partial => form %>
<p>
@@ -1,6 +1,6 @@
<h2>Editing Venue <%= h(@venue.name) %></h2>
-<% form_for([:admin, @venue]) do |form| %>
+<%= form_for([:admin, @venue]) do |form| %>
<%= render :partial => form %>
<p>
@@ -1,6 +1,6 @@
<h2>New Venue</h2>
-<% form_for([:admin, @venue]) do |form| %>
+<%= form_for([:admin, @venue]) do |form| %>
<%= render :partial => form %>
<p>
@@ -4,7 +4,8 @@
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<meta name="viewport" content="width=400; initial-scale=0.755; maximum-scale=1.0; minimum-scale=0.6666" />
<title>BarCampOrlando Schedule</title>
- <%= stylesheet_link_tag 'application' %>
+ <%= stylesheet_link_tag 'application', media: 'all' %>
+ <%= csrf_meta_tags %>
</head>
<body>
View
@@ -0,0 +1,4 @@
+# This file is used by Rack-based servers to start the application.
+
+require ::File.expand_path('../config/environment', __FILE__)
+run BarCampLive::Application
View
@@ -0,0 +1,22 @@
+require File.expand_path('../boot', __FILE__)
+
+require 'active_record/railtie'
+require 'action_controller/railtie'
+require 'sprockets/railtie'
+
+if defined?(Bundler)
+ Bundler.require(*Rails.groups(:assets => %w(development test)))
+end
+
+module BarCampLive
+ class Application < Rails::Application
+ # Defaults
+ config.encoding = 'utf-8'
+ config.filter_parameters += [:password]
+ config.time_zone = 'Eastern Time (US & Canada)'
+
+ # Assets
+ config.assets.enabled = true
+ config.assets.version = '1.0'
+ end
+end
View
@@ -1,110 +1,6 @@
-# Don't change this file!
-# Configure your app in config/environment.rb and config/environments/*.rb
+require 'rubygems'
-RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
+# Set up gems listed in the Gemfile.
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
-module Rails
- class << self
- def boot!
- unless booted?
- preinitialize
- pick_boot.run
- end
- end
-
- def booted?
- defined? Rails::Initializer
- end
-
- def pick_boot
- (vendor_rails? ? VendorBoot : GemBoot).new
- end
-
- def vendor_rails?
- File.exist?("#{RAILS_ROOT}/vendor/rails")
- end
-
- def preinitialize
- load(preinitializer_path) if File.exist?(preinitializer_path)
- end
-
- def preinitializer_path
- "#{RAILS_ROOT}/config/preinitializer.rb"
- end
- end
-
- class Boot
- def run
- load_initializer
- Rails::Initializer.run(:set_load_path)
- end
- end
-
- class VendorBoot < Boot
- def load_initializer
- require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
- Rails::Initializer.run(:install_gem_spec_stubs)
- Rails::GemDependency.add_frozen_gem_path
- end
- end
-
- class GemBoot < Boot
- def load_initializer
- self.class.load_rubygems
- load_rails_gem
- require 'initializer'
- end
-
- def load_rails_gem
- if version = self.class.gem_version
- gem 'rails', version
- else
- gem 'rails'
- end
- rescue Gem::LoadError => load_error
- $stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
- exit 1
- end
-
- class << self
- def rubygems_version
- Gem::RubyGemsVersion rescue nil
- end
-
- def gem_version
- if defined? RAILS_GEM_VERSION
- RAILS_GEM_VERSION
- elsif ENV.include?('RAILS_GEM_VERSION')
- ENV['RAILS_GEM_VERSION']
- else
- parse_gem_version(read_environment_rb)
- end
- end
-
- def load_rubygems
- min_version = '1.3.2'
- require 'rubygems'
- unless rubygems_version >= min_version
- $stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
- exit 1
- end
-
- rescue LoadError
- $stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
- exit 1
- end
-
- def parse_gem_version(text)
- $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
- end
-
- private
- def read_environment_rb
- File.read("#{RAILS_ROOT}/config/environment.rb")
- end
- end
- end
-end
-
-# All that for this:
-Rails.boot!
+require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
Oops, something went wrong.

0 comments on commit 2df21ee

Please sign in to comment.