Commit Graph

57170 Commits

Author SHA1 Message Date
Prathamesh Sonpatki a05a9f5e79 Fix Gemfile.lock
- Resque version was locked to < 1.26 in 92f869a0c8 but
  Gemfile.lock was not updated.
2016-03-12 08:22:15 +05:30
Rafael França 66afa81110 Merge pull request #24161 from Sen-Zhang/restore_application_mailer
regenerate application_mailer.rb if it is missing
2016-03-11 22:25:31 -03:00
Sen-Zhang 1be9563625 improve some code 2016-03-11 16:59:06 -08:00
Sen-Zhang 0b3ae023d2 generate application_mailer.rb if it is missing 2016-03-11 16:47:08 -08:00
Jeremy Daer d448918027 AC: skip PG adapter tests if the db isn't available 2016-03-11 16:32:19 -07:00
Rafael França eefcc78f7a Merge pull request #23797 from kamipo/case_sensitive_comparison_for_non_string_column
The BINARY Operator is only needed for string columns
2016-03-11 19:10:29 -03:00
Sean Griffin 12cce89c89 Break up a circular require between AP/AV
Right now referencing the constant `AbstractController::Rendering`
causes `ActionView::Base` to be loaded, and thus the load hooks for
action_view are run. If that load hook references any part of action
view that then references action controller (such as
`ActionView::TestCase`), the constant `AbstractController::Rendering`
will attempt to be autoloaded and blow up.

With this change, `ActionView::LoadPaths` no longer requires
`ActionView::Base` (which it had no reason to require). There was a
needed class from `AbstractController::Base` in the Rendering module,
which I've moved into its own file so we don't need to load
all of `AbstractController::Base` there.

This commit fixes
https://github.com/rails/rails-controller-testing/issues/21
2016-03-11 14:42:47 -07:00
Jon Moss f500e27df5 Merge pull request #24155 from chrisarcand/clarify-has-many-dependent-option
Clarify has_many :dependent option docs [ci skip]
2016-03-11 16:30:06 -05:00
Chris Arcand 5147ab121d Clarify has_many :dependent option docs [ci skip]
Clarifies the documentation here to mean all options are for when the
relation is destroyed; also now reflects the documentation on this same
option found in the has_one section.
2016-03-11 16:07:09 -05:00
Rafael Mendonça França 92f869a0c8 Ping the resque version while we can't investigate the failure 2016-03-11 17:11:59 -03:00
Sean Griffin b76b817629 Use the most highest priority exception handler when cause is set
There was some subtle breakage caused by #18774, when we removed
`#original_exception` in favor of `#cause`. However, `#cause` is
automatically set by Ruby when raising an exception from a rescue block.
With this change, we will use whichever handler has the highest priority
(whichever call to `rescue_from` came last). In cases where the outer
has lower precidence than the cause, but the outer is what should be
handled, cause will need to be explicitly unset.

