Commit Graph

9510 Commits

Author SHA1 Message Date
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
Prathamesh Sonpatki
e33defcec8 Removed information about creating database[ci skip]
- As default index page is no longer in public folder, rails hits the
  welcome controller in railties for index action
- If the database is not created or username and password are
  incorrect in database.yml, those errors are first shown before index
  action succeeds
- welcome#index succeeds iff the database is created with correct
  details in database.yml
- So this information about creating database is not required in the
  index template
2013-07-20 20:22:09 +05:30
Damien Mathieu
bae07dcce2 use the appropriate RDoc code markup
Thanks @fxn
2013-07-18 17:15:11 +02:00
Damien Mathieu
3c6767cade document the Rails::ConsoleMethods#helper and #controller methods
Closes rails/rails#11362
2013-07-18 16:18:07 +02:00
Xavier Noria
df6a62d8c0 Merge pull request #11465 from arunagw/removed_missleading_readme_link_doc
Fixed README link in API
2013-07-17 15:04:29 -07:00
Burkhard Vogel-Kreykenbohm
ad62cf68f8 bcrypt-ruby stable is 3.1 2013-07-17 16:39:07 +02:00
Arun Agrawal
4091606ff1 Fixed README link in API [ci skip]
This should not be a link because
it's creating a link with activesupport README right now
2013-07-17 10:35:59 +02:00
Arun Agrawal
0b5b32ef27 Fixed USAGE file for generator [ci skip] 2013-07-16 14:09:19 +02:00
Josef Šimánek
5ecd125a62 Added generated unit test for generator generator and new test:generators rake task included in test:all rake task. 2013-07-16 09:38:13 +02:00
Arun Agrawal
3b03733d9e Added CheckPending middleware in default
As this middleware comes by default in a new
rails app

Added test to check omit for CheckPending when

Active Record is not included.
2013-07-15 11:22:15 +02:00
Arun Agrawal
b5f8630591 No need to add config for x_sendfile_header
Rack::Sendfile is loaded by default now
2013-07-15 10:42:52 +02:00
Guillermo Iguaran
0b61cc730e Rack::Sendfile is now included in middleware by default, change tests to reflect that 2013-07-15 00:33:09 -05:00
Santiago Pastorino
207fa5c11d Revert "Don't use Rack::Sendfile middleware if x_sendfile_header is not present"
This reverts commit 19ac034bdc9be175eff7cf54208ba14b43d97681.
And allows webservers to configure X-Sendfile-Type.

Closes #11440 thanks to [@MSch]

Conflicts:
	railties/lib/rails/application.rb
