Commit Graph

57778 Commits

Author SHA1 Message Date
Erol Fornoles
46e6a0c68c Fix typo in Configuration Guide [ci skip] 2016-04-27 08:41:41 +08:00
Derek Prior
cacded5a0e Add more info to insecure URL generation error
I always appreciate having a bit more information as to why something is
now an error. We can use this error to tell people why what they were
previously doing is insecure and give them hints on how to fix it.

Signed-off-by: Kasper Timm Hansen <kaspth@gmail.com>
2016-04-26 22:14:03 +02:00
Jeremy Daer
f03c27cad2
Merge pull request #24723 from lvl0nax/array_split_fix
Little perfomance fix for Array#split.
2016-04-26 11:41:16 -05:00
Richard Schneeman
8d4ffc81fb Merge pull request #24737 from Erol/fix-guides-typo
Fix typo in Rails Guides [ci skip]
2016-04-26 09:45:10 -05:00
Erol Fornoles
0aab9c6008 Fix typo in Rails Guides [ci skip] 2016-04-26 22:32:42 +08:00
lvl0nax
ffb1df52c1 Little perfomance fix for Array#split.
Calculating -------------------------------------
before    40.770k i/100ms
after    58.464k i/100ms
-------------------------------------------------
before    629.568k (± 5.0%) i/s -      3.180M
after      1.159M (± 4.5%) i/s -      5.788M
2016-04-26 09:21:56 +03:00
arktisklada
9d63111499
Clear ActionMailer deliveries on setup and teardown
Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
2016-04-25 22:41:18 -05:00
Jeremy Daer
9364d50654
Merge pull request #24641 from rafaelfranca/fix-per-form-token-with-full-url
Discart the schema and host information when building the per-form token
2016-04-25 21:03:33 -05:00
Alexey Shein
420730b10b
Do not cache ActiveSupport::TimeZone#utc_offset
This can be an issue when TZInfo::TimeZone#current_period is refreshed
due to timezone period transition, but it's not reflected in
ActiveSupport::TimeZone object.

For example, on Sun, 26 Oct 2014 22:00 UTC, Moscow changed its TZ from
MSK +04:00 to MSK +03:00 (-1 hour). If ActiveSupport::TimeZone['Moscow']
happens to be initialized just before the timezone transition, it will
cache its stale utc_offset even after the timezone transition.

This commit removes cache and fixes this issue.

Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
2016-04-25 20:55:33 -05:00
Jeremy Daer
ea628f72c3
CI: allow JRuby build to fail, too flaky to be useful 2016-04-25 19:30:37 -05:00
Rafael França
4a4eedb240 Merge pull request #24730 from vipulnsward/move-savepoints
Move remaining current_savepoint_name to savepoints module
2016-04-25 19:19:58 -03:00
Sean Griffin
831a277d49 Merge pull request #24731 from vipulnsward/database-type
Change valid_type? from abstract adapter
2016-04-25 14:05:40 -06:00
Vipul A M
2af2d6b057 Dont simply assume a type is a valid database type. This is only always true in the case of sqlite.
Others adapters need to perform a check for validity.
Add coverage for mysql2 db type validation
2016-04-25 23:35:36 +05:30
Andrew White
3e4c6d1aba Merge pull request #24729 from Fryguy/date_and_time_depends_on_mattr_accessor
Add require of mattr_accessor since Compatibility relies on it.
2016-04-25 18:54:17 +01:00
Vipul A M
d58d9f713c Move remaining current_savepoint_name to savepoints module 2016-04-25 23:21:56 +05:30
Jason Frey
de601699ba Add require of mattr_accessor since Compatibility relies on it.
Follow up to
c9c5788a52
2016-04-25 12:39:12 -04:00
Kasper Timm Hansen
e007afd3cd Merge pull request #24696 from y-yagi/remove_unnessary_option_setting
remove unnessary option setting from test runner
2016-04-25 08:07:52 +02:00
yui-knk
cd9d5c1150
Remove Array#sum method before override it
To suppress warning ('warning: method redefined; discarding old sum')
remove the method before override it.

Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
2016-04-24 22:05:24 -05:00
yuuji.yaginuma
996092ec18 register rake options to OptionParser
In order to prevent `OptionParser::ParseError` when specify the rake options to
`routes` task.
2016-04-25 08:33:47 +09:00
yuuji.yaginuma
9fa07095a3 remove unnessary option setting from test runner
If run the test over the `rake` command, because of the test patterns is passed
via `rake_run` method, do not need to be obtained from the argv.

This probably fixes #24372.
2016-04-25 08:33:39 +09:00
Jeremy Daer
643cac08a3
Merge pull request #23103 from rails/refactor-handling-of-action-default
Refactor handling of :action default in routing
2016-04-24 15:27:46 -07:00
Ryuta Kamizono
edc2b77187
Add Expression Indexes and Operator Classes support for PostgreSQL
Example:

    create_table :users do |t|
      t.string :name
      t.index 'lower(name) varchar_pattern_ops'
    end

Fixes #19090.
Fixes #21765.
Fixes #21819.
Fixes #24359.

Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
2016-04-24 14:56:29 -07:00
Seva Orlov
c41ef01aec
remove_index do not fetch indexes if name is specified
There is no need to fetch all table indexes in remove_index if name is specified. If name is wrong, then StatementInvalid will be raised.

Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
2016-04-24 14:32:55 -07:00
Vipul A M
6c6eeda54d
Follow up of #23461
- Rename max to statement_limit
- Remove magic number 1000 from everywhere
- Defined StatementPool::DEFAULT_STATEMENT_LIMIT and started using it everywhere

Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
2016-04-24 13:28:48 -07:00
Xavier Noria
7463aa19b1 rewords code comment [ci skip]
This alternative flows better.

