1. 24 4月, 2016 1 次提交
  2. 05 3月, 2016 1 次提交
  3. 04 3月, 2016 2 次提交
  4. 28 2月, 2016 1 次提交
  5. 26 2月, 2016 1 次提交
  6. 25 2月, 2016 1 次提交
  7. 11 2月, 2016 1 次提交
  8. 06 2月, 2016 1 次提交
  9. 03 2月, 2016 1 次提交
    • Y
      use rails command in routes task · fae17243
      yuuji.yaginuma 提交于
      For other task has become to use the rails command at doc and test,
      I think that routes task also it is better to use the rails command.
      fae17243
  10. 02 2月, 2016 1 次提交
    • V
      Add options for rake routes task · 8a436fdd
      Vipul A M 提交于
      Add two options: `-c` and `-g`.
      `-g` option returns the urls name, verb and path fields that match the pattern.
      `-c` option returns the urls for specific controller.
      
      Fixes #18902, and Fixes #20420
      
      [Anton Davydov & Vipul A M]
      8a436fdd
  11. 24 1月, 2016 1 次提交
  12. 11 1月, 2016 1 次提交
    • Y
      remove warnings from rake test · a2338c58
      yuuji.yaginuma 提交于
      This removes the following warnings.
      
      ```
      test/application/rake_test.rb:33: warning: ambiguous first argument; put parentheses or a space even after `/' operator
      test/application/rake_test.rb:43: warning: ambiguous first argument; put parentheses or a space even after `/' operator
      ```
      a2338c58
  13. 08 1月, 2016 1 次提交
    • S
      Prevent destructive action on production database · 900bfd94
      schneems 提交于
      This PR introduces a key/value type store to Active Record that can be used for storing internal values. It is an alternative implementation to #21237 cc @sgrif @matthewd.
      
      It is possible to run your tests against your production database by accident right now. While infrequently, but as an anecdotal data point, Heroku receives a non-trivial number of requests for a database restore due to this happening. In these cases the loss can be large.
      
      To prevent against running tests against production we can store the "environment" version that was used when migrating the database in a new internal table. Before executing tests we can see if the database is a listed in `protected_environments` and abort. There is a manual escape valve to force this check from happening with environment variable `DISABLE_DATABASE_ENVIRONMENT_CHECK=1`.
      900bfd94
  14. 18 12月, 2015 1 次提交
  15. 16 12月, 2015 2 次提交
    • G
      Introduce ApplicationRecord, an Active Record layer supertype · 2067fff9
      Genadi Samokovarov 提交于
      It's pretty common for folks to monkey patch `ActiveRecord::Base` to
      work around an issue or introduce extra functionality. Instead of
      shoving even more stuff in `ActiveRecord::Base`, `ApplicationRecord` can
      hold all those custom work the apps may need.
      
      Now, we don't wanna encourage all of the application models to inherit
      from `ActiveRecord::Base`, but we can encourage all the models that do,
      to inherit from `ApplicationRecord`.
      
      Newly generated applications have `app/models/application_record.rb`
      present by default. The model generators are smart enough to recognize
      that newly generated models have to inherit from `ApplicationRecord`,
      but only if it's present.
      2067fff9
    • E
      Run railties generated app tests in test env · becf1bcb
      eileencodes 提交于
      Running railties generated app tests in development env can cause unintended
      consequences. The environments are different and tests aren't meant to be
      run in development mode.
      
      The changes to the generator exposed this issue where the random test
      order in the generated apps could cause problems when those tests are
      run in development mode.
      
      Particularly we saw failures in `railties/test/application/rake_test.rb`
      generated apps that used the scaffold to create applications and then
      run the migration and immediately run the tests. The error we saw was
      `ActiveRecord::RecordNotFound: Couldn't find User with 'id'=980190962`
      and seemed to only occur if the destroy test ran first. I'm not entirely
      sure _why_ this causes that error to be thrown but I believe it is
      related to the environments being different.
      becf1bcb
  16. 18 9月, 2015 1 次提交
  17. 30 6月, 2015 1 次提交
  18. 12 6月, 2015 3 次提交
  19. 30 5月, 2015 1 次提交
  20. 02 5月, 2015 1 次提交
  21. 24 3月, 2015 1 次提交
  22. 22 2月, 2015 1 次提交
  23. 08 1月, 2015 1 次提交
  24. 08 3月, 2014 1 次提交
    • R
      Make the rails:template rake task load initializers · 9c53b8b8
      Robin Dupret 提交于
      Templates could rely on irregular inflections or external libraries for
      instance so we should load the application's initializers when running
      the rails:template task.
      
      The introducing commit of this feature is f7f11361 ; the initializers
      have never been loaded invoking this task.
      
      Fixes #12133.
      9c53b8b8
  25. 02 1月, 2014 1 次提交
    • J
      Automatically maintain test database schema · ff7ab3bc
      Jon Leighton 提交于
      * Move check from generated helper to test_help.rb, so that all
        applications can benefit
      * Rather than just raising when the test schema has pending migrations,
        try to load in the schema and only raise if there are pending
        migrations afterwards
      * Opt out of the check by setting
        config.active_record.maintain_test_schema = false
      * Deprecate db:test:* tasks. The test helper is now fully responsible
        for maintaining the test schema, so we don't need rake tasks for this.
        This is also a speed improvement since we're no longer reloading the
        test database on every call to "rake test".
      ff7ab3bc
  26. 15 12月, 2013 1 次提交
  27. 22 11月, 2013 2 次提交
  28. 01 11月, 2013 1 次提交
  29. 11 7月, 2013 1 次提交
  30. 24 6月, 2013 1 次提交
  31. 11 6月, 2013 1 次提交
  32. 04 6月, 2013 1 次提交
  33. 01 6月, 2013 1 次提交
  34. 30 5月, 2013 1 次提交
  35. 07 5月, 2013 1 次提交
    • R
      Updates to make rails 4 happy with minitest 5: · 3073c531
      Ryan Davis 提交于
      + Namespace changes, overhaul of runners.
      + Internal ivar name changes
      - Removed a logger globally applied to tests that spew everywhere?!?
      + Override Minitest#__run to sort tests by name.
      + Reworked testing isolation to work with the new cleaner architecture.
      - Removed a bunch of tests that just test minitest straight up. I think these changes were all merged to minitest 4 a long time ago.
      - Minor report output differences.
      3073c531