diff --git a/.ruby-version b/.ruby-version deleted file mode 100644 index cb50681..0000000 --- a/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -2.0.0-p247 diff --git a/Gemfile.lock b/Gemfile.lock index 96463b7..39d3c5c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,10 +11,10 @@ GIT GIT remote: git://github.com/clyfe/active_scaffold.git - revision: edbf575a42813afe7632a00cee9515774e7e7555 + revision: 4415c56d5667e150b42a933bda97bbc847768d50 branch: always_use_build specs: - active_scaffold (3.4.9) + active_scaffold (3.4.10) rails (>= 3.2.18, < 5) GIT diff --git a/app/controllers/users/records_controller.rb b/app/controllers/users/records_controller.rb index 8ce95bf..8d6de32 100644 --- a/app/controllers/users/records_controller.rb +++ b/app/controllers/users/records_controller.rb @@ -29,7 +29,7 @@ class Users::RecordsController < UsersController security_method: :a_record?, type: :member, position: false, confirm: 'Are you sure?' end include RecordsControllerCommon - with_options(:only => 'modify') do |c| + with_options(:only => :modify) do |c| c.skip_before_filter :ensure_nested_under_domain c.skip_before_filter :authenticate_user! c.skip_before_filter :set_user_current @@ -46,9 +46,7 @@ class Users::RecordsController < UsersController return render(:text => MODIFY_ERROR) if @record.type != 'A' @record.content = params[:ip] || client_remote_ip @record.save! - respond_with(@record) do |format| - format.html {render(:text => MODIFY_OK)} - end + render(:text => MODIFY_OK) end protected diff --git a/spec/support/matchers/be_able_to.rb b/spec/support/matchers/be_able_to.rb index c30ad02..075d78d 100644 --- a/spec/support/matchers/be_able_to.rb +++ b/spec/support/matchers/be_able_to.rb @@ -13,11 +13,11 @@ RSpec::Matchers.define :be_able_to do |*args| end end - failure_message_for_should do |ability| + failure_message do |ability| "expected to be able to #{args.map(&:inspect).join(" ")}" end - failure_message_for_should_not do |ability| + failure_message_when_negated do |ability| "expected not to be able to #{args.map(&:inspect).join(" ")}" end end diff --git a/spec/support/rspec.rb b/spec/support/rspec.rb index b008da0..30c375b 100644 --- a/spec/support/rspec.rb +++ b/spec/support/rspec.rb @@ -4,11 +4,14 @@ RSpec.configure do |config| config.fixture_path = "#{::Rails.root}/spec/fixtures" config.use_transactional_fixtures = false config.infer_base_class_for_anonymous_controllers = false - - config.treat_symbols_as_metadata_keys_with_true_values = true + config.filter_run :focus => true config.run_all_when_everything_filtered = true config.order = "random" config.infer_spec_type_from_file_location! + + config.expect_with :rspec do |c| + c.syntax = [:should, :expect] + end end