| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Taken from @Sonopa's commits on PR #19091.
Add support for dev caching via "rails s" flags.
Implement suggestions from @kaspth.
Remove temporary cache file if server does not have flags.
Break at 80 characters in railties/CHANGELOG.md
Remove ability to disable cache based on server options.
Add more comprehensive options: --dev-caching / --no-dev-caching
|
| |
|
|
|
|
| |
constant loading should be thread safe now, so lets remove this
|
|
|
|
| |
Fixes #20345.
|
|
|
|
|
| |
ContentLength is not part of the rack SPEC since rack/rack@86ddc7a6ec68d7b6951c2dbd07947c4254e8bc0d
If you want it, just add it as a middleware in your config.
|
|
|
|
|
|
|
|
|
|
|
| |
This also adds free mix and matching of directories, files and lines filters.
Like so:
bin/rails test models/post_test.rb test/integration models/person_test.rb:26
You can also mix in a traditional Minitest filter:
bin/rails test test/integration -n /check_it_out/
|
|
|
|
| |
fix minor convention problems
|
|
|
|
|
|
| |
Support for versions of SQLite less than 3 was removed in #6011 as part
of the Rails 4.0 release. Therefore there is no need to have support for
it in the `rails dbconsole` command anymore.
|
|
|
|
|
|
| |
We only want to support adapters that we officially support through the
entire framework so it is better to not ask patches for adapters that
we may not support
|
| |
|
|
|
|
|
|
|
| |
Preserving RACK_ENV behavior.
This reverts commit 7bdc7635b885e473f6a577264fd8efad1c02174f, reversing
changes made to 45786be516e13d55a1fca9a4abaddd5781209103.
|
|\
| |
| | |
Don't fallback to RACK_ENV when RAILS_ENV is not present
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
| |
With refactors to Rails::Sever from v3 to v4, this method is no longer used and is untested.
Previous usage: https://github.com/rails/rails/blob/3-2-stable/railties/lib/rails/commands/server.rb#L79
Currently set from: https://github.com/rails/rails/blob/7b75551a1a4539876f878f37a2439cd02f89d961/railties/lib/rails/application/configuration.rb#L69
|
|
|
|
| |
ref: https://github.com/rails/rails/pull/18763#issuecomment-72349769
|
|\
| |
| | |
Use EXEEXT
|
| |
| |
| |
| |
| |
| |
| |
| | |
Use the configured variable EXEEXT, instead of hardcoded suffix and
platform names.
And on such platforms, files which do not end with the suffix are not
executable, so the original names are not necessary, in general.
|
|/ |
|
|
|
|
|
| |
bebugger doesn't work with Ruby 2.2 so we don't need to support it
anymore
|
|
|
|
|
|
|
|
|
|
| |
Commit 1aea470 introduced this directory but this was at a time when the
default way to store sessions was on the file system under the tmp
directory.
Let's remove references to it from the documentation as well.
[Robin Dupret & yui-knk]
|
| |
|
| |
|
|\
| |
| |
| | |
be more general with adapter name
|
| | |
|
|/ |
|
|
|
|
| |
active_support/notifications [ci skip]
|
|\
| |
| | |
remove unneeded file from Railties.
|
| | |
|
|/ |
|
|
|
|
| |
Fixes #16578
|
| |
|
|
|
| |
Per feedback in https://github.com/rails/rails/commit/af63e4a2546629c3fb2d53cffb7d4ea0e8663f68#commitcomment-7477636
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this change it will be possible to add additional options to the `option_parser` like this:
require 'rails/commands/server'
module Rails
class Server < ::Rack::Server
class Options
def option_parser_with_open(options)
parser = option_parser_without_open options
parser.on('-o', '--open', 'Open in default browser') { options[:open] = true }
parser
end
alias_method_chain :option_parser, :open
end
def start_with_open
start_without_open do
`open http://localhost:3000` if options[:open]
end
end
alias_method_chain :start, :open
end
end
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently Active Record can be configured via the environment variable `DATABASE_URL` or by manually injecting a hash of values which is what Rails does, reading in `database.yml` and setting Active Record appropriately. Active Record expects to be able to use `DATABASE_URL` without the use of Rails, and we cannot rip out this functionality without deprecating. This presents a problem though when both config is set, and a `DATABASE_URL` is present. Currently the `DATABASE_URL` should "win" and none of the values in `database.yml` are used. This is somewhat unexpected to me if I were to set values such as `pool` in the `production:` group of `database.yml` they are ignored.
There are many ways that active record initiates a connection today:
- Stand Alone (without rails)
- `rake db:<tasks>`
- ActiveRecord.establish_connection
- With Rails
- `rake db:<tasks>`
- `rails <server> | <console>`
- `rails dbconsole`
We should make all of these behave exactly the same way. The best way to do this is to put all of this logic in one place so it is guaranteed to be used.
Here is my prosed matrix of how this behavior should work:
```
No database.yml
No DATABASE_URL
=> Error
```
```
database.yml present
No DATABASE_URL
=> Use database.yml configuration
```
```
No database.yml
DATABASE_URL present
=> use DATABASE_URL configuration
```
```
database.yml present
DATABASE_URL present
=> Merged into `url` sub key. If both specify `url` sub key, the `database.yml` `url`
sub key "wins". If other paramaters `adapter` or `database` are specified in YAML,
they are discarded as the `url` sub key "wins".
```
### Implementation
Current implementation uses `ActiveRecord::Base.configurations` to resolve and merge all connection information before returning. This is achieved through a utility class: `ActiveRecord::ConnectionHandling::MergeAndResolveDefaultUrlConfig`.
To understand the exact behavior of this class, it is best to review the behavior in activerecord/test/cases/connection_adapters/connection_handler_test.rb though it should match the above proposal.
|
| |
|
| |
|