Commit Graph

1962 Commits

Author SHA1 Message Date
Aaron Patterson
7eb586f57f application template respects Gemfile entries 2013-11-04 15:00:29 -08:00
Aaron Patterson
8beb42cfbc gems can be added or skipped from the template 2013-11-04 15:00:29 -08:00
Yves Senn
84eac5dab8 BACKTRACE environment variable to show unfiltered backtraces.
We used to support the `BACKTRACE` environment variable but when
we switched to MiniTest it got removed: f9382cd7948

This commit adds back the functionality to show the unfiltered backtrace when needed.
This also works when you run your tests with `rake`:

* `BACKTRACE=1 bin/rake test`
* `BACKTRACE=1 ruby -Itest ...`
2013-11-04 10:00:44 +01:00
Arun Agrawal
fae08dd9ca No web-console for now 2013-11-03 22:19:17 +01:00
Rafael Mendonça França
9616a7ee1a Merge pull request #12733 from robin850/fix-railties-build
Fix railties build
2013-11-01 08:23:06 -07:00
Robin Dupret
bca36b080b Fix some failing tests for Rails::Paths
Since we are not using the File.exists? alias which raises a warning on
current ruby trunk, few stubs are wrong.
2013-11-01 14:42:12 +01:00
Arun Agrawal
c10a78124c More Warnings removed for ruby trunk
Same as 4d4ff531b8807ee88a3fc46875c7e76f613956fb
2013-11-01 13:47:23 +01:00
Arun Agrawal
e42fb393c2 Passing args for gemfile entry
Fixing build
2013-11-01 13:44:49 +01:00
Aaron Patterson
3f2230b9ec gemfile entries can be added to the app builder 2013-10-31 14:59:56 -07:00
Aaron Patterson
90ace1b986 forgot to add the test. orz 😢 2013-10-31 11:48:12 -07:00
Aaron Patterson
9bc99b4fe5 add a test for whitespace separated args in the rc file 2013-10-30 16:53:08 -07:00
Aaron Patterson
19ca0952bb there is no reason for ARGV[0] to be nil 2013-10-30 16:37:33 -07:00
Aaron Patterson
a27d2d74f2 add a comment to people of the future 2013-10-30 16:14:02 -07:00
Aaron Patterson
baaf9acaa7 adding a test for --help defaults 2013-10-30 16:12:40 -07:00
Aaron Patterson
169fa516c3 change the test to make argv a little more realistic 2013-10-30 15:49:47 -07:00
Aaron Patterson
7d01907f95 adding a test for the current behavior 2013-10-30 15:41:09 -07:00
Aaron Patterson
2f11668eb8 add a test for the rc commandline option 2013-10-30 15:33:46 -07:00
Aaron Patterson
327c6023cd remove useless assertions 2013-10-30 15:31:14 -07:00
Aaron Patterson
3060dfce5a test some of the rc specification 2013-10-30 15:29:01 -07:00
Aaron Patterson
9696073b2d forgot the test, oops! 2013-10-30 15:03:34 -07:00
Arun Agrawal
97ac5ed2a7 Fixed tests for app_generator
Added test for jbuilder and web-console inclusion.

Added README.rdoc for test default files
2013-10-27 23:40:40 +01:00
Robin Dupret
84e261b930 Removal of javascript related gems when creating an app
Commit 0417bc8 add the coffee-rails and javascript runtime gems even
when passing the --skip-javascript option but this is not the desired
behavior.

Also remove all javascript related stuff in the generated application
such as the vendor/assets/javascripts folder.
2013-10-27 18:44:03 +01:00
Robin Dupret
52b252614e Make the application name snake cased when it contains spaces
The application name is used to fill the `database.yml` and
`session_store.rb` files ; previously, if the provided name contained
whitespaces, it led to unexpected names in these files.

Since Shellwords.escape adds backslashes to escape spaces, the app_name
should remove them and replace any space with an underscore (just like
periods previously).

