aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/app_generator_test.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* Enable Action Cable routes by defaultJon Moss2016-02-241-3/+0
| | | | This also marks Action Cable routes as internal to Rails.
* Switch to `data-turbolinks-track="reload"`Sam Stephenson2016-02-231-2/+2
|
* adds --skip-listen to the application generator [closes #23590]Xavier Noria2016-02-171-6/+27
|
* include spring-watcher-listen in the Gemfile of new applicationsXavier Noria2016-02-101-0/+1
|
* enables the evented monitor in new applicationsXavier Noria2016-02-101-0/+22
|
* - app generate option --skip-sprockets leaves jquery-rails gem, which relies ↵Vipul A M2016-02-041-1/+2
| | | | | | | | on sprockets environment - Remove jquery-rails if --skip-sprockets is true Fixes #23431
* Update assertion on redis in generated GemfilePrem Sichanugrist2016-02-041-1/+1
| | | | | | | | Redis now included in Gemfile but commented out. This change was made in 91864439c7aebb6ca710831aac6781903a433904 and is causing the test failure. See https://travis-ci.org/rails/rails/jobs/106994913#L1025
* move `test_generator_if_skip_action_cable_is_given_for_an_api_app` to the ↵yuuji.yaginuma2016-02-021-11/+0
| | | | | | appropriate file Test of Rails API should be in `api_app_generator_test.rb`.
* Merge pull request #23057 from schneems/schneems/default-puma-configRichard Schneeman2016-02-011-0/+9
|\ | | | | Add Default Puma Config
| * Add Default Puma Configschneems2016-01-291-0/+9
| | | | | | | | | | | | | | | | | | | | | | When the `puma` command is run without any configuration options it will detect presence of a `config/puma.rb` file and use that. Currently there is discrepancy between `puma` command and `rails server` but Evan said it would be reasonable to add in reading in config from the default location. I am working on that right now as a feature in puma/puma. Why do we need this? By default Puma uses 16 threads, and by default ActiveRecord only has 5 threads. Due to the architecture of AR it is guaranteed that if you're running with fewer DB connections than your server has threads you will hit `ActiveRecord::ConnectionTimeoutError ` eventually if your app gets modest amounts of traffic. Since we are providing a default webserver, we should provide reasonable configuration for that webserver. This PR does a few things, first it sets the default Puma thread count to 5 to mach ActiveRecord's default. It sets the default environment to `"development"` and the default port to 300 so that booting the server with `$ puma` will give you the same default port as `rails server`. It is worth mentioning that by reading in from `PORT` environment variable this config can work with containerized deployments, such as on Heroku. We are not using worker processes by default, that way JRuby and windows devs can use this configuration without modification. I went ahead and included a default `on_worker_boot`. It won't be used unless a worker count is specified, that means this config will not use it. Even though it's not being used now It will make someone who wants to try modifying their config to run extra workers easier. cc/ @pixeltrix
* | Switch the default redis adapter to a single-stream modelMatthew Draper2016-02-011-3/+0
| | | | | | | | | | | | This new adapter does get a little more intimate with the redis-rb gem's implementation than I would like, but it's the least bad of the approaches I've come up with.
* | Add an after_bundle callback in Rails plugin templatesRyan Manuel2016-01-281-2/+3
| |
* | prevent --skip-action-cable from erroring when --api option is usedDave Riddle2016-01-221-0/+12
|/
* Merge pull request #23174 from JuanitoFatas/followup-skip-action-cableKasper Timm Hansen2016-01-221-0/+3
|\ | | | | Remove action_cable_meta_tag when skip Action Cable
| * Remove action_cable_meta_tag when skip action_cableJuanitoFatas2016-01-221-0/+3
| |
* | Add `config/cable.yml` to list of default files in Rails generatorJon Moss2016-01-211-0/+1
|/
* Add em-hiredis and redis as default Gems for new applicationsJon Moss2016-01-181-0/+10
|
* Adapterize ActionCable storage and extract behaviorJon Moss2016-01-181-1/+1
|
* Add sass-rails back to the default GemfileRafael Mendonça França2015-12-301-0/+7
| | | | It was removed by mistake at 877a411d0c16baa4e670dae9a28f5cfcc201adc1
* remove cors initializer from rails appyuuji.yaginuma2015-12-221-0/+6
| | | | | `rack-cors` gem is defined in Gemfile by default only if the api, not defined by default in rails app.
* Ensure Action Cable files are removed when `skip_action_cable` is set.Jey Balachandran2015-12-211-0/+3
| | | | | | | | | | | | The Action Cable generators creates four files which need to be removed if `skip_action_cable` is set. 1. `app/assets/javascripts/cable.coffee` 2. `app/channels/application_cable/channel.rb` 3. `app/channels/application_cable/connection.rb` 4. `config/redis/cable.yml` Fixes #22669.
* ApplicationMailer should be generated by default just like every other ↵David Heinemeier Hansson2015-12-171-1/+0
| | | | Application* parent
* No longer uses keep now that we have ApplicationRecordDavid Heinemeier Hansson2015-12-161-1/+0
|
* Merge branch 'master' into merge-action-cableRafael Mendonça França2015-12-161-0/+1
|\
| * Introduce ApplicationRecord, an Active Record layer supertypeGenadi Samokovarov2015-12-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's pretty common for folks to monkey patch `ActiveRecord::Base` to work around an issue or introduce extra functionality. Instead of shoving even more stuff in `ActiveRecord::Base`, `ApplicationRecord` can hold all those custom work the apps may need. Now, we don't wanna encourage all of the application models to inherit from `ActiveRecord::Base`, but we can encourage all the models that do, to inherit from `ApplicationRecord`. Newly generated applications have `app/models/application_record.rb` present by default. The model generators are smart enough to recognize that newly generated models have to inherit from `ApplicationRecord`, but only if it's present.
* | Add option to skip Action CableRafael Mendonça França2015-12-141-0/+5
|/
* Update web-console to 3.0.0Genadi Samokovarov2015-12-131-2/+2
| | | | | Web Console 3.0.0 is compatible with Rails 5, while the 2.x.x releases aren't.
* Add version constraint to database gem in generated applicationRafael Mendonça França2015-10-291-4/+8
| | | | | | We are using the same version constraint in the database adapters so when a new version of the adapter that doesn't work with the version of rails is released we don't break new applications.
* Removed Mocha from app generators testsRonak Jangir2015-09-231-87/+106
|
* Merge pull request #20605 from dcrec1/assert_fileYves Senn2015-06-191-1/+1
|\ | | | | | | assert_file understands paths with special characters
| * assert_file understands paths with special charactersDiego Carrion2015-06-181-1/+1
| | | | | | fixes #20042
* | fix railties testsMehmet Emin İNAÇ2015-06-181-2/+2
|/
* Generate a `.keep` file in `tmp` folderYoong Kang Lim2015-05-301-0/+27
| | | | | | | | | | | | | A lot of scripts assumes the existence of this folder and most would fail if it is absent. One example of this is `rake restart` (before the previous commit) – it tries to `touch tmp/restart.txt`, which would fail if `tmp` does not exist, which was the case for a freshly-cloned project as `tmp` is `.gitignored` by default. See #20299. [Yoong Kang Lim, Sunny Juneja]
* Implicitly skip spring for `rails new --dev`Godfrey Chan2015-04-201-0/+8
| | | | | | Spring seems like an obvious foot gun for the `--dev` setup, presumably you are about to make lots of changes to the codebase, so it should always reload the framework.
* Merge pull request #19034 from jvanbaarsen/explicit-job-base-classMatthew Draper2015-03-301-0/+6
|\ | | | | | | Add explicit base class for ActiveJob jobs
| * Add explicit base class for ActiveJob jobsJeroen van Baarsen2015-03-231-0/+6
| | | | | | | | | | | | | | | | * Jobs generated now inherent from ApplicationJob * ApplicationJob inherents from ActiveJob::Base * Added entry to changelog Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
* | method_source needs to be a hard dependency on railtiesArthur Neves2015-03-191-7/+0
|/
* Require `belongs_to` by default.Josef Šimánek2015-02-211-0/+33
| | | | Deprecate `required` option in favor of `optional` for belongs_to.
* README.rdoc -> README.md for newly generated applicationsXavier Noria2015-02-061-1/+1
| | | | | | README.rdoc was generated to support the doc:app task. Now that this task is gone we can switch to Markdown, which is nowadays a better default.
* Remove documentation tasksXavier Noria2015-02-061-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the tasks doc:app, doc:rails, and doc:guides. In our experience applications do not generate APIs using doc:app. Methods may be certainly documented for maintainers, annotated with YARD tags, etc. but that is intended to be read with the source code, not in a separate website. Then, teams also have typically selected topics written down in Markdown files, or in a GitHub wiki... that kind of thing. If a team absolutely needs to generate application documentation for internal purposes, they can still easily write their own task. Regarding doc:rails and doc:guides, we live in 2015. We are used to go to online docs all the time. If you really want access to the API offline RubyGems generates it for every Rails component unless you tell it not to, and you can checkout the Rails source code to read the guides as Markdown, or download them for a Kindle reader. All in all, maintaining this code does not seem to be worthwhile anymore. As a consequence of this, guides (+3 MB uncompressed) won't be distributed with the rails gem anymore. Of course, guides and API are going to be still part of releases, since documentation is maintained alongside code and tests. Also, time permitting, this will allow us to experiment with novel ways to generate documentation in the Rails docs server, since right now we were constrained by being able to generate them in the user's environment.
* Merge pull request #18705 from mrgilman/skip-testRafael Mendonça França2015-01-291-4/+4
|\ | | | | Update option to skip test in generators
| * Update option to skip test in generatorsMelanie Gilman2015-01-271-4/+4
| | | | | | | | Rails no longer generates Test::Unit files by default.
* | introduce `ActiveSupport::Testing::FileFixtures`.Yves Senn2015-01-281-0/+1
|/ | | | | | It's a thin layer to provide easy access to sample files throughout test-cases. This adds the directory `test/fixtures/files` to newly generated applications.
* Add the `method_source` gem to the default GemfileSean Griffin2015-01-131-0/+7
| | | | Fixes #18473
* Remove debugger supportRafael Mendonça França2015-01-041-3/+0
| | | | | bebugger doesn't work with Ruby 2.2 so we don't need to support it anymore
* Add config to halt callback chain on return falseclaudiob2015-01-021-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This stems from [a comment](rails#17227 (comment)) by @dhh. In summary: * New Rails 5.0 apps will not accept `return false` as a way to halt callback chains, and will not display a deprecation warning. * Existing apps ported to Rails 5.0 will still accept `return false` as a way to halt callback chains, albeit with a deprecation warning. For this purpose, this commit introduces a Rails configuration option: ```ruby config.active_support.halt_callback_chains_on_return_false ``` For new Rails 5.0 apps, this option will be set to `false` by a new initializer `config/initializers/callback_terminator.rb`: ```ruby Rails.application.config.active_support.halt_callback_chains_on_return_false = false ``` For existing apps ported to Rails 5.0, the initializers above will not exist. Even running `rake rails:update` will not create this initializer. Since the default value of `halt_callback_chains_on_return_false` is set to `true`, these apps will still accept `return true` as a way to halt callback chains, displaying a deprecation warning. Developers will be able to switch to the new behavior (and stop the warning) by manually adding the line above to their `config/application.rb`. A gist with the suggested release notes to add to Rails 5.0 after this commit is available at https://gist.github.com/claudiob/614c59409fb7d11f2931
* Add --skip-action-mailer (or -M) to rails generateclaudiob2015-01-011-0/+28
|
* Skip byebug on all non-MRI rubies, fix testsSean Griffin2014-12-221-1/+1
| | | | | | The changes in #18149 added tests for the app generator, but only fixed it for the plugin generator (I should have let CI finish though I think it would have failed as an allowed failure).
* Only add debugger/byebug if on MRIArthur Neves2014-12-221-1/+1
|
* Fix Duplicate web-console entries in GemfileNorimasaAndo2014-12-141-0/+18
|