| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \ \
| | | | |
| | | | | |
rails server: Allow to explicitly specify whether to output Rails's log to stdout
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Before Rails' logger output is mirrored to std out if:
* environment is development and
* the process is not daemonized
It was not possible to change that behaviour, e.g. to disable log output
in that case or enable it in other cases.
Now you can explicitly disable or enable output with the new command
line switch `--log-to-stdout`, regardless of any other circumstances.
```
// enable output in production
rails server -e production --log-to-stdout
// disable output in development
rails server -e development --no-log-to-stdout
```
Enabling output when daemonized still makes no sense (since tty is
detached), but this is ignored for now.
If the command line flag is not specified, old behaviour still
applies, so this change is completely backward compatible.
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We prefer double quotes over single quotes.
Fixes:
```
railties/lib/rails/commands/server/server_command.rb:279:39:
C: Style/StringLiterals: Prefer double-quoted strings unless you need
single quotes to avoi d extra backslashes for escaping.
original_options.concat [ '-u', using ]
```
Related to 161ed37d7120e1f391eed19e49a3390e53e4fe91
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Our restart_command would pass in `--restart` which means
that if the @original_options already contains --restart
it would keep getting another --restart appended.
Nothing here that would break the bank, but just a nicety.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
If booting a server via `rails s -u puma`, we'd convert the
option to a `using` positional.
When using `rails restart` our `restart_command` would the
option converted to the using positional and put that in
the restart command.
Thus we'd show users deprecation warnings for our own code.
Fix that by converting a passed positional to an option instead.
Also: fix initialize method signature. The local_options are an
array, not a hash. But don't even bother assigning defaults as
Thor passes them in.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Ref:
https://github.com/rails/rails/commit/654704247eba742e139cfaa8d1385f13605d9e12
Before the commit we had a restart_command in Rails::Server. But after
there's another one in Rails::ServerCommand. The command version of the
method is the right one as it's used in server_options.
Give the leftover method the boot.
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Mixing strings and symbols seems aesthetically less than ideal.
We can also use underscores just fine. Thor converts them to dashes
for the CLI and it makes access in Ruby code nicer.
Here's the `server --help` output after this change:
```
Usage:
rails server [thin/puma/webrick] [options]
Options:
-p, [--port=port] # Runs Rails on the specified port - defaults to 3000.
-b, [--binding=IP] # Binds Rails to the specified IP - defaults to 'localhost' in development and '0.0.0.0' in other environments'.
-c, [--config=file] # Uses a custom rackup configuration.
# Default: config.ru
-d, [--daemon], [--no-daemon] # Runs server as a Daemon.
-e, [--environment=name] # Specifies the environment to run this server under (development/test/production).
-u, [--using=name] # Specifies the Rack server used to run the application (thin/puma/webrick).
-P, [--pid=PID] # Specifies the PID file.
# Default: tmp/pids/server.pid
-C, [--dev-caching], [--no-dev-caching] # Specifies whether to perform caching in development.
[--early-hints], [--no-early-hints] # Enables HTTP/2 early hints.
```
See? Quite dashing ✨
|
|\ \ \
| | | |
| | | | |
Use testing lazy-load hooks
|
| | | |
| | | |
| | | |
| | | | |
- In order to avoid loading classes prematurely, let's use lazy load hooks that are now provided with each test case
|
|\ \ \ \
| |/ / /
|/| | | |
Adds `Rails::Command::NotesCommand` and makes `rake notes` use it under the hood
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* Invokes the notes Rails::Command and passes the rake task ENV variables as annotations options to it
* Adds a deprecation warning for unsupported commands
* Gets rid of reference to ENV["SOURCE_ANNOTATION_DIRECTORIES"] in SourceAnnotationExtractor since its now dealt with in the NotesCommand
* Gets rid of rake desc for each rake notes task so they are not documented while using `rails -T` or `rails --help`
|
| | | |
| | | |
| | | |
| | | |
| | | | |
* Require the application and environnement in the notes command in order to load the config files
* Adds tests for both register_directories and register_extensions added to a config file
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* It is called with `rails notes`
* It defaults to displaying [OPTIMIZE, FIXME and TODO] annotations
* It accepts custom annotations by using `rails notes -a CUSTOM_ANNOTATION OTHER_ANNOTATION`
* It defaults to look for annotations in [app config db lib test] as dictated by SourceAnnotationExtractor
* It supports ENV["SOURCE_ANNOTATION_DIRECTORIES"] but adds a deprecation warning and recommends using register_directories instead
|
| |/ /
| | |
| | |
| | |
| | |
| | | |
* Get rid of references to rake notes in the documentation
* Get rid of references to environement variables used in SourceAnnotationExtractor
* Updates the command line guide to reflect the new rails notes API
|
| | |
| | |
| | |
| | |
| | | |
This TODO comment has been here more than 7 years and doesn't seem to be
a temporary implementation anymore.
|
|\ \ \
| | | |
| | | | |
Fix route eager loading
|
| | | | |
|
| |\ \ \ |
|
| | |/ /
| |/| | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
yhirano55/fix-app-update-when-hyphenated-name-is-given
Fix app:update when hyphenated name is given
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* Fixed app_name's difference between `rails new` and `app:update`
* Changed be prefer to const name than directory name.
* Kept original app name which use exception message.
|
|\ \ \ \ \
| |_|_|_|/
|/| | | |
| | | | |
| | | | | |
bogdanvlviv/change-rails_welcome-image-on-localhost3000
Changes Rails Welcome image on localhost:3000
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Note that I used https://www.base64-image.de/ in order to
convert the image to Base64 with enabled optimization status.
Closes #33181.
Closes #33186.
Follow up #32735.
|
|/ / / /
| | | |
| | | |
| | | | |
[Jon Moss & Xavier Noria]
|
|\ \ \ \
| | | | |
| | | | | |
Fix Ruby version in `.ruby-version`
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Since #30016 Rails generates `.ruby-version` file
in order to help Ruby version manager tools like `rbenv`, `rvm`
determine which Ruby version should be used for the current Rails
project.
Since #32649 Rails sets Ruby version to the file compatible with MRI/JRuby
by default.
Pull Request #31496 reports that `.ruby-version` doesn't match ruby version other
than stable version and recommends to use `ENV["RBENV_VERSION"]`, and
`ENV["rvm_ruby_string"]` in order to set correct Ruby version to the file
that `rbenv` or `rvm` can understand.
Also, there is another similar issue that reports the same case if use
JRuby https://github.com/jruby/jruby/issues/5144.
Closes #31496, https://github.com/jruby/jruby/issues/5144.
|
|/ / /
| | |
| | |
| | | |
`optparse` is unused since #26977.
|
| |/
|/|
| |
| |
| | |
Since #32289, `Spellchecker.suggest` returns only one value, multiple
suggestions not output.
|
|\ \
| | |
| | |
| | | |
Minimize Spring.watch calls
|
| | | |
|
|\ \ \
| | | |
| | | | |
Respect NODE_ENV when running `rails yarn:install`
|
| | |/
| |/|
| | |
| | |
| | |
| | | |
`yarn install --prod` removes dev deps,
so it's impossible to run `assets:precompile` with dev npm dependencies.
This change makes rake task pass NODE_ENV to yarn when explicitly set.
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Don't generate `config/spring.rb` in `app:update` task when spring isn't loaded
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | | |
In #32780, We have supported the `--skip-sprockets` option in the `app:update` task.
When `options[:api]` is truthy, `option[:skip_sprockets]` is also truthy. So we can remove this `remove_file` method.
https://github.com/rails/rails/blob/42b9e7e50c084e119a679cf155b70b5efc4d36ff/railties/lib/rails/generators/rails/app/app_generator.rb#L281-L283
|
| | | |
|
|\ \ \
| | | |
| | | | |
Don't generate assets' initializer in `app:update` task if sprockets is skipped
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Execute `rails new myapp -S` and then upgrade the app by using the `app:update` task, `bin/rails c` results in `NoMethodError`.
```
$ bin/rails app:update
$ bin/rails c
Traceback (most recent call last):
44: from bin/rails:4:in `<main>'
(snip)
1: from /Users/tanimichi.tsukuru/ghq/github.com/moneyforward/moneyplus/config/initializers/assets.rb:4:in `<top (required)>'
/Users/tanimichi.tsukuru/ghq/github.com/moneyforward/moneyplus/vendor/bundle/ruby/2.5.0/gems/railties-5.2.0/lib/rails/railtie/configuration.rb:97:in `method_missing': undefined method `assets' for #<Rails::Application::Configuration:0x00007fcb8d3697e0> (NoMethodError)
Did you mean? asset_host
```
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
`DidYouMean::SpellChecker` is not defined.
`did_you_mean` is bundled in Ruby but can be uninstalled, and is not always
available, sometimes even on our CI:
https://travis-ci.org/rails/rails/jobs/372638523#L2405
https://travis-ci.org/rails/rails/jobs/372638523#L2416
https://travis-ci.org/rails/rails/jobs/372638523#L2427
...
|
|\ \ \
| |/ /
|/| | |
Use ImageProcessing gem for ActiveStorage variants
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
ImageProcessing gem is a wrapper around MiniMagick and ruby-vips, and
implements an interface for common image resizing and processing. This
is the canonical image processing gem recommended in [Shrine], and
that's where it developed from. The initial implementation was extracted
from Refile, which also implements on-the-fly transformations.
Some features that ImageProcessing gem adds on top of MiniMagick:
* resizing macros
- #resize_to_limit
- #resize_to_fit
- #resize_to_fill
- #resize_and_pad
* automatic orientation
* automatic thumbnail sharpening
* avoids the complex and inefficient MiniMagick::Image class
* will use "magick" instead of "convert" on ImageMagick 7
However, the biggest feature of the ImageProcessing gem is that it has
an alternative implementation that uses libvips. Libvips is an
alternative to ImageMagick that can process images very rapidly (we've
seen up 10x faster than ImageMagick).
What's great is that the ImageProcessing gem provides the same interface
for both implementations. The macros are named the same, and the libvips
implementation does auto orientation and thumbnail sharpening as well;
only the operations/options specific to ImageMagick/libvips differ. The
integration provided by this PR should work for both implementations.
The plan is to introduce the ImageProcessing backend in Rails 6.0 as the
default backend and deprecate the MiniMagick backend, then in Rails 6.1
remove the MiniMagick backend.
|
|\ \ \
| | | |
| | | | |
Gracefully handle extra "controller" when generating controller
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
In the previous code incorrectly removes intermediate words.
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
After renaming and deprecation of SourceAnnotationExtractor
documentation has been updated to reflect the new name Rails::SourceAnnotationExtractor
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The previous documentation version listed only the default
registered extensions. This was misleading because if more extensions
get registered with
<tt>SourceAnnotationExtractor::Annotation.register_extensions</tt>,
they would be also taken into account. By saying that we consider
all registered extensions we document what happens in reality.
|