| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
| |
Same as 4d4ff531b8807ee88a3fc46875c7e76f613956fb
|
| |
|
|
|
|
|
| |
AppPreparer doesn't actually prepare applications, it scrubs ARGV.
Let's also get the class under test while we're at it
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Right now when you start a server via `rails s`, the logger gets extended so that it logs to the file system and also to stdout. This extension behavior is not "intelligent" and if the default logger is already set to output to stdout, then the contents will be received twice.
To capture logs in accordance with http://www.12factor.net/logs some platforms require the logs to be sent to standard out. If a logger is set to stdout, and the server is started using `rails server` instead of another method (i.e. `thin start` etc.) then the app will produce double logs.
This PR fixes the issue by only extending the logger to standard out in the development environment. So that in production you don't get double logs like this:
```
ActionView::Template::Error (wrong number of arguments (5 for 4)):
1: <% lang_index = 0 %>
2: <div class="row">
3: <ul class="nav nav-tabs nav-stacked span2" data-tabs="tabs" id="repo-tabs">
4: <% repos.group_by(&:language).each do |lang, repos| %>
5: <% unless lang == nil %>
6: <li><a href="#<%= "#{lang.parameterize}#{lang.hash}" %>" data-toggle="tab"><%= lang %></a></li>
7: <% end -%>
app/views/shared/_repos.html.erb:4:in `_app_views_shared__repos_html_erb___1685450633638247395_70300668607000'
app/views/pages/index.html.erb:13:in `_app_views_pages_index_html_erb__2084723628308867770_70300687584880'
ActionView::Template::Error (wrong number of arguments (5 for 4)):
1: <% lang_index = 0 %>
2: <div class="row">
3: <ul class="nav nav-tabs nav-stacked span2" data-tabs="tabs" id="repo-tabs">
4: <% repos.group_by(&:language).each do |lang, repos| %>
5: <% unless lang == nil %>
6: <li><a href="#<%= "#{lang.parameterize}#{lang.hash}" %>" data-toggle="tab"><%= lang %></a></li>
7: <% end -%>
app/views/shared/_repos.html.erb:4:in `_app_views_shared__repos_html_erb___1685450633638247395_70300668607000'
app/views/pages/index.html.erb:13:in `_app_views_pages_index_html_erb__2084723628308867770_70300687584880'
```
ATP Railties. Opened against master in favor of #10999
|
| |
|
|\
| |
| | |
Creating a class to handle preparing ARGV.
|
| |
| |
| |
| |
| |
| | |
Before the AppGenerator is started, ARGV needs to be modified to
correctly account for some things. I'm extracting these out into their
own class.
|
|/
|
|
|
| |
Instead of using the global constant ARGV, we're changing to using the
instance variable because it is more testable.
|
|
|
|
|
|
| |
This class encapsulates a lot of logic that wasn't very object oriented.
Helper methods have been created to try to make things more logical and
easy to read.
|
|
|
|
|
| |
There are historical reasons that the `plugin` command was `plugin_new`, now those are no longer applicable, we should remove the naming edge case from the project. This PR is based off of comments from #11176
ATP Railties
|
|\
| |
| | |
Make "rails dbconsole" work with activerecord-postgis-adapter
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
| |
Related with ed8df3ff018d17fad123e48c7cb907332e72e7dc
|
| |
|
|
|
|
| |
v2 of pull request based on feedback from @rafaelfranca, @schneems, and @carlosantoniodasilva
|
|
|
|
|
|
|
|
|
|
| |
We used to pass the Rails::Application subclass to #run.
The Rails server then called #to_app to convert that class to the
actual Rack application.
if you surround `#run` with a call to `#map` the server no longer
convertes the class to the instance and we end up with unnecessary
delegation calls on every request.
|
|
|
|
| |
Cache the value of "super" in a variable and use it instead.
|
| |
|
| |
|
|
|
|
|
|
| |
* `rails test -f` will run the test suites with all fixtures loaded
* New application will now generated without `fixtures :all` line
enabled by default.
|
|
|
|
|
| |
Any flags that got set will be passed through to MiniTest::Unit.runner,
such as `-n`, `-s-, and `-v`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To run the whole test suite:
$ rails test
To run the test file(s):
$ rails test test/unit/foo_test.rb [test/unit/bar_test.rb ...]
To run the test suite
$ rails test [models,helpers,units,controllers,mailers,...]
For more information, see `rails test --help`.
This command will eventually replacing `rake test:*`, and `rake test`
command will actually invoking `rails test` instead.
|
|
|
|
|
|
| |
I've also added a proper acceptance test which reproduced the issue.
Closes #9513, #9515.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Executable scripts are versioned code like the rest of your app. To generate a stub for a bundled gem: 'bundle binstubs unicorn' and 'git add bin/unicorn'
|
|
|
|
|
|
|
|
| |
Avoid swallowing all exceptions that might happen when requiring
debugger, just catch a LoadError if it cannot be loaded.
Check for more background:
https://github.com/rails/rails/commit/28fd867c9bc790636d37a28f288791cd0089a6fd#commitcomment-2386952
|
| |
|
| |
|
|
|
|
|
| |
This method doesn't need to be in the class, since it's only used only
from the instance.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow environment name to start with a substring of the default
environment names.
For example: tes, pro, prod, dev, devel, etc.
Fixing identation.
Adding test for Rails::Console.parse_arguments method.
Fix issue 8628 for Rails::DBConsole.
|
|
|
|
|
|
| |
command
Closes #8545
|
| |
|
| |
|
|
|
|
|
|
| |
Remove not used variable.
Remove config attr_reader causing warning.
Fix indent in runner file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using sqlite3 it was attempting to find the database file based on
Rails.root, the problem is that Rails.root is not always present because
we try to first manually load "config/database.yml" instead of loading
the entire app, to make "rails db" faster.
This means that when we're in the root path of the app, calling "rails db"
won't allow us to use Rails.root, making the command fail for sqlite3
with the error:
./rails/commands/dbconsole.rb:62:in `start':
undefined method `root' for Rails:Module (NoMethodError)
The fix is to simply not pass any dir string to File.expand_path, which
will make it use the current directory of the process as base, or the
root path of the app, which is what we want.
When we are in any other subdirectory, calling "rails db" should work
just fine, because "config/database.yml" won't be found, thus "rails db"
will fallback to loading the app, making Rails.root available.
Closes #8257.
|
| |
|
| |
|
| |
|
| |
|