aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #33992 from kirs/enqueue-return-falseRafael França2018-12-055-1/+56
|\ | | | | Make AJ::Base#enqueue return false if the job wasn't enqueued
| * Make AJ::Base#enqueue return false if the job wasn't enqueuedKir Shatrov2018-10-285-1/+56
| |
* | Merge pull request #34621 from colby-swandale/update-bundler-2Rafael França2018-12-051-1/+1
|\ \ | | | | | | Update bundler to 2.0.0.pre.2
| * | update bundler to 2.0.0.pre.2Colby Swandale2018-12-051-1/+1
| | |
* | | Merge pull request #34591 from gmcgibbon/new_delivery_jobEileen M. Uchitelle2018-12-0512-23/+179
|\ \ \ | | | | | | | | Add MailDeliveryJob for unified mail delivery
| * | | Add MailDeliveryJob for unified mail deliveryGannon McGibbon2018-12-0412-23/+179
| | | | | | | | | | | | | | | | | | | | Add `MailDeliveryJob` for delivering both regular and parameterized mail. Deprecate using `DeliveryJob` and `Parameterized::DeliveryJob`.
* | | | Fix unstable ↵yuuji.yaginuma2018-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `test_serialized_attribute_works_under_concurrent_initial_access` test Since bd62389307e138ee0f274a9d62697567a3334ea0, isolate test of `test_serialized_attribute_works_under_concurrent_initial_access` fails. ``` $ ./bin/test -w test/cases/serialized_attribute_test.rb -n test_serialized_attribute_works_under_concurrent_initial_access Using sqlite3 Run options: -n test_serialized_attribute_works_under_concurrent_initial_access --seed 32129 # Running: E Error: SerializedAttributeTest#test_serialized_attribute_works_under_concurrent_initial_access: ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: ``` If duplicate an unloaded model, it seems that method invocation for that class is not guaranteed. Use the original class to avoid it.
* | | | Merge pull request #34620 from ↵Yuji Yaginuma2018-12-052-3/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | ysksn/use_safe_navigation_operator_for_railsguides_generator_constructor Use String for direction of RailsGuides::Generator#new
| * | | | Use safe nav operator when calling RailsGuides::Generator.newYosuke Kabuto2018-12-052-3/+3
|/ / / / | | | | | | | | | | | | Use String for direction of RailsGuides::Generator
* | | | Merge pull request #34617 from blahed/colorize-unpermitted-paramsRafael França2018-12-041-1/+1
|\ \ \ \ | | | | | | | | | | Colorize the unpermitted params log message
| * | | | colorize the unpermitted params log messageblahed2018-12-031-1/+1
| | | | |
* | | | | Merge pull request #34563 from sambostock/improve-test-helper-guidesGannon McGibbon2018-12-041-0/+50
|\ \ \ \ \ | |_|_|/ / |/| | | | Add advanced test helpers docs to guides
| * | | | Add advanced test helpers docs to guidesSam Bostock2018-12-041-0/+50
|/ / / / | | | | | | | | | | | | [ci skip]
* | | | Merge pull request #34612 from ↵Rafael França2018-12-041-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | utilum/bigdecimal_raises_on_comma_in_string_argument Another Ruby 2.6 BigDecimal compatibility issue
| * | | | Another Ruby 2.6 BigDecimal compatibility issueutilum2018-12-041-1/+1
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch modifies XmlMini::Parsing["decimal"] to handle a string that contains an invalid number. Since [ruby/ruby@a0e438c#diff-6b866d482baf2bdfd8433893fb1f6d36R144](https://github.com/ruby/ruby/commit/a0e438cd3c28d2eaf4efa18243d5b6edafa14d88#diff-6b866d482baf2bdfd8433893fb1f6d36R144) this case raises an `ArgumentError`. `String.to_f` returns 0.0 if there is not a valid number at the start of the argument, so current behavior is conserved. See https://travis-ci.org/rails/rails/jobs/463180341#L6264 Related: #34600, #34601
* | | | Merge pull request #34560 from gmcgibbon/fix_decorate_leak_on_serial_attr_testRafael França2018-12-041-0/+4
|\ \ \ \ | | | | | | | | | | Fix attribute decoration leak on serialized attribute test
| * | | | Fix attribute decoration leak on serialized attribute testGannon McGibbon2018-11-291-0/+4
| | | | |
* | | | | Merge pull request #34616 from gmcgibbon/route_symbol_noteRafael França2018-12-041-0/+2
|\ \ \ \ \ | | | | | | | | | | | | Add note about symbols vs strings
| * | | | | Add note about symbols vs stringsGannon McGibbon2018-12-041-0/+2
| | | | | |
* | | | | | Fix announcement draft formatting [ci skip]Rafael Mendonça França2018-12-041-2/+2
| | | | | |
* | | | | | Add release link to the announcement [ci skip]Rafael Mendonça França2018-12-041-3/+7
| | | | | |
* | | | | | Improve the task to generate the release summaryRafael Mendonça França2018-12-041-5/+10
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | Now it accepts the base release to be compared with. [ci skip]
* | | | | Merge pull request #34605 from alfie-max/disable_enum_scopesRafael França2018-12-043-2/+18
|\ \ \ \ \ | |_|/ / / |/| | | | option to disable all scopes that `ActiveRecord.enum` generates
| * | | | option to disable scopes that `ActiveRecord.enum` generates by defaultAlfred Dominic2018-12-043-2/+18
|/ / / /
* | | | Merge pull request #34609 from kamipo/delete_all_on_collection_proxyRyuta Kamizono2018-12-045-6/+23
|\ \ \ \ | | | | | | | | | | | | | | | Ensure that `delete_all` on collection proxy returns affected count
| * | | | Ensure that `delete_all` on collection proxy returns affected countRyuta Kamizono2018-12-045-6/+23
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | Unlike the `Relation#delete_all`, `delete_all` on collection proxy doesn't return affected count. Since the `CollectionProxy` is a subclass of the `Relation`, this inconsistency is probably not intended, so it should return the count consistently.
* | | | Merge pull request #34607 from gmcgibbon/clear_scope_on_deleteRyuta Kamizono2018-12-044-4/+72
|\ \ \ \ | |/ / / |/| | | Reset scope after collection delete
| * | | Reset scope after collection deleteGannon McGibbon2018-12-044-4/+72
|/ / / | | | | | | | | | | | | Reset scope after delete on collection association to clear stale offsets of removed records.
* | | Merge pull request #34596 from bogdanvlviv/imporve-parallel-testing-guideGannon McGibbon2018-12-031-10/+9
|\ \ \ | | | | | | | | Improve parallel testing guide [ci skip]
| * | | Improve parallel testing guide [ci skip]bogdanvlviv2018-12-031-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix formatting - Don't repeat "Active Record automatically handles creating and migrating a new database for each worker to use." - Tell that AR loads the schema to a database for each process(Related to #33479) - Clarify that `parallelize_teardown` is executed for each process
* | | | Merge pull request #34602 from guizmaii/masterRafael França2018-12-031-1/+2
|\ \ \ \ | | | | | | | | | | Pass the `connection` to the `@instrumenter.instrument` method call
| * | | | Pass the `connection` to the `@instrumenter.instrument` method calljules Ivanic2018-12-031-1/+2
| | | | |
* | | | | Merge pull request #34601 from evexoio/34600-test_should_return_nil_as_averageRyuta Kamizono2018-12-031-2/+6
|\ \ \ \ \ | | | | | | | | | | | | Fix NumericData.average test on 2.6.0-dev
| * | | | | Fix NumericData.average test on ruby 2.6Abdallah Samman2018-12-031-2/+6
| |/ / / /
* / / / / Address "warning: shadowing outer local variable - parts"Ryuta Kamizono2018-12-034-7/+8
|/ / / / | | | | | | | | | | | | And hide the `READ_QUERY` internal constant.
* | | | Merge pull request #34597 from utilum/assigned_but_unused_variable_birdYuji Yaginuma2018-12-031-1/+1
|\ \ \ \ | | | | | | | | | | Assigned but unused variable - bird
| * | | | Assigned but unused variable - birdutilum2018-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | See: https://travis-ci.org/rails/rails/jobs/462233144#L1384
* | | | | Merge pull request #34598 from ↵Rafael França2018-12-021-0/+2
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | rmacklin/add-missing-authorship-to-changelog-entry Add missing authorship to ActionCable changelog entry
| * | | | Add missing authorship to ActionCable changelog entryRichard Macklin2018-12-021-0/+2
|/ / / / | | | | | | | | | | | | | | | | I accidentally forgot to add the author line to my changelog entry from 2bb4fdef5efc70327c018e982ff809a29ac6708b
* | | | Merge pull request #34585 from marceloperini/marceloperini/33795Yuji Yaginuma2018-12-031-0/+1
|\ \ \ \ | | | | | | | | | | add require 'database/setup' in activestorage/test/service/s3_service_test.rb
| * | | | add require 'database/setup' in activestorage/test/service/s3_service_test.rbMarcelo Perini Veloso2018-12-011-0/+1
| |/ / /
* | | | Merge pull request #34595 from albertoalmagro/remove-unnecessary-variableRyuta Kamizono2018-12-031-11/+2
|\ \ \ \ | | | | | | | | | | Remove unnecessary variable route
| * | | | Remove unnecessary variable routeAlberto Almagro2018-12-021-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The variable `route` was only allocated to hold an object that was immediately returned. This patch removes that variable.
* | | | | Merge pull request #34590 from rmacklin/use-websocket-adapter-in-getStateJavan Makhmali2018-12-025-4/+37
|\ \ \ \ \ | | | | | | | | | | | | Replace reference to WebSocket global with ActionCable.adapters.WebSocket
| * | | | | Replace reference to WebSocket global with ActionCable.adapters.WebSocketRichard Macklin2018-12-015-4/+37
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The WebSocket dependency of ActionCable.Connection was made configurable in 66901c1849efae74c8a58fe0cb36afd487c067cc However, the reference here in Connection#getState was not updated to use the configurable property. This change remedies that and adds a test to verify it. Additionally, it backfills a test to ensure that Connection#open uses the configurable property.
* | | | | Merge pull request #34588 from rmacklin/fix-yarn-lockfilesJavan Makhmali2018-12-023-2308/+2404
|\ \ \ \ \ | |/ / / / |/| | | | Remove obsolete yarn.lock files and check in root yarn.lock file
| * | | | Remove obsolete yarn.lock files and check in root yarn.lock fileRichard Macklin2018-12-023-2308/+2404
|/ / / /
* / / / Remove circular dependency warnings in ActionCable javascript and publish ↵rmacklin2018-12-0116-290/+325
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | source modules with fine-grained exports (#34370) * Replace several ActionCable.* references with finer-grained imports This reduces the number of circular dependencies among the module imports from 4: ``` (!) Circular dependency: app/javascript/action_cable/index.js -> app/javascript/action_cable/connection.js -> app/javascript/action_cable/index.js (!) Circular dependency: app/javascript/action_cable/index.js -> app/javascript/action_cable/connection_monitor.js -> app/javascript/action_cable/index.js (!) Circular dependency: app/javascript/action_cable/index.js -> app/javascript/action_cable/consumer.js -> app/javascript/action_cable/index.js (!) Circular dependency: app/javascript/action_cable/index.js -> app/javascript/action_cable/subscriptions.js -> app/javascript/action_cable/index.js ``` to 2: ``` (!) Circular dependency: app/javascript/action_cable/index.js -> app/javascript/action_cable/connection.js -> app/javascript/action_cable/index.js (!) Circular dependency: app/javascript/action_cable/index.js -> app/javascript/action_cable/connection.js -> app/javascript/action_cable/connection_monitor.js -> app/javascript/action_cable/index.js ``` * Remove tests that only test javascript object property assignment These tests really only assert that you can assign a property to the ActionCable global object. That's true for pretty much any object in javascript (it would only be false if the object has been frozen, or has explicitly set some properties to be nonconfigurable). * Refactor ActionCable to provide individual named exports By providing individual named exports rather than a default export which is an object with all of those properties, we enable applications to only import the functions they need: any unused functions will be removed via tree shaking. Additionally, this restructuring removes the remaining circular dependencies by extracting the separate adapters and logger modules, so there are now no warnings when compiling the ActionCable bundle. Note: This produces two small breaking API changes: - The `ActionCable.WebSocket` getter and setter would be moved to `ActionCable.adapters.WebSocket`. If a user is currently configuring this, when upgrading they'd need to either add a delegated getter/setter themselves, or change it like this: ```diff - ActionCable.WebSocket = MyWebSocket + ActionCable.adapters.WebSocket = MyWebSocket ``` Applications which don't change the WebSocket adapter would not need any changes for this when upgrading. - Similarly, the `ActionCable.logger` getter and setter would be moved to `ActionCable.adapters.logger`. If a user is currently configuring this, when upgrading they'd need to either add a delegated getter/setter themselves, or change it like this: ```diff - ActionCable.logger = myLogger + ActionCable.adapters.logger = myLogger ``` Applications which don't change the logger would not need any changes for this when upgrading. These two aspects of the public API have to change because there's no way to export a property setter for `WebSocket` (or `logger`) such that this: ```js import ActionCable from "actioncable" ActionCable.WebSocket = MyWebSocket ``` would actually update `adapters.WebSocket`. (We can only offer that if we have two separate source files like if `index.js` uses `import * as ActionCable from "./action_cable" and then exports a wrapper which has delegated getters and setters for those properties.) This API change is very minor - it should be easy for applications to add the `adapters.` prefix in their assignments or to patch in delegated setters. And especially because most applications in the wild are not ever changing the default value of `ActionCable.WebSocket` or `ActionCable.logger` (because the default values are perfect), this API breakage is worth the tree-shaking benefits we gain. * Include source code in published actioncable npm package This allows actioncable users to ship smaller javascript bundles to visitors using modern browsers, as demonstrated in this repository: https://github.com/rmacklin/actioncable-es2015-build-example In that example, the bundle shrinks by 2.8K (25.2%) when you simply change the actioncable import to point to the untranspiled src. If you go a step further, like this: ``` diff --git a/app/scripts/main.js b/app/scripts/main.js index 17bc031..1a2b2e0 100644 --- a/app/scripts/main.js +++ b/app/scripts/main.js @@ -1,6 +1,6 @@ -import ActionCable from 'actioncable'; +import * as ActionCable from 'actioncable'; let cable = ActionCable.createConsumer('wss://cable.example.com'); cable.subscriptions.create('AppearanceChannel', { ``` then the bundle shrinks by 3.6K (31.7%)! In addition to allowing smaller bundles for those who ship untranspiled code to modern browsers, including the source code in the published package can be useful in other ways: 1. Users can import individual modules rather than the whole library 2. As a result of (1), users can also monkey patch parts of actioncable by importing the relevant module, modifying the exported object, and then importing the rest of actioncable (which would then use the patched object). Note: This is the same enhancement that we made to activestorage in c0368ad090b79c19300a4aa133bb188b2d9ab611 * Remove unused commonjs & resolve plugins from ActionCable rollup config These were added when we copied the rollup config from ActiveStorage, but ActionCable does not have any commonjs dependencies (it doesn't have any external dependencies at all), so these plugins are unnecessary here * Change ActionCable.startDebugging() -> ActionCable.logger.enabled=true and ActionCable.stopDebugging() -> ActionCable.logger.enabled=false This API is simpler and more clearly describes what it does * Change Travis configuration to run yarn install at the root for ActionCable builds This is necessary now that the repository is using Yarn Workspaces
* | | Merge pull request #34583 from gregmolnar/guides_fixRyuta Kamizono2018-12-011-1/+1
|\ \ \ | | | | | | | | fix example code syntax [ci skip]
| * | | fix example code syntax [ci skip]Greg Molnar2018-12-011-1/+1
|/ / /