Permalink
Browse files

upgrade to Rails 4.0.0.rc1

  • Loading branch information...
1 parent 268dae8 commit 10709955685ec513524facb656f4e26f518e8e38 @agrobbin committed Apr 29, 2013
View
@@ -1,7 +1,17 @@
+# 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 all logfiles and tempfiles.
+/log/*.log
+/tmp
+
/config/config.yml
/config/database.yml
/coverage
/public/uploads
-/log/*.log
-/tmp
View
18 Gemfile
@@ -2,9 +2,11 @@ source 'https://rubygems.org'
ruby '2.0.0'
+gem 'coffee-rails', '~> 4.0.0'
gem 'daemons', '~> 1.1.9'
gem 'delayed_job_active_record', '~> 4.0.0.beta2'
gem 'exception_notification', github: 'smartinez87/exception_notification' # '~> 3.0.1'
+gem 'font-awesome-rails', '~> 3.0.2.0'
gem 'google-api', '~> 0.4.0'
gem 'haml-rails', '~> 0.4.0'
gem 'highcharts-js-rails', '~> 1.0.0'
@@ -17,19 +19,14 @@ gem 'omniauth-oauth2', github: 'intridea/omniauth-oauth2'
gem 'omniauth-google-oauth2', '~> 0.1.17'
gem 'paper_trail', github: 'airblade/paper_trail', branch: 'rails4' # '~> 2.7.1'
gem 'paperclip', '~> 3.4.1'
-gem 'rails', '4.0.0.beta1'
+gem 'rails', '4.0.0.rc1'
+gem 'sass-rails', '~> 4.0.0.rc1'
gem 'sendgrid-rails', '~> 2.0.2'
+gem 'therubyracer', '~> 0.11.4', platforms: :ruby
gem 'turbolinks', '~> 1.1.1'
+gem 'uglifier', '>= 1.3.0'
gem 'unicorn', '~> 4.6.2'
-group :assets do
- gem 'coffee-rails', '~> 4.0.0.beta1'
- gem 'font-awesome-rails', '~> 3.0.2.0'
- gem 'sass-rails', '~> 4.0.0.beta1'
- gem 'therubyracer', '~> 0.11.4', platforms: :ruby
- gem 'uglifier', '~> 1.3'
-end
-
group :development, :test do
gem 'debugger', '~> 1.5.0'
gem 'rspec-rails', '~> 2.13.1'
@@ -45,3 +42,6 @@ group :test do
gem 'shoulda-matchers', '~> 1.5.6'
gem 'simplecov', '~> 0.7.1', require: false
end
+
+# bundle exec rake doc:rails generates the API under doc/api.
+gem 'sdoc', require: false, group: :doc
View
@@ -26,32 +26,32 @@ GIT
GEM
remote: https://rubygems.org/
specs:
- actionmailer (4.0.0.beta1)
- actionpack (= 4.0.0.beta1)
+ actionmailer (4.0.0.rc1)
+ actionpack (= 4.0.0.rc1)
mail (~> 2.5.3)
- actionpack (4.0.0.beta1)
- activesupport (= 4.0.0.beta1)
+ actionpack (4.0.0.rc1)
+ activesupport (= 4.0.0.rc1)
builder (~> 3.1.0)
erubis (~> 2.7.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
- activemodel (4.0.0.beta1)
- activesupport (= 4.0.0.beta1)
+ activemodel (4.0.0.rc1)
+ activesupport (= 4.0.0.rc1)
builder (~> 3.1.0)
- activerecord (4.0.0.beta1)
- activemodel (= 4.0.0.beta1)
- activerecord-deprecated_finders (~> 0.0.3)
- activesupport (= 4.0.0.beta1)
- arel (~> 4.0.0.beta1)
- activerecord-deprecated_finders (0.0.3)
- activesupport (4.0.0.beta1)
- i18n (~> 0.6.2)
+ activerecord (4.0.0.rc1)
+ activemodel (= 4.0.0.rc1)
+ activerecord-deprecated_finders (~> 1.0.2)
+ activesupport (= 4.0.0.rc1)
+ arel (~> 4.0.0)
+ activerecord-deprecated_finders (1.0.2)
+ activesupport (4.0.0.rc1)
+ i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
- tzinfo (~> 0.3.33)
+ tzinfo (~> 0.3.37)
addressable (2.3.4)
- arel (4.0.0.beta2)
+ arel (4.0.0)
atomic (1.1.8)
bourne (1.4.0)
mocha (~> 0.13.2)
@@ -66,7 +66,7 @@ GEM
activesupport (>= 3.0)
cocaine (0.5.1)
climate_control (>= 0.0.3, < 1.0)
- coffee-rails (4.0.0.beta1)
+ coffee-rails (4.0.0)
coffee-script (>= 2.2.0)
railties (>= 4.0.0.beta, < 5.0)
coffee-script (2.2.0)
@@ -175,20 +175,19 @@ GEM
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
- rails (4.0.0.beta1)
- actionmailer (= 4.0.0.beta1)
- actionpack (= 4.0.0.beta1)
- activerecord (= 4.0.0.beta1)
- activesupport (= 4.0.0.beta1)
+ rails (4.0.0.rc1)
+ actionmailer (= 4.0.0.rc1)
+ actionpack (= 4.0.0.rc1)
+ activerecord (= 4.0.0.rc1)
+ activesupport (= 4.0.0.rc1)
bundler (>= 1.3.0, < 2.0)
- railties (= 4.0.0.beta1)
- sprockets-rails (~> 2.0.0.rc3)
- railties (4.0.0.beta1)
- actionpack (= 4.0.0.beta1)
- activesupport (= 4.0.0.beta1)
+ railties (= 4.0.0.rc1)
+ sprockets-rails (~> 2.0.0.rc4)
+ railties (4.0.0.rc1)
+ actionpack (= 4.0.0.rc1)
+ activesupport (= 4.0.0.rc1)
rake (>= 0.8.7)
- rdoc (~> 3.4)
- thor (>= 0.17.0, < 2.0)
+ thor (>= 0.18.1, < 2.0)
raindrops (0.11.0)
rake (10.0.4)
rdoc (3.12.2)
@@ -208,11 +207,14 @@ GEM
rvm-capistrano (1.3.0)
capistrano (>= 2.0.0)
sass (3.2.8)
- sass-rails (4.0.0.beta1)
+ sass-rails (4.0.0.rc1)
railties (>= 4.0.0.beta, < 5.0)
sass (>= 3.1.10)
sprockets-rails (~> 2.0.0.rc0)
tilt (~> 1.3)
+ sdoc (0.3.20)
+ json (>= 1.1.3)
+ rdoc (~> 3.10)
sendgrid-rails (2.0.3)
actionmailer (>= 3.0.0)
activesupport (>= 2.1.0)
@@ -228,7 +230,7 @@ GEM
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- sprockets-rails (2.0.0.rc3)
+ sprockets-rails (2.0.0.rc4)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
@@ -245,7 +247,7 @@ GEM
turbolinks (1.1.1)
coffee-rails
tzinfo (0.3.37)
- uglifier (1.3.0)
+ uglifier (2.0.1)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
unicorn (4.6.2)
@@ -257,7 +259,7 @@ PLATFORMS
ruby
DEPENDENCIES
- coffee-rails (~> 4.0.0.beta1)
+ coffee-rails (~> 4.0.0)
daemons (~> 1.1.9)
debugger (~> 1.5.0)
delayed_job_active_record (~> 4.0.0.beta2)
@@ -276,14 +278,15 @@ DEPENDENCIES
omniauth-oauth2!
paper_trail!
paperclip (~> 3.4.1)
- rails (= 4.0.0.beta1)
+ rails (= 4.0.0.rc1)
rspec-rails (~> 2.13.1)
rvm-capistrano (~> 1.3.0)
- sass-rails (~> 4.0.0.beta1)
+ sass-rails (~> 4.0.0.rc1)
+ sdoc
sendgrid-rails (~> 2.0.2)
shoulda-matchers (~> 1.5.6)
simplecov (~> 0.7.1)
therubyracer (~> 0.11.4)
turbolinks (~> 1.1.1)
- uglifier (~> 1.3)
+ uglifier (>= 1.3.0)
unicorn (~> 4.6.2)
View
@@ -1,4 +1,4 @@
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)
-run Uclass::Application
+run Rails.application
View
@@ -5,8 +5,9 @@
require "action_mailer/railtie"
require "sprockets/railtie"
-# Assets should be precompiled for production (so we don't need the gems loaded then)
-Bundler.require(*Rails.groups(assets: %w(development test)))
+# Require the gems listed in Gemfile, including any gems
+# you've limited to :test, :development, or :production.
+Bundler.require(:default, Rails.env)
APP_CONFIG = YAML.load_file(File.join(File.dirname(__FILE__), 'config.yml'))[Rails.env].deep_symbolize_keys
@@ -24,5 +24,7 @@
config.active_record.migration_error = :page_load
# Debug mode disables concatenation and preprocessing of assets.
+ # This option may cause significant delays in view rendering with a large
+ # number of complex assets.
config.assets.debug = true
end
@@ -23,10 +23,10 @@
config.serve_static_assets = false
# Compress JavaScripts and CSS.
- config.assets.js_compressor = :uglifier
+ config.assets.js_compressor = :uglifier
# config.assets.css_compressor = :sass
- # Whether to fallback to assets pipeline if a precompiled asset is missed.
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false
# Generate digests for assets URLs.
@@ -13,7 +13,7 @@
config.eager_load = false
# Configure static asset server for tests with Cache-Control for performance.
- config.serve_static_assets = true
+ config.serve_static_assets = true
config.static_cache_control = "public, max-age=3600"
# Show full error reports and disable caching.
@@ -1,6 +1,6 @@
# Be sure to restart your server when you modify this file.
-# Your secret key for verifying the integrity of signed cookies.
+# Your secret key is used for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
@@ -1,3 +1,3 @@
# Be sure to restart your server when you modify this file.
-Uclass::Application.config.session_store :encrypted_cookie_store, key: '_uclass_session'
+Uclass::Application.config.session_store :cookie_store, key: '_uclass_session'
@@ -8,7 +8,7 @@
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
end
-# Disable root element in JSON by default.
-ActiveSupport.on_load(:active_record) do
- self.include_root_in_json = false
-end
+# To enable root element in JSON for ActiveRecord objects.
+# ActiveSupport.on_load(:active_record) do
+# self.include_root_in_json = true
+# end
@@ -43,13 +43,13 @@
context ".assignments" do
it "should only include events that are assignments and order by ends_at" do
- expect(Event.assignments.to_sql).to eq("SELECT `events`.* FROM `events` WHERE `events`.`assignment` = 1 ORDER BY `events`.`ends_at` ASC")
+ expect(Event.assignments.to_sql).to eq("SELECT `events`.* FROM `events` WHERE `events`.`assignment` = 1 ORDER BY `events`.ends_at ASC")
end
end
context ".for" do
it "should only include events within the given date range" do
- expect(Event.for(Time.zone.local(2012, 12, 1).all_week).to_sql).to eq("SELECT `events`.* FROM `events` WHERE (`events`.`starts_at` BETWEEN '2012-11-26 05:00:00' AND '2012-12-03 04:59:59') ORDER BY `events`.`starts_at` ASC")
+ expect(Event.for(Time.zone.local(2012, 12, 1).all_week).to_sql).to eq("SELECT `events`.* FROM `events` WHERE (`events`.`starts_at` BETWEEN '2012-11-26 05:00:00' AND '2012-12-03 04:59:59') ORDER BY `events`.starts_at ASC")
end
end
end

0 comments on commit 1070995

Please sign in to comment.