aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | | | | | | Don't use same table between primary_keys tests and composite_primary_keys testsPrathamesh Sonpatki2017-04-261-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The test `PrimaryKeyAnyTypeTest#test_any_type_primary_key` was failing if ran after running all tests from `CompositePrimaryKeyTest`. - This was happening because `CompositePrimaryKeyTest` was changing the primary key of the barcodes table which was cached in schema cache. - As we were always going to drop the `barcodes` table at the end of tests in both `PrimaryKeyTest` and `CompositePrimaryKeyTest`, solved this issue by using different table name for tests in `CompositePrimaryKeyTest`.
| | * | | | | | | | Fix one more test randomly failing due to array ordering issue on PG adapterPrathamesh Sonpatki2017-04-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reproduction command - ARCONN=postgresql be ruby -w -Itest test/cases/autosave_association_test.rb --seed 34101
| | * | | | | | | | Fix the random failure of `test_create_resets_cached_counters`Prathamesh Sonpatki2017-04-262-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Tried specifying `id` for the `readers` records but it is interconnected with so many tests that many random tests started failing. - So switched to the approach of deleting all readers in the `create_resets_cached_counters` test.
| | * | | | | | | | Fix random test failure of test_create_resets_cached_countersPrathamesh Sonpatki2017-04-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - In earlier commit, I removed setting id manually for readers fixtures but that did not fix the randomly failing test_create_resets_cached_counters from has_many_associations tests. - Because the problem was with the `person_id` of the readers. As it is set to 1 in fixtures, if a post gets created with id 1 then that post automatically has 2 readers. - Fixed by removing the person_id.
| | * | | | | | | | Don't add specific id's to the readers fixturesPrathamesh Sonpatki2017-04-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This causes failures in the `test_create_resets_cached_counters` from the has_many_associations tests because sometimes a Post record gets created with id as 1 so the readers records get associated with it and `person.readers` returns these 2 records instead of empty array. - Better to just remove the ids.
| | * | | | | | | | Add minitest-bisect as part of the gemfileRafael Mendonça França2017-04-262-1/+10
| | | | | | | | | |
| | * | | | | | | | Release minitest lock so we can fix the order dependent testsRafael Mendonça França2017-04-262-5/+1
| | | | | | | | | |
| * | | | | | | | | Merge pull request #29777 from yui-knk/set_content_typeMatthew Draper2017-08-021-3/+2
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Refactoring `Response#charset=`
| | * | | | | | | | | Brush up local variables assignmentyui-knk2017-07-131-3/+2
| | | | | | | | | | |
| | * | | | | | | | | Use `#set_content_type` instead of `#set_header`yui-knk2017-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By this commit, `#set_header` is called only via `#set_content_type`. This commit makes the role of `#charset=` more clear.
| * | | | | | | | | | Merge pull request #29724 from eugeneius/sync_primary_keyMatthew Draper2017-08-024-5/+57
| |\ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|/ / / / | |/| | | | | | | | | Sync transaction state when accessing primary key
| | * | | | | | | | | Sync transaction state when accessing primary keyEugene Kenny2017-07-094-5/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a record is modified inside a transaction, it must check the outcome of that transaction before accessing any state which would no longer be valid if it was rolled back. For example, consider a new record that was saved inside a transaction which was later rolled back: it should be restored to its previous state so that saving it again inserts a new row into the database instead of trying to update a row that no longer exists. The `id` and `id=` methods defined on the PrimaryKey module implement this correctly, but when a model uses a custom primary key, the reader and writer methods for that attribute must check the transaction state too. The `read_attribute` and `write_attribute` methods also need to check the transaction state when accessing the primary key.
* | | | | | | | | | | Merge pull request #30040 from rbarysas/active-storage-importRyuta Kamizono2017-08-021-0/+1
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Add Azure to the available services list [ci skip]
| * | | | | | | | | | | Add Azure to the available services listRolandas Barysas2017-08-021-0/+1
|/ / / / / / / / / / /
* | | | | | | | | | | Merge pull request #30035 from ytbryan/patch-1Ryuta Kamizono2017-08-021-3/+1
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Add Azure to readme [ci skip]
| * | | | | | | | | | | Add Azure to readme Bryan Lim2017-08-021-3/+1
|/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | previously https://github.com/rails/activestorage/pull/86
* | | | | | | | | | | Skip if credentials aren't providedDavid Heinemeier Hansson2017-08-012-2/+2
| | | | | | | | | | |
* | | | | | | | | | | Fix dummy app for inclusion in RailsDavid Heinemeier Hansson2017-08-011-2/+1
| | | | | | | | | | |
* | | | | | | | | | | Remove circular dependencyDavid Heinemeier Hansson2017-08-011-2/+0
| | | | | | | | | | |
* | | | | | | | | | | Merge branch 'master' into active-storage-importDavid Heinemeier Hansson2017-08-0117-35/+71
|\| | | | | | | | | |
| * | | | | | | | | | Merge pull request #30015 from larskanis/use-duktake-on-mingwGuillermo Iguaran2017-08-012-0/+4
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Use duktape gem as default JS engine on Windows-MINGW
| | * | | | | | | | | | Use duktape gem as default JS engine on Windows-MINGW and MS-Visual-C buildsLars Kanis2017-08-012-0/+4
| | | |_|_|_|_|_|_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fallback javascript engine on Windows is Windows Script Host (JScript). However this engine isn't able to process the default assets, because it supports ES3 only but the coffeescript compiler requires ES5. Fixes #30014
| * | | | | | | | | | Update working_with_javascript_in_rails.mdGuillermo Iguaran2017-08-011-1/+1
| | | | | | | | | | |
| * | | | | | | | | | Clarify route encoding testeileencodes2017-08-011-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since this test changed in 9220935 I noticed that it really doesn't make sense anymore. I split the tests into 2 groups to explain what each one does. First these routes should throw a `bad_request` when the encoding isn't valid. We're expecting UTF8 encoding and passing binary, that should be a bad request. For the second test we are setting the `show` route to set `self.binary_params_for?` for that route which will convert the parameters and return a `:ok` instead of a `:bad_request`.
| * | | | | | | | | | Merge pull request #30023 from y-yagi/remove_unnecessary_doc_directory_deletionGuillermo Iguaran2017-08-012-2/+0
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Remove unnecessary `doc` directory deletion
| | * | | | | | | | | | Remove unnecessary `doc` directory deletionyuuji.yaginuma2017-08-012-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 553b695, `doc` directory is not created in application.
| * | | | | | | | | | | Update working_with_javascript_in_rails.mdGuillermo Iguaran2017-08-011-1/+1
| | | | | | | | | | | |
| * | | | | | | | | | | Path parameters should default to UTF8eileencodes2017-08-015-14/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the behavior such the path_params now default to UTF8 just like regular parameters. This also changes the behavior such that if a path parameter contains invalid UTF8 it returns a 400 bad request. Previously the behavior was to encode the path params as binary but that's not the same as query params. So this commit makes path params behave the same as query params. It's important to test with a path that's encoded as binary because that's how paths are encoded from the socket. The test that was altered was changed to make the behavior for bad encoding the same as query params. We want to treat path params the same as query params. The params in the test are invalid UTF8 so they should return a bad request. Fixes #29669 *Eileen M. Uchitelle, Aaron Patterson, & Tsukuru Tanimichi*
| * | | | | | | | | | | Merge pull request #30029 from yhirano55/fix_rails_command_commentsSean Griffin2017-08-011-3/+3
| |\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip] Fix rails_command comments
| | * | | | | | | | | | | [ci skip] Fix rails_command commentsYoshiyuki Hirano2017-08-011-3/+3
| | | | | | | | | | | | |
| * | | | | | | | | | | | Merge pull request #30021 from roberts1000/fix-rubocop-issuesRafael França2017-08-012-3/+3
| |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix rubocop issues
| | * | | | | | | | | | | | Fix rubocop style issues in yarn and spring.rb templates"roberts10002017-07-312-3/+3
| | | |/ / / / / / / / / / | | |/| | | | | | | | | |
| * | | | | | | | | | | | Merge pull request #30024 from kamipo/remove_redundant_unless_branchSean Griffin2017-07-311-2/+0
| |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove redundant `unless current_adapter?(:OracleAdapter)`
| | * | | | | | | | | | | | Remove redundant `unless current_adapter?(:OracleAdapter)`Ryuta Kamizono2017-07-281-2/+0
| | | | | | | | | | | | | |
| * | | | | | | | | | | | | Talk about bytes not charactersRafael Mendonça França2017-07-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip] Closes #30012
| * | | | | | | | | | | | | Add backticks around method [ci skip]Ryuta Kamizono2017-08-011-1/+1
| | |/ / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And make reference to `Relation`.
| * | | | | | | | | | | | Merge pull request #30017 from bslobodin/fix-typo-in-assert-changesRafael França2017-07-311-1/+1
| |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix typo in assert_changes error message
| | * | | | | | | | | | | | fix typo in assert_changes error messageBoris Slobodin2017-07-311-1/+1
| | | | | | | | | | | | | |
* | | | | | | | | | | | | | Prevent interpolation of ERB elementsDavid Heinemeier Hansson2017-08-011-6/+6
| | | | | | | | | | | | | |
* | | | | | | | | | | | | | Add the storage.yml file by defaultDavid Heinemeier Hansson2017-08-011-0/+1
| | | | | | | | | | | | | |
* | | | | | | | | | | | | | Follow same format as action_cableDavid Heinemeier Hansson2017-08-011-1/+3
| | | | | | | | | | | | | |
* | | | | | | | | | | | | | Cut down on installation adviceDavid Heinemeier Hansson2017-08-011-8/+4
| | | | | | | | | | | | | |
* | | | | | | | | | | | | | Drop README terms no longer relevantDavid Heinemeier Hansson2017-08-011-12/+0
| | | | | | | | | | | | | |
* | | | | | | | | | | | | | Add requireDavid Heinemeier Hansson2017-08-011-0/+1
| | | | | | | | | | | | | |
* | | | | | | | | | | | | | We moved to storage.ymlDavid Heinemeier Hansson2017-08-012-35/+1
| | | | | | | | | | | | | |
* | | | | | | | | | | | | | Rely on top-level filesDavid Heinemeier Hansson2017-08-012-150/+0
| | | | | | | | | | | | | |
* | | | | | | | | | | | | | Merge pull request #30034 from ffmike/patch-1Guillermo Iguaran2017-08-011-0/+8
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Azure configuration to Active Storage template
| * | | | | | | | | | | | | | Add Azure configuration to Active Storage templateMike Gunderloy2017-08-011-0/+8
|/ / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With Active Storage supporting Azure, we should show people how to set it up. Incorporates the minor changes originally in https://github.com/rails/activestorage/pull/88 as well
* | | | | | | | | | | | | | Merge pull request #30030 from claudiob/only-diskGuillermo Iguaran2017-08-011-1/+3
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let ActiveStorage tests pass only for Disk
| * | | | | | | | | | | | | | Let ActiveStorage tests pass only for Diskclaudiob2017-08-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you have a "service/configurations.yml" file, but every single line is commented out, then an error occurs when running tests: ``` git:active-storage-import~/code/rails/activestorage$ rake ~/code/rails/activestorage/test/test_helper.rb:17:in `<top (required)>': undefined method `deep_symbolize_keys' for false:FalseClass (NoMethodError) from ~/code/rails/activestorage/test/controllers/direct_uploads_controller_test.rb:1:in `require' ``` The reason is that `YAML.load(..an empty file content..)` simply returns `false`, and not `{}`. This PR fixes this behavior so tests can also run when no remote service is available.