action_mailer_auto_url_options 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f062b1907c1b3cab4220f59346760d6a185a90b7
4
- data.tar.gz: 1a34ff3bd19aa5d6f4bd4df84e7317100f3230c4
3
+ metadata.gz: d99ed7be111f65b1f20549e2f06b426375fa3d8c
4
+ data.tar.gz: acd9915ab5755fb1504c14f7fbafebb680de50e3
5
5
  SHA512:
6
- metadata.gz: 8bfaa1ca1cd9d44059cef9a450d2b50e1aeca6fc8f44c15d8f22e0d2316761378c01fa70e31f5841c9f6f8ae08eb360f1280573bd87e0dace2da56eb7d0bdade
7
- data.tar.gz: ff68818e193c40d1175f3c6f9bed36701339d3a6409bab41580876a0dcb7548bac0bf1b41a76f8444274cf2cc7e6f3d7958e41cfa804ccaa1be8700f59c011a3
6
+ metadata.gz: f051e86928bc4cfb6cac9d1dc2dac1f344d7ea03708a34709154c9be8f358b95929b0a2c41f16997fe20b395ff3fdbe60171ec3bdc82fa428573790fcf51e08a
7
+ data.tar.gz: '06825e1b40bf1cd3726493eed4cf186c431e86655f7fc0ce1c34dc3ccd8ab08dd51371fb16268597add440e1e47df6f9f81391ea1593280f2772c42ab722a806'
data/README.md CHANGED
@@ -21,10 +21,11 @@ for example.
21
21
  Install
22
22
  -------
23
23
 
24
- Add this line to your Rails application's Gemfile:
24
+ Add these lines to your Rails application's Gemfile:
25
25
 
26
26
  ```ruby
27
- gem 'action_mailer_auto_url_options'
27
+ # Add the current request host and protocol in email URLs
28
+ gem "action_mailer_auto_url_options"
28
29
  ```
29
30
 
30
31
  Run `bundle install`, restart your server and that's it!
@@ -33,24 +34,13 @@ Run `bundle install`, restart your server and that's it!
33
34
  Usage with Sidekiq
34
35
  ------------------
35
36
 
36
- If you delay your emails with Sidekiq, include this middleware in your
37
- `sidekiq.rb` initializer:
37
+ If you delay your emails with Sidekiq, include this middleware in
38
+ `config/initializers/sidekiq.rb`:
38
39
 
39
40
  ```ruby
40
41
  require "action_mailer_auto_url_options/middleware/sidekiq"
41
42
  ```
42
43
 
43
-
44
- Security considerations
45
- -----------------------
46
-
47
- This does not protect you from host-injection exploits, so please whitelist
48
- requests to the allowed domain name in production.
49
-
50
- Read more about [this vulnerability](http://seclists.org/fulldisclosure/2008/Jun/169)
51
- because your app may already be vulnerable if it does any kind of cache.
52
-
53
-
54
44
  License
55
45
  -------
56
46
 
@@ -5,7 +5,7 @@ module ActionMailerAutoUrlOptions
5
5
  extend ActiveSupport::Concern
6
6
 
7
7
  included do
8
- before_filter :make_action_mailer_use_request_host_and_protocol
8
+ before_action :make_action_mailer_use_request_host_and_protocol
9
9
  end
10
10
 
11
11
  private
@@ -13,7 +13,7 @@ module Sidekiq::Middleware::ActionMailerDefaultUrlOption
13
13
  # current thread to use them.
14
14
  class Server
15
15
  def call(worker, msg, queue)
16
- options = msg['action_mailer_default_url_options'].symbolize_keys
16
+ options = msg['action_mailer_default_url_options'].try(:symbolize_keys)
17
17
  ActionMailer::Base.default_url_options = options if options
18
18
  yield
19
19
  end
@@ -1,3 +1,3 @@
1
1
  module ActionMailerAutoUrlOptions
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,55 +1,75 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_mailer_auto_url_options
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sunny Ripert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-19 00:00:00.000000000 Z
11
+ date: 2018-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4.1'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '6'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - ~>
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: '4.1'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '6'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: rspec-rails
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - '>='
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '3.1'
40
+ type: :development
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '3.1'
47
+ - !ruby/object:Gem::Dependency
48
+ name: combustion
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
32
52
  - !ruby/object:Gem::Version
33
53
  version: '0'
34
54
  type: :development
35
55
  prerelease: false
36
56
  version_requirements: !ruby/object:Gem::Requirement
37
57
  requirements:
38
- - - '>='
58
+ - - ">="
39
59
  - !ruby/object:Gem::Version
40
60
  version: '0'
41
61
  - !ruby/object:Gem::Dependency
42
- name: combustion
62
+ name: sidekiq
43
63
  requirement: !ruby/object:Gem::Requirement
44
64
  requirements:
45
- - - '>='
65
+ - - ">="
46
66
  - !ruby/object:Gem::Version
47
67
  version: '0'
48
68
  type: :development
49
69
  prerelease: false
50
70
  version_requirements: !ruby/object:Gem::Requirement
51
71
  requirements:
52
- - - '>='
72
+ - - ">="
53
73
  - !ruby/object:Gem::Version
54
74
  version: '0'
55
75
  description: Make ActionMailer use the current request host and protocol for URL generation
@@ -77,17 +97,17 @@ require_paths:
77
97
  - lib
78
98
  required_ruby_version: !ruby/object:Gem::Requirement
79
99
  requirements:
80
- - - '>='
100
+ - - ">="
81
101
  - !ruby/object:Gem::Version
82
102
  version: '0'
83
103
  required_rubygems_version: !ruby/object:Gem::Requirement
84
104
  requirements:
85
- - - '>='
105
+ - - ">="
86
106
  - !ruby/object:Gem::Version
87
107
  version: '0'
88
108
  requirements: []
89
109
  rubyforge_project:
90
- rubygems_version: 2.4.5
110
+ rubygems_version: 2.5.2
91
111
  signing_key:
92
112
  specification_version: 4
93
113
  summary: ActionMailer automatic URL options