Commit Graph

9892 Commits

Author SHA1 Message Date
Carlos Antonio da Silva
811604f3f7 Avoid defining the test if it does not need to when not on JRuby 2014-07-30 23:41:19 -03:00
Carlos Antonio da Silva
72c96dea2d Use default argument when testing generators without the need for extra args 2014-07-30 23:41:19 -03:00
Carlos Antonio da Silva
bfc2b23128 Simplify path setup 2014-07-30 23:41:18 -03:00
Carlos Antonio da Silva
9023e3b773 Simplify plugin tests a bit, leave the regexp work for minitest 2014-07-30 23:41:18 -03:00
Carlos Antonio da Silva
c8c8fe98b3 Invert unless..else conditions on JRuby checks 2014-07-30 23:41:18 -03:00
Carlos Antonio da Silva
5d4fce640e Remove some more globals from tests
We are using blocks here so we have access to the environment around
them, no need for globals.
2014-07-30 22:52:38 -03:00
Carlos Antonio da Silva
32f49612e7 Fix / improve some assertions 2014-07-30 22:52:38 -03:00
Carlos Antonio da Silva
5fc5665066 Remove some globals from configuration tests 2014-07-30 22:52:38 -03:00
@schneems and @sgrif
2bbcca004c Deprecate *_path methods in mailers
Email does not support relative links since there is no implicit host. Therefore all links inside of emails must be fully qualified URLs. All path helpers are now deprecated. When removed, the error will give early indication to developers to use `*_url` methods instead.

Currently if a developer uses a `*_path` helper, their tests and `mail_view` will not catch the mistake. The only way to see the error is by sending emails in production. Preventing sending out emails with non-working path's is the desired end goal of this PR.

Currently path helpers are mixed-in to controllers (the ActionMailer::Base acts as a controller). All `*_url` and `*_path` helpers are made available through the same module. This PR separates this behavior into two modules so we can extend the `*_path` methods to add a Deprecation to them. Once deprecated we can use this same area to raise a NoMethodError and add an informative message directing the developer to use `*_url` instead.

The module with warnings is only mixed in when a controller returns false from the newly added `supports_relative_path?`.

Paired @sgrif & @schneems
2014-07-30 12:01:45 -05:00
Santiago Pastorino
4efb36e7b4 Revert "Merge pull request #15305 from tgxworld/remove_unnecessary_require"
This reverts commit f632f79b8dcd144408c66a544984b2ba9cf52f87, reversing
changes made to 98c7fe87690ca4de6c46e8f69806e82e3f8af42d.

Closes #16343
2014-07-30 09:46:33 -03:00
Yves Senn
94abb92c8d Merge pull request #16328 from noinkling/template_password_confirmation_fix
Give password_confirmation div the "field" class in the scaffold generator "_form" partial
2014-07-29 12:22:22 +02:00
noinkling
ed29c0a96b Give password_confirmation div the "field" class in erb form template 2014-07-29 16:16:31 +12:00
noinkling
31d37826b3 Additional clarification on password:digest in scaffold and model generator help [ci skip] 2014-07-25 18:29:58 +12:00
noinkling
2a7fcc8c9b Add password:digest information to scaffold generator help text [ci skip] 2014-07-25 16:42:01 +12:00
Rafael Mendonça França
b17330cf39 Remove mocha usage 2014-07-23 19:01:44 -03:00
Rafael Mendonça França
23cb26cfac Fix syntax error 2014-07-23 18:30:27 -03:00
Rafael Mendonça França
ecef1776a0 Dev and edge application and plugins need to include i18n master 2014-07-23 18:05:57 -03:00
Rafael Mendonça França
bec08e7744 Merge pull request #16267 from robin850/rbx-yaml
Set Psych as the YAML engine for Rubinius
2014-07-23 17:45:15 -03:00
Rafael Mendonça França
cd7d414e48 Do not set enforce_available_locales to i18n 0.7
Now the default is always true.

Users still can set it using config.i18n.enforce_available_locales.
2014-07-23 17:40:44 -03:00
Robin Dupret
558f8aa2ee Set Psych as the YAML engine for Rubinius
Since the rubysl-yaml gem doesn't ship with Psych by default because of
its dependency on libyaml, on Rubinius, the default engine is Syck.

However, if we want to be able to run the application safely on
different rubies, we need to make people using Rubinius rely on Psych.

See http://git.io/uuLVag for further information.
2014-07-23 20:05:14 +02:00
Rafael Mendonça França
08754f12e6 Merge branch 'rm-remove-mocha'
Conflicts:
	actionpack/test/abstract_unit.rb
2014-07-19 18:17:13 -03:00
Rafael Mendonça França
fd6aaaa0c3 Stop requiring mocha automatically
We are planning to remove mocha from our test suite because of
performance problems. To make this possible we should stop require mocha
on ActionSupport::TestCase.

This should not affect applications since users still need to add mocha
to Gemfile and this already load mocha.

Added FIXME notes to place that still need mocha removal
2014-07-19 17:35:12 -03:00
Rafael Mendonça França
533c035205 Merge pull request #16212 from aantix/additional_migration_conflict_help_messaging
Additional help messaging to help the user resolve a conflicted migration
2014-07-18 18:22:37 -03:00
Jim Jones
cc1ad787af Modified migration conflict message to remove the string concatenation. 2014-07-18 08:51:36 -07:00
Guo Xiang Tan
ee35b79d4c Prefer to pass block when logging.
The Logger by default includes a guard which checks for the
logging level. By removing the custom logging guards, we can decouple
the logging guard from the logging action to be done.

