| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use Webpacker by default on new apps
* Stop including coffee-rails by default
* Drop using a js_compressor by default
* Drop extra test for coffeescript inclusion by default
* Stick with skip_javascript to signify skipping webpack
* Don't install a JS runtime by default any more
* app/javascript will be the new default directory for JS
* Make it clear that this is just for configuring the default Webpack framework setup now
* Start using the Webpack tag in the default layout
* Irrelevant test
* jQuery is long gone
* Stop having asset pipeline compile default application.js
* Add rails-ujs by default to the Webpack setup
* Add Active Storage JavaScript to application.js pack by default
* Consistent quoting
* Add Turbolinks to default pack
* Add Action Cable to default pack
Need some work on how to set the global consumer that channels will
work with. @javan?
* Require all channels by default and use a separate consumer stub
* Channel generator now targets Webpack style
* Update task docs to match new generator style
* Use uniform import style
* Drop the JS assets generator
It was barely helpful as it was. It’s no longer helpful in a Webpacked
world. Sayonara!
* Add app/javascript to the stats directories
* Simpler import style
Which match the other imports.
* Address test failures from dropping JS compilation (and compression)
* webpacker-default: Modify `AssetsGeneratorTest`
Before:
```
$ bin/test test/generators/assets_generator_test.rb
Run options: --seed 46201
F
Failure:
AssetsGeneratorTest#test_assets [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/assets_generator_test.rb:12]:
Expected file "app/assets/javascripts/posts.js" to exist, but does not
bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/assets_generator_test.rb:10
.
Finished in 0.031343s, 63.8101 runs/s, 95.7152 assertions/s.
2 runs, 3 assertions, 1 failures, 0 errors, 0 skips
```
After:
```
$ bin/test test/generators/assets_generator_test.rb
Run options: --seed 43571
..
Finished in 0.030370s, 65.8545 runs/s, 65.8545 assertions/s.
2 runs, 2 assertions, 0 failures, 0 errors, 0 skips
```
* webpacker-default: Modify `ChannelGeneratorTest`
Before:
```
$ bin/test test/generators/channel_generator_test.rb
Run options: --seed 8986
.F
Failure:
ChannelGeneratorTest#test_channel_with_multiple_actions_is_created [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:43]:
Expected file "app/assets/javascripts/channels/chat.js" to exist, but does not
bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:34
.F
Failure:
ChannelGeneratorTest#test_channel_is_created [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:29]:
Expected file "app/assets/javascripts/channels/chat.js" to exist, but does not
bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:22
E
Error:
ChannelGeneratorTest#test_cable_js_is_created_if_not_present_already:
Errno::ENOENT: No such file or directory @ apply2files - /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/fixtures/tmp/app/assets/javascripts/cable.js
bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:60
F
Failure:
ChannelGeneratorTest#test_channel_suffix_is_not_duplicated [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:87]:
Expected file "app/assets/javascripts/channels/chat.js" to exist, but does not
bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:80
F
Failure:
ChannelGeneratorTest#test_channel_on_revoke [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:77]:
Expected file "app/assets/javascripts/cable.js" to exist, but does not
bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:68
Finished in 0.064384s, 108.7227 runs/s, 481.4861 assertions/s.
7 runs, 31 assertions, 4 failures, 1 errors, 0 skips
```
After:
```
$ bin/test test/generators/channel_generator_test.rb
Run options: --seed 44857
.......
Finished in 0.060243s, 116.1961 runs/s, 697.1764 assertions/s.
7 runs, 42 assertions, 0 failures, 0 errors, 0 skips
```
* Fix shared generator tests.
* webpacker-default: Modify `ControllerGeneratorTest`
The JS assets generator was dropped. ref. https://github.com/rails/rails/commit/46215b179483d3e4d264555f5a4952f43eb8142a
* Revert "Simpler import style". It's currently failing with an error of "TypeError: undefined is not an object (evaluating '__WEBPACK_IMPORTED_MODULE_2_activestorage___default.a.start')". Waiting for @javan to have a look.
This reverts commit 5d3ebb71059f635d3756cbda4ab9752027e09256.
* require webpacker in test app
* Add webpacker without making the build hang/timeout. (#33640)
* use yarn workspaces to allow for installing unreleased packages and only generate js/bootsnap when required
* no longer need to have webpacker in env templates as webpacker moved this config to yml file
* Fix rubocop violation
* Got the test passing for the running scaffold
* update expected lines of code
* update middleware tests to account for webpacker
* disable js in plugins be default to get the tests passing (#34009)
* clear codeclimate report issues
* Anything newer than currently released is good
* Use Webpacker development version during development of Rails
* Edge should get development webpacker as well
* Add changelog entry for Webpacker change
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Ruby 2.3 or later, `String#+@` is available and `+@` is faster than `dup`.
```ruby
# frozen_string_literal: true
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
gem "benchmark-ips"
end
Benchmark.ips do |x|
x.report('+@') { +"" }
x.report('dup') { "".dup }
x.compare!
end
```
```
$ ruby -v benchmark.rb
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
Warming up --------------------------------------
+@ 282.289k i/100ms
dup 187.638k i/100ms
Calculating -------------------------------------
+@ 6.775M (± 3.6%) i/s - 33.875M in 5.006253s
dup 3.320M (± 2.2%) i/s - 16.700M in 5.032125s
Comparison:
+@: 6775299.3 i/s
dup: 3320400.7 i/s - 2.04x slower
```
|
|
|
|
|
|
|
|
| |
`spec` is the same variable name as gemspec generated by bundler, and its
intention is easier to understand than a one-letter variable.
https://github.com/bundler/bundler/blob/00fd58eaa69015092ee272c4cb5aa92a5e7ee45c/lib/bundler/templates/newgem/newgem.gemspec.tt#L11
This is follow up on 1c59b4840c58097186022f68427c46e0046c5d0d. `spec` is already in use there.
|
|
|
|
|
|
| |
Add `//= require rails-ujs`
Closes #32094
|
|
|
|
|
| |
- Do not generate `javascript_include_tag` if `--skip-javascript`
- Generate `<%= csp_meta_tag %>`. Related to #32018.
|
|
|
|
| |
`--skip-active-storage`
|
|
|
|
|
|
|
|
|
| |
Since fbd1e98cf983572ca9884f17f933ffe92833632a, Rails plugin does not
run `bundle install` when generating.
Therefore, `after_bundle` callback is not actually executed after `bundle`.
Since there is a difference between the name and the actual behavior,
I think that should be remove.
|
|\
| |
| | |
Update plugin_generator.rb
|
| |
| |
| |
| |
| |
| |
| | |
Ensure plugin_generator adds to new line in Gemfile, even if the Gemfile
does not end with an empty line.
[Lisa Ugray, Nikita Penzin]
|
|\ \
| | |
| | |
| | |
| | | |
y-yagi/do_not_create_credential_in_dummy_application
Do not create credentials in dummy application
|
| | |
| | |
| | |
| | |
| | | |
Because dummy application is only for use test, so credentials is
unnecessary.
|
| | |
| | |
| | |
| | | |
These were added in #30101, after #31084 it became redundant.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
is used
Closes #30102
Revert part 787fe90dc0a7c5b91bb5af51f2858ea8c4676268
--skip-active-storage pass throughs `rails plugin new`
Add changelog entry about default initialization of Active Storage
|
| |
| |
| |
| | |
`SharedGeneratorTests`
|
| |
| |
| |
| |
| | |
Add SharedGeneratorTests#application_path
This method will help to DRY in files app_generator_test.rb, plugin_generator_test.rb
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | | |
yhirano55/skip_unused_components_when_running_rails_command_in_plugin
Skip unused components when running `bin/rails` in Rails plugin
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | | |
Add git_source to Gemfile for plugin generator
|
| |/ / |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Improve app generator tests.
Ensure that generation `config/application.rb` is correct.
Ensure that generation `config/application.rb` is correct.
|
|\ \ \
| | | |
| | | | |
Fix engine command
|
| |/ / |
|
|/ / |
|
| |
| |
| |
| | |
And deal with a temporary test fix until we allow you to skip active storage.
|
|/
|
|
| |
Since 553b695, `doc` directory is not created in application.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When generating models, we created ApplicationRecord in the default
location if no file existed there. That was annoying for people who
moved it to somewhere else in the autoload path. At this point, the
vast majority of apps should have either run the upgrade script or
generated a model since upgrading. For those that haven't the error
message after generating a new model should be helpful:
NameError: uninitialized constant ApplicationRecord
To ease friction in that case, this also adds a generator for
ApplicationRecord.
|
|
|
|
|
| |
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
".. with __dir__ we can restore order in the Universe." - by @fxn
Related to 5b8738c2df003a96f0e490c43559747618d10f5f
|
| |
|
|
|
|
|
|
| |
Occasionally we update the file generated by engine.
Therefore, I think that there is a task for updating as well as
application in the engine, it is convenient for updating.
|
|\
| |
| |
| |
| | |
y-yagi/make_adding_gemfile_entry_work_even_if_specify_only_the_plugin_name
Make adding gemfile entry work even if specify only the plugin name
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Whether the command was executed within the rails application is checked
by whether or not the application's path matches `app_path`.
https://github.com/rails/rails/blob/5-0-stable/railties/lib/rails/generators/rails/plugin/plugin_generator.rb#L439..L441
Therefore, if only plugin name is specified in `app_path`, addition to
Gemfile is not done.
However, in the rails guide an example of specifying only plugin name
is given, and it is considered that there are many cases where only
plugin name is specified.
For that reason, made it work even if only plugin name was specified.
|
|/ |
|
|
|
|
|
|
|
|
| |
Currently, all rails commands can be executed in engine,
but `server`, `console`, `dbconsole` and `runner` do not work.
This make all rails commands work in engine.
Related to #22588
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
`rails plugin new` with `--full` and `--skip-sprockets` options generates a dummy application that throws `NoMethodError`.
```
% rails plugin new my_engine -S --full --skip-gemspec
% cd my_engine
% bin/rails test
rails aborted!
NoMethodError: undefined method `assets' for #<Rails::Application::Configuration:0x007f83aa1e6100>
```
|
|
|
|
| |
Follow up to 92703a9ea5d8b96f30e0b706b801c9185ef14f0e
|
|
|
|
|
|
|
|
| |
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces
Fix all violations in the repository.
|
| |
|
|
|
|
|
| |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
|
|
|
|
|
| |
Since bundler 1.12.0, the gemspec is validated so the `bundle install`
command will fail just after the gem is created causing confusion to the
users. This change was a bug fix to correctly validate gemspecs.
|
|
|
|
|
|
|
|
|
| |
Currently, if `ApplicationMailer` does not exist, it is generated when
run the mailer generator, but layouts files does not generate.
However, because it uses the layouts in `ApplicationMailer`,
layouts are required.
Follow up to #24161
|
|
|
|
|
|
| |
ActiveJob jobs now inherit from ApplicationJob by default.
However, when updating to Rails 5 from the old Rails,
since there is a possibility that ApplicationJob does not exist.
|
|
|
|
| |
- Followup of https://github.com/rails/rails/pull/24161.
|