Fixes #23925
2016-03-11 10:53:01 -07:00
Sean Griffin 0ff6eb3489 Fix test failures caused by #23958
I'm unsure how this passed CI in the pull request.
2016-03-11 10:50:52 -07:00
Sean Griffin 3bfda09fa0 Merge pull request #22854 from jcoyne/missing_template
Default rendering behavior if respond_to collector doesn't have a block.
2016-03-11 10:29:10 -07:00
Xavier Noria e56b594d32 Merge pull request #24150 from exviva/unmarshal-infinite-retry
Prevent `Marshal.load` from looping infinitely
2016-03-11 08:26:52 -08:00
Matthew Draper 120517706e Merge pull request #24143 from perceptec/fix-thread-mattr-accessor-refs
Fix `thread_mattr_accessor` thread-local variable naming
2016-03-12 02:53:33 +10:30
Rafael França f8d9c05107 Merge pull request #24054 from kamipo/extract_default_primary_key
Extract `default_primary_key?` to refactor `column_spec_for_primary_key`
2016-03-11 12:03:57 -03:00
Rafael França 4d7e96910f Merge pull request #24087 from kamipo/dump_bigint_instead_of_integer_limit_8
Dump `bigint` instead of `integer` with `limit: 8` for schema dumper
2016-03-11 11:27:09 -03:00
Rafael França c9219a75fc Merge pull request #23677 from kamipo/passing_table_name_to_column_initialize
Passing `table_name` to `Column#initialize` to avoid `instance_variable_set`
2016-03-11 11:25:47 -03:00
Kasper Timm Hansen 36db762a78 Merge pull request #24153 from y-yagi/use_activesupport_reloader
use `ActiveSupport::Reloader.to_prepare` instead of deprecated `ActionDispatch::Reloader.to_prepare` [ci skip]
2016-03-11 14:37:05 +01:00
yuuji.yaginuma 3d09a70677 use `ActiveSupport::Reloader.to_prepare` instead of deprecated `ActionDispatch::Reloader.to_prepare` [ci skip] 2016-03-11 22:20:05 +09:00
Michael Ryan 4f2c25d39d Fix `thread_mattr_accessor` thread-local variable naming
The current implentation of `thread_mattr_accessor` is setting
differently-named thread variables when defining class and
instance writer methods, so the method isn't working as documented:

    Account.user = "DHH"
    Account.user # => "DHH"
    Account.new.user # => nil
    a = Account.new
    a.user = "ABC" # => "ABC"
    a.class.user # => "DHH"

At this point `:attr_Account_user` and `:attr_Class_user` thread-local
variables have been created. Modify the reader and writer methods to use
the class name instead of 'Class'.
2016-03-11 06:54:00 -05:00
Olek Janiszewski aa0fad5148 Prevent `Marshal.load` from looping infinitely
Fix a bug in `Marshal.load` that caused it to loop indefinitely when
trying to autoload a constant that resolved to a different name.

This could occur when marshalling an ActiveRecord 4.0 object (e.g. into
memcached) and then trying to unmarshal it with Rails 4.2. The
marshalled payload contains a reference to
`ActiveRecord::ConnectionAdapters::Mysql2Adapter::Column`, which in
Rails 4.2 resolves to
`ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter::Column`.
2016-03-11 10:35:01 +01:00
Ryuta Kamizono 37024ce479 Dump `bigint` instead of `integer` with `limit: 8` for schema dumper
Before:

```ruby
create_table "big_numbers", force: :cascade do |t|
  t.integer "bigint_column", limit: 8
end
```

After:

```ruby
create_table "big_numbers", force: :cascade do |t|
  t.bigint "bigint_column"
end
```
2016-03-11 14:44:36 +09:00
Ryuta Kamizono 270bcebdf7 Extract `default_primary_key?` to refactor `column_spec_for_primary_key` 2016-03-11 14:43:20 +09:00
Rafael França a101115d5b Merge pull request #23958 from kamipo/fix_bigserial_appears_with_limit_8
Fix bigserial appears with limit 8 for schema dumper
2016-03-11 02:09:02 -03:00
Rafael França de483660ea Merge pull request #24129 from dharamgollapudi/rename_dependencies_rake
Rename dependencies.rake to cache_digests.rake
2016-03-11 01:59:19 -03:00
Rafael Mendonça França c82b3a8104 Add missing require to try 2016-03-11 01:37:33 -03:00
Rafael França 1ba3401e7c Merge pull request #24145 from bdewater/remove_try_require
Remove unused try require in ActiveSupport::TimeZone
2016-03-11 00:19:39 -03:00
Kasper Timm Hansen 264222bc44 Remove unfinished command infrastructure.
If we're gonna do this right, it will look mighty different from this anyway.
(Looking at you, Rails 5.1).