Also improve the assert_file helper to work with paths containing spaces
using String#shellescape.
2013-10-22 14:13:14 +02:00
yalab
4f642dcb39 Added --model-name option scaffold_controller_generator. 2013-10-15 15:35:15 +09:00
Marc Schütz
16c0023a9a Make logging to stdout work again with implicit development env 2013-10-13 19:21:18 +02:00
Ben Pickles
4de8851289 Expose MiddlewareStack#unshift to environment configuration. 2013-10-09 12:25:29 +01:00
Andrew White
deb91862b9 Merge branch 'fix-ip-spoof-errors' of https://github.com/tamird/rails into tamird-fix-ip-spoof-errors 2013-09-30 12:39:10 +01:00
schneems
5f98bb402b Only output Server logs in Development
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
2013-09-22 20:56:31 -05:00
Piotr Sarnacki
47ac67b8d4 Don't require using application_name before options
Before this commit options for `rails new` and `rails plugin new` had to
be passed in a strict order, trying to execute a following command:

    rails new -J path/to/app

resulted in an error.

This commit fixes the situation and allows to pass path to app anywhere
after `new`
2013-09-13 18:02:25 +02:00
Rafael Mendonça França
d891c19066 Merge pull request #12216 from suginoy/a-an
Fix typos: the indefinite articles(a -> an).
2013-09-13 05:55:28 -07:00
SUGINO Yasuhiro
4a36eb64a5 Fix typos: the indefinite articles(a -> an) 2013-09-13 20:44:37 +09:00
José Valim
1385ae138d Remove BasicRendering tests 2013-09-09 16:10:41 -03:00
Rafael Mendonça França
0329bab9d4 Merge pull request #11912 from jonkessler/respond-to-signature-fixes
Update Rails::Railtie::Configuration and ActionDispatch::Response#respond_to? to accept include_private argument
2013-08-31 14:41:14 -07:00
Prathamesh Sonpatki
c2df74938e Fix typo in generators test helpr -> helper [ci skip] 2013-08-30 11:21:46 +05:30
Łukasz Strzałkowski
a2ca04bb3a Extend basic rendering, test it in railties 2013-08-25 11:40:10 +02:00
Łukasz Strzałkowski
1b1c23599b Add --skip-action-view to app generator 2013-08-25 11:39:13 +02:00
Łukasz Strzałkowski
ac036cc38c Missing AV requires in railties tests 2013-08-25 11:39:13 +02:00
Łukasz Strzałkowski
e291e6a479 Include AV railtie in railties isolation tests 2013-08-25 11:39:12 +02:00
Łukasz Strzałkowski
d7d3e34172 Add AV as development dependency for railties
It's needed for tests
2013-08-25 11:39:12 +02:00
Łukasz Strzałkowski
718332536c Fix railtie tests 2013-08-25 11:39:11 +02:00
Rafael Mendonça França
a0b948e9f5 Fix the indentation on the from template of the scaffold generator 2013-08-19 10:52:01 -03:00
Jon Kessler
ba5fab4c01 update Rails::Railtie::Configuration and ActionDispatch::Response#respond_to? to accept include_private argument 2013-08-16 08:22:08 -07:00
Yves Senn
5c6e11d6b8 fix build error caused by #11900. 2013-08-15 14:17:08 +02:00
Josh Crowder
f3073773a3 Adding LESS to rake notes 2013-08-15 11:30:01 +01:00
Prathamesh Sonpatki
53c5794a4b Generate namespaced routes correctly for generators. Fix for #11532 2013-08-14 08:53:38 +05:30
thedarkone
a0907bbdad "Naked" rescue clauses only catch StandardError subclasses.
Similar to #11497.
2013-08-06 17:04:02 +02:00
thedarkone
3af8a91c38 Add a missing require.
This makes the rack_logger_test.rb runnable by itself (outside of the `rake test` suite).
2013-08-06 17:03:55 +02:00
Rafael Mendonça França
d86ccec097 Use the right instrumentation name
The pattern is event.component

Closes #11769

Conflicts:
	railties/CHANGELOG.md
2013-08-05 18:20:22 -03:00
Max Shytikov
e2180e84a9 Rails.logger should have level specified by config.log_level.
Fix bug when log level of Rails.logger (which was set via config.logger) does not match the    config.log_level.
2013-07-30 18:25:00 +03:00
Akira Matsuda
3c6f35dc03 Privatize non-test method 2013-07-25 17:08:43 +09:00