aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
Commit message (Collapse)AuthorAgeFilesLines
* Avoid ajv@6.9.0 for nowyuuji.yaginuma2019-02-101-0/+16
| | | | | Because ajv@6.9.0 does not work with webpack. Ref: https://github.com/epoberezkin/ajv/issues/941
* Fix rubocop violationsyuuji.yaginuma2019-02-091-9/+7
|
* Merge pull request #35036 from rails/av-base-subclassAaron Patterson2019-02-061-2/+6
|\ | | | | Move compiled ERB to an AV::Base subclass
| * Deprecate finalizer configuration (it doesn't do anything)Aaron Patterson2019-02-061-0/+21
| | | | | | | | | | | | Revert "Remove finalizer and configuration" This reverts commit 9e7b4a3173788ea43b11e74a4d2f69a5f1565daa.
| * Remove finalizer and configurationAaron Patterson2019-02-061-17/+0
| |
* | Preload all component gemsyuuji.yaginuma2019-02-061-0/+2
| | | | | | | | To avoid running require individually.
* | Restrict frameworks to load in engine testyuuji.yaginuma2019-02-061-4/+22
|/ | | | | For avoid to affect tests. Also, `action_text:install` task execute `yarn add`. This is an expensive and should be avoided if it is not needed.
* Set sqlite3 gem version explicitly in generated GemfileSergey Ponomarev2019-02-051-1/+1
|
* Respect ENV variables when finding DBs etc for the test suiteMatthew Draper2019-02-063-10/+15
| | | | | If they're not set we'll still fall back to localhost, but this makes it possible to run the tests against a remote Postgres / Redis / whatever.
* Merge pull request #35086 from gsamokovarov/cleanup-whitelisting-refsGannon McGibbon2019-02-041-1/+1
|\ | | | | Cleanup the whitelisting references after #33145
| * Cleanup the whitelisting references after #33145Genadi Samokovarov2019-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | During the development of #33145, I have named a few concepts in the code as `whitelisted`. We decided to stay away from the term and I adjusted most of the code afterwards, but here are the cases I forgot to change. I also found a case in the API guide that we could have cleaned up as well. [ci skip]
* | Railities typo fixes.alkesh262019-02-019-12/+12
| |
* | Fix `ERB.new` argument deprecated warningyuuji.yaginuma2019-01-311-1/+5
| | | | | | | | | | | | | | | | This fixes following warning. ``` warning: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments. ```
* | Merge pull request #34980 from y-yagi/fixes_34979Yuji Yaginuma2019-01-311-0/+6
|\ \ | | | | | | Don't add `RAILS_ENV` in generate action
| * | Don't add `RAILS_ENV` in generate actionyuuji.yaginuma2019-01-191-0/+6
| | | | | | | | | | | | | | | | | | | | | In the case of generator, `RAILS_ENV` is interpreted as an argument as it is. Avoid this because it will result unintended by the user. Fixes #34979.
* | | Rename methods and update docsEileen Uchitelle2019-01-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a minor update to the named methods for the following: - s/desired_capabilities/capabilities - s/driver_options/capabilities Since they are all the same thing we should keep the name the same throughout the feature. Updated docs to match / be a little bit clearer Also updated the Gemfile for selenium-webdriver.
* | | Implement a way to add browser capabilities:Edouard CHIN2019-01-291-0/+2
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * There is currently no way to define specific browser capabilities since our SystemTest driver override the `option` key [Ref](https://github.com/rails/rails/blob/a07d0680787ced3c04b362fa7a238c918211ac70/actionpack/lib/action_dispatch/system_testing/driver.rb#L35) This option key is used internally by selenium to add custom capabilities on the browser. Depending on the Browser, some option are allowed to be passed inside a hash, the driver takes care of setting whatever you passed on the driver option. An example [here](https://github.com/rails/rails/blob/a07d0680787ced3c04b362fa7a238c918211ac70/actionpack/lib/action_dispatch/system_testing/driver.rb#L35) where you are allowed to pass args such as `--no-sandbox` etc However this behavior was only meant for backward compatibility and as you can see it's deprecated. The non-deprecated behavior is to create a `<Driver>::Option` object containing all the capabilities we want. This is what we [currently do](https://github.com/rails/rails/blob/a07d0680787ced3c04b362fa7a238c918211ac70/actionpack/lib/action_dispatch/system_testing/browser.rb#L34-L36) when chrome or firefox are in headless mode. This PR allows to pass a block when calling `driven_by`, the block will be pased a `<Driver>::Option` instance. You can modify this object the way you want by adding any capabilities. The option object will be then passed to selenium. ```ruby driven_by :selenium, using: :chrome do |driver_option| driver_option.add_argument('--no-sandbox') driver_option.add_emulation(device: 'iphone 4') end ```
* | Merge pull request #34789 from christos/fix-editing-new-environment-credentialsKasper Timm Hansen2019-01-251-0/+8
|\ \ | | | | | | Don't load app environment when editing credentials
| * | Don't load app environment when editing credentialsChristos Zisopoulos2018-12-261-0/+8
| | | | | | | | | | | | This avoids missing key exceptions caused by code that tries to read the credentials before they have been added to the encrypted file, for example when editing the credentials for a new environment.
* | | Fix deeply nested namespace command printingGannon McGibbon2019-01-241-0/+2
| | |
* | | Merge pull request #34993 from schuetzm/allow-subdomains-of-localhostRafael França2019-01-231-0/+5
|\ \ \ | | | | | | | | Subdomains of localhost are safe against DNS rebinding
| * | | Subdomains of localhost are safe against DNS rebindingMarc Schütz2019-01-231-0/+5
| | |/ | |/|
* / | Add Channel tests to `rails stats`bogdanvlviv2019-01-211-1/+1
|/ / | | | | | | | | | | | | | | | | Rails generates `test/channels`(#34933) and even allows `rails test:channels` (#34947). `rails stats` has been providing info about `app/channels`, it makes sense to add `test/channels` as well. (I've changed test because we generate `test/channels` with some code)
* | Revert "Remove deprecated `server` argument from the rails server command"yuuji.yaginuma2019-01-181-0/+4
| | | | | | | | | | | | This reverts commit fa791fb8e2a718b5d0430c7ca5a454678dfc192d. Reason: `server` argument was deprecated in Rails 6.0. Ref: #32058.
* | Remove deprecated `after_bundle` helper inside plugins templatesRafael Mendonça França2019-01-171-32/+0
| |
* | Remove deprecated `server` argument from the rails server commandRafael Mendonça França2019-01-171-4/+0
| |
* | Remove deprecated support to old `config.ru` that use the application class ↵Rafael Mendonça França2019-01-171-14/+0
| | | | | | | | as argument of `run`
* | Remove deprecated `environment` argument from the rails commandsRafael Mendonça França2019-01-173-44/+5
| |
* | Remove deprecated `capify!`Rafael Mendonça França2019-01-171-9/+0
| |
* | Remove deprecated `config.secret_token`Rafael Mendonça França2019-01-174-212/+4
| |
* | Change `SQLite3Adapter` to always represent boolean values as integersRafael Mendonça França2019-01-171-19/+11
| |
* | Merge pull request #34953 from gmcgibbon/seed_with_inline_jobsRafael França2019-01-171-0/+12
|\ \ | | | | | | Seed database with inline ActiveJob job adapter
| * | Seed database with inline ActiveJob job adapterGannon McGibbon2019-01-171-0/+12
| | |
* | | Minimize boilerplate setup code for JavaScript librariesJavan Makhmali2019-01-162-3/+3
|/ /
* | Merge branch 'master' into db_system_change_commandKasper Timm Hansen2019-01-169-110/+137
|\ \
| * | Add `rails test:channels`.bogdanvlviv2019-01-161-2/+13
| | | | | | | | | | | | | | | Add this rake task to test channels only. We've added `rails test:mailboxes` recently in the same way #34828.
| * | Merge pull request #33962 from kaspth/restructure-environment-credentialsKasper Timm Hansen2019-01-143-67/+58
| |\ \ | | | | | | | | Restructure credentials after environment overrides.
| | * | Restructure credentials after environment overrides.Kasper Timm Hansen2019-01-143-67/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow up to: e0d3313 - Revert renames from `encrypted` and `encrypted_file` back to `credentials`. They might be using our Encrypted* generators but from that level of abstraction they're still about credentials. - Same vein: extract a `credentials` method for the `encrypted` local variable. But don't call it `encrypted` just because it uses that under the hood. It's about capturing the credentials. It's also useful in `change_credentials_in_system_editor`. - Remove lots of needless argument passing. We've abstracted content_path and key_path into methods for a reason, so they should be used. Also spares a conspicuous rename of content_path into file_path in other methods. - Reorders private methods so they're grouped into: command building blocks, option parsers, and the generators. - Extracts commonality in the credentials application tests. A tad unsure about this. But I do like that we go with key, content thus matching the command and remove the yield which isn't really needed. - Moves test/credentials_test.rb to beneath the test/application directory. It's a Rails application test, so it should be in there. - Uses `root.join` — a neat trick gleaned from the tests! — and composes the configuration private methods such that the building block is below the callers.
| * | | Add connection_test to app generatorVladimir Dementyev2019-01-131-0/+3
| | | |
| * | | Add channel test generatorVladimir Dementyev2019-01-131-0/+14
| |/ /
| * | Add Exim and Qmail support to Action MailboxGeorge Claghorn2019-01-122-10/+8
| | |
| * | Move all npm packages to @rails scopeJavan Makhmali2019-01-101-2/+2
| | | | | | | | | | | | Fixes #33083
| * | Merge pull request #34907 from wildbit/actionmailbox-postmarkGeorge Claghorn2019-01-092-33/+43
| |\ \ | | | | | | | | Add Postmark ingress support to ActionMailbox
| | * | Added Postmark ingress supportTomek Maszkowski2019-01-092-33/+43
| | | |
* | | | Revise wording on invalid database error messagesGannon McGibbon2019-01-092-2/+2
| | | |
* | | | Add rails db:system:change commandGannon McGibbon2019-01-094-1/+177
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add `rails db:system:change` command for changing databases. ``` bin/rails db:system:change --to=postgresql force config/database.yml gsub Gemfile ``` The change command copies a template `config/database.yml` with the target database adapter into your app, and replaces your database gem with the target database gem.
* | | Merge pull request #34692 from gmcgibbon/use_mail_delivery_job_in_6.0_defaultsRafael França2019-01-091-0/+27
|\ \ \ | |/ / |/| | Move MailDeliveryJob default to 6.0 defaults
| * | Move MailDeliveryJob default to 6.0 defaultsGannon McGibbon2019-01-071-0/+27
| | |
* | | Preserve Bundle configuration during app generation (#34755)Marco Costa2019-01-091-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When generating a new rails application (rails new) using a custom template that includes gems from an authenticated source, the user has to provide credentials to bundler. One way to do this is by exporting environment variables, for example: export BUNDLE_GITHUB__COM=user:pass: provides credentials for bundler to fetch gems from github.com. The problem this PR addresses is that we are currently scrubs all /BUNDLE_.*/ environment variables by wrapping our system calls in Bundler.with_clean_env. We do this because we don't want our commands executed against the generated project to use the generator's bundler environment (e.g. our gems): the generated project should use it's own configuration. The problem with Bundler.with_clean_env is that, on top of restoring environment variables to their original state, it also scrubs any /BUNDLE_.*/ variables, which is harmful for authenticated gem sources. This PR replaces Bundler.with_clean_env with Bundler.with_original_env, which only restores environment variables to their initial state, without additional scrubbing.
* | | Revert "Merge pull request #34387 from yhirano55/rails_info_properties_json"Kasper Timm Hansen2019-01-082-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had a discussion on the Core team and we don't want to expose this information as a JSON endpoint and not by default. It doesn't make sense to expose this JSON locally and this controller is only accessible in dev, so the proposed access from a production app seems off. This reverts commit 8eaffe7e89719ac62ff29c2e4208cfbeb1cd1c38, reversing changes made to 133e0ba33db5887b047c9ac8233e5b414657bca5.