aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/app_generator_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #26157 from ↵Rafael França2016-08-161-0/+1
|\ | | | | | | | | y-yagi/remove_test_mailers_when_skipping_action-mailer remove "test/mailers" directory when skipping action-mailer
| * remove "test/mailers" directory when skipping action-maileryuuji.yaginuma2016-08-141-0/+1
| | | | | | | | Related to #26146
* | Add three new rubocop rulesRafael Mendonça França2016-08-161-1/+1
|/ | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* Ensure app/mailers is removed when skipping action-mailerBrian Cardarella2016-08-121-0/+1
| | | | Closes #26145
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-1/+1
|
* applies new string literal convention in railties/testXavier Noria2016-08-061-49/+49
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* A generated app should not include Uglifier with `--skip-javascript` option.Ben Pickles2016-07-261-0/+5
|
* Enforce minimal web-console version for Rails 5Genadi Samokovarov2016-07-211-2/+2
| | | | | | | | | | | | | | | I dropped the version constraint in web-console with the idea it will be easier to upgrade the console between Rails releases. However, issues like #25899 started popping up. I'm reintroducing the constraint, but this time, I don't set an upper limit to the major version. This will keep the web-console in a version that always works for the current Rails version and can be easily upgraded to the last one with `bundle update`. We may need to backport this for Rails 5.0.1. Fixes #25899.
* Setup default session store internally, no longer through an application ↵Prathamesh Sonpatki2016-07-171-10/+0
| | | | | | | | | | | | | initializer - By default the session store will be set to cookie store with application name as session key. - Older apps are not affected as they will have the session store initializer generated by Rails in older versions, and Rails will not overwrite the session store if it is already set or disabled. - But new apps will not have the initializer, instead the session store will be set to cookie store by default. - Based on comment by DHH here - https://github.com/rails/rails/issues/25181#issuecomment-222312764.
* Do not run `bundle install` when generating a new plugin.Rafael Mendonça França2016-07-011-26/+61
| | | | | | 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.
* Remove FORCE option as it was only needed for testsPrathamesh Sonpatki2016-06-071-1/+3
| | | | - Adjusted tests instead.
* Fix minor regression about old apps not getting per_form_csrf and ↵Prathamesh Sonpatki2016-06-041-17/+6
| | | | | | | | | | | | request_forgery_protection configs - Earlier per_form_csrf_tokens and request_forgery_protection config files were generated for old apps upgraded to Rails 5. - But when we collapsed all initializers into one file, the entire file does not get created for old apps. - This commit fixes it and also changes values for all new defaults for old apps so that they will not break. - Also added a test for `rails app:update`.
* Collapse all new default initializers into a single filePrathamesh Sonpatki2016-05-311-91/+10
| | | | | | - Adjusted tests also for this new behavior. - Based on the discussion in https://github.com/rails/rails/pull/25184#issuecomment-222454583.
* Move new default initializers into separate directoryPrathamesh Sonpatki2016-05-281-17/+17
| | | | | | - These initializers are new defaults for Rails 5 and newly generated apps do not need to change them. - Fixes #25181
* Add compatibility for Ruby 2.4 `to_time` changesAndrew White2016-04-231-0/+28
| | | | | | | | | | | | | | | In Ruby 2.4 the `to_time` method for both `DateTime` and `Time` will preserve the timezone of the receiver when converting to an instance of `Time`. Since Rails 5.0 will support Ruby 2.2, 2.3 and later we need to introduce a compatibility layer so that apps that upgrade do not break. New apps will have a config initializer file that defaults to match the new Ruby 2.4 behavior going forward. For information about the changes to Ruby see: https://bugs.ruby-lang.org/issues/12189 https://bugs.ruby-lang.org/issues/12271 Fixes #24617.
* Use new hash syntax (#24464)Jeroen Visser2016-04-081-2/+2
| | | | | | * Updated syntax * Updated tests to match syntax
* Add tests for file_watcher config on updateArthur Neves2016-03-211-0/+14
| | | | [related #24243]
* Merge pull request #23940 from prathamesh-sonpatki/rm-with-dispatchersRafael França2016-03-091-12/+12
|\ | | | | Remove passing `with_dispatchers` to AppGenerator
| * Remove passing `with_dispatchers` to AppGeneratorPrathamesh Sonpatki2016-03-091-12/+12
| | | | | | | | | | | | | | - While working on https://github.com/rails/rails/pull/22790 I found out that we pass `with_dispatchers: true` but it's not used at all by Rails. - We were passing `with_dispatchers: true` in few tests too but again it's not used by Rails.
* | Fix the tests after e594000Genadi Samokovarov2016-03-081-2/+2
| |
* | Drop the explicit version requirements for web-consoleGenadi Samokovarov2016-03-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Between major versions 2 and 3, we hit a bug. It's fixed in version 3, however, the explicit 2.x requirement of `~> '2.0'` will prevent people from getting the fix with `bundle update` and they would have to explicitly set the constraint to `~> '3.0'`. For more information see: rails/web-console#178. I propose we drop the explicit version constraints in the Gemfile. Web Console has been relatively stable for the past couple of years, and I don't anticipate any major alterations, like we saw between major versions 1 and 2.
* | Merge pull request #24001 from 5t111111/fix-gsub-cookies_serializerRafael França2016-03-021-1/+2
|\ \ | | | | | | Fix description in cookies_serializer.rb being corrupted by gsub when updating
| * | Fix description in cookies_serializer.rb being corrupted when updatingHirofumi Wakasugi2016-03-021-1/+2
| | |
* | | Fix typo in app_generator_test.rbHirofumi Wakasugi2016-03-021-1/+1
|/ /
* | Merge pull request #23935 from y-yagi/convert_cable_coffee_to_javascriptRafael França2016-03-011-1/+1
|\ \ | | | | | | convert cable.coffee to cable.js
| * | convert cable.coffee to cable.jsyuuji.yaginuma2016-02-281-1/+1
| |/ | | | | | | In order to eliminate the dependecy of CoffeeScript.
* | Mock fork twiceRafael Mendonça França2016-03-011-1/+1
| |
* | generate config/spring.rb in new applications [closes #18874]Xavier Noria2016-02-291-0/+2
|/
* remove rack cors initializer when updatingyuuji.yaginuma2016-02-271-0/+26
| | | | Rack cors initializer is only necessary to API-only applications, for when the update is unnecessary.
* [close #23681] Use puma 3.0.0+ schneems2016-02-261-0/+5
| | | | | Puma 3.0 and up introduced compatibility to read from `config/puma.rb` when booting from the command `$ rails server`https://github.com/puma/puma/pull/856.
* Old applications will not get the ssl_options initializerPrathamesh Sonpatki2016-02-251-0/+28
| | | | | - We will remove the initializer for old apps which are migrated to Rails 5 so that they are not affected by this breaking change.
* 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