Skip to content

Commit c956161

Browse files
committed
Clean things up to pass on Rails 4
* Test against Rails 4.0 and master * Remove ActiveResource require - this wasn't used and was only part of the generated dummy spec * Remove active_resource/railtie require in spec/dummy * Can't test ruby 1.9.2 against rails 4, as that's not supported anymore. * Remove whitelist_attributes
1 parent 7356292 commit c956161

File tree

5 files changed

+5
-15
lines changed

5 files changed

+5
-15
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ rvm:
66

77
env:
88
- "RAILS_VERSION=3.2"
9+
- "RAILS_VERSION=4.0"
910
- "RAILS_VERSION=master"
1011

1112
matrix:
1213
allow_failures:
1314
- env: "RAILS_VERSION=master"
1415
exclude:
16+
- rvm: 1.9.2
17+
env: "RAILS_VERSION=4.0"
1518
- rvm: 1.9.2
1619
env: "RAILS_VERSION=master"

griddler.gemspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ upgrade information.
2121
MESSAGE
2222

2323
s.add_dependency 'rails', '>= 3.2.0'
24-
s.add_dependency 'activeresource', '>= 3.2.8'
2524
s.add_dependency 'htmlentities'
2625
s.add_development_dependency 'rspec-rails'
2726
s.add_development_dependency 'sqlite3'

spec/dummy/config/application.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
require "active_record/railtie"
55
require "action_controller/railtie"
66
require "action_mailer/railtie"
7-
require "active_resource/railtie"
87
require "sprockets/railtie"
9-
# require "rails/test_unit/railtie"
108

119
Bundler.require
1210
require "griddler"
@@ -49,12 +47,6 @@ class Application < Rails::Application
4947
# like if you have constraints or database-specific column types
5048
# config.active_record.schema_format = :sql
5149

52-
# Enforce whitelist mode for mass assignment.
53-
# This will create an empty whitelist of attributes available for mass-assignment for all models
54-
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
55-
# parameters by using an attr_accessible or attr_protected declaration.
56-
config.active_record.whitelist_attributes = true
57-
5850
# Enable the asset pipeline
5951
config.assets.enabled = true
6052

spec/dummy/config/environments/development.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
# Only use best-standards-support built into browsers
2323
config.action_dispatch.best_standards_support = :builtin
2424

25-
# Raise exception on mass assignment protection for Active Record models
26-
config.active_record.mass_assignment_sanitizer = :strict
27-
2825
# Log the query plan for queries taking more than this (works
2926
# with SQLite, MySQL, and PostgreSQL)
3027
config.active_record.auto_explain_threshold_in_seconds = 0.5

spec/dummy/config/environments/test.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
# and recreated between test runs. Don't rely on the data there!
88
config.cache_classes = true
99

10+
config.eager_load = false
11+
1012
# Configure static asset server for tests with Cache-Control for performance
1113
config.serve_static_assets = true
1214
config.static_cache_control = "public, max-age=3600"
@@ -29,9 +31,6 @@
2931
# ActionMailer::Base.deliveries array.
3032
config.action_mailer.delivery_method = :test
3133

32-
# Raise exception on mass assignment protection for Active Record models
33-
config.active_record.mass_assignment_sanitizer = :strict
34-
3534
# Print deprecation notices to the stderr
3635
config.active_support.deprecation = :stderr
3736
end

0 commit comments

Comments
 (0)