Commit Graph

1140 Commits

Author SHA1 Message Date
Timm
94ca27b190 Added rails-dom-testing and rails-html-sanitizer to Gemfile. Added tests for assert_select_email. 2014-06-16 21:04:17 +02:00
Juanito Fatas
6a781b9245 [ci skip] Improve enable_starttls_auto documentation. 2014-06-11 01:51:06 +08:00
Zuhao Wan
573a8421e7 Restore I18n.locale to default after test.
If i18n_with_controller_test.rb were to run first, the I18n.locale will
be changed to :de, and the following tests in base_test.rb will fail:

"subject gets default from I18n"
“default subject can have interpolations”
"translations are scoped properly"
"implicit multipart with default locale"
2014-06-07 00:52:24 +08:00
Zuhao Wan
c4f4123ef4 Restore test deliveries properly in ActionMailer.
`ActionMailer::Base.delivery_method` and
`ActionMailer::Base.perform_deliveries` have leaked states.

"delivery method can be customized per instance" and "delivery method
can be customized in subclasses not changing the parent" in
delivery_methods_test.rb will fail if test_helper_test.rb (in which
TestHelperMailerTest is inherited from ActionMailer::TestCase) runs
before it.
2014-06-07 00:11:24 +08:00
Benjamin Fleischer
bb0890d056 Relax mail gem constraint from ~> 2.5.4 to ~> 2.5, >= 2.5.4
This allows Rails users to install mail 2.6 which relaxes
the mime-types dependency, which is a big win for a lot of people.

Previously, the mail gem restricted mime-types to ~> 1.16
but now it has expanded to [">= 1.16", "< 3"]

And the mime-types maintainer will also be checking that
2.x releases don't break mail.

See https://github.com/mikel/mail/pull/713
https://rubygems.org/gems/mail/versions/2.6.0
2014-06-03 11:54:45 -05:00
Zachary Scott
4c66ab2b21 Feature requests should be made on the mailing list, not submitted to
the issue tracker. See also #15455 [ci skip]
2014-06-01 19:11:39 -07:00
Zachary Scott
415ba0c323 Pass through AM documentation re: 02d048d [ci skip] 2014-05-26 16:45:50 -07:00
Zachary Scott
02d048d926 Use "Action Mailer" as canonical name in documentation [ci skip]
See also:
3a297f8db7 (commitcomment-6451708)
2014-05-26 16:38:44 -07:00
Zachary Scott
3a297f8db7 Add description of ActionMailer::TestHelper module [ci skip] 2014-05-26 16:34:16 -07:00
Yves Senn
fd6d6dc602 Merge pull request #15083 from zuhao/refactor_actionmailer_i18n_with_controller_test
Use with_translation helper to clean up I18n stored translations.
2014-05-13 10:43:50 +02:00
Zuhao Wan
32ef7d3c5c Use with_translation helper to clean up I18n stored translations. 2014-05-13 16:38:21 +08:00
Yves Senn
9392d1615c Merge pull request #15082 from zuhao/refactor_actionmailer_delivery_methods_test
Clean up deliveries after each test.
2014-05-13 10:32:37 +02:00
Zuhao Wan
5330b894e5 Move state restoration from setup/teardown into affected test cases. 2014-05-13 16:28:39 +08:00
Yves Senn
b6d627b49a Merge pull request #15086 from zuhao/refactor_actionmailer_mail_layout_test
Do not clear deliveries in setup.
2014-05-13 09:39:13 +02:00
Zuhao Wan
4d9e4ea47a Remove unnecessary setup and teardown. 2014-05-13 15:03:53 +08:00
Zuhao Wan
275d20ca01 A minor stylistic fix and cleanup of mail deliveries. 2014-05-13 13:01:14 +08:00
Zuhao Wan
1401637e3f Fix state leaks in actionmailer/test/base_test.rb. 2014-05-07 20:49:43 +08:00
Gaurav Sharma
c4807672a8 [ci skip] Improve formatting and yml 2014-04-24 18:51:34 +05:30
Arthur Neves
f870c4d063
Fix MailerPreview broken tests
`BaseMailerPreview.welcome` is an instance method, so we need to stub the
method on a instance level and not on Class. The stub is important to make
sure the Message object is the same in the other expectations.
This was working randomly because Mocha uses == to compare two objects
on the `with()` expectation and even if the Mail::Message objects were
not the same object they are equal, but thats not the case in 100% of
the runs. So we need to make sure we use `.any_instance` method and have
the right message object.
2014-03-15 18:56:32 -04:00
Arthur Neves
d39bba7c85
Make sure we clean preview_interceptors
We should make sure we clean preview_interceptors after each test so they dont leaky to the next test
2014-03-07 14:53:18 -05:00
Vijay Dev
70ff31d69f Merge branch 'master' of github.com:rails/docrails
Conflicts:
	guides/source/4_1_release_notes.md
2014-03-07 20:58:11 +05:30
Prem Sichanugrist
2dd2fcf896
Introduce Rails.gem_version
This method return `Gem::Version.new(Rails.version)`, suggesting a more
reliable way to perform version comparison.

Example:

    Rails.version #=> "4.1.2"
    Rails.gem_version #=> #<Gem::Version "4.1.2">

    Rails.version > "4.1.10" #=> false
    Rails.gem_version > Gem::Version.new("4.1.10") #=> true
    Gem::Requirement.new("~> 4.1.2") =~ Rails.gem_version #=> true