This also follows the good practice listed on http://guides.rubyonrails.org/debugging_rails_applications.html#impact-of-logs-on-performance.
2014-07-18 15:04:43 +08:00
Jim Jones
af3cf61aa7 Added additional help messaging when there's scaffolding being generated and a migration already exists for the resource.
The user is now alerted that they are able to skip the conflicted migration file via the --skip option.
2014-07-17 21:19:07 -07:00
Rafael Mendonça França
fcc2231a04 Stop using mocha on dbconsole_test 2014-07-15 23:36:45 -03:00
Rafael Mendonça França
3121412cf1 Keep quietly and capture undeprecated on your suite 2014-07-15 17:56:27 -03:00
Rafael Mendonça França
9629dea4fb Add Rails::Application#config_for
This is a convenience for loading configuration for the current Rails
environment.
2014-07-15 15:35:13 -03:00
Andrey Chernih
b3a34cd374 Add ability to extend rails server command options parser
With this change it will be possible to add additional options to the `option_parser` like this:

    require 'rails/commands/server'
    module Rails
      class Server < ::Rack::Server
        class Options
          def option_parser_with_open(options)
            parser = option_parser_without_open options
            parser.on('-o', '--open', 'Open in default browser') { options[:open] = true }
            parser
          end
          alias_method_chain :option_parser, :open
        end

        def start_with_open
          start_without_open do
            `open http://localhost:3000` if options[:open]
          end
        end
        alias_method_chain :start, :open
      end
    end
2014-07-11 23:26:33 +04:00
Santiago Pastorino
6e23c8242d Merge pull request #16132 from tgxworld/fix_test_not_unsubscribing
Fix incorrect unsubscription.
2014-07-11 08:14:55 -03:00
Godfrey Chan
00aae7cb38 Synced 4.2 release notes with the latest commits.
Also reordered some of the items to put newer ones on top (same order as
CHANGELOGs), which makes it easier to diff while we are still working on it.
2014-07-11 02:16:57 -07:00
Guo Xiang Tan
d9396a07eb Fix incorrect unsubscription. 2014-07-11 16:38:26 +08:00
Aaron Patterson
97d62a32f8 Merge pull request #13999 from jamox/update_rack
This updates rails to use edge rack
2014-07-08 11:46:56 -07:00
Rafael Mendonça França
a83efa4a1f Stop using mocha on console_test 2014-07-07 23:39:18 -03:00
Rafael Mendonça França
57e298fcd5 Set the application logger using configuration 2014-07-07 22:57:55 -03:00
Rafael Mendonça França
d3af622586 Stop using mocha on configuration_test 2014-07-07 22:46:39 -03:00
Rafael Mendonça França
fb9eb7019e Stop using mocha on app_rails_loader_test 2014-07-07 22:05:30 -03:00
Zachary Scott
2f716694f2 Change back occurrences of SQLite(3) to sqlite3 when referring to the
adapter, fixed from #16057 [ci skip]
2014-07-06 11:47:16 -07:00
Zachary Scott
2cda0aff30 Merge pull request #16057 from akshay-vishnoi/doc_change
[ci skip] /sqlite/i --> SQLite
2014-07-06 11:41:31 -07:00
Akshay Vishnoi
ddad32978d [ci skip] /sqlite/i --> SQLite 2014-07-06 15:23:12 +05:30
Rafael Mendonça França
871af9122b Merge pull request #16046 from grosser/grosser/cleangen
Do not load rails without loading bundler
2014-07-04 12:35:46 -03:00
Arun Agrawal
e197fd7f37 Display notice in index.html pages in scaffolded generated views
As we are setting notice in destroy action we should display that

For more information see https://github.com/rails/rails/pull/14044
And https://github.com/rails/jbuilder/pull/191

closes #14044
2014-07-04 16:20:53 +02:00
grosser
8572fcd9f8 remove bundler magic 2014-07-03 17:28:55 -07:00
Rafael Mendonça França
5c87b5c524 Revert "Merge pull request #15394 from morgoth/fix-automatic-maintaining-test-schema-for-sql-format"
This reverts commit 46139d33c06715e74ad450428ece3ee84da98579, reversing
changes made to 8f247871bb18b2e3036a05df5f62cbfe3b402586.

Conflicts:
	activerecord/CHANGELOG.md
2014-07-02 09:41:52 -03:00
Rafael Mendonça França
72f58b0244 Rename preview_enabled option to show_previews 2014-07-01 13:09:24 -03:00
Leonard Garvey
84ed7b8dfe Add configuration to enable mail previews
Adds `config.action_mailer.preview_enabled`

This allows mail previewing to be enabled easily in non-development
environments such as staging. The default is set to true for development
so no changes should be required to existing Rails applications.

The mail preview path can still be configured using the existing
`config.action_mailer.preview_path` configuration option.

Adding this avoids devs from having to do stuff like:
https://gist.github.com/lengarvey/fa2c9bd6cdbeba96526a

Update actionmailer/CHANGELOG with new configuration.
Update configuring guide with new configuratation.
Add `config.action_mailer.preview_path` to configuring guide.
2014-07-01 14:39:59 +10:00
Rafael Mendonça França
ebdedaec32 Merge pull request #15933 from rafael/master
Add always permitted parameters as a configurable option.

[Rafael Mendonça França + Gary S. Weaver]
2014-06-27 18:16:52 -03:00
Rafael Chacón
58399e1dc3 Improvements per code review.
* General style fixes.
* Add changes to configuration guide.
* Add missing tests.
2014-06-27 13:08:40 -07:00
Rafael Mendonça França
30b56084fb Talk about config.assts.version move too
Closes #15942
2014-06-27 16:00:00 -03:00