2013-07-15 01:20:49 -03:00
Arun Agrawal
f6dd6310fc Removed unused require from Rakefile 2013-07-14 14:46:32 +02:00
Arun Agrawal
8b2bde3c26 Removed unused broken task for update README [ci skip] 2013-07-14 14:42:02 +02:00
Xavier Noria
1e403f1d6d Merge pull request #11425 from arunagw/actionview_api_generation
Actionview api generation
2013-07-14 04:55:20 -07:00
Arun Agrawal
d4e1fcf7e5 Added actionview in API generation [ci skip]
CHANGELOG and LICENSE removed as suggested
2013-07-14 09:44:58 +02:00
Santiago Pastorino
ba8b55f791 This is not needed anymore, before_initialize block can access config 2013-07-14 01:54:33 -03:00
Josef Šimánek
8e1656e76f Remove update:application_controller rake task. 2013-07-13 14:44:06 +02:00
José Valim
e7e81b4580 Merge pull request #11389 from jetthoughts/11381_fix_hit_database_on_precompile
#11381: Ignore config.eager_load=true for rake
2013-07-10 11:46:17 -07:00
Paul Nikitochkin
9cac69c602 #11381: Ignore config.eager_load=true for rake
Closes #11381
2013-07-10 21:43:15 +03:00
Rafael Mendonça França
54d893f9d8 Merge pull request #11385 from MarceloCajueiro/remove_string_interpolation
Remove unnecessary string interpolation
2013-07-09 19:56:56 -07:00
Marcelo G. Cajueiro
07e7c099b5 Remove unnecessary string interpolation
Removed from controller template of scaffold generator.
2013-07-09 21:30:34 -03:00
Rafael Mendonça França
37d1e48dfe Merge pull request #11378 from wangjohn/class_for_application_generator
Creating a class to handle preparing ARGV.
2013-07-09 06:14:06 -07:00
wangjohn
929e5b5b8b 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.
2013-07-09 08:29:07 -04:00
wangjohn
0c5d8f813c Using the instance variable for argv.
Instead of using the global constant ARGV, we're changing to using the
instance variable because it is more testable.
2013-07-09 08:21:54 -04:00
Rafael Mendonça França
b025fca0c5 Merge pull request #11355 from wangjohn/class_for_rails_commands
Creating a class for carrying out rails commands.
2013-07-08 08:39:34 -07:00
Yuri Artemev
dd996ad394 handle notes in *.sass files 2013-07-08 19:13:01 +04:00
wangjohn
f1f249d836 Creating a class for carrying out rails commands.
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.
2013-07-07 23:15:55 -07:00
Xavier Noria
374fd6693a fixes Rails version for the stable API [ci skip] 2013-07-06 22:42:24 +02:00
Xavier Noria
8d8d4b7782 fixes broken links in the API [Fixes #11335] [ci skip] 2013-07-06 22:24:06 +02:00
Arun Agrawal
4a2a504f40 Removed deprecated Rails.application.railties.engines. 2013-07-04 19:56:23 +02:00
Yves Senn
f45718df3d build fix: railties tests used deprecated SchemaCache methods. 2013-07-04 11:16:04 +02:00
Paul Nikitochkin
419f257b73 Removed unused deprecation requires. 2013-07-03 23:21:23 +03:00
Yves Senn
3974b95a6e Merge pull request #11280 from arunagw/added-missing-changelog-entry
Added missing CHANGELOG from PR #11279 [ci skip]
2013-07-03 13:11:58 -07:00
Arun Agrawal
7e897d469f Added missing CHANGELOG from PR #11279 [ci skip] 2013-07-03 22:10:31 +02:00
Paul Nikitochkin
d7f8724992 Removed deprecated threadsafe! 2013-07-03 22:52:31 +03:00
Rafael Mendonça França
f3f7f31407 Merge pull request #11272 from vipulnsward/generator_update
Remove deprecated `ActiveRecord::Generators::ActiveModel#update_attribute`
2013-07-03 10:33:20 -07:00
Vipul A M
822d995627 Remove deprecated ActiveRecord::Generators::ActiveModel#update_attributes in
favor of `ActiveRecord::Generators::ActiveModel#update`
2013-07-03 22:33:57 +05:30
Carlos Antonio da Silva
d6e1d6d7b5 Fix ruby patch level example in rails docs regarding info page [ci skip]
Thanks @egilburg.
2013-07-03 13:56:05 -03:00
Tyler Brock
5c099a6f06 Add patch level to Ruby version information
Given the recent security related patches to ruby and rails it is more
important than ever to know what patch level you are running.
2013-07-03 09:57:51 -04:00
Carlos Antonio da Silva
9adbbe93a9 Merge pull request #10565 from prathamesh-sonpatki/rake-db
Improved grammar and replaced 'dbs' slang with 'databases'
2013-07-02 19:39:32 -07:00
Carlos Antonio da Silva
161c3afc9c Merge pull request #11134 from wangjohn/object_orienting_testing_rake_file
Making the rake file for tests easier to read.
2013-07-02 19:10:49 -07:00
Vipul A M
d50483b048 Remove deprecated config.whiny_nils 2013-07-02 09:25:08 +05:30
Rafael Mendonça França
9aaa3111b0 Use block instead passing as argument 2013-07-02 00:24:51 -03:00
Carlos Antonio da Silva
259161881f Merge pull request #11220 from aditya-kapoor/add-concern
Change Rails Migration generator module to use AS::Concern
2013-07-01 12:47:00 -07:00
Rafael Mendonça França
ab6601ccdf Merge pull request #11203 from schneems/schneems/plugin_new-plugin
s/plugin_new/plugin
2013-07-01 11:36:47 -07:00
aditya-kapoor
1c07a3231d Using ActiveSupport::Concern instead of plain regular Ruby hooks in railties/lib/rails/generators/migration.rb file 2013-07-01 22:27:01 +05:30
schneems
ec8d8652f3 s/plugin_new/plugin
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
2013-06-30 22:03:39 -04:00
wangjohn
08dc92421a Allowing multiple rails applications in the same ruby instance.
This change provides the ability to create a new application with a
configuration which can be specified.
2013-06-30 18:52:40 -07:00
Rafael Mendonça França
08f8c8aa52 Merge pull request #11176 from schneems/schneems/plugin_new_help_fix
Fix `rails plugin --help`
2013-06-29 07:53:30 -07:00
schneems
6ce18ba7dc Fix rails plugin --help
Right now if you run the `rails plugin --help` command it fails because rails expects a command in `railties/lib/rails/commands/plugin.rb` that does not exist because the file is named `plugin_new`. This is the error:

```
ruby-2.0.0-p0  ~/documents/projects/tmp/vanilla (master)
$ rails plugin --help
/Users/schneems/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require': cannot load such file -- rails/commands/plugin (LoadError)
	from /Users/schneems/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
	from /Users/schneems/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
	from /Users/schneems/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
	from /Users/schneems/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0/lib/rails/commands.rb:49:in `<top (required)>'
	from bin/rails:4:in `require'
	from bin/rails:4:in `<main>'
```
2013-06-29 14:34:46 +03:00
Robin Dupret
8564f0ae19 Update a broken link into the fixtures' template 2013-06-29 11:43:49 +02:00
Nikita Fedyashev
e68183cccb Omit turbolinks configuration completely on skip_javascript generator option 2013-06-28 18:53:32 +06:00
Akira Matsuda
b22cbf8267 Fix punctuation in config templates 2013-06-28 00:43:02 +09:00
Prathamesh Sonpatki
aca25cb0de Improved grammar and replaced 'dbs' slang with 'databases' 2013-06-27 10:58:08 +05:30
wangjohn
8f1deaeb37 Removing deprecation message and silencing method.
The deprecation rake task is no longer useful because the deprecated
methods have already been removed.

The method for silencing stderr has been removed since it was only
useful for `rake test:uncommitted` which was deprecated and removed.
2013-06-26 22:19:02 -07:00
Carlos Antonio da Silva
f5df6e5a6d Review railties changelog [ci skip] 2013-06-26 20:17:58 -03:00
wangjohn
512a64f37f Making the rake file for tests easier to read.
I'm defining a new class which modularizes how the `rake test` tasks are
defined and invoked.
2013-06-25 09:43:55 -04:00
wangjohn
3e5dbda5bb Removing deprecated rake tasks.
The `rake test:recent` and `rake test:uncommitted` tasks were
deprecated and are now being removed.
2013-06-24 09:35:15 -04:00
Vijay Dev
317aaa0588 Merge branch 'master' of github.com:lifo/docrails
Conflicts:
	guides/source/layout.html.erb
2013-06-26 22:57:34 +05:30
Yves Senn
d9a0e0d853 remove trailing whitespace from config/routes.rb template. 2013-06-26 12:06:55 +02:00
Carlos Antonio da Silva
51a5e90658 Merge pull request #10666 from YanhaoYang/master
Make "rails dbconsole" work with activerecord-postgis-adapter
2013-06-25 17:34:20 -07:00
Nolan Evans
e17ddc255d restore correct scaffold generation 2013-06-25 10:32:58 -07:00
Steve Klabnik
0c850f8dab Change reference to all to scoped instead.
In #11088, `#to_a` was added to remove a deprecation around using
`#all`. I merged, but it really should have been `#scoped` instead, as
that's the preferred replacement.
2013-06-25 10:16:30 -07:00
Nolan Evans
e84edf13c2 fix deprecation warning in scaffold controllers 2013-06-25 08:19:21 -07:00
Robin Dupret
89c1653ee3 Missing mention about a generated file [ci skip]
Add a mention about the helper's test file generated invoking the
controller generator in the USAGE file
2013-06-22 18:39:50 +03:00
Robin Dupret
47a9eea04a Remove code related to the rails test command
Remove the mention about this command in the rails command's help
message and remove the "t" alias related to it.
2013-06-21 22:35:20 +02:00
Guillermo Iguaran
3f34f75d72 Merge pull request #10537 from jetthoughts/10428_bug_with_config_assets_precompile
#10428: Added tests for config.assets.precompile
2013-06-21 08:19:41 -07:00
Arun Agrawal
67f668845e Saying gemcutter => rubygems [ci skip] 2013-06-21 11:04:52 +02:00
Paul Nikitochkin
9da48a998c #10428: Added tests for config.assets.precompile
Tests for bug in sprocket-rails:
  do not use value of configuration options
  which changed after environment loaded
2013-06-21 01:08:59 +03:00
Łukasz Strzałkowski
d8b0499141 Change from 'actionpack' to 'actionview' for locales path 2013-06-20 18:59:51 +02:00
wangjohn
484ff7d29e Removing a repetitive comment and removing a deprecation warning.
The comment on the +env_config+ method is repetitive, likely to get
outdated, and provides no useful information which cannot be gleamed
from the code. I'm therefore removing it. I'm also refactoring the check
for the presence of a secret_token in the configuration.
2013-06-17 21:32:12 -07:00
Santiago Pastorino
fa4cf9407c Revert "Merge pull request #10961 from wangjohn/changing_rails_env_config"
This reverts commit 7098d6c9ab28931acc9562a00037567609f9e529, reversing
changes made to 9ec2e2ee91568af24e09760a6de2890b89c33f56.
This make some tests fail /cc @wangjohn
2013-06-17 21:30:53 -04:00
Santiago Pastorino
1d4f96601d Merge pull request #10968 from wangjohn/refactoring_rails_application_class
Creating a class to build the default middleware stack.
2013-06-17 17:46:18 -07:00
Aaron Patterson
bc8eaf0f5b load the file rather than evaling 2013-06-17 17:42:18 -07:00
Santiago Pastorino
7098d6c9ab Merge pull request #10961 from wangjohn/changing_rails_env_config
Removing a repetitive comment and refactoring the Application class in Railties
2013-06-17 17:40:58 -07:00
Santiago Pastorino
9ec2e2ee91 Merge pull request #10902 from wangjohn/removing_application_singleton_calls
Calls to the application constant have been refactored
2013-06-17 17:37:54 -07:00
Sıtkı Bağdat
f0e4254bfa Use Colspan in th Tags
Is it more suitable that using ```<th colspan="3">``` instead of three empty ```<th>```? It is simple, but what i am missing about it?

Change repetitive th tags to use colspan attribute

Update CHANGELOG.md

Update CHANGELOG.md
2013-06-17 19:59:02 +03:00
wangjohn
f0e6666187 Removing a repetitive comment and refactoring the Application class in
Railties.

The comment on the +env_config+ method is repetitive, likely to get
outdated, and provides no useful information which cannot be gleamed
from the code. I'm therefore removing it. I'm also refactoring the check
for the presence of a secret_token in the configuration.
2013-06-16 15:57:47 -07:00
wangjohn
685309cf59 Creating a class to build the default middleware stack.
A lot of logic for building the default middleware stack is currently
kept in Application class, but this can be encapsulated and made more
modular by being moved to its own class. Also refactored a couple of the
helper methods.
2013-06-16 15:31:32 -07:00
Martin Schürrer
53edda2235 valid_app_const? -> valid_const? 2013-06-15 00:13:50 +02:00
Terence Lee
2d5a6de4e2 initialize_on_precompile is not used anymore. 2013-06-13 16:33:39 -07:00
Genadi Samokovarov
50be56dcde Refactor of ::Rails module
1. Used ActiveSupport::Autoload to dry-up the autoload definitions.
2. Used ActiveSupport's delegate to dry up the application proxied
   attributes.
3. Did a little white space change on Rails.groups.
2013-06-12 11:42:36 +03:00
wangjohn
55d708d597 Calls to the application constant have been refactored to use
Rails.application when drawing routes and creating other configurations
on the application.
2013-06-10 20:59:37 -07:00
Arun Agrawal
2c86fa211b Testing CheckPending middleware 2013-06-08 21:10:15 +02:00
Xavier Noria
7d40aa4ddb registers recent patch in the railties CHANGELOG 2013-06-06 23:16:04 +02:00
Xavier Noria
b9b06daa91 clearing autoloaded constants triggers routes reloading [Fixes #10685]
Conflicts:
	railties/test/application/loading_test.rb
2013-06-06 23:11:00 +02:00
Arun Agrawal
e27262493d Fixing build for not checking migration 2013-06-05 12:11:10 +02:00
Tamir Duberstein
ccd6f8b931 make sure both headers are set before checking for ip spoofing 2013-06-04 15:01:08 -07:00
wangjohn
bb4378404d Removing use of subclassed application constant and instead using the
more agnostic Rails.application syntax. This means tests will be more
portable, and won't rely on the existence of a particular subclass.
2013-06-03 21:38:17 -07:00
Guillermo Iguaran
438e2ad361 Replace comment about Sprockets stub directive with a link to README about all directives 2013-06-03 16:07:10 -05:00
wangjohn
7655fc0b6c Fixing a failing railtie test by using the ENV variable to specify a
particular controller to search for in rake routes.
2013-05-31 19:48:36 -04:00
wangjohn
42c9bd0617 Adding a test to make sure that using rake routes with the CONTROLLER
environment works correctly.
2013-05-29 17:30:06 -04:00
Rafael Mendonça França
04332e34d8 No need changelog entry 2013-05-28 12:12:20 -03:00
Oleg Sukhodolsky
82d8a1b9af condition simplified 2013-05-28 12:11:42 -03:00
Rafael Mendonça França
643e0b23d6 Merge pull request #10629 from stmpjmpr/bug_10628
Fixes bug 10628.
2013-05-28 12:11:29 -03:00
Luke Wendling
ff4730d7de add notice to server boot messages if using default 0.0.0.0 binding 2013-05-25 12:41:51 -05:00
Jamie Gaskins
ab727743bf Add ActiveModel requirement to application.rb
Currently, ActiveModel is only loaded by ActiveRecord. If you skip ActiveRecord, ActiveModel will not be required (or even autoloaded) and including `ActiveModel::Model` into a plain Ruby class will raise `NameError`.

To reproduce this:

- create a new app with `rails new my_app -O`
- create a Ruby class that includes `ActiveModel::Model` in `app/models`
- load up a Rails console and try to do anything with the class :-)

Since ActionPack relies so heavily on the ActiveModel API, this should probably be considered a dependency of the app. Another possibility would be to make it a dependency of ActionController.
2013-05-22 17:46:54 +08:00
Vijay Dev
d71b0935a9 Merge branch 'master' of github.com:lifo/docrails 2013-05-19 21:40:12 +05:30
Vijay Dev
7f24d3d695 copy edits[ci skip] 2013-05-19 21:38:23 +05:30
Prathamesh Sonpatki
f8a3dda6ce Fxied some typos 2013-05-18 19:23:30 +05:30
YanhaoYang
2f35f613ba make "rails dbconsole" work with activerecord-postgis-adapter 2013-05-17 21:12:44 +08:00
AJ Acevedo
00e43ccc36 plugin new missing license spec
When bundling a gem created with
rails plugin new
Bundler outputs the following warning when building the gem:
WARNING:  licenses is empty

	modified:   railties/lib/rails/generators/rails/plugin_new/templates/%name%.gemspec
2013-05-16 21:02:39 -04:00
Aaron Patterson
9fef7c8dc9 Merge pull request #10527 from zenspider/squishy_minitest5
Squishy minitest5
2013-05-16 13:41:54 -07:00
Aaron Patterson
e38c93a120 Merge pull request #10594 from shime/rack-debugger
exit with non-zero to signal failure
2013-05-16 13:28:12 -07:00
Sam Ruby
f96478369e restore whitespace in Gemfile between sqlite3 and sprockets 2013-05-16 13:22:13 -03:00
Colin Bartlett
46faadfacc Remove trailing line break
If you generate a fresh app without ActiverRecord, this template
exhibited a lone trailing line break. My watchful pre-commit hook
told me about it so I've fixed it here.
2013-05-16 00:49:17 -04:00
Scott Hill
bdc2aa54ca Fixes bug 10628. 2013-05-15 00:20:59 -07:00
Nick
877920ba55 Removed incorrect warning from application.js templates and replaced it with stub command description 2013-05-15 11:38:49 +07:00
aditya-kapoor
af2d212b63 Added documentation for Rails::Generators::NamedBase.template 2013-05-14 00:22:59 +05:30
Hrvoje Šimić
886f439cb5 exit with non-zero to signal failure 2013-05-13 12:14:47 +02:00
AJ Acevedo
2a57cbc762 Updated comment to Rails 4 2013-05-12 22:47:25 -04:00
Hrvoje Šimić
bde14bef61 better error message when app name is not passed in rails new
Prior to this change, for the following command:

    $ rails new

we received "Options should be given after the application name" as an error message.

This is outdated and should be "Application name should be provided in arguments".
2013-05-12 23:39:25 +02:00
Rafael Mendonça França
64a508f662 Merge pull request #10560 from jkutner/master
Remove jruby-openssl from default Gemfile
2013-05-12 11:20:44 -07:00
Vijay Dev
d8b8c0ef87 Merge branch 'master' of github.com:lifo/docrails
Conflicts:
	activesupport/lib/active_support/callbacks.rb
2013-05-12 15:57:14 +05:30
Teng Siong Ong
524f09a5e7 Clean up unused method for rake doc. 2013-05-11 03:12:59 -07:00
Joe Kutner
430e5dce42 Removed jruby-openssl gem from default template Gemfile 2013-05-10 13:04:40 -05:00
Prathamesh Sonpatki
39b8b8fdbf rails -> Rails [ci skip] 2013-05-09 17:27:58 +05:30
Xavier Noria
cd3177d315 "rails" -> "Rails" [ci skip] 2013-05-09 08:36:37 +02:00
Prathamesh Sonpatki
b5429eec60 Fix Typo existant -> existent [ci skip] 2013-05-08 09:50:46 +05:30
Ryan Davis
3073c53198 Updates to make rails 4 happy with minitest 5:
+ Namespace changes, overhaul of runners.
+ Internal ivar name changes
- Removed a logger globally applied to tests that spew everywhere?!?
+ Override Minitest#__run to sort tests by name.
+ Reworked testing isolation to work with the new cleaner architecture.
- Removed a bunch of tests that just test minitest straight up. I think these changes were all merged to minitest 4 a long time ago.
- Minor report output differences.
2013-05-06 17:38:45 -07:00
Xavier Noria
c9e4c9acdc let rake tasks be robust to a missing RDoc in Rubinius [Fixes #10462]
See the comment in the rescue clause towards the top of the patch for the rationale.
2013-05-06 22:12:23 +02:00
Matthew Michihara
ebfe41ca21 Improve model generator USAGE grammar 2013-05-05 16:00:18 -07:00
Prathamesh Sonpatki
42275a6bad Updated link to to GitHub article about ignoring files [ci skip]
- http://help.github.com/ignore-files redirects to https://help.github.com/articles/ignoring-files
2013-05-05 20:33:24 +05:30
Prathamesh Sonpatki
9e8c467945 Fixes warning 'method redefined' in scaffold generators tests
- f1805a697831 Redefined 'test_scaffold_generator_no_assets' twice.
- Only the last instance of these three definitions of the same method
  was getting called when the tests were actually running.
- This commit changes names of this method so that all three
  definitions will be called
- scaffold.css is not generated by --assets=false switch.
- Test was expecting the presence of the file with --assets=false
- This issue was not discovered in f1805a697831b because it was
  redefining the same method twice
2013-05-05 16:30:09 +05:30
Prathamesh Sonpatki
e1bd8d1a5c dir -> directory [ci skip] 2013-05-04 20:14:41 +05:30
Rafael Mendonça França
8e0d43bc50 Use Ruby 1.9 syntax 2013-05-04 10:59:56 -03:00
Rafael Mendonça França
d093f8437a Review the CHANGELOG entry [ci skip] 2013-05-04 10:53:53 -03:00
Arun Agrawal
f1805a6978 Fixes Scaffold generator with --assets=false
Scaffold generator with --assets=false option 
outputs an error

See #9525
2013-05-04 15:48:44 +02:00
Rafael Mendonça França
29dce6e4b5 Merge pull request #10436 from NARKOZ/keep-images
generate 'app/assets/images' directory when creating new rails app. Fixes #10434
2013-05-04 05:33:34 -07:00
Rafael Mendonça França
cc50aab3ba Merge pull request #10461 from rwz/master
Relaxed jbuilder dependency in Gemfile template
2013-05-04 05:25:30 -07:00
Nihad Abbasov
f354ad1b69 generate 'app/assets/images' directory when creating new rails app 2013-05-04 16:26:27 +05:00
Pavel Pravosud
cf733bce5e Relaxed jbuilder dependency in Gemfile template 2013-05-04 13:46:01 +07:00
Sam Ruby
ec92d8440f Add a test case for comparing Rails versions
558d402472
2013-05-03 14:18:57 -04:00
Piotr Sarnacki
9a4268db99 Fix generating route from engine to other engine
A regression was introduced in 5b3bb6, generating route from within an
engine to an another engine resulted in prefixing a path with the
SCRIPT_NAME value.

The regression was caused by the fact that SCRIPT_NAME should be
appended only if it's the SCRIPT_NAME for the application, not if it's
SCRIPT_NAME from the current engine.

closes #10409
2013-05-03 18:15:40 +02:00
wangjohn
062a93a05e Refactoring the creation of TestTasks to remove code duplication. 2013-05-02 11:16:20 -04:00
Carlos Antonio da Silva
dfd5dc93a1 Remove not used module from initializable test 2013-05-01 23:21:08 -03:00
Sam Ruby
558d402472 Make railties version match RAILS_VERSION 2013-05-01 18:10:10 -04:00
Vijay Dev
7ead1d8143 Merge branch 'master' of github.com:lifo/docrails 2013-05-01 16:24:13 +05:30
Thiago Pinto
727d0af28c routes.rb should teach how to use concerns 2013-05-01 00:11:43 -04:00
wangjohn
9703d67048 Removing the app constant and replacing it with Rails.application
syntax. This helps removing the class level abstraction of an
application.
2013-04-30 15:27:43 -04:00
Rafael Mendonça França
1e5ee397ff Merge pull request #10357 from arunagw/minor-code-deuplication-removed-app-generator
Minor code duplication removed
2013-04-30 07:35:50 -07:00
Teng Siong Ong
5aec73daf5 Make rake doc:guides works again. Fix #10384. 2013-04-30 06:49:03 -07:00
wangjohn
81b7416afa Removing Railtie::Configurable from the base Railtie object and making
Railtie itself abstract. This stops the weird behavior of forcing
subclasses of Railtie to include the Configurable module.
2013-04-29 13:06:29 -04:00
Arun Agrawal
bca866e6f1 Minor code duplication removed 2013-04-29 18:37:33 +02:00
Rafael Mendonça França
feb44b9213 rails/master is now 4.1.0.beta 2013-04-29 13:15:24 -03:00
David Heinemeier Hansson
1ec64297f9 Bump version to rc1 2013-04-29 08:29:18 -07:00
wangjohn
3ff263919c Moved the check for the rails test environment into rails/test_unit so that you
can select frameworks separately when running rake test.
2013-04-23 15:39:18 -04:00
Xavier Noria
756cba02c1 ActiveRecord -> Active Record 2013-04-22 23:44:39 +02:00
buddhamagnet
a85729c5f1 extract path into variable 2013-04-21 23:30:16 +01:00
David Heinemeier Hansson
eaec0ec71f Merge branch 'master' of github.com:rails/rails 2013-04-19 10:27:35 -07:00
Carlos Antonio da Silva
e62f4404cf Unindent attributes iteration in scaffold index template
Otherwise we get extra indent for the <td> elements due to the extra
spaces at the beginning of the lines, like this:

      <tr>
          <td><%= author.name %></td>
          <td><%= link_to 'Show', author %></td>
        <td><%= link_to 'Edit', edit_author_path(author) %></td>
2013-04-18 16:01:38 -03:00
David Heinemeier Hansson
082c90da98 Alignment 2013-04-18 11:56:11 -07:00
David Heinemeier Hansson
4746f92b13 Indent around the scaffold loop 2013-04-18 11:53:55 -07:00
David Heinemeier Hansson
f038d4cc5f HTML5 breaks 2013-04-18 11:53:55 -07:00
David Heinemeier Hansson
da5405c4bc Better ordering 2013-04-18 11:53:55 -07:00
Rafael Mendonça França
e83acd4a9c Use sass-rails 4.0.0.rc1 2013-04-18 15:28:46 -03:00
Rafael Mendonça França
fe495c9488 Use latest coffee-rails release 2013-04-18 14:21:28 -03:00
Rafael Mendonça França
2dc42e07c7 Revert "sprockets 2.9.x doesn't work with uglifier 2.0 yet."
This reverts commit 575838795019f7402992e3bfa83a0c5048cf143d.

Conflicts:
	railties/lib/rails/generators/app_base.rb

Reason: sprockets 2.9.1 fixes this issue
2013-04-18 14:21:28 -03:00
Prathamesh Sonpatki
7f36eb40ca Use secure source for rubygems in engine tests 2013-04-18 09:18:51 +05:30
Aaron Patterson
94e68e7ad3 adding a test for root path in the app 2013-04-17 11:20:12 -07:00
Rafael Mendonça França
5e4683f76a Don't need to add activerecord-deprecated_finders on edge and dev
applications

This gem will not change often to explain it be included in the
application Gemfile
2013-04-17 13:21:22 -03:00
Rafael Mendonça França
9f290e6e67 Merge pull request #10178 from rubys/app_base_strip_heredoc
Use strip_heredoc where possible
2013-04-15 09:57:09 -07:00
Carlos Antonio da Silva
334e260c5f Revert "Merge pull request #10194 from pabloh/extract_regexp_at_generators_testing_assertion"
This reverts commit 81f243375b9d3cfd431c1ca904c5c1efc9a41ae8, reversing
changes made to c7673b0981d961e5510c85d958c944876d543314.
2013-04-12 21:16:05 -03:00
Carlos Antonio da Silva
81f243375b Merge pull request #10194 from pabloh/extract_regexp_at_generators_testing_assertion
Extract method declaration regexp for assert_method into a constant
2013-04-12 16:51:21 -07:00
Paul Nikitochkin
a49d93552f Added tests for eager_load config option to do not eager load for rake tasks if eager_load is true 2013-04-12 22:24:54 +03:00
Pablo Herrero
83d0232304 Extract method declaration regexp into a constant 2013-04-12 15:40:30 -03:00
Yves Senn
c245437de7 use unified and clean formatting in CHANGELOGS. [ci skip] 2013-04-12 15:52:43 +02:00
Xavier Noria
481618cfc2 replaces Pathname#(dirname|realpath) with File.$1
Simpler, thanks to @rubys for the hint.
2013-04-12 02:33:46 +02:00
Rafael Mendonça França
9027ce9f7e Merge pull request #10175 from vipulnsward/initialize_fix
initialize instead of assert to fix warning
2013-04-11 09:20:54 -07:00
Vipul A M
8134c26640 initialize instead of assert to fix warning 2013-04-11 21:26:36 +05:30
Sam Ruby
a4f812f512 Use strip_heredoc where possible
Following up on an observation by @rafaelfranca

https://github.com/rails/rails/pull/10170/files#r3753963

Reduce the number of gsub calls to the two cases where inputs are concatenated
from various sources and with inconsistent indentation.

Also zap extraneous spacing from the sass-rails line... presumably this is a
holdover from a previous time where this aligned the version string with an
adjacent line.
2013-04-11 11:47:13 -04:00
Xavier Noria
2e3f5191f0 fixes app_rails_loader_test.rb in Mac OS X 2013-04-11 15:22:59 +02:00
Xavier Noria
f64ba8782e fixes remaining lowercase "rails" 2013-04-11 13:28:57 +02:00