This was originally introduced as `.version` by @charliesome in #8501
but got reverted in #10002 since it was not backward compatible.

Also, updating template for `rake update_versions`.
2014-03-05 12:37:38 -05:00
Carlos Antonio da Silva
71b3910a7d Point master changelogs to 4-1-stable branch
Remove 4-1 related entries from master [ci skip]
2014-02-25 09:14:36 -03:00
Yves Senn
c554d170e6 update version to 4.2.0.alpha 2014-02-23 13:14:43 +01:00
Zachary Scott
f302079d97 ✂️
This commit also addresses rails/docrails#169 and rails/rails#14159
2014-02-23 20:24:23 +11:00
Guillermo Iguaran
1c248dfbab Fix render plain docs example in AM::Base
The errors were introduced in e220a34e39
2014-02-18 15:18:37 -05:00
robertomiranda
e220a34e39 Update Docs in favor to use render plain instead of text option
ref #14062
2014-02-18 15:05:10 -05:00
Rafael Mendonça França
1879c259b8 Merge branch '4-1-0-beta2'
Conflicts:
	actionview/CHANGELOG.md
	activerecord/CHANGELOG.md
2014-02-18 16:00:47 -03:00
Rafael Mendonça França
8b20c72dd8 Preparing for 4.1.0.beta2 release 2014-02-18 15:45:20 -03:00
Rafael Mendonça França
99cdad6d9c Fix typo [ci skip] 2014-02-16 21:49:50 -03:00
Rafael Mendonça França
e4911e9162 Merge pull request #13997 from dmitry/test_coverage_improvement
Test coverage improvement
2014-02-09 16:51:59 -02:00
Dmitry Polushkin
5af7cab02d add actionmailer test coverage for undefined delivery method 2014-02-09 18:41:41 +00:00
Vijay Dev
92fdd65162 Merge branch 'master' of github.com:rails/docrails
Conflicts:
	guides/source/active_record_validations.md
	guides/source/api_documentation_guidelines.md
	guides/source/configuring.md
2014-02-09 23:33:55 +05:30
Yves Senn
02f9f33142 tidy CHANGELOGs [ci skip] 2014-01-30 11:12:46 +01:00
Robin Dupret
718d3b0bc5 Remove an extra comment [ci skip] 2014-01-26 13:11:26 +01:00
Andrew White
4df9cc29c1 Support underscored symbols in Action Mailer config
We allow the use of underscored symbols to represent classes throughout
other parts of Rails so it seems incongruous that it's not supported in
`register_interceptor` and `register_observer`.
2014-01-26 12:05:35 +00:00
Andrew White
7d86352f83 Don't use a class_attribute for ActionMailer::Base.preview_path
Since preview_path is read from ActionMailer::Base when previewing, subclasses
can’t change it so don’t there's no need for the extra overhead imposed by using it.
2014-01-26 12:05:35 +00:00
Andrew White
35fd81672e Add the ability to intercept emails before previewing
To support the ability for tools like CSS style inliners to operate on emails
being previewed this commit adds a hook in a similar fashion to the existing
delivery interceptor hook, e.g:

  class CSSInlineStyler
    def self.previewing_email(message)
      # inline CSS styles
    end
  end

  ActionMailer::Base.register_preview_interceptor CSSInlineStyler

Fixes #13622.
2014-01-26 12:05:35 +00:00
Yves Senn
080fc9cad3 docs should say email not Email. [ci skip] 2014-01-20 15:04:36 +01:00
Waynn Lue
4dbc62dabd e-mail => email, and subject/verb agreement 2014-01-13 11:56:00 -08:00
Kuldeep Aggarwal
1ea0ae6637 removed extra comma [ci skip] 2014-01-14 01:18:00 +05:30
Gaurish Sharma
35e56f6fa5 standardize on jruby_skip & rbx_skip
This Adds helpers(jruby_skip & rbx_skip). In Future, Plan is to use
these helpers instead of calls directly to
RUBY_ENGINE/RbConfig/JRUBY_VERSION
2014-01-13 19:51:47 +05:30
Yves Senn
535bd55fcd quick formatting pass through CHANGELOGS. [ci skip]. 2014-01-06 10:57:00 +01:00
Andrew White
3713e43366 Add preview_path to autoload_paths in after_initialize
Only config.autoload_paths is frozen, so add the preview_path
to ActiveSupport::Dependencies.autoload_paths directly in an
after_initialize block. Also protect against a blank preview_path
being added to autoload_paths which can cause a serious slowdown
as Dir[] tries to load all *_preview.rb files under /

Fixes #13372
2014-01-04 18:42:34 +00:00
Vipul A M
98cb3e69af update copyright notices to 2014. [ci skip] 2014-01-01 23:59:49 +05:30
Chun-wei Kuo
fbbd4e1899 Improve font of some code in API documentation [ci skip]
* Add "<tt>" or "+" to improve font of some code and filenames in API documentation
* Does not contain wording changes
2013-12-26 18:54:46 +08:00
Yves Senn
69b5dc7e00 document how to access mail previews. [ci skip]
/cc @pixeltrix
2013-12-18 14:38:02 +01:00
David Heinemeier Hansson
c0a2d474c5 Get ready to release 4.1.0.beta1 2013-12-17 16:05:28 -08:00
Carlos Antonio da Silva
6802196a6b Disable available locales checks to avoid warnings running the tests 2013-12-17 09:05:41 -02:00
Andrew White
d6dec7fcb6 Add mailer previews feature based on mail_view gem 2013-12-17 03:58:35 +00:00