mail-notify 1.2.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/linting.yml +24 -0
- data/.github/workflows/publish.yml +5 -1
- data/.github/workflows/rails-integration-tests.yml +169 -0
- data/.github/workflows/unit-tests.yml +43 -0
- data/.gitignore +5 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +23 -1
- data/Dockerfile +61 -0
- data/README.md +181 -76
- data/Rakefile +1 -6
- data/{lib/mail/notify → app/views}/layouts/govuk_notify_layout.html.erb +23 -25
- data/bin/console +4 -9
- data/bin/rspec +27 -0
- data/bin/standardrb +27 -0
- data/docs/assets/images/view_template_in_notify.png +0 -0
- data/lib/mail/notify/delivery_method.rb +17 -26
- data/lib/mail/notify/engine.rb +13 -0
- data/lib/mail/notify/mail_notify_preview_interceptor.rb +51 -0
- data/lib/mail/notify/mail_notify_previews_controller.rb +6 -0
- data/lib/mail/notify/mailer.rb +89 -7
- data/lib/mail/notify/message.rb +1 -3
- data/lib/mail/notify/version.rb +1 -1
- data/lib/mail/notify.rb +3 -3
- data/mail-notify.gemspec +16 -15
- data/renovate.json +3 -1
- metadata +74 -61
- data/.coveralls.yml +0 -0
- data/.github/dependabot.yml +0 -10
- data/.github/workflows/build.yml +0 -27
- data/.rubocop.yml +0 -14
- data/docs/screenshot.png +0 -0
- data/lib/mail/notify/mailers_controller.rb +0 -40
- data/lib/mail/notify/personalisation.rb +0 -30
- data/lib/mail/notify/railtie.rb +0 -19
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
##
|
4
|
+
# This is a ActionMailer interceptor class for previews from the Notifications API
|
5
|
+
#
|
6
|
+
# See ActionMailer::Base:
|
7
|
+
#
|
8
|
+
# https://github.com/rails/rails/blob/v5.2.8.1/actionmailer/lib/action_mailer/base.rb#L367
|
9
|
+
|
10
|
+
class MailNotifyPreviewInterceptor
|
11
|
+
##
|
12
|
+
# ActionMailer call back when a preview is being generated.
|
13
|
+
#
|
14
|
+
# Transforms the content of the passed in message.
|
15
|
+
|
16
|
+
def self.previewing_email(message)
|
17
|
+
new(message).transform!
|
18
|
+
end
|
19
|
+
|
20
|
+
##
|
21
|
+
# Creates a new MailNotifyPreviewInterceptor ready for use.
|
22
|
+
|
23
|
+
def initialize(message)
|
24
|
+
@message = message
|
25
|
+
end
|
26
|
+
|
27
|
+
##
|
28
|
+
# Transforms the content of the message to that from the Notifications API preview.
|
29
|
+
#
|
30
|
+
# The html is wrapped in a layout and rendered by the MailNotifyPreviewsControllers renderer.
|
31
|
+
|
32
|
+
def transform!
|
33
|
+
# the messages delivery method will be our Mail::Notify::DeliveryMethod and have the `preview` method.
|
34
|
+
preview = @message.delivery_method.preview(@message)
|
35
|
+
|
36
|
+
@message.subject = preview.subject
|
37
|
+
@message.html_part.body = renderer.render html: preview.html.html_safe, layout: "govuk_notify_layout"
|
38
|
+
@message.text_part.body = preview.body
|
39
|
+
|
40
|
+
@message
|
41
|
+
end
|
42
|
+
|
43
|
+
private
|
44
|
+
|
45
|
+
def renderer
|
46
|
+
# rendering in Rails without a controller gets far too complicated, instead
|
47
|
+
# we rely on this empty controller to do it for us.
|
48
|
+
|
49
|
+
MailNotifyPreviewsController.renderer
|
50
|
+
end
|
51
|
+
end
|
data/lib/mail/notify/mailer.rb
CHANGED
@@ -2,21 +2,103 @@
|
|
2
2
|
|
3
3
|
module Mail
|
4
4
|
module Notify
|
5
|
+
##
|
6
|
+
# The Mail Notify base Mailer class, overridden in Rails applications to provide the additional
|
7
|
+
# Notify behaviour along with the application behaviour.
|
8
|
+
|
5
9
|
class Mailer < ActionMailer::Base
|
6
|
-
|
7
|
-
|
10
|
+
##
|
11
|
+
# Set a default from address, will only be used in previews if a from address is not supplied
|
12
|
+
# by subclasses
|
13
|
+
|
14
|
+
default from: "preview@notifications.service.gov.uk"
|
15
|
+
|
16
|
+
##
|
17
|
+
# Send an email where the content is managed in the Notify template.
|
18
|
+
#
|
19
|
+
# The required arguments are:
|
20
|
+
#
|
21
|
+
# - template_id
|
22
|
+
# - to address
|
23
|
+
#
|
24
|
+
# Can include personalisation.
|
25
|
+
#
|
26
|
+
# Add any additional headers in the options hash.
|
27
|
+
#
|
28
|
+
# A default subject is supplied as ActionMailer requires one, however it will never be used as
|
29
|
+
# the subject is assumed to be managed in the Notify template.
|
30
|
+
|
31
|
+
def template_mail(template_id, options)
|
32
|
+
raise ArgumentError, "You must specify a Notify template ID" if template_id.blank?
|
33
|
+
raise ArgumentError, "You must specify a to address" if options[:to].nil? || options[:to].blank?
|
34
|
+
|
35
|
+
message.template_id = template_id
|
36
|
+
message.reply_to_id = options[:reply_to_id]
|
37
|
+
message.reference = options[:reference]
|
38
|
+
message.one_click_unsubscribe_url = options[:one_click_unsubscribe_url]
|
39
|
+
|
40
|
+
message.personalisation = options[:personalisation] || {}
|
41
|
+
|
42
|
+
headers = options.except(:personalisation, :reply_to_id, :reference)
|
8
43
|
|
9
|
-
|
44
|
+
headers[:subject] = "Subject managed in Notify" unless options[:subject]
|
45
|
+
|
46
|
+
# We have to set the html and the plain text content to nil to prevent Rails from looking
|
47
|
+
# for the content in the views. We replace nil with the content returned from Notify before
|
48
|
+
# sending or previewing
|
49
|
+
mail(headers) do |format|
|
50
|
+
format.text { nil }
|
51
|
+
format.html { nil }
|
52
|
+
end
|
10
53
|
end
|
11
54
|
|
12
|
-
|
13
|
-
|
55
|
+
##
|
56
|
+
# Send an email where the content is managed in the Rails application.
|
57
|
+
#
|
58
|
+
# The required arguments are:
|
59
|
+
#
|
60
|
+
# - template_id
|
61
|
+
# - to address
|
62
|
+
# - subject
|
63
|
+
#
|
64
|
+
# Personalisation will dropped as all content comes from the view provided by Rails.
|
65
|
+
#
|
66
|
+
# Add any additional headers in the options hash.
|
67
|
+
|
68
|
+
def view_mail(template_id, options)
|
69
|
+
raise ArgumentError, "You must specify a Notify template ID" if template_id.blank?
|
70
|
+
raise ArgumentError, "You must supply a to address" if options[:to].blank?
|
71
|
+
raise ArgumentError, "You must specify a subject" if options[:subject].blank?
|
72
|
+
|
73
|
+
message.template_id = template_id
|
74
|
+
message.reply_to_id = options[:reply_to_id]
|
75
|
+
message.reference = options[:reference]
|
76
|
+
|
77
|
+
subject = options[:subject]
|
78
|
+
headers = options.except(:personalisation, :reply_to_id, :reference)
|
14
79
|
|
15
|
-
|
80
|
+
# We have to render the view for the message and grab the raw source, then we set that as the
|
81
|
+
# body in the personalisation for sending to the Notify API.
|
82
|
+
#
|
83
|
+
# We do not pass the headers as the call to `mail` will keep adding headers resulting in
|
84
|
+
# duplication when we have to call it again later.
|
85
|
+
body = mail.body.raw_source
|
86
|
+
|
87
|
+
# The 'view mail' works by sending a subject and body as personalisation options, these are
|
88
|
+
# then used in the Notify template to provide content.
|
89
|
+
message.personalisation = {subject: subject, body: body}
|
90
|
+
|
91
|
+
mail(headers) do |format|
|
92
|
+
format.text { nil }
|
93
|
+
format.html { nil }
|
94
|
+
end
|
16
95
|
end
|
17
96
|
|
97
|
+
##
|
98
|
+
# allows blank personalisation options
|
99
|
+
|
18
100
|
def blank_allowed(value)
|
19
|
-
value.
|
101
|
+
value.to_s
|
20
102
|
end
|
21
103
|
end
|
22
104
|
end
|
data/lib/mail/notify/message.rb
CHANGED
data/lib/mail/notify/version.rb
CHANGED
data/lib/mail/notify.rb
CHANGED
@@ -3,12 +3,12 @@
|
|
3
3
|
require "notifications/client"
|
4
4
|
|
5
5
|
require "mail/notify/version"
|
6
|
-
require "mail/notify/
|
6
|
+
require "mail/notify/engine" if defined? Rails
|
7
7
|
require "mail/notify/delivery_method"
|
8
|
-
require "mail/notify/personalisation"
|
9
8
|
require "mail/notify/mailer"
|
10
9
|
require "mail/notify/message"
|
11
|
-
require "mail/notify/
|
10
|
+
require "mail/notify/mail_notify_previews_controller"
|
11
|
+
require "mail/notify/mail_notify_preview_interceptor"
|
12
12
|
|
13
13
|
Mail::Message.include Mail::Notify::Message
|
14
14
|
|
data/mail-notify.gemspec
CHANGED
@@ -7,10 +7,10 @@ require "mail/notify/version"
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
8
|
spec.name = "mail-notify"
|
9
9
|
spec.version = Mail::Notify::VERSION
|
10
|
-
spec.authors = ["Stuart Harrison"]
|
10
|
+
spec.authors = ["Stuart Harrison", "Meyric Rawlings"]
|
11
11
|
spec.email = ["pezholio@gmail.com"]
|
12
12
|
|
13
|
-
spec.summary = "
|
13
|
+
spec.summary = "Rails plugin, send and preview email with GOV.UK Notify"
|
14
14
|
spec.homepage = "https://github.com/dxw/mail-notify"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
@@ -26,20 +26,21 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.require_paths = ["lib"]
|
27
27
|
|
28
28
|
spec.add_development_dependency "bundler", "~> 2.0"
|
29
|
-
spec.add_development_dependency "
|
30
|
-
spec.add_development_dependency "
|
31
|
-
spec.add_development_dependency "
|
32
|
-
spec.add_development_dependency "
|
33
|
-
spec.add_development_dependency "
|
29
|
+
spec.add_development_dependency "simplecov", "~> 0.21"
|
30
|
+
spec.add_development_dependency "simplecov-lcov"
|
31
|
+
spec.add_development_dependency "debug"
|
32
|
+
spec.add_development_dependency "rails", "7.2.2.1"
|
33
|
+
spec.add_development_dependency "rake", "~> 13.2.1"
|
34
|
+
spec.add_development_dependency "rspec-rails", "~> 7.1"
|
34
35
|
spec.add_development_dependency "standard", "~> 1"
|
35
|
-
spec.add_development_dependency "sqlite3", "~> 1.
|
36
|
-
spec.add_development_dependency "webmock", "~> 3.
|
37
|
-
spec.add_development_dependency "rspec-mocks", "~> 3.
|
36
|
+
spec.add_development_dependency "sqlite3", "~> 1.7.2"
|
37
|
+
spec.add_development_dependency "webmock", "~> 3.23.0"
|
38
|
+
spec.add_development_dependency "rspec-mocks", "~> 3.13.0"
|
38
39
|
|
39
|
-
spec.add_dependency "actionmailer", ">= 5.2.4.6"
|
40
|
-
spec.add_dependency "activesupport", ">= 5.2.4.6"
|
41
|
-
spec.add_dependency "actionpack", ">= 5.2.7.1"
|
42
|
-
spec.add_dependency "actionview", ">= 5.2.7.1"
|
43
|
-
spec.add_dependency "notifications-ruby-client", "~> 5.1"
|
44
40
|
spec.add_dependency "rack", ">= 2.1.4.1"
|
41
|
+
spec.add_dependency "actionmailer", ">= 5.2.8.1"
|
42
|
+
spec.add_dependency "activesupport", ">= 5.2.8.1"
|
43
|
+
spec.add_dependency "actionpack", ">= 5.2.8.1"
|
44
|
+
spec.add_dependency "actionview", ">= 5.2.8.1"
|
45
|
+
spec.add_dependency "notifications-ruby-client", "~> 6.0"
|
45
46
|
end
|
data/renovate.json
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mail-notify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stuart Harrison
|
8
|
-
|
8
|
+
- Meyric Rawlings
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -25,75 +25,89 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: simplecov
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: '0.21'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: '0.21'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: simplecov-lcov
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: debug
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rails
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- -
|
73
|
+
- - '='
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
75
|
+
version: 7.2.2.1
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
|
-
- -
|
80
|
+
- - '='
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
82
|
+
version: 7.2.2.1
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: rake
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
87
|
- - "~>"
|
74
88
|
- !ruby/object:Gem::Version
|
75
|
-
version: 13.
|
89
|
+
version: 13.2.1
|
76
90
|
type: :development
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
94
|
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
|
-
version: 13.
|
96
|
+
version: 13.2.1
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: rspec-rails
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
101
|
- - "~>"
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
103
|
+
version: '7.1'
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
108
|
- - "~>"
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
110
|
+
version: '7.1'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: standard
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,160 +128,161 @@ dependencies:
|
|
114
128
|
requirements:
|
115
129
|
- - "~>"
|
116
130
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.
|
131
|
+
version: 1.7.2
|
118
132
|
type: :development
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
136
|
- - "~>"
|
123
137
|
- !ruby/object:Gem::Version
|
124
|
-
version: 1.
|
138
|
+
version: 1.7.2
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: webmock
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
128
142
|
requirements:
|
129
143
|
- - "~>"
|
130
144
|
- !ruby/object:Gem::Version
|
131
|
-
version: 3.
|
145
|
+
version: 3.23.0
|
132
146
|
type: :development
|
133
147
|
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
150
|
- - "~>"
|
137
151
|
- !ruby/object:Gem::Version
|
138
|
-
version: 3.
|
152
|
+
version: 3.23.0
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: rspec-mocks
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
142
156
|
requirements:
|
143
157
|
- - "~>"
|
144
158
|
- !ruby/object:Gem::Version
|
145
|
-
version: 3.
|
159
|
+
version: 3.13.0
|
146
160
|
type: :development
|
147
161
|
prerelease: false
|
148
162
|
version_requirements: !ruby/object:Gem::Requirement
|
149
163
|
requirements:
|
150
164
|
- - "~>"
|
151
165
|
- !ruby/object:Gem::Version
|
152
|
-
version: 3.
|
166
|
+
version: 3.13.0
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
168
|
+
name: rack
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
156
170
|
requirements:
|
157
171
|
- - ">="
|
158
172
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
173
|
+
version: 2.1.4.1
|
160
174
|
type: :runtime
|
161
175
|
prerelease: false
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
163
177
|
requirements:
|
164
178
|
- - ">="
|
165
179
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
180
|
+
version: 2.1.4.1
|
167
181
|
- !ruby/object:Gem::Dependency
|
168
|
-
name:
|
182
|
+
name: actionmailer
|
169
183
|
requirement: !ruby/object:Gem::Requirement
|
170
184
|
requirements:
|
171
185
|
- - ">="
|
172
186
|
- !ruby/object:Gem::Version
|
173
|
-
version: 5.2.
|
187
|
+
version: 5.2.8.1
|
174
188
|
type: :runtime
|
175
189
|
prerelease: false
|
176
190
|
version_requirements: !ruby/object:Gem::Requirement
|
177
191
|
requirements:
|
178
192
|
- - ">="
|
179
193
|
- !ruby/object:Gem::Version
|
180
|
-
version: 5.2.
|
194
|
+
version: 5.2.8.1
|
181
195
|
- !ruby/object:Gem::Dependency
|
182
|
-
name:
|
196
|
+
name: activesupport
|
183
197
|
requirement: !ruby/object:Gem::Requirement
|
184
198
|
requirements:
|
185
199
|
- - ">="
|
186
200
|
- !ruby/object:Gem::Version
|
187
|
-
version: 5.2.
|
201
|
+
version: 5.2.8.1
|
188
202
|
type: :runtime
|
189
203
|
prerelease: false
|
190
204
|
version_requirements: !ruby/object:Gem::Requirement
|
191
205
|
requirements:
|
192
206
|
- - ">="
|
193
207
|
- !ruby/object:Gem::Version
|
194
|
-
version: 5.2.
|
208
|
+
version: 5.2.8.1
|
195
209
|
- !ruby/object:Gem::Dependency
|
196
|
-
name:
|
210
|
+
name: actionpack
|
197
211
|
requirement: !ruby/object:Gem::Requirement
|
198
212
|
requirements:
|
199
213
|
- - ">="
|
200
214
|
- !ruby/object:Gem::Version
|
201
|
-
version: 5.2.
|
215
|
+
version: 5.2.8.1
|
202
216
|
type: :runtime
|
203
217
|
prerelease: false
|
204
218
|
version_requirements: !ruby/object:Gem::Requirement
|
205
219
|
requirements:
|
206
220
|
- - ">="
|
207
221
|
- !ruby/object:Gem::Version
|
208
|
-
version: 5.2.
|
222
|
+
version: 5.2.8.1
|
209
223
|
- !ruby/object:Gem::Dependency
|
210
|
-
name:
|
224
|
+
name: actionview
|
211
225
|
requirement: !ruby/object:Gem::Requirement
|
212
226
|
requirements:
|
213
|
-
- - "
|
227
|
+
- - ">="
|
214
228
|
- !ruby/object:Gem::Version
|
215
|
-
version:
|
229
|
+
version: 5.2.8.1
|
216
230
|
type: :runtime
|
217
231
|
prerelease: false
|
218
232
|
version_requirements: !ruby/object:Gem::Requirement
|
219
233
|
requirements:
|
220
|
-
- - "
|
234
|
+
- - ">="
|
221
235
|
- !ruby/object:Gem::Version
|
222
|
-
version:
|
236
|
+
version: 5.2.8.1
|
223
237
|
- !ruby/object:Gem::Dependency
|
224
|
-
name:
|
238
|
+
name: notifications-ruby-client
|
225
239
|
requirement: !ruby/object:Gem::Requirement
|
226
240
|
requirements:
|
227
|
-
- - "
|
241
|
+
- - "~>"
|
228
242
|
- !ruby/object:Gem::Version
|
229
|
-
version:
|
243
|
+
version: '6.0'
|
230
244
|
type: :runtime
|
231
245
|
prerelease: false
|
232
246
|
version_requirements: !ruby/object:Gem::Requirement
|
233
247
|
requirements:
|
234
|
-
- - "
|
248
|
+
- - "~>"
|
235
249
|
- !ruby/object:Gem::Version
|
236
|
-
version:
|
237
|
-
description:
|
250
|
+
version: '6.0'
|
238
251
|
email:
|
239
252
|
- pezholio@gmail.com
|
240
253
|
executables: []
|
241
254
|
extensions: []
|
242
255
|
extra_rdoc_files: []
|
243
256
|
files:
|
244
|
-
- ".coveralls.yml"
|
245
|
-
- ".github/dependabot.yml"
|
246
257
|
- ".github/setup-rubygems.sh"
|
247
|
-
- ".github/workflows/
|
258
|
+
- ".github/workflows/linting.yml"
|
248
259
|
- ".github/workflows/publish.yml"
|
260
|
+
- ".github/workflows/rails-integration-tests.yml"
|
261
|
+
- ".github/workflows/unit-tests.yml"
|
249
262
|
- ".gitignore"
|
250
263
|
- ".rspec"
|
251
|
-
- ".rubocop.yml"
|
252
264
|
- ".ruby-version"
|
253
265
|
- CHANGELOG.md
|
254
266
|
- CODE_OF_CONDUCT.md
|
255
267
|
- CONTRIBUTING.md
|
268
|
+
- Dockerfile
|
256
269
|
- Gemfile
|
257
270
|
- LICENSE.txt
|
258
271
|
- README.md
|
259
272
|
- Rakefile
|
273
|
+
- app/views/layouts/govuk_notify_layout.html.erb
|
260
274
|
- bin/console
|
275
|
+
- bin/rspec
|
261
276
|
- bin/setup
|
262
|
-
-
|
277
|
+
- bin/standardrb
|
278
|
+
- docs/assets/images/view_template_in_notify.png
|
263
279
|
- lib/mail/notify.rb
|
264
280
|
- lib/mail/notify/delivery_method.rb
|
265
|
-
- lib/mail/notify/
|
281
|
+
- lib/mail/notify/engine.rb
|
282
|
+
- lib/mail/notify/mail_notify_preview_interceptor.rb
|
283
|
+
- lib/mail/notify/mail_notify_previews_controller.rb
|
266
284
|
- lib/mail/notify/mailer.rb
|
267
|
-
- lib/mail/notify/mailers_controller.rb
|
268
285
|
- lib/mail/notify/message.rb
|
269
|
-
- lib/mail/notify/personalisation.rb
|
270
|
-
- lib/mail/notify/railtie.rb
|
271
286
|
- lib/mail/notify/version.rb
|
272
287
|
- mail-notify.gemspec
|
273
288
|
- renovate.json
|
@@ -275,7 +290,6 @@ homepage: https://github.com/dxw/mail-notify
|
|
275
290
|
licenses:
|
276
291
|
- MIT
|
277
292
|
metadata: {}
|
278
|
-
post_install_message:
|
279
293
|
rdoc_options: []
|
280
294
|
require_paths:
|
281
295
|
- lib
|
@@ -290,8 +304,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
290
304
|
- !ruby/object:Gem::Version
|
291
305
|
version: '0'
|
292
306
|
requirements: []
|
293
|
-
rubygems_version: 3.
|
294
|
-
signing_key:
|
307
|
+
rubygems_version: 3.6.2
|
295
308
|
specification_version: 4
|
296
|
-
summary:
|
309
|
+
summary: Rails plugin, send and preview email with GOV.UK Notify
|
297
310
|
test_files: []
|
data/.coveralls.yml
DELETED
File without changes
|
data/.github/dependabot.yml
DELETED
data/.github/workflows/build.yml
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
name: Build
|
2
|
-
|
3
|
-
on: [push, pull_request]
|
4
|
-
|
5
|
-
jobs:
|
6
|
-
build:
|
7
|
-
|
8
|
-
runs-on: ubuntu-latest
|
9
|
-
|
10
|
-
steps:
|
11
|
-
- uses: actions/checkout@v3
|
12
|
-
- name: Set up Ruby
|
13
|
-
uses: ruby/setup-ruby@v1
|
14
|
-
- name: Set up cache
|
15
|
-
uses: actions/cache@preview
|
16
|
-
with:
|
17
|
-
path: vendor/bundle
|
18
|
-
key: ${{ runner.os }}-gem-${{ hashFiles('**/mail-notify.gemspec') }}
|
19
|
-
restore-keys: |
|
20
|
-
${{ runner.os }}-gem-
|
21
|
-
- name: Build and test with Rake
|
22
|
-
run: |
|
23
|
-
sudo apt-get update
|
24
|
-
sudo apt-get install sqlite3 libsqlite3-dev
|
25
|
-
gem install bundler
|
26
|
-
bundle install --jobs 4 --retry 3 --path ./vendor/bundle
|
27
|
-
bundle exec rake
|
data/.rubocop.yml
DELETED
data/docs/screenshot.png
DELETED
Binary file
|