Merge remote-tracking branch 'origin/master' into unlock-minitest

This commit is contained in:
Rafael Mendonça França 2017-08-01 17:34:14 -04:00
commit feb1ddae02
2023 changed files with 16840 additions and 2041 deletions

View File

@ -25,6 +25,9 @@ Layout/CaseIndentation:
Layout/CommentIndentation:
Enabled: true
Layout/EmptyLineAfterMagicComment:
Enabled: true
# No extra empty lines.
Layout/EmptyLines:
Enabled: true
@ -41,6 +44,9 @@ Layout/EmptyLinesAroundMethodBody:
Layout/EmptyLinesAroundModuleBody:
Enabled: true
Layout/FirstParameterIndentation:
Enabled: true
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
Style/HashSyntax:
Enabled: true
@ -82,7 +88,18 @@ Style/FrozenStringLiteralComment:
EnforcedStyle: always
Include:
- 'activesupport/**/*'
- 'activemodel/**/*'
- 'actioncable/**/*'
- 'activejob/**/*'
- 'activerecord/**/*'
- 'actionmailer/**/*'
- 'actionview/**/*'
- 'actionpack/**/*'
Exclude:
- 'actionview/test/**/*.builder'
- 'actionview/test/**/*.ruby'
- 'actionpack/test/**/*.builder'
- 'actionpack/test/**/*.ruby'
# Use `foo {}` not `foo{}`.
Layout/SpaceBeforeBlockBraces:

View File

@ -22,7 +22,7 @@ gem "capybara", "~> 2.13"
gem "rack-cache", "~> 1.2"
gem "jquery-rails"
gem "coffee-rails"
gem "sass-rails"
gem "sass-rails", github: "rails/sass-rails", branch: "5-0-stable"
gem "turbolinks", "~> 5"
# require: false so bcrypt is loaded only when has_secure_password is used.
@ -39,6 +39,8 @@ gem "json", ">= 2.0.0"
gem "rubocop", ">= 0.47", require: false
gem "rb-inotify", github: "matthewd/rb-inotify", branch: "close-handling", require: false
group :doc do
gem "sdoc", "> 1.0.0.rc1", "< 2.0"
gem "redcarpet", "~> 3.2.3", platforms: :ruby
@ -54,6 +56,9 @@ gem "libxml-ruby", platforms: :ruby
# Action View. For testing Erubis handler deprecation.
gem "erubis", "~> 2.7.0", require: false
# for railties app_generator_test
gem "bootsnap", ">= 1.1.0", require: false
# Active Job.
group :job do
gem "resque", require: false

View File

