aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* remove test/dummy from gitignore when "plugin new -T"Francesco Rodriguez2012-07-031-1/+7
|
* Add polymorphic option to model generatorAleksey Magusev2012-06-272-11/+29
| | | | | | | | | | For instance, $ rails g model Product supplier:references{polymorphic} generate model with `belongs_to :supplier, polymorphic: true` association and appropriate migration. Also fix model_generator_test.rb#L196 and #L201
* Merge pull request #6681 from arunagw/plugin_gen_fixRafael Mendonça França2012-06-081-2/+8
|\ | | | | Plugin gen fix
| * We should not include engine.rake file into rakeArun Agrawal2012-06-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | if we are passing -T which is skip_test_unit See issue #6673 for more details. I saw that we are not creating dummy app even if we do skip_test_unit. Fixes #6673
| * Removed protected as we already doing it above.Arun Agrawal2012-06-081-2/+0
| |
* | Don't add sqlite3 to gemspec with -O on rails plugin newPiotr Sarnacki2012-06-081-0/+8
|/ | | | (closes #6672)
* Fixed the application_controller require_dependency path generated by the ↵Fred Wu2012-06-061-1/+3
| | | | app generator
* Fixed the Gemfile when gemspec is skipped in the 'rails plugin new' commandFred Wu2012-06-051-0/+26
|
* Fix app_generator_test with the changes introduced atRafael Mendonça França2012-05-301-1/+1
| | | | f4d7af67ffc90f2542afa50c7579fc83ea4f45f2
* Remove unnecessary comment.Uģis Ozols2012-05-231-1/+0
|
* Use new hash syntax for generators gem methodAlexey Vakhov2012-05-222-2/+10
| | | | | | The Gemfile of new application uses ruby 1.9 hashes. Gem method of generators should use them too. It prevents from mixing two kinds of syntax in one file.
* Use require_dependency in generated controllersPiotr Sarnacki2012-05-221-2/+2
| | | | | | | Using require in development mode will prevent required files from reloading, even if they're changed. In order to keep namespaced application_controller reloadable, we need to use require_dependency instead of require.
* Fix generators to help with ambiguous `ApplicationController` issuePiotr Sarnacki2012-05-201-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In development mode, dependencies are loaded dynamically at runtime, using `const_missing`. Because of that, when one of the constants is already loaded and `const_missing` is not triggered, user can end up with unexpected results. Given such file in an Engine: ```ruby module Blog class PostsController < ApplicationController end end ``` If you load it first, before loading any application files, it will correctly load `Blog::ApplicationController`, because second line will hit `const_missing`. However if you load `ApplicationController` first, the constant will be loaded already, `const_missing` hook will not be fired and in result `PostsController` will inherit from `ApplicationController` instead of `Blog::ApplicationController`. Since it can't be fixed in `AS::Dependencies`, the easiest fix is to just explicitly load application controller. closes #6413
* Remove warning in namespaced generator testCarlos Antonio da Silva2012-05-191-1/+1
|
* Fix railties testsPiotr Sarnacki2012-05-191-1/+1
| | | | | Minitest uses different signature for assert_no_match, so we have to swap arguments.
* Revert changes related to `bundle install` fixes in `rails new`Piotr Sarnacki2012-05-171-7/+2
| | | | | | | | | | | Reverted changes: f3482a9 Fix tests in railties 5904295 improve #6318 aed906a prevent using already loaded Gemfile for 'bundle install' In order to fix this, we need a fix in bundler related to GEM_PATH, which will allow to run tests properly. I will get this changes back when it happens.
* Fix tests in railtiesPiotr Sarnacki2012-05-151-1/+1
| | | | | | | | Since `bundle install` was fixed in `rails plugin new`, it now requires `rails 4.0.0.beta` version in filesystem when running tests. Instead of providing it, we can run tested command with `--dev` option, to use rails from the local directory.
* improve #6318Michal Papis2012-05-151-1/+6
|
* Remove not used date variable and another test warningCarlos Antonio da Silva2012-05-141-2/+1
|
* Remove assertion on date from humans.txt testsJosé Valim2012-05-141-1/+1
|
* Refactor App Generator TestOscar Del Ben2012-05-131-22/+20
|
* Failing test for #6251Piotr Sarnacki2012-05-101-0/+7
|
* Adding test for humans.txtArun Agrawal2012-05-081-0/+6
|
* Fix build for railties generators Arun Agrawal2012-05-022-3/+3
|