Commit Graph

9383 Commits

Author SHA1 Message Date
José Valim
daf426291a Merge pull request #12097 from kassio/remove-unused-delegate-on-railtie
Remove unused delegate
2013-08-31 14:58:40 -07:00
Kassio Borges
c56a4a4f51 Remove unused delegate
Related with commit 4a2a504
2013-08-31 18:55:21 -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
wangjohn
30aa2b97e5 Using indent method to refactor controller generator.
[John J. Wang & Prathamesh Sonpatki]
2013-08-31 03:48:13 -04:00
Prathamesh Sonpatki
c2df74938e Fix typo in generators test helpr -> helper [ci skip] 2013-08-30 11:21:46 +05:30
wangjohn
ecd4e70a1f Refactoring Generators::Base.
The defaults hash isn't used unless the +class_options+ hash has a
particular key, so we don't need to compute it unless this is true.

Also moving some code for extracting a module into its own method.
2013-08-28 15:22:05 -05:00
Thibault Jouan
1cb5094903 Comply with current umask when generating new app:
When creating a new application using the default rails generator
(`rails new my_app`), it will apply some permissions bypassing the
current process umask. The `bin' directory and any files inside it will
always be set a mode of 0755.

  This change removes the current umask bits from the mode applied by
the generator on the `bin' directory and its content.
2013-08-27 18:38:11 +00:00
Ł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
c9ffd73968 Include AV railtie when we're not loading full rails stack 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
Łukasz Strzałkowski
b2ae1fae5d Add loading 'action_view' as part of rails/all 2013-08-25 11:39:07 +02:00
Semyon Perepelitsa
d1f33e0963 Fix typo in file path, should include extension. 2013-08-23 16:16:05 +04: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
Vijay Dev
9abe72c760 Merge branch 'master' of github.com:rails/docrails
Conflicts:
	actionview/README.rdoc
	activerecord/lib/active_record/migration.rb
	guides/source/development_dependencies_install.md
	guides/source/getting_started.md
2013-08-17 21:49:16 +05:30
Vijay Dev
ec8ef1e105 Revert "Merge branch 'master' of github.com:rails/docrails"
This reverts commit 70d6e16fbad75b89dd1798ed697e7732b8606fa3, reversing
changes made to ea4db3bc078fb3093ecdddffdf4f2f4ff3e1e8f9.

Seems to be a code merge done by mistake.
2013-08-17 21:46:39 +05:30
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
Avner Cohen
86f2061cd5 Revert "Removing obsolete html tags in favor of markdown code block"
This reverts commit 157dc275da0ad38635337b7c1d96de656d91de8e.
2013-08-06 22:16:03 +03:00
Avner Cohen
157dc275da Removing obsolete html tags in favor of markdown code block. 2013-08-06 21:20:33 +03:00
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
Rafael Mendonça França
3a7e321246 Add CHANGELOG entry for #11665
[ci skip]
2013-08-04 11:38:14 -03:00
Rafael Mendonça França
067393895d Merge pull request #11665 from mshytikov/fix-config-log_level
Rails.logger should have level specified by config.log_level.
2013-08-04 07:34:45 -07:00
Guillermo Iguaran
71f512646a Revert "Isolate railties Generators Tests"
This fixes railties tests in JRuby but break it in MRI
This reverts commit fea99276c7024f183bf72a16ad9f36af4bae1d42.
2013-08-02 21:48:34 -05:00
Alex Tambellini
fea99276c7 Isolate railties Generators Tests
With this change jruby should pass all of the railties tests.
2013-08-02 22:26:58 -04:00
Arun Agrawal
65624e9030 Added action_view in Rails::Info 2013-08-02 10:30:04 -04:00
Rafael Mendonça França
ffb680e121 Merge pull request #11601 from TylerRick/dont_permanently_silence_all_warnings
Remove $VERBOSE = nil from tasks.rb
2013-07-30 19:00:04 -07: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
Carlos Antonio da Silva
4cf805a6d9 Move changelog entry to the top [ci skip] 2013-07-29 08:03:41 -03:00
Pawel Janiak
f18aecfe7b Changed stylesheet load order in the stylesheet manifest generator. 2013-07-28 15:05:17 +02:00
Arun Agrawal
1e384f82b0 Removed excluding vendor from API doc [ci skip]
These folder not exists in system
2013-07-26 12:21:53 +02:00
Arun Agrawal
e32576ae52 Excluding action_view/vendor in API [ci skip] 2013-07-26 12:03:53 +02:00
Tyler Rick
9affba83f5 Remove $VERBOSE = nil from tasks.rb
Permanently setting $VERBOSE to nil causes unwanted side effects (warnings generated by app code are
silenced when triggered by a rake task but visible otherwise). silence_warnings {} would be safer to
use here since it resets $VERBOSE back to what it was when the block finishes.
2013-07-25 11:54:24 -07:00
Aaron Patterson
d7fc97d3f9 grab executable from rubygems 2013-07-25 10:01:19 -07:00
Akira Matsuda
44f785357c Use Ruby 2.0 caller_locations instead of caller if available
* we no more have to manipulate the each caller strings by ourselves using caller_locations