@ -1,6 +1,6 @@
GIT
remote: https://github.com/QueueClassic/queue_classic.git
revision: 51d56ca6fa2fdf1eeffdffd702ae1cc0940b5156
revision: cde82d17ded2799ed726dd7b0df6ce1fd4c1b7da
branch: master
specs:
queue_classic (3.2.0.RC1)
@ -12,6 +12,14 @@ GIT
specs:
thor (0.19.4)
GIT
remote: https://github.com/matthewd/rb-inotify.git
revision: 856730aad4b285969e8dd621e44808a7c5af4242
branch: close-handling
specs:
rb-inotify (0.9.9)
ffi (~> 1.0)
GIT
remote: https://github.com/matthewd/websocket-client-simple.git
revision: e161305f1a466b9398d86df3b1731b03362da91b
@ -23,9 +31,21 @@ GIT
GIT
remote: https://github.com/rails/arel.git
revision: 67a51c62f4e19390cd8eb408596ca48bb0806362
revision: f4227bf20a16a1d688afc24cf0038e2f98905dd4
specs:
arel (8.0.0)
arel (9.0.0.alpha)
GIT
remote: https://github.com/rails/sass-rails.git
revision: bb5c1d34e8acad2e2960cc785184ffe17d7b3bca
branch: 5-0-stable
specs:
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
PATH
remote: .
@ -44,7 +64,7 @@ PATH
actionview (= 5.2.0.alpha)
activesupport (= 5.2.0.alpha)
rack (~> 2.0)
rack-test (~> 0.6.3)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.0.alpha)
@ -61,7 +81,7 @@ PATH
activerecord (5.2.0.alpha)
activemodel (= 5.2.0.alpha)
activesupport (= 5.2.0.alpha)
arel (~> 8.0)
arel (= 9.0.0.alpha)
activesupport (5.2.0.alpha)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
@ -91,9 +111,9 @@ GEM
specs:
addressable (2.5.1)
public_suffix (~> 2.0, >= 2.0.2)
amq-protocol (2.1.0)
amq-protocol (2.2.0)
ast (2.3.0)
backburner (1.3.1)
backburner (1.4.1)
beaneater (~> 1.0)
concurrent-ruby (~> 1.0.1)
dante (> 0.1.5)
@ -115,26 +135,28 @@ GEM
thor (~> 0.19.1)
useragent (~> 0.16.7)
blade-qunit_adapter (2.0.1)
blade-sauce_labs_plugin (0.6.2)
blade-sauce_labs_plugin (0.7.1)
childprocess
faraday
selenium-webdriver
bootsnap (1.1.2)
msgpack (~> 1.0)
builder (3.2.3)
bunny (2.6.2)
amq-protocol (>= 2.0.1)
bunny (2.6.6)
amq-protocol (>= 2.1.0)
byebug (9.0.6)
capybara (2.14.1)
capybara (2.14.4)
addressable
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
childprocess (0.5.9)
childprocess (0.7.1)
ffi (~> 1.0, >= 1.0.11)
coffee-rails (4.2.1)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.2.x)
railties (>= 4.0.0)
coffee-script (2.4.1)
coffee-script-source
execjs
@ -162,16 +184,18 @@ GEM
http_parser.rb (>= 0.6.0)
em-socksify (0.3.1)
eventmachine (>= 1.0.0.beta.4)
erubi (1.6.0)
erubi (1.6.1)
erubis (2.7.0)
event_emitter (0.2.5)
eventmachine (1.2.1)
eventmachine (1.2.1-x64-mingw32)
eventmachine (1.2.1-x86-mingw32)
et-orbi (1.0.5)
tzinfo
event_emitter (0.2.6)
eventmachine (1.2.3)
eventmachine (1.2.3-x64-mingw32)
eventmachine (1.2.3-x86-mingw32)
execjs (2.7.0)
faraday (0.11.0)
faraday (0.12.2)
multipart-post (>= 1.2, < 3)
faye (1.2.3)
faye (1.2.4)
cookiejar (>= 0.3.0)
em-http-request (>= 0.3.0)
eventmachine (>= 0.12.0)
@ -179,33 +203,33 @@ GEM
multi_json (>= 1.0.0)
rack (>= 1.0.0)
websocket-driver (>= 0.5.1)
faye-websocket (0.10.5)
faye-websocket (0.10.7)
eventmachine (>= 0.12.0)
websocket-driver (>= 0.5.1)
ffi (1.9.17)
ffi (1.9.17-x64-mingw32)
ffi (1.9.17-x86-mingw32)
ffi (1.9.18)
ffi (1.9.18-x64-mingw32)
ffi (1.9.18-x86-mingw32)
globalid (0.4.0)
activesupport (>= 4.2.0)
hiredis (0.6.1)
http_parser.rb (0.6.0)
i18n (0.8.1)
jquery-rails (4.2.2)
i18n (0.8.6)
jquery-rails (4.3.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (2.0.3)
json (2.1.0)
kindlerb (1.2.0)
mustache
nokogiri
libxml-ruby (2.9.0)
libxml-ruby (3.0.0)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.5)
mail (2.6.6)
mime-types (>= 1.16, < 4)
metaclass (0.0.4)
method_source (0.8.2)
@ -222,13 +246,17 @@ GEM
mocha (0.14.0)
metaclass (~> 0.0.1)
mono_logger (1.1.0)
msgpack (1.1.0)
msgpack (1.1.0-x64-mingw32)
msgpack (1.1.0-x86-mingw32)
multi_json (1.12.1)
multipart-post (2.0.0)
mustache (1.0.3)
mysql2 (0.4.6)
mysql2 (0.4.6-x64-mingw32)
mysql2 (0.4.6-x86-mingw32)
nio4r (2.0.0)
mustache (1.0.5)
mustermann (1.0.0)
mysql2 (0.4.8)
mysql2 (0.4.8-x64-mingw32)
mysql2 (0.4.8-x86-mingw32)
nio4r (2.1.0)
nokogiri (1.8.0)
mini_portile2 (~> 2.2.0)
nokogiri (1.8.0-x64-mingw32)
@ -243,41 +271,39 @@ GEM
pg (0.19.0-x64-mingw32)
pg (0.19.0-x86-mingw32)
powerpack (0.1.1)
psych (2.2.2)
psych (2.2.4)
public_suffix (2.0.5)
puma (3.7.0)
puma (3.9.1)
qu (0.2.0)
multi_json
qu-redis (0.2.0)
qu (= 0.2.0)
redis-namespace
simple_uuid
que (0.12.0)
que (0.13.1)
racc (1.4.14)
rack (2.0.3)
rack-cache (1.6.1)
rack-cache (1.7.0)
rack (>= 0.4)
rack-protection (2.0.0)
rack
rack-test (0.6.3)
rack (>= 1.0)
rails-dom-testing (2.0.2)
activesupport (>= 4.2.0, < 6.0)
nokogiri (~> 1.6)
rack-test (0.7.0)
rack (>= 1.0, < 3)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
rainbow (2.2.2)
rake
rake (12.0.0)
rb-fsevent (0.9.8)
rb-inotify (0.9.9)
ffi (~> 1.0)
rb-fsevent (0.10.2)
rdoc (5.1.0)
redcarpet (3.2.3)
redis (3.3.3)
redis-namespace (1.5.2)
redis-namespace (1.5.3)
redis (~> 3.0, >= 3.0.4)
resque (1.27.0)
resque (1.27.4)
mono_logger (~> 1.0)
multi_json (~> 1.0)
redis-namespace (~> 1.3)
@ -297,43 +323,43 @@ GEM
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.8.1)
ruby_dep (1.5.0)
rubyzip (1.2.0)
rufus-scheduler (3.3.2)
tzinfo
sass (3.4.23)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
rubyzip (1.2.1)
rufus-scheduler (3.4.2)
et-orbi (~> 1.0)
sass (3.5.1)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sdoc (1.0.0.rc2)
rdoc (~> 5.0)
selenium-webdriver (3.0.5)
selenium-webdriver (3.4.4)
childprocess (~> 0.5)
rubyzip (~> 1.0)
websocket (~> 1.0)
sequel (4.42.1)
sequel (4.48.0)
serverengine (1.5.11)
sigdump (~> 0.2.2)
sidekiq (5.0.0)
sidekiq (5.0.4)
concurrent-ruby (~> 1.0)
connection_pool (~> 2.2, >= 2.2.0)
rack-protection (>= 1.5.0)
redis (~> 3.3, >= 3.3.3)
sigdump (0.2.4)
simple_uuid (0.4.0)
sinatra (1.0)
rack (>= 1.0)
sneakers (2.4.0)
bunny (~> 2.6)
sinatra (2.0.0)
mustermann (~> 1.0)
rack (~> 2.0)
rack-protection (= 2.0.0)
tilt (~> 2.0)
sneakers (2.5.0)
bunny (~> 2.6.4)
serverengine (~> 1.5.11)
thor
thread (~> 0.1.7)
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-export (0.9.1)
sprockets-export (1.0.0)
sprockets-rails (3.2.0)
actionpack (>= 4.0)
activesupport (>= 4.0)
@ -344,32 +370,32 @@ GEM
stackprof (0.2.10)
sucker_punch (2.0.2)
concurrent-ruby (~> 1.0.0)
thin (1.7.0)
thin (1.7.2)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
thread (0.1.7)
thread_safe (0.3.6)
tilt (2.0.5)
tilt (2.0.8)
turbolinks (5.0.1)
turbolinks-source (~> 5)
turbolinks-source (5.0.0)
turbolinks-source (5.0.3)
tzinfo (1.2.3)
thread_safe (~> 0.1)
tzinfo-data (1.2016.10)
tzinfo-data (1.2017.2)
tzinfo (>= 1.0.0)
uglifier (3.0.4)
uglifier (3.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.2.1)
unicode-display_width (1.3.0)
useragent (0.16.8)
vegas (0.1.11)
rack (>= 1.0.0)
w3c_validators (1.3.1)
json (~> 2.0)
w3c_validators (1.3.3)
json (>= 1.8)
nokogiri (~> 1.6)
wdm (0.1.1)
websocket (1.2.3)
websocket-driver (0.6.4)
websocket (1.2.4)
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
xpath (2.1.0)
@ -390,6 +416,7 @@ DEPENDENCIES
benchmark-ips
blade
blade-sauce_labs_plugin
bootsnap (>= 1.1.0)
byebug
capybara (~> 2.13)
coffee-rails
@ -418,12 +445,13 @@ DEPENDENCIES
rack-cache (~> 1.2)
rails!
rake (>= 11.1)
rb-inotify!
redcarpet (~> 3.2.3)
redis
resque
resque-scheduler
rubocop (>= 0.47)
sass-rails
sass-rails!
sdoc (> 1.0.0.rc1, < 2.0)
sequel
sidekiq
@ -441,4 +469,4 @@ DEPENDENCIES
websocket-client-simple!
BUNDLED WITH
1.15.1
1.15.3

