Commit Graph

11063 Commits

Author SHA1 Message Date
claudiob
1a5941e3cf AppGenerator: Replace 'rake' with 'rails_command'
Since Rails 5.0 is switching the Rails command line from 'rake …'
to 'rails …', it makes sense to also replace the `rake` method in
the Rails templates API.

Based on feedback from @matthewd and @kaspth, I chose to replace
`rake` with `rails_command`, which is less confusing than
the alternatives `rails` or `command` or `rails_run` and is not
Thor-reserved word like `task`.
2016-02-20 10:01:55 -08:00
Aaron Patterson
3bd9fe1708 Merge pull request #23756 from tenderlove/move_digest_cache
move digest cache on to the DetailsKey object
2016-02-18 09:23:59 -08:00
Aaron Patterson
3239ed48d2 move digest cache on to the DetailsKey object
This moves digest calculation cache on to the details key object.
Before, the digest cache was a class level ivar, and one of the keys was
the hash value of the details key object:

  13c4cc3b5a/actionview/lib/action_view/digestor.rb (L28)

An object's hash value is not unique, so it's possible for this cache
key to produce colliding keys with no resolution.  This commit move
cache on to the details key object itself, so we know that the digests
are always unique per details key object.
2016-02-18 08:23:26 -08:00
yuuji.yaginuma
8e95feb723 set skip_listen option to dummy appplication
If you want to use `EventedFileUpdateChecker`, need to specify `listen` to plugin's gemspec.
However, the default is not specified `listen` to plugin's gemspec,
`EventedFileUpdateChecker` should be disabled.
2016-02-18 21:24:17 +09:00
Andrew White
d50fbe952f Merge pull request #23730 from y-yagi/fail_fast_when_test_error
modify to `error` also abort when specify fail fast option
2016-02-17 18:33:11 +00:00
yuuji.yaginuma
1b8fc04216 modify to error also abort when specify fail fast option 2016-02-17 22:04:32 +09:00
Benjamin Quorning
a623442623 Implement ActionController::Parameters#inspect
Now that AC::Parameters is no longer a Hash, it shouldn't look like a hash.
2016-02-17 14:01:14 +01:00
yuuji.yaginuma
dbc30d7e26 remove unused method
`app_templates_dir` is unused since dc53fe9.
2016-02-17 17:26:56 +09:00
Xavier Noria
94dbc48887 adds --skip-listen to the application generator [closes #23590] 2016-02-17 00:59:42 +01:00
Yves Senn
b0b61b62f9 Merge pull request #23630 from akshaymohite/correct-test-name-api-only
Correct config option from only_api to api_only in test
2016-02-16 12:00:59 +01:00
Yves Senn
9d37874732 reset ActionMailer::Base.deliveries in ActionDispatch::IntegrationTest.
Whenever you are sending emails in integration tests using the `:test`
delivery method you need to make sure that
`ActionMailer::Base.deliveries` is reset after every test. This piece of
boilerplate code is present in all my applications that send
emails. Let's have `ActionDispatch::IntegrationTest` reset the
deliveries automatically.
2016-02-16 11:20:59 +01:00
Yves Senn
156c2cb571 fix more failing tests due to 07e422f ... 🙏 2016-02-15 17:36:54 +01:00
Yves Senn
0ff1d9b433 fixing the build take II. 😓 2016-02-15 16:47:51 +01:00
Yves Senn
218dc0a3d3 fix build broken by 07e422f58d61da0. 2016-02-15 15:57:14 +01:00
Yves Senn
cfd61919da Merge pull request #23631 from y-yagi/generate_mailer_views_in_api
generate mailer views in Rails API
2016-02-15 15:25:52 +01:00
Yves Senn
07e422f58d test runner, relay minitest information about the error location.
This is a follow-up to ea70c29 to bring back the assertion error
location information provided by minitest.
2016-02-15 15:19:24 +01:00
Yves Senn
ea70c295ff Revert "Prefer Minitest's location for test failures."
This reverts commit 0db310586ac3e15be95d2ef27ff40cfa24c05c10.

Closes #23686.

Conflicts:
	railties/test/application/test_runner_test.rb

It's possible that the `result.location` returned by minitest is outside
the test file itself. For example in the case of mocha. This resulted in
bad rerun snipptets:

```
bin/rails test app/models/deliveries/delivery.rb:103
```

Let's always use the first line of the failed test-case in our rerun
snippet. We can display the line number of the assertion error elsewhere.
2016-02-15 15:19:16 +01:00
yuuji.yaginuma
0146a055c0 generate mailer views in Rails API
View files is necessary to send mail, it should be generated even Rails API.
Fixes #23617
2016-02-15 22:13:32 +09:00
Vipul A M
4feb34ddf2 Merge pull request #23569 from Gaurav2728/no_doc_of_some_railtie_methods
mark as #:nodoc:  [ci skip]
2016-02-15 15:19:47 +05:30
Yves Senn
2f284170c3 Merge pull request #23664 from y-yagi/remove_test_order_from_environment_file
remove `active_support.test_order` from environment file
2016-02-15 10:49:20 +01:00
Gaurav Sharma
d95cb0627a mark as #:nodoc: [ci skip]
can’t be instantiate directly or may be no need for doc.
2016-02-15 15:12:51 +05:30
Kasper Timm Hansen
3c96a6eaa4 Merge pull request #23505 from kaspth/inject-rails-config-through-railtie
Inject Rails related configuration through Railtie
2016-02-14 18:08:46 +01:00
Kasper Timm Hansen
661298176c Inject Rails' channel paths in engine.
We were explicitly referencing Rails.root in ActionCable::Server::Configuration.initialize,
thereby coupling ourselves to Rails.

Instead add `app/channels` to Rails' app paths and assign the existent files
to `channel_paths`.

Users can still append to those load paths with `<<` and `push` in `config/application.rb`.

This means we can remove the custom `Dir` lookup in `channel_paths` and the Rails
and root definitions in the tests.
2016-02-14 17:46:48 +01:00
yuuji.yaginuma
b9e226188a remove active_support.test_order from environment file
The default test order has been changed to `:random` in 5f777e4b5ee2e3e8e6fd0e2a208ec2a4d25a960d.
Therefore, it is no more need to be specified in the environment file.
2016-02-14 07:55:56 +09:00
Kasper Timm Hansen
6e8d70e697 Fix expected hash syntax.
3f70e8bd2 set a new bar for tests, but they weren't updated.

Update their expectation.
2016-02-12 23:31:46 +01:00
Rafael Mendonça França
3f70e8bd2d Use Ruby 1.9 hash syntax 2016-02-12 19:12:42 -02:00
Kasper Timm Hansen
8c53b41293 Merge pull request #23611 from abhishekjain16/routes_options
Fix routes to match verb and URL path with -g option also.
2016-02-12 20:20:14 +01:00
Tom von Schwerdtner
1a61496ae5 Use correct path in documentation.
s/config\/production/config\/environments\/production/

[ci skip]
2016-02-12 13:53:18 -05:00
Akshay
2d9b774940 Correct config option from only_api to api_only in test 2016-02-12 15:23:37 +05:30
Vipul A M
ef2a8c2391 - Fixed and removed long arguments to rake routes
- Fixed related documentation and usage all around

Fixes #23561
2016-02-12 14:35:57 +05:30
Abhishek Jain
4e3931aac2 Fixes routes to match verbs and path with -g option 2016-02-11 15:16:33 +05:30
Richard Schneeman
391061a30d Merge pull request #23528 from bensheldon/patch-1
Set database poolsize via rails_max_threads
2016-02-10 14:19:21 -06:00
Ben Sheldon
1273fc9b1d Set postgresql poolsize via RAILS_MAX_THREADS 2016-02-10 11:39:48 -08:00
David Heinemeier Hansson
437a7a406c Merge pull request #23512 from y-yagi/set_association_name_to_fixture
set association name to generated fixtures if attribute is reference
2016-02-10 17:23:30 +01:00
Xavier Noria
bd69718124 prevent apps in the railties test suite from running the evented monitor 2016-02-10 01:32:17 +01:00
Xavier Noria
00a5eb6aeb include spring-watcher-listen in the Gemfile of new applications 2016-02-10 00:45:19 +01:00
Xavier Noria
de6ad5665d enables the evented monitor in new applications 2016-02-10 00:28:50 +01:00
Scott Bronson
ba2aea9807 revert dev:cache to rake task, fixes #23410 2016-02-07 14:32:43 -08:00
Syamil MJ
04021c4b78 Remove unused private method 2016-02-07 04:07:48 +08:00
yuuji.yaginuma
00c64e8ae2 set association name to generated fixtures if attribute is reference
It has been changed to require `belongs_to` by default in Rails 5.
Therefore in order to pass the controller test, have association of set to fixtures.

Fixes #23384
2016-02-06 22:41:10 +09:00
Genadi Samokovarov
91678fe9f7 Replace old Rails greeting references
A couple of the READMEs were still referring the old welcome page. This
is a small change that goes over it.

[ci skip]
2016-02-06 09:14:42 +02:00
Kasper Timm Hansen
84b72a812f Fix mixing line filters with Minitest's -n filter.
Previous commit accidentally broke mixing line filters with string -n filter.

Fix by checking if it is a string and returning it.

We also need to ensure the -n filter carry forward into any other composite filters.

Fix by letting the named filter be extractable, so we'll keep this for the next runnable's
run.
2016-02-05 21:53:27 +01:00
yuuji.yaginuma
c9768b8a88 move CHANGELOG entry to the appropriate position [ci skip]
Dummy apple icon files has been added after the 5.0.0.beta2 release.
ref: #23455
2016-02-05 18:27:22 +09:00
Vipul A M
c074343cff - app generate option --skip-sprockets leaves jquery-rails gem, which relies on sprockets environment
- Remove jquery-rails if --skip-sprockets is true

Fixes #23431
2016-02-04 21:01:45 +05:30
Prem Sichanugrist
b1ae3a32b5 Update assertion on redis in generated Gemfile
Redis now included in Gemfile but commented out. This change was made in
91864439c7aebb6ca710831aac6781903a433904 and is causing the test
failure.

See https://travis-ci.org/rails/rails/jobs/106994913#L1025
2016-02-04 09:47:24 -05:00
Rafael França
83147f1ff3 Merge pull request #23478 from vipulnsward/23470-pass-api-in-update-generator
Pass api only option to rails rails:update task to update only based on api Apps
2016-02-04 12:12:53 -02:00
Vipul A M
e0e872f675 Pass api only option to rails rails:update task to update only based on API.
Fixes #23470
2016-02-04 19:40:23 +05:30
David Heinemeier Hansson
f2306d05d8 Turbolinks has moved out
All grown up and shit!
2016-02-04 12:17:12 +01:00
David Heinemeier Hansson
91864439c7 Redis is now only needed if you want to use Action Cable in production
So no need to have it on by default in the Gemfile.
2016-02-04 12:16:57 +01:00
Akira Matsuda
dfa48f200c rake stats dynamically scales now
So it can properly show stats for an app with 1,000,000+ LOC
2016-02-04 18:25:05 +09:00