* caller_locations runs slightly faster, and creates less objects than good old caller
Benchmark (loading an Engine 1000 times):
  caller: 262.89 ms
  caller_locations: 186.068 ms
2013-07-25 17:13:53 +09:00
Akira Matsuda
3c6f35dc03 Privatize non-test method 2013-07-25 17:08:43 +09:00
Zachary Scott
b017562382 Use GeneratedAttribute#column_name if #reference? scaffold_generator in _form view [Fixes #11573] 2013-07-23 18:06:44 -03:00
Carlos Antonio da Silva
fe820a772d Stop reading the same file twice for testing different content
assert_file already gives this functionality for free by passing
multiple contents.
2013-07-22 22:43:38 -03:00
Piotr Sarnacki
73bbf54868 Revert "Match Dev/Prod parity for Index Page"
Showing welcome page in production can expose information, which should
not be visible on production if people don't override the default root
route.

This reverts commit b0caea29c2da9f4c8bb958019813482da297067d.
2013-07-22 17:19:07 +02:00
Piotr Sarnacki
230d2f84a1 Merge pull request #11514 from schneems/schneems/dev-prod-parity-index
Match Dev/Prod parity for Index Page
2013-07-22 03:25:27 -07:00
Andrew White
e5275f9b59 Clear named routes when routes.rb is reloaded
Fix an issue where Journey was failing to clear the named routes hash when the
routes were reloaded and since it doesn't overwrite existing routes then if a
route changed but wasn't renamed it kept the old definition. This was being
masked by the optimised url helpers so it only became apparent when passing an
options hash to the url helper.
2013-07-21 17:11:52 +01:00
Vijay Dev
3613235cc3 Merge branch 'master' of github.com:rails/docrails 2013-07-21 18:08:43 +05:30
schneems
b0caea29c2 Match Dev/Prod parity for Index Page
With Rails 4 the default index page was moved from a static file `index.html` inside the `public/` folder to an internal controller/view inside of the railties gem. This was to allow use of erb in the default index page and to remove the requirement that new apps must delete a static file to make their index pages work. While this was a good change, the functionality was unexpected to developers who wish to get their apps running in production ASAP. They will create a new app `rails new my app`, start a server to verify it works, then immediately deploy the app to verify that it can start working in production. Unfortunately locally they see a page when they visit `localhost:3000` when they visit their production app they get an error page.

We initially anticipated this problem in the original pull request, but did not properly anticipate the severity or quantity of people who would like this functionality. Having a default index page serves as an excellent litmus test for a passed deploy on default apps, and it is very unexpected to have a page work locally, but not on production. 

This change makes the default index page available in production if the developer has not over-written it by defining their own `root` path inside of routes.
2013-07-20 14:56:10 -05:00