View File

@ -75,6 +75,8 @@ and may also be used independently outside Rails.
## Contributing
[![Code Triage Badge](https://www.codetriage.com/rails/rails/badges/users.svg)](https://www.codetriage.com/rails/rails)
We encourage you to contribute to Ruby on Rails! Please check out the
[Contributing to Ruby on Rails guide](http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html) for guidelines about how to proceed. [Join us!](http://contributors.rubyonrails.org)

View File

@ -1,35 +1,35 @@
# Releasing Rails
In this document, we'll cover the steps necessary to release Rails. Each
section contains steps to take during that time before the release. The times
suggested in each header are just that: suggestions. However, they should
In this document, we'll cover the steps necessary to release Rails. Each
section contains steps to take during that time before the release. The times
suggested in each header are just that: suggestions. However, they should
really be considered as minimums.
## 10 Days before release
Today is mostly coordination tasks. Here are the things you must do today:
Today is mostly coordination tasks. Here are the things you must do today:
### Is the CI green? If not, make it green. (See "Fixing the CI")
### Is the CI green? If not, make it green. (See "Fixing the CI")
Do not release with a Red CI. You can find the CI status here:
Do not release with a Red CI. You can find the CI status here:
```
http://travis-ci.org/rails/rails
```
### Is Sam Ruby happy? If not, make him happy.
### Is Sam Ruby happy? If not, make him happy.
Sam Ruby keeps a [test suite](https://github.com/rubys/awdwr) that makes
sure the code samples in his book
([Agile Web Development with Rails](https://pragprog.com/titles/rails5/agile-web-development-with-rails-5th-edition))
all work. These are valuable system tests
for Rails. You can check the status of these tests here:
all work. These are valuable system tests
for Rails. You can check the status of these tests here:
[http://intertwingly.net/projects/dashboard.html](http://intertwingly.net/projects/dashboard.html)
Do not release with Red AWDwR tests.
### Do we have any Git dependencies? If so, contact those authors.
### Do we have any Git dependencies? If so, contact those authors.
Having Git dependencies indicates that we depend on unreleased code.
Obviously Rails cannot be released when it depends on unreleased code.
@ -38,12 +38,12 @@ suits them.
### Contact the security team (either tenderlove or rafaelfranca)
Let them know of your plans to release. There may be security issues to be
Let them know of your plans to release. There may be security issues to be
addressed, and that can impact your release date.
### Notify implementors.
Ruby implementors have high stakes in making sure Rails works. Be kind and
Ruby implementors have high stakes in making sure Rails works. Be kind and
give them a heads up that Rails will be released soonish.
This is only required for major and minor releases, bugfix releases aren't a
@ -60,18 +60,18 @@ Implementors will love you and help you.
## 3 Days before release
This is when you should release the release candidate. Here are your tasks
This is when you should release the release candidate. Here are your tasks
for today:
### Is the CI green? If not, make it green.
### Is the CI green? If not, make it green.
### Is Sam Ruby happy? If not, make him happy.
### Is Sam Ruby happy? If not, make him happy.
### Contact the security team. CVE emails must be sent on this day.
### Contact the security team. CVE emails must be sent on this day.
### Create a release branch.
From the stable branch, create a release branch. For example, if you're
From the stable branch, create a release branch. For example, if you're
releasing Rails 3.0.10, do this:
```
@ -82,7 +82,7 @@ Switched to a new branch '3-0-10'
### Update each CHANGELOG.
Many times commits are made without the CHANGELOG being updated. You should
Many times commits are made without the CHANGELOG being updated. You should
review the commits since the last release, and fill in any missing information
for each CHANGELOG.
@ -96,15 +96,15 @@ If you're doing a stable branch release, you should also ensure that all of
the CHANGELOG entries in the stable branch are also synced to the master
branch.
### Update the RAILS_VERSION file to include the RC.
### Put the new version in the RAILS_VERSION file.
Include an RC number if appropriate, e.g. `6.0.0.rc1`.
### Build and test the gem.
Run `rake install` to generate the gems and install them locally. Then try
generating a new app and ensure that nothing explodes.
Verify that Action Cable and Action View's package.json files are updated with
the RC version.
Run `rake verify` to generate the gems and install them locally. `verify` also
generates a Rails app with a migration and boots it to smoke test with in your
browser.
This will stop you from looking silly when you push an RC to rubygems.org and
then realize it is broken.
@ -117,37 +117,39 @@ as NPM packages, so you must have Node.js installed, have an NPM account
check this via `npm owner ls actioncable` and `npm owner ls rails-ujs`) in
order to do a full release. Do not release until you're set up with NPM!
The release task will sign the release tag. If you haven't got commit signing
set up, use https://git-scm.com/book/tr/v2/Git-Tools-Signing-Your-Work as a
guide. You can generate keys with the GPG suite from here: https://gpgtools.org.
Run `rake changelog:header` to put a header with the new version in every
CHANGELOG. Don't commit this, the release task handles it.
Run `rake release`. This will populate the gemspecs and NPM package.json with
the current RAILS_VERSION, commit the changes, tag it, and push the gems to
rubygems.org.
Here are the commands that `rake release` uses so you can understand what to do
in case anything goes wrong:
```
$ rake all:build
$ git commit -am'updating RAILS_VERSION'
$ git tag -m 'v3.0.10.rc1 release' v3.0.10.rc1
$ git push
$ git push --tags
$ for i in $(ls pkg); do gem push $i; npm publish; done
```
### Send Rails release announcements
Write a release announcement that includes the version, changes, and links to
GitHub where people can find the specific commit list. Here are the mailing
GitHub where people can find the specific commit list. Here are the mailing
lists where you should announce:
* rubyonrails-core@googlegroups.com
* rubyonrails-talk@googlegroups.com
* ruby-talk@ruby-lang.org
Use Markdown format for your announcement. Remember to ask people to report
Use Markdown format for your announcement. Remember to ask people to report
issues with the release candidate to the rails-core mailing list.
NOTE: For patch releases there's a `rake announce` task to generate the release
post. It supports multiple patch releases too:
```
VERSIONS="5.0.5.rc1,5.1.3.rc1" rake announce
```
IMPORTANT: If any users experience regressions when using the release
candidate, you *must* postpone the release. Bugfix releases *should not*
candidate, you *must* postpone the release. Bugfix releases *should not*
break existing applications.
### Post the announcement to the Rails blog.
@ -165,12 +167,12 @@ Check the rails-core mailing list and the GitHub issue list for regressions in
the RC.
If any regressions are found, fix the regressions and repeat the release
candidate process. We will not release the final until 72 hours after the
last release candidate has been pushed. This means that if users find
candidate process. We will not release the final until 72 hours after the
last release candidate has been pushed. This means that if users find
regressions, the scheduled release date must be postponed.
When you fix the regressions, do not create a new branch. Fix them on the
stable branch, then cherry pick the commit to your release branch. No other
When you fix the regressions, do not create a new branch. Fix them on the
stable branch, then cherry pick the commit to your release branch. No other
commits should be added to the release branch besides regression fixing commits.
## Day of release
@ -203,7 +205,7 @@ Email the security reports to:
* oss-security@lists.openwall.com
Be sure to note the security fixes in your announcement along with CVE numbers
and links to each patch. Some people may not be able to upgrade right away,
and links to each patch. Some people may not be able to upgrade right away,
so we need to give them the security fixes in patch form.
* Blog announcements

View File

@ -7,6 +7,9 @@ require "railties/lib/rails/api/task"
desc "Build gem files for all projects"
task build: "all:build"
desc "Build, install and verify the gem files in a generated Rails app."
task verify: "all:verify"
desc "Prepare the release"
task prep_release: "all:prep_release"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "rake/testtask"
require "pathname"
require "open3"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
version = File.read(File.expand_path("../RAILS_VERSION", __dir__)).strip
Gem::Specification.new do |s|

View File

@ -1,4 +1,5 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
COMPONENT_ROOT = File.expand_path("..", __dir__)
require_relative "../../tools/test"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
#--
# Copyright (c) 2015-2017 Basecamp, LLC
#

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionCable
module Channel
extend ActiveSupport::Autoload

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "set"
module ActionCable
@ -205,7 +207,9 @@ module ActionCable
# Transmit a hash of data to the subscriber. The hash will automatically be wrapped in a JSON envelope with
# the proper channel identifier marked as the recipient.
def transmit(data, via: nil) # :doc:
logger.debug "#{self.class.name} transmitting #{data.inspect.truncate(300)}".tap { |m| m << " (via #{via})" if via }
status = "#{self.class.name} transmitting #{data.inspect.truncate(300)}"
status += " (via #{via})" if via
logger.debug(status)
payload = { channel_class: self.class.name, data: data, via: via }
ActiveSupport::Notifications.instrument("transmit.action_cable", payload) do
@ -266,7 +270,7 @@ module ActionCable
end
def action_signature(action, data)
"#{self.class.name}##{action}".tap do |signature|
"#{self.class.name}##{action}".dup.tap do |signature|
if (arguments = data.except("action")).any?
signature << "(#{arguments.inspect})"
end

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "active_support/core_ext/object/to_param"
module ActionCable

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "active_support/callbacks"
module ActionCable

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionCable
module Channel
module Naming

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionCable
module Channel
module PeriodicTimers

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionCable
module Channel
# Streams allow channels to route broadcastings to the subscriber. A broadcasting is, as discussed elsewhere, a pubsub queue where any data

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionCable
module Connection
extend ActiveSupport::Autoload

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionCable
module Connection
module Authorization

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "action_dispatch"
module ActionCable

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "websocket/driver"
module ActionCable

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "set"
module ActionCable

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionCable
module Connection
# Makes it possible for the RemoteConnection to disconnect a specific connection.

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionCable
module Connection
# Allows us to buffer messages received from the WebSocket before the Connection has been fully initialized, and is ready to receive them.

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "thread"
module ActionCable

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "nio"
require "thread"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "active_support/core_ext/hash/indifferent_access"
module ActionCable

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionCable
module Connection
# Allows the use of per-connection tags against the server logger. This wouldn't work using the traditional

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "websocket/driver"
module ActionCable

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "rails"
require "action_cable"
require_relative "helpers/action_cable_helper"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionCable
# Returns the version of the currently loaded Action Cable as a <tt>Gem::Version</tt>.
def self.gem_version

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionCable
module Helpers
module ActionCableHelper

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionCable
# If you need to disconnect a given connection, you can go through the
# RemoteConnections. You can find the connections you're looking for by

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionCable
module Server
extend ActiveSupport::Autoload

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "monitor"
module ActionCable

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionCable
module Server
# Broadcasting is how other parts of your application can send messages to a channel's subscribers. As explained in Channel, most of the time, these

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionCable
module Server
# An instance of this configuration object is available via ActionCable.server.config, which allows you to tweak Action Cable configuration

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionCable
module Server
# Collection class for all the connections that have been established on this specific server. Remember, usually you'll run many Action Cable servers, so

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "active_support/callbacks"
require "active_support/core_ext/module/attribute_accessors_per_thread"
require "concurrent"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionCable
module Server
class Worker

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionCable
module SubscriptionAdapter
extend ActiveSupport::Autoload

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require_relative "inline"
module ActionCable

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionCable
module SubscriptionAdapter
class Base

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionCable
module SubscriptionAdapter
module ChannelPrefix # :nodoc:

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "thread"
gem "em-hiredis", "~> 0.3.0"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionCable
module SubscriptionAdapter
class Inline < Base # :nodoc:

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
gem "pg", "~> 0.18"
require "pg"
require "thread"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "thread"
gem "redis", "~> 3.0"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionCable
module SubscriptionAdapter
class SubscriberMap

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require_relative "gem_version"
module ActionCable

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Rails
module Generators
class ChannelGenerator < NamedBase

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
require "stubs/test_connection"
require "stubs/room"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
require "stubs/test_connection"
require "stubs/room"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
class ActionCable::Channel::NamingTest < ActiveSupport::TestCase

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
require "stubs/test_connection"
require "stubs/room"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
require "stubs/test_connection"
require "stubs/room"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
require "stubs/test_connection"
require "stubs/room"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
require "concurrent"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
require "stubs/test_server"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
require "stubs/test_server"
require "active_support/core_ext/object/json"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
require "stubs/test_server"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
require "stubs/test_server"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
require "stubs/test_server"
require "stubs/user"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
require "stubs/test_server"
require "stubs/user"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
require "stubs/test_server"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
require "stubs/test_server"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
class ActionCable::Connection::SubscriptionsTest < ActionCable::TestCase

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
require "stubs/test_server"
require "active_support/core_ext/hash/indifferent_access"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
require "stubs/test_server"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class GlobalID
attr_reader :uri
delegate :to_param, :to_s, to: :uri

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Room
attr_reader :id, :name

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class SuccessAdapter < ActionCable::SubscriptionAdapter::Base
def broadcast(channel, payload)
end

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "stubs/user"
class TestConnection

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "ostruct"
class TestServer

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class User
attr_reader :name

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
require_relative "common"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
require "stubs/test_server"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
class ActionCable::Server::WithIndependentConfig < ActionCable::Server::Base

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
require "concurrent"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
require_relative "common"
require_relative "channel_prefix"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
require_relative "common"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
require_relative "common"
@ -12,7 +14,7 @@ class PostgresqlAdapterTest < ActionCable::TestCase
if Dir.exist?(ar_tests)
require File.join(ar_tests, "config")
require File.join(ar_tests, "support/config")
local_config = ARTest.config["arunit"]
local_config = ARTest.config["connections"]["postgresql"]["arunit"]
database_config.update local_config if local_config
end

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
require_relative "common"
require_relative "channel_prefix"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
class SubscriberMapTest < ActionCable::TestCase

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "action_cable"
require "active_support/testing/autorun"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "test_helper"
class WorkerTest < ActiveSupport::TestCase

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "rake/testtask"
desc "Default Task"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
version = File.read(File.expand_path("../RAILS_VERSION", __dir__)).strip
Gem::Specification.new do |s|

View File

@ -1,4 +1,5 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
COMPONENT_ROOT = File.expand_path("..", __dir__)
require_relative "../../tools/test"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
#--
# Copyright (c) 2004-2017 David Heinemeier Hansson
#

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "mail"
require_relative "collector"
require "active_support/core_ext/string/inflections"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "abstract_controller/collector"
require "active_support/core_ext/hash/reverse_merge"
require "active_support/core_ext/array/extract_options"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "active_job"
module ActionMailer

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "tmpdir"
module ActionMailer

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionMailer
# Returns the version of the currently loaded Action Mailer as a <tt>Gem::Version</tt>.
def self.gem_version

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "base64"
module ActionMailer

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "active_support/log_subscriber"
module ActionMailer

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionMailer
# Provides helper methods for ActionMailer::Base that can be used for easily
# formatting messages, accessing mailer or message instances, and the

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "delegate"
module ActionMailer

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActionMailer
# Provides the option to parameterize mailers in order to share instance variable
# setup, processing, and common headers.

Some files were not shown because too many files have changed in this diff Show More