It isn't being used in any code as of now, so yanking is the best option.
2016-03-10 21:34:34 +01:00
Bart de Water 73e46ac136 Remove unused try require 2016-03-10 21:23:00 +01:00
Rafael Mendonça França 1e4de9bf9e Fix Gemfile.lock 2016-03-10 16:28:02 -03:00
Rafael França a73ce897cf Merge pull request #24144 from tjschuck/bcrypt_on_windows_fixed
Version 3.1.11 works on Windows again
2016-03-10 16:26:15 -03:00
T.J. Schuck efbfdd4049 Version 3.1.11 works on Windows again
This undoes 7241498e51

https://github.com/codahale/bcrypt-ruby/issues/128 is fixed and closed.
2016-03-10 14:13:21 -05:00
Vipul A M b785064958 Merge pull request #24140 from gregmolnar/guides
remove obsolete i18n links from guides [ci skip]
2016-03-10 21:35:42 +05:30
Greg Molnar 71a3e6634c remove obsolete i18n links from guides [ci skip] 2016-03-10 17:01:03 +01:00
Rafael França 5e496cbf35 Merge pull request #24137 from sidonath/patch-1
Reorder paragraphs in the Routing API docs
2016-03-10 11:05:21 -03:00
Damir 40f6d200cf [skip ci] Reorder paragraphs
The previous order made sense [when `match` was used twice to point to two different actions](7305ef842b). In this case the note was misleading as posting to `/posts/:id` would still route to `show` action.
2016-03-10 15:01:27 +01:00
Rafael França d9b42cfd34 Merge pull request #24134 from kamipo/remove_needless_break
Remove needless `break;` [ci skip]
2016-03-10 10:51:37 -03:00
प्रथमेश Sonpatki be9ee039b5 Merge pull request #24136 from salmanasiddiqui/patch-1
Fixed comments of add_foreign_key method
2016-03-10 16:36:28 +05:30
Salman Afzal Siddiqui 56570ebfba Fixed comments of add_foreign_key method
The comments of add_foreign_key method was displaying incorrect constraint name.
2016-03-10 15:40:37 +05:00
Ryuta Kamizono 7fc10468b6 Remove needless `break;` [ci skip] 2016-03-10 18:09:01 +09:00
Xavier Noria 841c74ccba revises whitespace in the gemspec of AV [ci skip] 2016-03-10 07:55:42 +01:00
Xavier Noria 1eb27fafa9 revises the homepage URL in the gemspecs [ci skip]
References https://github.com/rails/homepage/issues/46.
2016-03-10 07:55:27 +01:00
Xavier Noria 55984afe2c prefer require_relative over require + File.expand_path 2016-03-10 07:34:01 +01:00
Dharam Gollapudi 056d0fd53c Rename dependencies.rake to cache_digests.rake
As the tasks are related to cache_digests and
as they are already namespaced under cache_digests,
renaming to cache_digests.rake makes it to know
where to find these tasks.
2016-03-09 15:32:11 -08:00
Rafael França 2506c79793 Merge pull request #24128 from y-yagi/add_return_values_to_example
add return values to example [ci skip]
2016-03-09 20:10:53 -03:00
yuuji.yaginuma 5ad722c23b add return values to example [ci skip] 2016-03-10 07:48:23 +09:00
Matthew Draper bf79b81740 Revert "Merge pull request #24125 from dharamgollapudi/patch-3"
This reverts commit b3c487515c, reversing
changes made to 4b43651884.
2016-03-10 07:41:31 +10:30
Rafael França b3c487515c Merge pull request #24125 from dharamgollapudi/patch-3
Rename dependencies.rake to cache_digests.rake
2016-03-09 17:09:38 -03:00
Dharam Gollapudi f819f20601 Rename dependencies.rake to cache_digests.rake
As the tasks are related to cache_digests and 
as they are already namespaced under cache_digests,
renaming to cache_digests.rake makes it to know
where to find these tasks.
2016-03-09 12:06:19 -08:00