- 04 1月, 2020 8 次提交
-
-
由 Keeyan Nejad 提交于
MariaDB cannot be started on Arch Linux before running a command to create the database files See https://wiki.archlinux.org/index.php/MariaDB#Installation It also appears that memcached is not started by default on Arch Linux, so it has been added to the systemctl startup step. This PR adds that step when setting up on Arch Linux
-
由 Rafael França 提交于
Pass env_name as a string in test databases
-
由 John Crepezzi 提交于
In 154abcab we switched from using `Rails.env` to fetch the `env_name` to `ActiveRecord::ConnectionHandling::DEFAULT_ENV.call.to_sym` which changed the type from a `String` to a `Symbol`. This commit brings things back to the original state, so we can find the configurations correctly! It also modifies the configuration in the configurations array, so that future connections can find the database with the updated keyword value.
-
由 Rafael Mendonça França 提交于
When all IPs are trusted, use the furthest away
-
由 Keenan Brock 提交于
-
由 Rafael França 提交于
Fix regression where AJ#perform_now doesn't return the job's value:
-
由 Edouard CHIN 提交于
- I made a change in 0d3aec49 to output a log if a job was aborted in a before callbacks. I didn't take in consideration that a job could return a falsy value and thus it would wrongly log that the job was aborted. This fixes the problem by checking if the callback chain was halted rather than the return value of the job.
-
由 Edouard CHIN 提交于
- Fix #38040
-
- 03 1月, 2020 10 次提交
-
-
由 Matthew Draper 提交于
Scenario: we have a REMOTE_ADDR of `127.0.0.1`, and X-Forwarded-For is `A, B, C`. Without any relevant trust, the `remote_ip` is `C`. If `C` is trusted, then the `remote_ip` is `B`. If `B` and `C` are trusted, then the `remote_ip` is `A`. If all of `A`, `B`, and `C` are trusted, then the `remote_ip` should still be `A`: if our trust was sufficient to get that far out before, trusting something else should not have us fall back to `127.0.0.1`. It is this last situation that we're correcting here: We trust `A` to give us accurate X-Forwarded-For information, yet it has chosen to leave it unset. Therefore, `A` is telling us that it is itself the client.
-
由 Ryuta Kamizono 提交于
-
由 Rafael França 提交于
Fix regression, enforce fresh ETag header after collection contents change
-
由 Aaron Lipman 提交于
Add ActiveRecord::Relation#cache_key_with_version. This method will be used by ActionController::ConditionalGet to ensure that when collection cache versioning is enabled, requests using ConditionalGet don't return the same ETag header after a collection is modified. Prior to the introduction of collection cache versioning in 4f2ac80d, all collection cache keys included a version. However, with cache versioning enabled, collection cache keys remain constant. In turn, ETag headers remain constant, rendering them ineffective. This commit takes the cache_key_with_version method used for individual Active Record objects (from aa8749eb), and adds it to collections.
-
由 Rafael França 提交于
Add `ActionDispatch::HostAuthorization` to "Configuring Middleware" guide [ci skip]
-
由 Rafael França 提交于
Add to the log format "*/*" if using a not found format:
-
由 Rafael França 提交于
Separate with space between table name and columns list in SQL of insert_all
-
由 Rafael França 提交于
Mime::Mimes#symbols should return a always up to date reference:
-
The rendering template is processing as */* but in the log is "Processing by Controller#action as " This change add the */* for the log and showing as "Processing by Controller#action as */*" when there not founds for the extension of format.
-
由 Edouard CHIN 提交于
- Original issue was reported in https://github.com/rails/rails/issues/38094 and a fix attempted in https://github.com/rails/rails/pull/38126 but it's not the proper fix I think. TL;DR Is that `ActionView::Base.default_formats` holds a copy of mime symbols at the time ActionView::Base is loaded. So if you try to register mime types after ActionView Base is loaded then it won't work. ```ruby ActionView::Base.default_formats ||= Mime::SET.symbols # Note that this is automatically done when ActionView get loaded https://github.com/rails/rails/blob/22483b86a6c779743b30e2f23bb46accfbf96b28/actionpack/lib/action_dispatch.rb#L117 Mime::Type.register_alias "application/xhtml+xml", :foobar puts ActionView::base.defaults_formats.include?(:foobar) # => false ``` Same issue if you try to unregister a mime after ActionView is loaded. That's what was happening in the flaky test: ``` Mime::Type.register_alias "application/xhtml+xml", :foobar ActionView::Base.default_formats ||= Mime::SET.symbols puts ActionView::base.defaults_formats.include?(:foobar) # => true Mime::Type.unregister(:foobar) puts ActionView::base.defaults_formats.include?(:foobar) # => true ``` ### Solution Return a refence to `@symbols` which is updated each time a new mime is registered/unregistered.
-
- 02 1月, 2020 8 次提交
-
-
由 bogdanvlviv 提交于
This commit copies info from https://github.com/rails/rails/pull/33145 ([an excellent changelog](https://github.com/rails/rails/blob/6-0-stable/railties/CHANGELOG.md)) to our guides. Closes https://github.com/rails/rails/issues/36959 Not sure whether there is a need mentioning `config.hosts` in the "Upgrading to Rails 6.0" guide since it is configured to work in the development environment by default and we guide how to deal with "blocked host" issue, see: https://github.com/rails/rails/blob/6-0-stable/actionpack/lib/action_dispatch/middleware/templates/rescues/blocked_host.html.erb I would like to backport this to `6-0-stable` so users will be able to find info about `ActionDispatch::HostAuthorization` middleware and how to configure it. Give credit to @gsamokovarov since I copied the info from the changelog. <3 [bogdanvlviv, Genadi Samokovarov]
-
由 Ryuta Kamizono 提交于
Closes #38132
-
由 Takafumi ONAKA 提交于
In arel, there is a space between the table name and columns list when INSERT. https://github.com/rails/rails/blob/3c28e79b615f6937f5abdc433ff634d15cf2466f/activerecord/lib/arel/visitors/to_sql.rb#L56 ```ruby User.create!(name: "foo") # INSERT INTO `users` (`name`) VALUES ('foo') ^^^^^^^^^^^^^^^^ ``` But SQL of insert_all is not separated. ```ruby User.insert_all!([{name: "foo"}]) # INSERT INTO `users`(`name`) VALUES ('foo') ^^^^^^^^^^^^^^^ ``` This is not a problem (because it is correct as SQL), but fixing this will make unified behavior. A known issue is that database_rewinder fails to parse table name on insert_all. https://github.com/amatsuda/database_rewinder/blob/v0.9.1/lib/database_rewinder.rb#L51-L54 ```ruby statement = "INSERT INTO `users`(`name`) VALUES ('foo')" match = statement.match(/\A\s*INSERT(?:\s+IGNORE)?(?:\s+INTO)?\s+(?:\.*[`"]?([^.\s`"]+)[`"]?)*/i) # => #<MatchData "INSERT INTO `users`(`name`)" 1:")"> # Expected behavior is # => #<MatchData "INSERT INTO `users`" 1:"users"> ```
-
由 Ryuta Kamizono 提交于
Use travel_to to in date_helper_test.rb.
-
由 Matthew Draper 提交于
Remove Travis CI files
-
由 Josef Šimánek 提交于
-
由 Yasuo Honda 提交于
Rails CI has been running at Buildkite for 9 month. Refer https://github.com/rails/rails/commit/e485c14a3ee29ee486324a96545abf964d428101
-
由 Yasuo Honda 提交于
Rather than replace `ENV['TRAVIS']` with `ENV['CI']`, I think we can remove this condition because `ENV['TRAVIS']` is not valid at Buildkite then Rails CI has been running with `PROCESS_COUNT` about 9 month since this https://github.com/rails/rails/commit/e485c14a3ee29ee486324a96545abf964d428101
-
- 01 1月, 2020 1 次提交
-
-
由 Abhay Nikam 提交于
-
- 31 12月, 2019 8 次提交
-
-
由 Carlos Antonio da Silva 提交于
-
由 Carlos Antonio da Silva 提交于
-
由 Carlos Antonio da Silva 提交于
-
由 Kasper Timm Hansen 提交于
Address StarStarMimeControllerTest#test_javascript_with_no_format_only_star_star failure
-
由 Kasper Timm Hansen 提交于
Add ActionCable subscription connection identifier to PostgreSQL adapter
-
由 Carlos Antonio da Silva 提交于
* The last html block wasn't formatting properly, it needed a blank line between the paragraph and the text. * The ordered list wasn't generating the sequence, but always showing 1., the inner content/examples needed to be indented for that to work. * Mark some pieces as inline code for highlighting. * Tweak a couple sentences.
-
由 Sergey Ponomarev 提交于
* You can distinguish connection among others with specific `application_name` ```sql SELECT application_name FROM pg_stat_activity; /* application_name ------------------------ psql ActionCable-PID-42 (2 rows) */ ``` * It's possible to customize connection identification with `id` option in `cable.yml` `ActionCable-PID-#{$$}` is the default value * Related tests refactoring * `ActionCable::Server#config.cable` is no mutated anymore inside Redis subscription adapter
-
由 Yasuo Honda 提交于
Fix #38094 * Steps to reproduce: ```ruby % cd actionpack % MT_CPU=0 bundle exec ruby -w -Itest test/controller/mime/accept_format_test.rb -n "/^(?:MimeControllerLayoutsTest#(?:test_missing_layout_renders_properly)|StarStarMimeControllerTest#(?:test_javascript_with_no_format_only_star_star))$/" --verbose --seed 15759 ``` * Actual result without this commit: ```ruby % cd actionpack % MT_CPU=0 bundle exec ruby -w -Itest test/controller/mime/accept_format_test.rb -n "/^(?:MimeControllerLayoutsTest#(?:test_missing_layout_renders_properly)|StarStarMimeControllerTest#(?:test_javascript_with_no_format_only_star_star))$/" --verbose --seed 15759 Run options: -n "/^(?:MimeControllerLayoutsTest#(?:test_missing_layout_renders_properly)|StarStarMimeControllerTest#(?:test_javascript_with_no_format_only_star_star))$/" --verbose --seed 15759 MimeControllerLayoutsTest#test_missing_layout_renders_properly = 0.18 s = . StarStarMimeControllerTest#test_javascript_with_no_format_only_star_star = 0.00 s = E Error: StarStarMimeControllerTest#test_javascript_with_no_format_only_star_star: ArgumentError: Invalid formats: :iphone /Users/yahonda/src/github.com/yahonda/rails/actionview/lib/action_view/lookup_context.rb:287:in `formats=' /Users/yahonda/src/github.com/yahonda/rails/actionview/lib/action_view/view_paths.rb:11:in `formats=' /Users/yahonda/src/github.com/yahonda/rails/actionpack/lib/action_controller/metal/rendering.rb:29:in `process_action' /Users/yahonda/src/github.com/yahonda/rails/actionpack/lib/abstract_controller/callbacks.rb:42:in `block in process_action' /Users/yahonda/src/github.com/yahonda/rails/activesupport/lib/active_support/callbacks.rb:98:in `run_callbacks' /Users/yahonda/src/github.com/yahonda/rails/actionpack/lib/abstract_controller/callbacks.rb:41:in `process_action' /Users/yahonda/src/github.com/yahonda/rails/actionpack/lib/action_controller/metal/rescue.rb:22:in `process_action' /Users/yahonda/src/github.com/yahonda/rails/actionpack/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action' /Users/yahonda/src/github.com/yahonda/rails/activesupport/lib/active_support/notifications.rb:203:in `block in instrument' /Users/yahonda/src/github.com/yahonda/rails/activesupport/lib/active_support/notifications/instrumenter.rb:24:in `instrument' /Users/yahonda/src/github.com/yahonda/rails/activesupport/lib/active_support/notifications.rb:203:in `instrument' /Users/yahonda/src/github.com/yahonda/rails/actionpack/lib/action_controller/metal/instrumentation.rb:33:in `process_action' /Users/yahonda/src/github.com/yahonda/rails/actionpack/lib/action_controller/metal/params_wrapper.rb:245:in `process_action' /Users/yahonda/src/github.com/yahonda/rails/actionpack/lib/abstract_controller/base.rb:136:in `process' /Users/yahonda/src/github.com/yahonda/rails/actionview/lib/action_view/rendering.rb:39:in `process' /Users/yahonda/src/github.com/yahonda/rails/actionpack/lib/action_controller/metal.rb:190:in `dispatch' /Users/yahonda/src/github.com/yahonda/rails/actionpack/lib/action_controller/test_case.rb:512:in `process' /Users/yahonda/src/github.com/yahonda/rails/actionpack/lib/action_controller/test_case.rb:390:in `get' test/controller/mime/accept_format_test.rb:28:in `test_javascript_with_no_format_only_star_star' rails test test/controller/mime/accept_format_test.rb:26 Finished in 0.180610s, 11.0736 runs/s, 11.0736 assertions/s. 2 runs, 2 assertions, 0 failures, 1 errors, 0 skips % ``` * How to diagnose this error: At first Restore `require "action_view/base"` to `actionpack/lib/action_dispatch/middleware/debug_exceptions.rb` addresses this error, then isolated which lines are required then found this line is required. https://github.com/rails/rails/blob/22483b86a6c779743b30e2f23bb46accfbf96b28/actionpack/lib/action_dispatch.rb#L117 ```ruby ActionView::Base.default_formats ||= Mime::SET.symbols ```
-
- 30 12月, 2019 2 次提交
-
-
由 Ryuta Kamizono 提交于
-
由 Kasper Timm Hansen 提交于
Set AJ `return_false_on_aborted_enqueue` true in the test suite:
-
- 29 12月, 2019 3 次提交
-
-
由 Rafael França 提交于
Return unfrozen strings from to_sentence
-
由 Rafael França 提交于
Do not abort `rails new` when git binary doesn't exist
-
由 Martijn Storck 提交于
Co-Authored-By: NEugene Kenny <elkenny@gmail.com>
-