Commit Graph

14003 Commits

Author SHA1 Message Date
Akira Matsuda
d0192e0c2d Unused core_ext 2018-02-11 02:19:50 +09:00
Rafael Mendonça França
c92ea62792 Make sure assert_recognizes can still find routes mounted after engines
Before, if the application defined after an engine this method would not
recognize the route since it was not defined insdie the engine.
2018-02-09 13:51:20 -05:00
bogdanvlviv
88ba705609
Add changelog entry for #31844 2018-02-01 16:47:42 +02:00
Igor Kasyanchuk
2587cadd42 Consistent behavior for session and cookies with to_h and to_hash method 2018-01-31 13:36:01 -08:00
Rafael Mendonça França
1c383df324 Start Rails 6.0 development!!!
🎉🎉🎉
2018-01-30 18:51:17 -05:00
George Claghorn
8ef0751b12
Merge pull request #31815 from composerinteralia/make-request-id
Allow @ in X-Request-Id header
2018-01-29 20:45:02 -05:00
Daniel Colson
eea28f4103 Allow @ in X-Request-Id header
It makes sense to be as strict as possible
with headers from the outside world,
but allowing @ to support Apache's mod_unique_id
(see #31644) seems OK to me
2018-01-29 19:35:39 -05:00
Misty De Meo
c8bf6da465 ActionController::TestCase: fix #post documentation [ci skip]
Fixes #31823.
2018-01-29 10:59:03 -08:00
Daniel Colson
82c39e1a0b Use assert_empty and assert_not_empty 2018-01-25 23:32:59 -05:00
Daniel Colson
94333a4c31 Use assert_predicate and assert_not_predicate 2018-01-25 23:32:59 -05:00
Daniel Colson
211adb47e7 Change refute to assert_not 2018-01-25 23:32:58 -05:00
Daniel Colson
0d50cae996 Use respond_to test helpers 2018-01-25 23:32:58 -05:00
fatkodima
fbf4e9562d Remove code duplication for ActionController::Metal.action 2018-01-22 15:57:25 +02:00
James Lovejoy
403d0d8f9e Fix typos. Improve text_helper documentation.
[ci skip]
2018-01-19 17:56:00 -08:00
Matthew Draper
acbcef6094
Merge pull request #31732 from koic/enable_autocorrect_for_lint_end_alignment_cop
Enable autocorrect for `Lint/EndAlignment` cop
2018-01-19 17:49:21 +10:30
Koichi ITO
5ac6ec54a6 Enable autocorrect for Lint/EndAlignment cop
### Summary

This PR changes .rubocop.yml.

Regarding the code using `if ... else ... end`, I think the coding style
that Rails expects is as follows.

```ruby
var = if cond
  a
else
  b
end
```

However, the current .rubocop.yml setting does not offense for the
following code.

```ruby
var = if cond
        a
      else
        b
      end
```

I think that the above code expects offense to be warned.
Moreover, the layout by autocorrect is unnatural.

```ruby
var = if cond
  a
      else
        b
      end
```

This PR adds a setting to .rubocop.yml to make an offense warning and
autocorrect as expected by the coding style.
And this change also fixes `case ... when ... end` together.

Also this PR itself is an example that arranges the layout using
`rubocop -a`.

### Other Information

Autocorrect of `Lint/EndAlignment` cop is `false` by default.
https://github.com/bbatsov/rubocop/blob/v0.51.0/config/default.yml#L1443

This PR changes this value to `true`.

Also this PR has changed it together as it is necessary to enable
`Layout/ElseAlignment` cop to make this behavior.
2018-01-18 17:19:13 +09:00
Eileen M. Uchitelle
51c5bcbb39
Merge pull request #31713 from aellispierce/refactor-browser-options
Move browser config to its own class
2018-01-17 14:30:55 -05:00
Ashley Ellis Pierce
f52e17f1c3 Move browser checking to its own class 2018-01-15 14:21:48 -05:00
James Lovejoy
49542ae886 Fix typos, update documentation
[ci skip]
2018-01-11 17:10:06 -08:00
Kasper Timm Hansen
33721a71e3
Merge pull request #31534 from claudiob/kaspth-approach
Don't include Active Storage migrations in new apps
2018-01-09 20:59:04 +01:00
Guillermo Iguaran
428939be9f Add 'Referrer-Policy' header to default headers set 2018-01-08 22:14:22 -05:00
Prathamesh Sonpatki
1bb99ae7ad
Added deprecations and removals notes for Action Pack [ci skip] 2018-01-07 21:51:51 +05:30
Peter Wagenet
6fe9cc80fc
Add missing require for strip_heredoc 2018-01-04 15:51:03 -08:00
Eileen M. Uchitelle
092c547d7f
Merge pull request #31594 from yuki24/refactor-request-test
Refactor tests for request parameters to use more realistic setup
2018-01-04 08:23:25 -05:00
Yoshiyuki Hirano
b20354afcc Bump license years for 2018 2017-12-31 22:36:55 +09:00
Yuki Nishijima
64fb68f7d2 Use more realistic setup rather than stubbing
These assertions did matter due to the inconsistent behavior of
[the #parameters method][1]. Today, it behaves consistently and they
could be removed. Also, one of the methods was stubbed somewhat
incorrectly, so it is better not to stub and instead, make them close
to more realistic use cases.

[1]: https://github.com/rails/rails/pull/13999#issuecomment-34601746
2017-12-29 15:17:41 -05:00
Nobuyoshi Nakada
09820655f8
let drb make temprary server 2017-12-29 23:58:43 +09:00
Claudio B
e32eda6adf Help if Active Storage tables are missing
When a user tries to create a new attachment or blog and the matching table is missing from the database
(`active_storage_attachments` and `active_storage_blobs` by default), an informative error is displayed
that invites users to run the `active_storage:install` task.
2017-12-21 11:21:19 -08:00
Eileen M. Uchitelle
0dfe220425
Merge pull request #31449 from PHedkvist/headless_api_doc
Add headless browser support in api docs [ci skip]
2017-12-18 12:24:43 -05:00
Pierre Hedkvist
72aca5231f Add headless browser support in api docs [ci skip] 2017-12-18 16:51:22 +00:00
Prathamesh Sonpatki
fd1304d2aa
Minor cleanup of CHANGELOG of PR #30850 [ci skip] 2017-12-17 13:00:37 +05:30
Prathamesh Sonpatki
f4d2a8a8ce
Added reference to default value of allow_other_host [ci skip] 2017-12-17 12:53:39 +05:30
Dixit Patel
a680e2f727 [ci skip] update link 2017-12-15 10:15:04 +05:30
yuuji.yaginuma
cc0d272c8c Generate tmpname on its own
`make_tmpname` was removed by 25d56ea7b7.
In this case, we want a file name, not a `File`. So cannot use `Tempfile`.

Fixes #31458
2017-12-15 11:57:43 +09:00
Yasuo Honda
e4a6a23aa7 Suppress warning: BigDecimal.new is deprecated
`BigDecimal.new` has been deprecated in BigDecimal 1.3.3
 which will be a default for Ruby 2.5.

Refer
533737338d

* This commit has been made as follows:

```
cd rails
git grep -l BigDecimal.new | grep -v guides/source/5_0_release_notes.md | grep -v activesupport/test/xml_mini_test.rb | xargs sed -i -e "s/BigDecimal.new/BigDecimal/g"
```
- `activesupport/test/xml_mini_test.rb`
Editmanually to remove `.new` and `::`

- guides/source/5_0_release_notes.md
This is a Rails 5.0 release notes.
2017-12-15 01:19:57 +00:00
Eileen M. Uchitelle
659c516bef
Merge pull request #31289 from witlessbird/fips-compatibility
Initial support for running Rails on FIPS-certified systems
2017-12-14 09:58:33 -05:00
Ryuta Kamizono
245c1dafa8 Enable Layout/LeadingCommentSpace to not allow cosmetic changes in the future
Follow up of #31432.
2017-12-14 17:30:54 +09:00
Dmitri Dolguikh
82822a3421 Introduced ActiveSupport::Digest that allows to specify hash function implementation
and defaults to `Digest::MD5`.

Replaced calls to `::Digest::MD5.hexdigest` with calls to `ActiveSupport::Digest.hexdigest`.
2017-12-12 11:23:54 -08:00
Ryuta Kamizono
2b35826389 Enable Layout/SpaceBeforeComma rubocop rule, and fixed more
Follow up of #31390.
2017-12-12 20:00:50 +09:00
Guillermo Iguaran
f1b4cd1ad4 Change the system tests to set Puma as default server only when the user haven't specified manually another server. 2017-12-09 16:46:31 -05:00
Guillermo Iguaran
5d7b70f433 Add secure X-Download-Options and X-Permitted-Cross-Domain-Policies to default headers set. 2017-12-09 15:41:55 -05:00
Sean Griffin
e88e6cea21
Merge pull request #30780 from JackMc/fix-chrome-referrer-invalidauthenticitytoken
Fix issue #30658 by checking explicitly for 'null' referrer
2017-12-07 14:19:39 -07:00
bogdanvlviv
82b974813b
Add headless firefox driver to System Tests 2017-12-07 20:20:54 +02:00
Philip Tolton
faf169eedd Correct routing test spelling mistake. 2017-12-06 16:01:00 -05:00
Dominic Cleal
d7a121a0d6
Yield array from AC::Parameters#each for block with one arg
Matches Hash#each behaviour as used in Rails 4.
2017-12-06 14:50:35 +00:00
yuuji.yaginuma
7efb4d23c1 Add missing require
Follow up of 3c442b6df91e291ebbf17f37444414bf5f10fbe6

Without this require, it will fail when run CSP test alone.
Ref: https://travis-ci.org/rails/rails/jobs/311715758#L2976
2017-12-05 18:16:41 +09:00
Simon Dawson
3c442b6df9 Fix CSP copy boolean directives (#31326)
Use Object#deep_dup to safely duplicate policy values
2017-12-05 00:13:48 -07:00
Kasper Timm Hansen
c8f014ff1f
Embrace the instantiation in loving parens <3 2017-12-03 19:12:06 +01:00
Kasper Timm Hansen
1e4621a8c0
Merge pull request #31146 from mikeycgto/actiondispatch-cookie-store-test-updates
Update cookie_store_test to use encrypted cookies
2017-12-03 19:10:22 +01:00
eileencodes
0185aae747 Add changelog entry for 9d6e28
Since this changes a default setting a changelog entry is important.
2017-11-30 12:26:33 -05:00