[Richard Schneeman & Xavier Noria]
2016-04-24 21:18:21 +02:00
Xavier Noria
fe1eda64e5 removes useless use of string interpolation
`railtie` is already a string!
2016-04-24 20:17:36 +02:00
Vipul A M
35f32036b6
Include the Savepoints module in all adapters.
Adapters override `#supports_savepoints?` to return `true` if they
support transaction savepoints. Defaults to `false`.
2016-04-24 10:53:40 -07:00
Jeremy Daer
65b6496ee4
Share lock: more accurate livelock fix for aa598f4
Awaken waiting threads even if the current thread (the previously
exclusive thread) hadn't taken a share lock.

This only happens in code that wasn't run within an executor, since that
always take an outermost share lock.
2016-04-24 10:14:53 -07:00
Kasper Timm Hansen
24b1bb1a0f Merge pull request #24715 from vipulnsward/nodoc-st-pool
:nodoc: internal StatementPool class
2016-04-24 18:20:34 +02:00
Vipul A M
2fab3eee1f :nodoc: internal StatementPool class.
[ci skip]
2016-04-24 21:22:12 +05:30
Kasper Timm Hansen
8f22006c69 Merge pull request #24712 from vipulnsward/23461-release-notes
Add #23461 to release notes
2016-04-24 14:41:53 +02:00
Vipul A M
9a94f022dd Add #23461 to release notes
[ci skip]
2016-04-24 17:16:24 +05:30
Kasper Timm Hansen
e9331c646f Merge pull request #24710 from prathamesh-sonpatki/fix-build
Fix broken build, channel files are also included in `bin/rails stats` now
2016-04-24 12:15:39 +02:00
Prathamesh Sonpatki
9b0ee587af
Fix broken build, channel files are also included in bin/rails stats now
- Followup of https://github.com/rails/rails/pull/24709.
2016-04-24 14:45:55 +05:30
Jeremy Daer
91595761a8
Merge pull request #24709 from y-yagi/add_channels_files_in_stats_task
add channels files in `stats` task
2016-04-23 22:31:38 -07:00
Jeremy Daer
ab56c92f3c
Merge pull request #23461 from kamipo/prepared_statements_for_mysql2_adapter
Add prepared statements support for `Mysql2Adapter`
2016-04-23 22:28:52 -07:00
yuuji.yaginuma
ad9bdfca77 add channels files in stats task 2016-04-24 14:15:00 +09:00
Guillermo Iguaran
65d743904c Merge pull request #24701 from prathamesh-sonpatki/deprecate-request_via_redirect
Deprecate `request_via_redirect` method.
2016-04-24 00:04:26 -05:00
Jeremy Daer
7c45fa57a1
Merge pull request #24708 from kamipo/move_select_rows_implementation_to_super_class
Move `select_rows` implementation to super class
2016-04-23 21:26:33 -07:00
Guillermo Iguaran
77cd14bbbf Merge pull request #24705 from kamipo/add_nodoc_to_insert_versions_sql
Add `:nodoc:` to `insert_versions_sql` [ci skip]
2016-04-23 22:52:47 -05:00
Guillermo Iguaran
9f8a6c47c8 Merge pull request #24706 from kamipo/remove_in_doc_about_mysql_versions_below_5
Remove in the doc about MySQL versions below 5 [ci skip]
2016-04-23 22:50:26 -05:00
Guillermo Iguaran
77f3617362 Merge pull request #24707 from kamipo/move_require_ipaddr_to_oid_cidr
Move `require 'ipaddr'` in `postgresql/oid/cidr.rb`
2016-04-23 22:47:50 -05:00
Ryuta Kamizono
c1ab4a2dbf Move select_rows implementation to super class 2016-04-24 11:20:46 +09:00
Ryuta Kamizono
9c8a086863 Move require 'ipaddr' in postgresql/oid/cidr.rb
`IPAddr` is used in `OID::Cidr`.
2016-04-24 11:09:08 +09:00
Ryuta Kamizono
7ec31ac429 Remove in the doc about MySQL versions below 5 [ci skip]
Follow up to #23458.
Active Record supports MySQL >= 5.0 now.
2016-04-24 11:02:30 +09:00
Ryuta Kamizono
5394f2cde8 Add :nodoc: to insert_versions_sql [ci skip]
Follow up to #24685. `insert_versions_sql` is not public API.
2016-04-24 10:54:53 +09:00
Prathamesh Sonpatki
3da0a2b065
Deprecate request_via_redirect method.
- Followup of https://github.com/rails/rails/issues/18693.
- I think we missed deprecating `request_via_redirect` in that pull
  request.
- Originally requested by DHH here
  https://github.com/rails/rails/issues/18333.
2016-04-24 07:18:11 +05:30
प्रथमेश Sonpatki
39f1dac9a5 Merge pull request #24704 from graemeboy/master
Fix typo in ActiveJob #retry_job doc
2016-04-24 07:15:07 +05:30
Graeme Boy
6e27481dc7 Fix typo in ActiveJob #retry_job doc 2016-04-23 17:23:19 -07:00
Sean Griffin
17668cf528 Merge pull request #24703 from vipulnsward/24695-handle-nils
Followup of #15771
2016-04-23 17:27:09 -06:00