aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #28182 from y-yagi/show_correct_rails_commandsKasper Timm Hansen2017-03-091-0/+11
|\ | | | | Show correct commands in help
| * Show correct commands in helpyuuji.yaginuma2017-03-031-0/+11
| | | | | | | | | | Currently rails' help shows only namespace. However, the secrets command needs to specify command. Therefore, I fixed the command to display in help.
* | Use appropriate type in generators testyuuji.yaginuma2017-03-081-1/+1
| | | | | | | | | | | | | | | | This fixes the following thor's warning. ``` Expected string default value for '--generate'; got false (boolean) ```
* | Avoid running system tests by defaultRobin Dupret2017-03-051-0/+46
| | | | | | | | | | | | | | | | | | | | These tests may be expansive so let's only allow users to run them through `bin/rails test:system` or by passing a path to the `test` command. The same applies for `bin/rake test`. Refs #28109.
* | Fix random failure on system test with ajaxFumiaki MATSUSHIMA2017-03-031-0/+28
| | | | | | | | | | | | | | | | If application has ajax, browser may begin request after rollback. `teardown_fixtures` will be called after `super` on `after_teardown` so we must call `Capybara.reset_sessions!` before `super` https://github.com/rails/rails/blob/b61a56541aecd7ac685d4f19d943177a3f1b465a/activerecord/lib/active_record/fixtures.rb#L857
* | Move key packing into encryptor.Kasper Timm Hansen2017-03-021-3/+2
| |
* | Merge pull request #28139 from stouset/update-secrets-to-use-modern-cryptoKasper Timm Hansen2017-03-021-2/+3
|\ \ | | | | | | Update secrets to use modern crypto
| * | Default Secrets to AES-128-GCM, using ActiveSupport::MessageEncryptorStephen Touset2017-03-011-2/+3
| | | | | | | | | | | | Fixes #28135.
* | | Tell users how to assign a $EDITOR.Kasper Timm Hansen2017-03-011-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case there's no $EDITOR assigned users would see a cryptic: ``` % EDITOR= bin/rails secrets:edit Waiting for secrets file to be saved. Abort with Ctrl-C. sh: /var/folders/wd/xnncwqp96rj0v1y2nms64mq80000gn/T/secrets.yml.enc: Permission denied New secrets encrypted and saved. ``` That error is misleading, so give a hint in this easily detectable case. Fixes #28143.
* | | Set correct host except development environmentyuuji.yaginuma2017-02-271-0/+18
| |/ |/| | | | | | | | | | | | | Currently `localhost` is used for the default host in all environments. But up to Rails 5.0, `0.0.0.0` is used except for development. So fixed to use the same value as 5.0. Fixes #28184
* | Merge pull request #28137 from schneems/schneems/fix-default-puma-portRichard Schneeman2017-02-241-0/+8
|\ \ | | | | | | [close #24435] Send user_supplied_options to server
| * | [close #24435] Send user_supplied_options to serverschneems2017-02-241-0/+8
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently when Puma gets a `:Port` it doesn't know if it is Rails' default port or if it is one that is specified by a user. Because of this it assumes that the port passed in is always a user defined port and therefor 3000 always "wins" even if you specify `port` inside of the `config/puma.rb` file when booting your server with `rails s`. The fix is to record the options that are explicitly passed in from the user and pass those to the Puma server (or all servers really). Puma then has enough information to know when `:Port` is the default and when it is user defined. I went ahead and did this for all values rails server exposes as server side options for completeness. The hardest thing was converting the input say `-p` or `--port` into the appropriate "name", in this case `Port`. There may be a more straightforward way to do this with Thor, but I'm not an expert here. Move logic for parsing user options to method Better variable name for iteration Explicitly test `--port` user input ✂️ Update array if environment variables are used
* | Merge pull request #28150 from ↵Rafael França2017-02-241-0/+7
|\ \ | | | | | | | | | | | | y-yagi/do_not_display_hidden_namespaces_in_generators_help does not show hidden namespaces in generator's help
| * | does not show hidden namespaces in generator's helpyuuji.yaginuma2017-02-241-0/+7
| | |
* | | Merge pull request #28062 from ↵Rafael França2017-02-241-0/+15
|\ \ \ | |/ / |/| | | | | | | | 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
| * | Make adding gemfile entry work even if specify only the plugin nameyuuji.yaginuma2017-02-241-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Make help short-cut alias to workyuuji.yaginuma2017-02-241-0/+23
| | |
* | | Make version short-cut alias to workyuuji.yaginuma2017-02-241-0/+24
| |/ |/|
* | Add back tests for test:units and test:functionals.Kasper Timm Hansen2017-02-231-12/+16
| | | | | | | | | | | | | | Would have caught that the invoke changes broke rake delegation behavior. And we do ship the behavior so we should test it.
* | Revert "Revert "Add encrypted secrets""Kasper Timm Hansen2017-02-234-0/+152
| |
* | Revert "Add encrypted secrets" (#28127)David Heinemeier Hansson2017-02-234-152/+0
| |
* | Add encrypted secrets (#28038)Kasper Timm Hansen2017-02-234-0/+152
| |
* | Merge pull request #27572 from matthewd/prerelease-specifierMatthew Draper2017-02-231-4/+4
|\ \ | | | | | | Simplify the version specifier generated by prereleases
| * | Simplify the version specifier generated by prereleasesMatthew Draper2017-01-051-4/+4
| | | | | | | | | | | | | | | "~> 1.2.3.pre4" will automatically allow "1.2.4" -- no need for an explicit range.
* | | Merge pull request #23138 from rails/custom-url-helpers-and-polymorphic-urlsAndrew White2017-02-211-2/+185
|\ \ \ | | | | | | | | Implement custom url helpers and polymorphic mapping
| * | | Split direct method into twoAndrew White2017-02-211-4/+4
| | | | | | | | | | | | | | | | | | | | Use a separate method called `resolve` for the custom polymorphic mapping to clarify the API.
| * | | Prefer remove_method over undef_methodAndrew White2017-02-211-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | Using `undef_method` means that when a route is removed any other implementations of that method in the ancestor chain are inaccessible so instead use `remove_method` which restores access to the ancestor.
| * | | Add custom polymorphic mappingAndrew White2017-02-211-4/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow the use of `direct` to specify custom mappings for polymorphic_url, e.g: resource :basket direct(class: "Basket") { [:basket] } This will then generate the following: >> link_to "Basket", @basket => <a href="/basket">Basket</a> More importantly it will generate the correct url when used with `form_for`. Fixes #1769.
| * | | Rename url_helper to directAndrew White2017-02-211-4/+4
| | | |
| * | | Add support for defining custom url helpers in routes.rbAndrew White2017-02-211-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow the definition of custom url helpers that will be available automatically wherever standard url helpers are available. The current solution is to create helper methods in ApplicationHelper or some other helper module and this isn't a great solution since the url helper module can be called directly or included in another class which doesn't include the normal helper modules. Reference #22512.
* | | | Revert back to the original of using package.json in the root of the project ↵David Heinemeier Hansson2017-02-212-6/+6
|/ / / | | | | | | | | | (#28093)
* | | Fix run_via[]= backwards compatibility.Kasper Timm Hansen2017-02-211-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | ``` Minitest.run_via[:rails] = true ``` 👆 would break because a simple alias won't catch the second true argument there.
* | | Merge pull request #28055 from robertomiranda/patch-3Guillermo Iguaran2017-02-211-1/+1
|\ \ \ | | | | | | | | Use Puma 3.7
| * | | Use Puma 3.7.xRoberto Miranda2017-02-201-1/+1
| | |/ | |/| | | | | | | ref this commit seems that has not been merged into 3.7 https://github.com/puma/puma/commit/42bec4600c51ab8a1c1ee5a0e1b738a4ffd82bf2
* | | Move and rename system testseileencodes2017-02-202-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move system tests back into Action Pack * Rename `ActionSystemTest` to `ActionDispatch::SystemTestCase` * Remove private base module and only make file for public `SystemTestCase` class, name private module `SystemTesting` * Rename `ActionSystemTestCase` to `ApplicationSystemTestCase` * Update corresponding documentation and guides * Delete old `ActionSystemTest` files
* | | Turn system testing into it's own gem and renameeileencodes2017-02-202-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Renames `Rails::SystemTestCase` to `ActionSystemTest` and moves it to a gem under the Rails name. We need to name the class `ActionSystemTestCase` because the gem expects a module but tests themselves expect a class. Adds MIT-LICENSE, CHANGELOG, and README for the future.
* | | Add tests for system testingeileencodes2017-02-203-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Adds test case test * Adds driver adapter test * Adds tests for capybara seleium driver (testing the settings not actually opening the browser to test capybara w/ selenium because that would so so so slow) * Adds tests for rack test driver * Adds tests for generators
* | | Merge pull request #28059 from y-yagi/do_not_run_git_init_inside_test_dummyGuillermo Iguaran2017-02-201-0/+1
|\ \ \ | | | | | | | | Do not run `git init` in dummy application
| * | | Do not run `git init` in dummy applicationyuuji.yaginuma2017-02-181-0/+1
| |/ /
* / / Add test for generate namespaced integration testShota Iguchi2017-02-161-2/+6
|/ /
* | Merge pull request #27605 from ↵Godfrey Chan2017-02-141-0/+20
|\ \ | | | | | | | | | | | | mtsmfm/fix-generator-command-for-nested-rails-engine-take-2 Fix generator command for nested (namespaced) rails engine (take 2)
| * | Fix generator command for nested (namespaced) rails engine (take 2)Fumiaki MATSUSHIMA2017-01-071-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite https://github.com/rails/rails/pull/27550 085546df45 was reverted (b6ffb5efcb) because it change the return of `namespaced_path` from String to Array. ---------------- If we create nested (namespaced) rails engine such like bukkits-admin, `bin/rails g scaffold User name:string age:integer` will create `bukkits-admin/app/controllers/bukkits/users_controller.rb` but it should create `bukkits-admin/app/controllers/bukkits/admin/users_controller.rb`. In #6643, we changed `namespaced_path` as root path because we supposed application_controller is always in root but nested rails engine's application_controller will not.
* | | Remove unused requireRyuta Kamizono2017-02-122-2/+0
| | | | | | | | | | | | | | | | | | These files are not using `strip_heredoc`. Closes #27976
* | | remove `ActiveSupport.halt_callback_chains_on_return_false` from everywhereyuuji.yaginuma2017-02-081-1/+0
| | |
* | | Correct spellingBenjamin Fleischer2017-02-051-2/+2
| | | | | | | | | | | | | | | | | | | | | ``` go get -u github.com/client9/misspell/cmd/misspell misspell -w -error -source=text . ```
* | | Merge pull request #27802 from domcleal/27801-multiple-rake-testsKasper Timm Hansen2017-02-051-0/+15
|\ \ \ | | | | | | | | Collect all file patterns when running multiple rake test tasks
| * | | Collect all file patterns when running multiple rake test tasksDominic Cleal2017-02-041-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaces the rake_patterns instance variable with simple require, as `autorun` will run tests from all eagerly required test files. Fixes #27801
* | | | Ignore yarn error log fileyuuji.yaginuma2017-02-031-0/+5
|/ / /
* | | Don't mutate raw_source in mailer preview interceptorEugene Kenny2017-01-301-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | The raw_source method is documented as returning the exact value that was used to create the body; mutating it breaks that contract. Additionally, if the value used to create the body is blank, raw_source returns a frozen string which causes the interceptor to raise an error.
* | | Merge pull request #27797 from y-yagi/correctly_check_error_messageArthur Nogueira Neves2017-01-301-2/+4
|\ \ \ | | | | | | | | correctly check error message