Rafael Mendonça França
9582b3f509
Merge pull request #20819 from y-yagi/rails_api_gemfile
...
remove `web-console` from API app generated Gemfile
2015-07-21 10:59:30 -03:00
Thiago Pinto
1acf0f0ebd
titleizing the New Link
2015-07-20 22:20:39 -03:00
David Heinemeier Hansson
068865a7d5
Merge pull request #20384 from kaspth/per-request-cache
...
Use digest cache in development.
2015-07-20 13:15:55 +02:00
Matthew Draper
bd31aec9c3
We need stricter locking before we can unload
...
Specifically, the "loose upgrades" behaviour that allows us to obtain an
exclusive right to load things while other requests are in progress (but
waiting on the exclusive lock for themselves) prevents us from treating
load & unload interchangeably: new things appearing is fine, but they do
*not* expect previously-present constants to vanish.
We can still use loose upgrades for unloading -- once someone has
decided to unload, they don't really care if someone else gets there
first -- it just needs to be tracked separately.
2015-07-20 09:14:10 +09:30
Kasper Timm Hansen
40f79da8f2
Make digest cache work in development.
...
Avoid computing the same fragment digest many times when looping over templates.
The cache is cleared on every request so template changes are still picked up.
2015-07-18 21:54:19 +02:00
Rob Sanheim
d54d4356e3
add system! to fail fast in bin/setup
2015-07-18 00:14:38 -05:00
Jon Atack
ea747f7d2e
[skip ci] Lookup can be a noun but it is not a verb
...
Various grammar corrections and wrap to 80 characters.
2015-07-17 20:18:57 +02:00
yuuji.yaginuma
824246f66b
make test runner work correctly inside engine
2015-07-12 18:29:31 +09:00
Aaron Patterson
cc60b5e359
remove Rack::Lock for webrick
...
constant loading should be thread safe now, so lets remove this
2015-07-10 16:09:51 -07:00
yuuji.yaginuma
8c6f7ca888
remove web-console
from API app generated Gemfile
2015-07-09 17:51:30 +09:00
Matthew Draper
383fed5f23
Rely on the load interlock for non-caching reloads, too
2015-07-09 03:31:30 +09:30
Matthew Draper
c37d47e308
Soften the lock requirements when eager_load is disabled
...
We don't need to fully disable concurrent requests: just ensure that
loads are performed in isolation.
2015-07-09 02:23:23 +09:30
Yves Senn
74c7246238
Merge pull request #20767 from y-yagi/remove_unnecessary_fixture_method
...
remove unnecessary loading fixtures from `navigation_test.rb`
2015-07-06 09:20:23 +02:00
yuuji.yaginuma
4e4ad5f7f2
remove unnecessary loading fixtures from navigation_test.rb
...
it has been corrected in 0176aef1ebaa9f69001c7045a51727a8ea9b61b8 as for loading of fixtures in `test_helper.rb`,
loading fixtures for each test is unnecessary.
2015-07-03 08:50:24 +09:00
Mehmet Emin İNAÇ
2ccae54d64
Change wrong usage in documentation about autoload_paths [ci skip]
...
We can't use this configuration outside of the application.rb
2015-07-02 16:18:49 +03:00
Robin Dupret
42b5906523
Display a more human readable list of reserved names
...
Interpolating an array inside a String will call #inspect on it. Let's
call #join to display a more human-readable error message.
2015-07-01 16:58:42 +02:00
Victor Costan
e334ec4fe6
Avoid crashing when minitest-rails is loaded.
...
The improvments to the test runner's integration with minitest in commit
b6fc8e25a10cc4abdd03018798b180270d6c5d7f add methods to the Minitest
module that refer to the Rails module. Unfortunately, when the
minitest-rails gem is loaded, the reference is incorrectly resolved to
the Minitest::Rails module.
2015-07-01 00:56:14 -04:00
Yves Senn
2183caa24a
dump_schema_after_migration
applies migration tasks other than db:migrate
...
Closes #20743 .
The task `db:_dump` now only dumps the schema if
`ActiveRecord::Base.dump_schema_after_migration` is true. This has
effects:
- `db:migrate:up`
- `db:migrate:down`
- `db:forward`
- `db:rollback`
2015-06-30 16:36:03 +02:00
Yves Senn
a8f250a22c
tests, railties tests should use bin/
executables when possible.
...
We recommend using the `bin/` executables in our docs and guides.
Let's make sure that our tests execute the same code path.
2015-06-30 11:19:01 +02:00
Yves Senn
3cd0530df6
Merge pull request #20724 from y-yagi/fix_scaffold_in_full_engine
...
fix NoMethodError that occurs when generating scaffold inside full mode engine
2015-06-29 14:23:26 +02:00
yuuji.yaginuma
b1738e1a02
fix NoMethodError that occurs when generating scaffold inside full mode engine
2015-06-28 18:16:01 +09:00
Rafael Mendonça França
329c249c9a
Merge pull request #20712 from nhodges/dev/nh/20345
...
Remove `config` options from `default_options` in `railties`
2015-06-27 13:39:07 -03:00
Nuri Hodges
4dbacf26a9
Remove config
options from default_options
in railties
...
Fixes #20345 .
2015-06-26 23:29:16 -07:00
Rafael Mendonça França
79fc70f413
Merge pull request #20714 from y-yagi/fix_file_fixture_path
...
correct `file_fixture_path` in plugins `test_helper.rb`
2015-06-27 01:18:27 -03:00
yuuji.yaginuma
5469d9e1c4
correct file_fixture_path
in plugins test_helper.rb
...
`fixture_path` does not end with a slash
2015-06-27 10:57:35 +09:00
Hirofumi Wakasugi
e6be33f1dd
cherry-pick test and source doc from #20050
2015-06-25 15:25:49 +09:00
Hirofumi Wakasugi
ce3d2fa05a
modify add_source in application template to take a block for gem entries
2015-06-25 15:25:14 +09:00
yuuji.yaginuma
1d3e0f5872
do not show "Failed tests" message when a failed test is not
2015-06-23 07:53:17 +09:00
yuuji.yaginuma
3bcb637eab
remove unused variable in reporter test
2015-06-22 08:04:53 +09:00
Yves Senn
e97b8cb15f
Merge pull request #20605 from dcrec1/assert_file
...
assert_file understands paths with special characters
2015-06-19 11:25:03 +02:00
Diego Carrion
6074d0f6d3
assert_file understands paths with special characters
...
fixes #20042
2015-06-18 11:59:47 -03:00
Mehmet Emin İNAÇ
c76b11244c
fix railties tests
2015-06-18 14:45:45 +03:00
Aaron Patterson
56903585a0
Remove ContentLength middleware from the defaults.
...
ContentLength is not part of the rack SPEC since rack/rack@86ddc7a6ec
If you want it, just add it as a middleware in your config.
2015-06-17 16:18:43 -07:00
Kasper Timm Hansen
8775bc3de1
Merge pull request #20596 from vngrs/use_single_quote_in_gemfile
...
Use single quote in Railties generators Gemfile [ci skip]
2015-06-17 12:59:48 +02:00
Mehmet Emin İNAÇ
65a2ef6ba9
Use single quote in Railties generators Gemfile [ci skip]
2015-06-17 12:55:03 +03:00
Santiago Pastorino
16db36b566
Bump AMS to 0.10.0.rc2
2015-06-16 19:37:13 -03:00
Roque Pinel
5fab7192ba
[ci skip] Fix the Rails::Generators::NamedBase#template doc
...
Since #13612 , `template` is no longer being used to generate
migrations.
2015-06-15 00:16:43 -04:00
Yves Senn
2e59604909
make it possible to customize the executable inside rereun snippets.
...
In the Rails repository we use a `bin/test` executable to run our tests.
However the rerun snippets still included `bin/rails test`:
BEFORE:
```
Failed tests:
bin/rails test test/cases/adapters/postgresql/schema_test.rb:91
```
AFTER:
```
Failed tests:
bin/test test/cases/adapters/postgresql/schema_test.rb:91
```
2015-06-13 11:58:43 +02:00
Yves Senn
1d43458c14
Merge pull request #20480 from senny/test_runner
...
use our own runner for Rails framework components `bin/test`
2015-06-12 17:19:47 +02:00
Sean Griffin
de45e4c6cd
Fix failing tests for Rails-API
...
This looks to be just out of sync tests
2015-06-11 17:24:59 -06:00
Rafael Mendonça França
f6babddb58
assigns was removed from Rails
2015-06-11 20:05:15 -03:00
Santiago Pastorino
51d5d6252e
head :no_content is implicitly called
2015-06-11 16:54:17 -03:00
Jorge Bejar
afc78e72b4
Checking if controller responds to wrap_parameter is not longer required
2015-06-11 16:54:16 -03:00
Jorge Bejar
cf9f2f329a
Enable wrap_parameter by default in rails api applications
2015-06-11 16:54:16 -03:00
Jorge Bejar
ebcc15ca4e
Add rake-cors gem (commented) in Gemfile for rails api apps
2015-06-11 16:54:16 -03:00
Santiago Pastorino
72d0784611
Make Rails API apps return the full resource on update
2015-06-11 16:54:16 -03:00
Santiago Pastorino
f3df21649a
Add CHANGELOG entries for API apps functionality
2015-06-11 16:54:15 -03:00
Santiago Pastorino
37507d3b83
Document Generators.api_only! method
2015-06-11 16:54:15 -03:00
Santiago Pastorino
03b576ee06
http only => API only
2015-06-11 16:54:15 -03:00
Santiago Pastorino
511c33a157
Add AMS 0.10.0.rc1 by default for api apps
2015-06-11 16:54:15 -03:00
Santiago Pastorino
dc4c68aaaa
Fix scaffold generator test for resource routes
2015-06-11 16:54:15 -03:00
Santiago Pastorino
846f35203d
Fix class_option description for api generators
2015-06-11 16:54:15 -03:00
Santiago Pastorino
b6c270fb62
Remove unneeded option from ResourceRouteGenerator
2015-06-11 16:54:15 -03:00
Jorge Bejar
fa11f10c94
Api only apps should include tmp and vendor folders
2015-06-11 16:54:14 -03:00
Jorge Bejar
674dab30bc
Routes resources avoid :new and :edit endpoints if api_only is enabled
2015-06-11 16:54:14 -03:00
Santiago Pastorino
440b334cbb
Use new hash syntax
2015-06-11 16:54:13 -03:00
Santiago Pastorino
3d3730040d
Disable jbuilder for Rails API apps, meanwhile it doesn't play nicely
2015-06-11 16:54:12 -03:00
Santiago Pastorino
7d17269be3
Add test to show api only apps allow overriding generator options
2015-06-11 16:54:12 -03:00
Santiago Pastorino
e9e94c1d15
Add config.api_only = true to config/application.rb when using rails new --api
2015-06-11 16:54:12 -03:00
Santiago Pastorino
98a9936228
config.api_only = true implies config.generators.api_only = true
2015-06-11 16:54:12 -03:00
Santiago Pastorino
decc4e8f82
Do not generate lib/assets directory for api apps
2015-06-11 16:54:12 -03:00
Santiago Pastorino
94fdba9c92
Api apps scaffold does not generate assets
2015-06-11 16:54:12 -03:00
Santiago Pastorino
e5b6188b47
Api apps scaffold does not generate helpers
2015-06-11 16:54:12 -03:00
Santiago Pastorino
6d2b405a4e
Api apps scaffold does not generate views
2015-06-11 16:54:12 -03:00
Santiago Pastorino
451b1e3574
Add api scaffold test for route, controller and its tests
2015-06-11 16:54:11 -03:00
Santiago Pastorino
d4fe23c76b
API apps scaffold generator generates an apropriate controller
2015-06-11 16:54:11 -03:00
Santiago Pastorino
20939b3fcc
config.generators.api_only = true set rails api option on generators
2015-06-11 16:54:11 -03:00
Santiago Pastorino
e8100fc4e3
Api apps scaffold generates routes without new and edit actions
2015-06-11 16:54:11 -03:00
Santiago Pastorino
c19035299a
Hide assets, helper, css and js namespaces for api only apps
2015-06-11 16:54:11 -03:00
Santiago Pastorino
101df203eb
Add api_only option to Generators
2015-06-11 16:54:11 -03:00
Santiago Pastorino
7b47e4250d
Do not generate test/helpers directory for api apps
2015-06-11 16:54:11 -03:00
Santiago Pastorino
3847e485b6
Do not generate app/views directory for api apps
2015-06-11 16:54:10 -03:00
Santiago Pastorino
9b66071a3e
Do not generate app/helpers directory for api apps
2015-06-11 16:54:10 -03:00
Santiago Pastorino
1718683016
Do not generate app/assets directory for api apps
2015-06-11 16:54:10 -03:00
Santiago Pastorino
e8915d098c
api option implies skipping javascript & sprockets
2015-06-11 16:54:10 -03:00
Santiago Pastorino
c09a401660
Generate appropriate initializers for an api app
2015-06-11 16:54:10 -03:00
Santiago Pastorino
2a9cf48a61
rails new --api generates an api app skeleton
2015-06-11 16:54:10 -03:00
Santiago Pastorino
212a099ab0
Add AC::API + its middleware stack integration test
2015-06-11 16:54:10 -03:00
Santiago Pastorino
135c059d6f
Add config.api_only option to application and remove appropriate middleware when true
2015-06-11 16:54:09 -03:00
Yuki Nishijima
a888c3cdc9
Change the index
arg of ActionDispatch::Static#new
to a kwarg
2015-06-11 04:34:11 -07:00
Yves Senn
eec932704f
inline test runner check into as/testing/autorun.rb
.
...
This makes it possible to easily get the runner working with existing
setups that rely on `active_support/testing/autorun.rb`.
2015-06-11 10:50:10 +02:00
masarakki
83b7bf4d3b
add option to avoid generating scaffold.css
2015-06-09 04:41:19 +09:00
Yves Senn
e8d02ccf8c
Merge pull request #19571 from kaspth/improve-runner-integration
...
Improve Test Runner's Minitest integration.
2015-06-08 12:05:12 +02:00
Rafael Mendonça França
847a5ea7db
Merge pull request #20444 from y-yagi/can_use_path_helper_method_in_console
...
modify console of app method in that can use the path helpers
2015-06-06 00:07:45 -03:00
yuuji.yaginuma
4fded7c069
modify console of app method in that can use the path helpers
2015-06-05 18:38:53 +09:00
Arun Agrawal
382f52ddbb
Remove warning for setting eager_load
...
AppTemplate::Application.new does not run load hooks.
To load this configuration we need to use create which will
run load hooks to load this configuration.
2015-06-05 11:07:16 +02:00
Kasper Timm Hansen
b6fc8e25a1
Improve test runner's Minitest integration.
...
This also adds free mix and matching of directories, files and lines filters.
Like so:
bin/rails test models/post_test.rb test/integration models/person_test.rb:26
You can also mix in a traditional Minitest filter:
bin/rails test test/integration -n /check_it_out/
2015-06-04 20:57:08 +02:00
Ronak Jangir
a68ffa731e
Removed duplicate test cases for template execution
2015-06-04 01:55:54 +05:30
Rafael Mendonça França
cecbf9ed32
Merge pull request #18587 from chrismcg/allow_deliver_later_queue_name_to_be_configured
...
Allow configuration of ActionMailer queue name
2015-06-03 13:25:32 -03:00
Yves Senn
939d5a4932
Merge pull request #20387 from y-yagi/fix_engine_generated_controller_test
...
set engine's route in the functional test is generated in the engine
2015-06-02 16:20:40 +02:00
Chris McGrath
f5a131aaea
Allow configuration of ActionMailer queue name
2015-06-02 10:49:49 +01:00
yuuji.yaginuma
3612793475
add test to run generated test files inside mountable engine
2015-06-02 09:11:48 +09:00
Rafael Mendonça França
8b67f28f4a
Merge pull request #20357 from ronakjangir47/remove_mocha1
...
Removed use of mocha from railties actions_test
2015-06-01 13:44:01 -03:00
Santiago Pastorino
651fa5edcd
Merge pull request #20406 from yoongkang/add_edge_sprockets
...
Use sprockets-rails from github repo
2015-06-01 13:35:31 -03:00
Ronak Jangir
655b8be814
Removed use of mocha from railties actions_test
2015-06-01 21:56:12 +05:30
Yoong Kang Lim
757dd93c7f
Use sprockets-rails from github repo
...
See #20397
2015-06-02 02:02:01 +10:00
Rafael Mendonça França
bdfc662a11
Merge pull request #20138 from tgxworld/deprecated_assert_template
...
Deprecate `assert_template` and `assigns()`.
2015-06-01 12:39:03 -03:00
yuuji.yaginuma
c861ef283f
add engine's namespace to fixture name
2015-05-31 21:28:51 +09:00
yuuji.yaginuma
6a8d91897b
set engine's route in the functional test is generated in the engine
2015-05-31 12:54:38 +09:00
Yoong Kang Lim
0cb327c549
Add test to ensure tmp:clear works when tmp is missing
...
See #20299 .
2015-05-30 00:44:12 -07:00