aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
Commit message (Collapse)AuthorAgeFilesLines
...
* Detect rbenv and update the shebangYehuda Katz2012-12-221-0/+10
|
* Install binstubs by defaultYehuda Katz2012-12-221-3/+3
|
* Migration generators use `change` even for destructive methods [#8267]Marc-Andre Lafortune2012-12-211-31/+12
|
* Simple replacement of variable name for consistencyMarc-Andre Lafortune2012-12-211-32/+32
|
* update concerned testsFrancesco Rodriguez2012-12-181-0/+2
|
* Fixed test names for generated_attribute_test.rbArun Agrawal2012-12-131-1/+1
|
* Merge pull request #8468 from schneems/schneems/rack-index-pageSantiago Pastorino2012-12-101-8/+0
|\ | | | | Use Rails to Render Default Index Page
| * Use Rails to Render Default Index Pageschneems2012-12-101-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an alternative implementation to #7771 thanks to the advice of @spastorino Rails is a dynamic framework that serves a static index.html by default. One of my first questions ever on IRC was solved by simply deleting my public/index.html file. This file is a source of confusion when starting as it over-rides any set "root" in the routes yet it itself is not listed in the routes. By making the page dynamic by default we can eliminate this confusion. This PR moves the static index page to an internal controller/route/view similar to `rails/info`. When someone starts a rails server, if no root is defined, this route will take over and the "dynamic" index page from rails/welcome_controller will be rendered. These routes are only added in development. If a developer defines a root in their routes, it automatically takes precedence over this route and will be rendered, with no deleting of files required. In addition to removing this source of confusion for new devs, we can now use Rails view helpers to build and render this page. While not the primary intent, the added value of "dogfooding" should not be under-estimated. The prior PR #7771 had push-back since it introduced developer facing files. This PR solves all of the same problems, but does not have any new developer facing files (it actually removes one). cc/ @wsouto, @dickeyxxx, @tyre, @ryanb, @josevalim, @maxim, @subdigital, @steveklabnik ATP Railties and Actionpack.
* | Make sure that no extra spaces are created with a non-polymorphicRafael Mendonça França2012-12-101-2/+2
| | | | | | | | attributes
* | Add GeneratedAttribute#column_name to get the name of the column in theRafael Mendonça França2012-12-101-2/+9
| | | | | | | | database
* | Deal with polymorphic attributes correctly in the generatorsRafael Mendonça França2012-12-102-3/+17
| |
* | Make references and belongs_to attributes to generate the _id column inRafael Mendonça França2012-12-101-0/+5
| | | | | | | | fixtures
* | Put the reference and belongs_to attributes in the scaffold tests.Rafael Mendonça França2012-12-102-6/+6
| |
* | Use the references and belongs_id ids in the scaffold_controllerRafael Mendonça França2012-12-091-0/+9
| | | | | | | | generator
* | Add test case for scaffold_controller generator without attributes.Rafael Mendonça França2012-12-091-0/+9
|/ | | | This is a test for 978c568a7bffe354180aaefa471092182fed1015
* Fix scaffold controller generator testsCarlos Antonio da Silva2012-12-081-8/+6
|
* fix scaffold controller generator testsFrancesco Rodriguez2012-12-071-16/+12
|
* Refactor tests that switch RAILS_ENV and RACK_ENVCarlos Antonio da Silva2012-12-061-16/+15
| | | | | | | | | | | | This cleanup aims to fix a build failure: https://travis-ci.org/rails/rails/jobs/3515951/#L482 Since travis always have both ENV vars set to "test", a test is failing where it's expected to output the default env "development", but "test" is the result due to RACK_ENV being set when we expect it to not be. By cleaning this duplication we ensure that changing any of these env variables will pick the right expected value.
* Remove observers and sweepersRafael Mendonça França2012-11-282-48/+0
| | | | | | | | They was extracted from a plugin. See https://github.com/rails/rails-observers [Rafael Mendonça França + Steve Klabnik]
* Refactor generators tests to include test helpers in the parent classCarlos Antonio da Silva2012-11-271-4/+3
|
* Merge pull request #8112 from rails/encrypted_cookiesSantiago Pastorino2012-11-151-1/+1
|\ | | | | Encrypted cookies
| * Add encrypted cookie storeSantiago Pastorino2012-11-031-1/+1
| |
* | `plugin new` adds dummy app tasks when necessary.Yves Senn2012-11-081-0/+6
| | | | | | | | | | | | | | Closes #8121 The `plugin new` generator always adds the dummy app rake tasks, when a dummy app was created.
* | Remove some line breaks between array items that make the assert file tests ↵Carlos Antonio da Silva2012-11-043-41/+18
|/ | | | harder to read
* changed test case nameTima Maslyuchenko2012-10-231-1/+1
|
* Fix the app_generator and plugin_new testsRafael Mendonça França2012-10-181-1/+1
|
* Switch to new sprockets-rails pluginJoshua Peek2012-10-151-1/+2
|
* Use Ruby 1.9 Hash syntax in railtiesRobin Dupret2012-10-149-39/+39
|
* No need to test for rack-cache present in GemfileArun Agrawal2012-10-111-5/+0
| | | | | | as it's removed here 1fc795468525d8622cdca474a54c8310a514aa46
* Update test locationsMike Moore2012-10-0910-59/+61
| | | | | | | | | | | | | | Change the default test locations to avoid confusion around the common testing terms "unit" and "functional". Add new rake tasks for the new locations, while maintaining backwards compatibility with the old rake tasks. New testing locations are as follows: app/models -> test/models (was test/units) app/helpers -> test/helpers (was test/units/helpers) app/controllers -> test/controllers (was test/functional) app/mailers -> test/mailers (was test/functional)
* Merge pull request #7794 from guilleiguaran/extract-rack-cacheSantiago Pastorino2012-10-011-0/+5
|\ | | | | Use Rack::Cache middleware only if is in Gemfile
| * Add rack-cache to default GemfileGuillermo Iguaran2012-10-011-0/+5
| |
* | Fix broken scaffold routes testJeremy Walker2012-10-011-1/+1
| |
* | Fixed generated whitespace in routes when using namespaced resource.Jeremy Walker2012-09-291-2/+74
|/
* Update test to match new non-sorting of attributes.Brian Morearty2012-09-231-1/+1
|
* Remove .rb from require sentencesJosé Corcuera Z2012-09-212-2/+2
|
* Remove attributes whitelist tests from AppGenerator testsGuillermo Iguaran2012-09-161-6/+0
|
* Change scaffold_controller to generate and use private method to encapsulate ↵Guillermo Iguaran2012-09-162-6/+9
| | | | permissible params
* Remove all references to attr_accessible/protected and old ↵Guillermo Iguaran2012-09-162-19/+0
| | | | mass_assignment_sanitizers
* change app/plugin generators to be more SCM agnosticDerek Prior2012-09-122-4/+16
| | | | | | | | | | | | | | | | | Users of other SCM's can now generate rails apps that will add the "empty" directories to source control, but will not have a useless .gitignore or mis-named .gitkeep files. * Change `rails new` and `rails plugin new` generators to name the `.gitkeep` as `.keep` in a more SCM-agnostic way. * Change `--skip-git` option to only skip the `.gitignore` file and still generate the `.keep` files. * Add `--skip-keeps` option to skip the `.keep` files. It closes #2800.
* add mini-validator on creating migrationJan Bernacki2012-09-061-0/+7
| | | | move validation to AR
* Revert "Revert changes related to `bundle install` fixes in `rails new`"Piotr Sarnacki2012-08-311-2/+7
| | | | | | | | The cause of the previous revert was bug in bundler that made it hard to make railties test work. Fix for bundler was recently pushed to github, so now we can safely get back to the original commit. This reverts commit 0f5cc34ab58cda99d1401ecc82e1ebb873838dd7.
* Extract ActiveRecord::SessionStore from RailsPrem Sichanugrist2012-08-241-27/+0
| | | | | This functionality will be available from gem `active_record-session_store` instead.
* remove some artifacts of dependent_restrict_raises that I missedJon Leighton2012-08-101-1/+0
|
* Remove the dependent_restrict_raises option.Jon Leighton2012-08-101-5/+0
| | | | | | | | | | | | | | | It's not really a good idea to have this as a global config option. We should allow people to specify the behaviour per association. There will now be two new values: * :dependent => :restrict_with_exception implements the current behaviour of :restrict. :restrict itself is deprecated in favour of :restrict_with_exception. * :dependent => :restrict_with_error implements the new behaviour - it adds an error to the owner if there are dependent records present See #4727 for the original discussion of this.
* Revert "The application generator generates `public/humans.txt` with some ↵David Heinemeier Hansson2012-08-071-5/+0
| | | | basic data". I dont consider this something most people is going to want most of the time. If you want to add it in your own app, knock yourself out. But it doesnt belong in Rails imo
* Add fkey attributes to `join_table` migration generatorAleksey Magusev2012-07-191-1/+1
|
* Add join table migration generatorAleksey Magusev2012-07-181-0/+13
| | | | | | | | | | | | | For instance, running rails g migration CreateMediaJoinTable artists musics:uniq will create a migration with create_join_table :artists, :musics do |t| # t.index [:artist_id, :music_id] t.index [:music_id, :artist_id], unique: true end
* Add references statements to migration generatorAleksey Magusev2012-07-081-0/+29
| | | | | | | | | | | | | AddXXXToYYY/RemoveXXXFromYYY migrations are produced with references statements, for instance rails g migration AddReferencesToProducts user:references supplier:references{polymorphic} will generate the migration with: add_reference :products, :user, index: true add_reference :products, :supplier, polymorphic: true, index: true
* Fixed generating namespaced table_name_prefix in enginesWojciech Wnętrzak2012-07-061-1/+1
|