Commit Graph

10615 Commits

Author SHA1 Message Date
Aaron Patterson
d226ba5b6a smooth move aaron.... 💣 2015-08-20 13:49:05 -07:00
Aaron Patterson
51211a94bd point at rack master 2015-08-20 13:45:11 -07:00
yuuji.yaginuma
4d90bd02e8 fix path of annotations.rake [ci skip] 2015-08-20 21:46:21 +09:00
Kasper Timm Hansen
c83b117d4b Merge pull request #21279 from ronakjangir47/test_cleanup
Cleaned up generators tests using internal assertion helper
2015-08-20 07:37:59 +02:00
Ronak Jangir
63a70ad6ff Cleaned up generators tests using internal assertion helper 2015-08-20 09:22:56 +05:30
Andrei Istratii
d0e0fbafb2 Migrate to Sprockets 4. 2015-08-19 21:45:46 +03:00
printercu
0b7a37aa02 Fixed syslog example in production config template 2015-08-17 16:40:48 +03:00
Daniel Morris
0a888f0c0d Updated tests for the generated version number change 2015-08-16 23:45:55 +01:00
Daniel Morris
c3a9e97f84 Plugins are generated with the version 0.1.0
The semantic versioning specification uses MAJOR.MINOR.PATCH – it would
make more sense to set the version to 0.1.0 for initial development
since a patch release cannot be created before a minor feature release.
2015-08-16 23:22:15 +01:00
Robin Dupret
cbca29a959 Add a changelog entry for #21124 [ci skip]
[Kir Shatrov & Robin Dupret]
2015-08-16 14:42:09 +02:00
Robin Dupret
b803798b9d Tiny documentation fixes [ci skip]
* Add missing `def` and remove useless `do` keywords.
* Move `:nodoc:` in front of the methods' definition so that methods
  under these ones are correctly visible on the API.
2015-08-16 14:16:20 +02:00
Sean Griffin
c82d2d2676 Merge pull request #21021 from sgrif/sg-no-routes-comment
Replace the giant comment in routes.rb with a link to the guides
2015-08-12 19:57:33 -06:00
Kasper Timm Hansen
a0fa45c0e6 Merge pull request #21124 from kirs/feature/reload-i18n
Reload I18n.load_path in development
2015-08-10 07:34:13 +02:00
Rafael Mendonça França
6e6cfb665a Merge pull request #21176 from y-yagi/fix_scaffold_tests_inside_api_engine
make generated scaffold functional tests work inside API engines
2015-08-09 23:50:27 -03:00
Rafael Mendonça França
2ca686110c Whitespaces 2015-08-09 22:33:19 -03:00
Kir Shatrov
f50e90a1ae Reload I18n locales in development 2015-08-10 00:17:49 +02:00
yuuji.yaginuma
22d863d272 make generated scaffold functional tests work inside API engines
* set engine's route in setup
* use fixture with engine namespace
2015-08-09 21:32:39 +09:00
eileencodes
12f08acbac Fix deprecation warning in tests
Using the string version of the class reference is now deprecated when
referencing middleware. This should be written as a class not as a string.

Deprecation warning that this change fixes:
```
DEPRECATION WARNING: Passing strings or symbols to the middleware
builder is deprecated, please change
them to actual class references.  For example:
  "ActionDispatch::ShowExceptions" => ActionDispatch::ShowExceptions
```
2015-08-08 10:38:09 -04:00
Mehmet Emin İNAÇ
c7375fd162 Added bin/update script to update application automatically
use system!

fix changelog

use bundle check first and use rake

use system instead system! for bundle check
2015-08-07 04:01:34 +03:00
Ersin Akinci
38f28f7704 Only load statistics.rake once from inside engine
When running rake stats from inside an engine,
the engine's Rakefile attempts to reload
statistics.rake after the test app loads it, which
results in STATS_DIRECTORIES being redefined and
an annoying warning. This patch skips loading
statistics.rake from tasks.rb if rake's current
scope isn't empty, i.e. if we are running from
inside an engine and not the test app dir or a
normal app.

Fixes #20510.
2015-08-06 17:34:29 -03:00
Rafael Mendonça França
ce1bd47698 Merge pull request #21043 from y-yagi/loading_fixtures_in_engine_integration_tests
set the correct path to `ActionDispatch::IntegrationTest.fixture_path`
2015-08-06 17:29:19 -03:00
yuuji.yaginuma
35a734d671 stop using deprecated render :text in railties 2015-08-06 15:50:28 +09:00
Aaron Patterson
a31bfe6983 routes in the env via the request object 2015-08-05 17:13:19 -07:00
Aaron Patterson
df71e48be8 allocate a request object to avoid hash allocations
This decouples the `call` method from knowing the SCRIPT_NAME key and
offloads decisions about how to access script_name
2015-08-05 16:55:03 -07:00
Kasper Timm Hansen
8468fb1c6b Use exist? instead of deprecated exists? 2015-08-05 21:39:54 +02:00
Kasper Timm Hansen
2d00aa7a93 Merge pull request #20961 from ccallebs/add-dev-mode-caching
Add dev caching toggle / server options
2015-08-05 21:37:57 +02:00
Chuck Callebs
a01e58afd9 Add rake dev:cache task to enable dev mode caching.
Taken from @Sonopa's commits on PR #19091.

Add support for dev caching via "rails s" flags.

Implement suggestions from @kaspth.

Remove temporary cache file if server does not have flags.

Break at 80 characters in railties/CHANGELOG.md

Remove ability to disable cache based on server options.

Add more comprehensive options: --dev-caching / --no-dev-caching
2015-08-04 23:41:23 -04:00
Rafael Mendonça França
17eb64213a Merge pull request #21105 from os97673/allow-minitest-plugins
Allow Minitest to load plugins. Fixes #21102
2015-08-03 16:13:17 -03:00
Mehmet Emin İNAÇ
271c8e12af Inform user to add script in correct location into the application.js manifest file [ci skip]
use it

change the warning
2015-08-03 19:42:14 +03:00
Yves Senn
bc3956c0d5 Revert "test runner should crash with non existing file argument."
This reverts commit 465f0fbca3d4a1c269038b84ec9cc248fdab5fab.

This breaks some cases where non file / directory arguments are passed
to the runner (for example db:migrate).

I still think that we can get this to work. From what I can tell there
is no reason why db:migrate is passed along to `Minitest.run`. I'll
revert and investigate possible solutions.
2015-08-03 13:42:30 +02:00
Yves Senn
1921c6e91a Merge pull request #21104 from atul-shimpi/master
Inform user to add styles in correct location in application.css

[ci skip]
2015-08-03 11:24:55 +02:00
Yves Senn
465f0fbca3 test runner should crash with non existing file argument.
Before this patch, using `bin/rails test` with a non existing
file or directory argument would silently swallow the argument and
run the whole test suite.

After the patch the command fails with `cannot load such file --`.
2015-08-03 11:17:07 +02:00
Oleg Sukhodolsky
72bc400c9b Allow Minitest to load plugins. Fixes #21102 2015-08-03 08:11:49 +03:00
atul-shimpi
cbf178664d Inform user to add styles in correct location in application.css 2015-08-03 08:27:37 +05:30
Yves Senn
5ca385cb4e Merge pull request #20992 from JuanitoFatas/fix/bin-setup-script
Don't fail when checking dependencies in bin/setup script
2015-07-31 15:26:12 +02:00
schneems
9b18ba75b1 Fix rake/notes_test
Presumably due to https://github.com/rails/sprockets-rails/pull/265 sprockets was trying to load the "scss" gem but it isn't in the gemfile:

```
ApplicationTests::RakeTests::RakeNotesTest#test_register_a_new_extension:
LoadError: cannot load such file -- sass
```

If we use an empty precompile list, it won't try to load sass.
2015-07-29 20:12:56 -05:00
schneems
4bc2469156 Fix reported regression rails/sprockets-rails#265
We can prevent the UglifierCompressor from being instantiated prematurely by setting precompile to an empty array in this test.
2015-07-29 20:12:56 -05:00
Robin Dupret
a74fbb2972 Add :nodoc: for internal testing methods [ci skip] 2015-07-28 12:22:37 +02:00
yuuji.yaginuma
46599260b1 set the correct path to ActionDispatch::IntegrationTest.fixture_path
`ActionDispatch::IntegrationTest.fixture_path` set by `test_help.rb`, but if the engine,
path under the dummy is will be set, fixtures under test was not loaded.
2015-07-28 08:05:53 +09:00
Rafael Mendonça França
ab6f0dfbd7 Merge pull request #20759 from vngrs/fix_wrong_doc
Change wrong usage in documentation about autoload_paths [ci skip]
2015-07-27 17:08:46 -03:00
Rafael Mendonça França
695937c23b Merge pull request #21003 from robin850/api-plugins
Allow generating plugins for API applications
2015-07-27 13:03:00 -03:00
Sean Griffin
12e5cb5db3 Replace the giant comment in routes.rb with a link to the guides
This comment not only serves no purpose, but in my experience is
actively detrimental to new developers getting started with Rails.
Expereinced developers just end up deleting this comment, and are
annoyed that they had to take this step. I also spend a lot of time
mentoring brand new developers, and a consistent theme I've seen is that
this comment just ends up intimidating them, and making them think it's
dangerous to edit this file.

One of my students just said this (due to the number of comments which
even new developers don't actually read, they just see it as a sign that
this thing is "dangerous").

> I don't edit any file that Rails generates for me, until my instructor
> says that it's OK to do so.

Realistically, this comment adds 0 value. We have very good
documentation, which we can just link to instead. If someone is truly
new enough to benefit from this info, they presumably just ran `gem
install rails`, and have an internet connection that they can use to
read the routing guide.

The choice of language here was very specific. I chose "the DSL
available" over "what is possible", because a consistent theme I've
noticed among my students is that they aren't aware that this is
actually a Ruby file, and can write any Ruby code here that they want.

This file is not the only offender, but is by far the biggest point of
pain that I've seen, and felt it was a good spot to open this
discussion.
2015-07-24 17:22:22 -06:00
Matthew Draper
40ce686b57 Merge pull request #20928 from matthewd/unload-interlock
We need stricter locking before we can unload
2015-07-24 09:56:20 +09:30
Robin Dupret
a120f2716e Enable the api_only option for API plugins' generators
This way, running a generator inside the plugin's directory, files that
are not relevant won't be generated (e.g. views or assets).

This won't interfere with the application's generators configuration.
2015-07-23 19:36:49 +02:00
Robin Dupret
ce32c9da96 Generate an API dummy application for API plugins 2015-07-23 18:27:19 +02:00
Robin Dupret
e3cfd5b174 Make ApplicationController inherit from AC::API for API plugins 2015-07-23 18:27:18 +02:00
Robin Dupret
67863aa844 Skip assets, helpers and views generation for API plugins 2015-07-23 18:27:15 +02:00
Robin Dupret
9a7f011da1 Add the --api option for the plugin generator 2015-07-23 18:13:00 +02:00
Juanito Fatas
86a9633ce9 Don't fail when checking dependencies in bin/setup script 2015-07-23 14:21:41 +08:00
Rafael Mendonça França
b260a2735e Merge pull request #20926 from rsanheim/fail-fast-bin-setup
add system! to fail fast in bin/setup
2015-07-21 11:03:00 -03:00