mail-notify 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.circleci/config.yml +70 -0
- data/.circleci/setup-rubygems.sh +3 -0
- data/.coveralls.yml +0 -0
- data/.gitignore +12 -0
- data/.rspec +3 -0
- data/.rubocop.yml +10 -0
- data/.ruby-version +1 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +138 -0
- data/LICENSE.txt +21 -0
- data/README.md +78 -0
- data/Rakefile +11 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/docs/screenshot.png +0 -0
- data/lib/mail/notify.rb +12 -0
- data/lib/mail/notify/delivery_method.rb +39 -0
- data/lib/mail/notify/railtie.rb +11 -0
- data/lib/mail/notify/version.rb +7 -0
- data/mail-notify.gemspec +35 -0
- metadata +177 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b6b11dc10c2fb12b2ad57606156b3d2e555ee0f5ae47c1b5ed65aa5edda4f7e3
|
4
|
+
data.tar.gz: 69d53a7e7cd2cb27f1a918247faa02945df6c07b57be1ff017418556cfdf9dd4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 771e26cd9314ea752907d9bf7e09e213581247c32582b1a4663be105f5c9a4aabec30797e4ad8cbd831b83c354b1e4ed4cbeafc7f79781f9ce9d17da80ce151c
|
7
|
+
data.tar.gz: 14d36787c4dfab3458c31bdf3382fbfe760a82b78d4041ca48a9c5ccc9821534993dd68ae56da1826bff78ebba3dcf540b41920d6a2e32fcb5a9addd0d033e37
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# Ruby CircleCI 2.0 configuration file
|
2
|
+
#
|
3
|
+
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
|
4
|
+
#
|
5
|
+
version: 2
|
6
|
+
jobs:
|
7
|
+
build:
|
8
|
+
docker:
|
9
|
+
# specify the version you desire here
|
10
|
+
- image: circleci/ruby:2.6.0-node-browsers
|
11
|
+
|
12
|
+
working_directory: ~/repo
|
13
|
+
|
14
|
+
steps:
|
15
|
+
- checkout
|
16
|
+
|
17
|
+
# Install bundler
|
18
|
+
- run:
|
19
|
+
name: install bundler
|
20
|
+
command: gem install bundler
|
21
|
+
|
22
|
+
# Download and cache dependencies
|
23
|
+
- restore_cache:
|
24
|
+
keys:
|
25
|
+
- v1-dependencies-{{ checksum "Gemfile.lock" }}
|
26
|
+
# fallback to using the latest cache if no exact match is found
|
27
|
+
- v1-dependencies-
|
28
|
+
|
29
|
+
- run:
|
30
|
+
name: install dependencies
|
31
|
+
command: |
|
32
|
+
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
33
|
+
|
34
|
+
- save_cache:
|
35
|
+
paths:
|
36
|
+
- ./vendor/bundle
|
37
|
+
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
|
38
|
+
|
39
|
+
# run tests!
|
40
|
+
- run:
|
41
|
+
name: run tests
|
42
|
+
command: bundle exec rake
|
43
|
+
deploy:
|
44
|
+
docker:
|
45
|
+
- image: circleci/ruby:2.6.0-node-browsers
|
46
|
+
|
47
|
+
working_directory: ~/repo
|
48
|
+
|
49
|
+
steps:
|
50
|
+
- checkout
|
51
|
+
- run:
|
52
|
+
name: Setup Rubygems
|
53
|
+
command: bash .circleci/setup-rubygems.sh
|
54
|
+
|
55
|
+
- run:
|
56
|
+
name: Publish to Rubygems
|
57
|
+
command: |
|
58
|
+
gem build mail-notify.gemspec
|
59
|
+
gem push "mail-notify-$(git describe --tags).gem"
|
60
|
+
workflows:
|
61
|
+
version: 2
|
62
|
+
test-deploy:
|
63
|
+
jobs:
|
64
|
+
- build
|
65
|
+
- deploy:
|
66
|
+
filters:
|
67
|
+
tags:
|
68
|
+
only: /.*/
|
69
|
+
branches:
|
70
|
+
ignore: /.*/
|
data/.coveralls.yml
ADDED
File without changes
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.6.0
|
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at pezholio@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,138 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
mail-notify (0.1.0)
|
5
|
+
actionmailer (~> 5.0)
|
6
|
+
notifications-ruby-client (~> 2.0)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
actionmailer (5.2.2)
|
12
|
+
actionpack (= 5.2.2)
|
13
|
+
actionview (= 5.2.2)
|
14
|
+
activejob (= 5.2.2)
|
15
|
+
mail (~> 2.5, >= 2.5.4)
|
16
|
+
rails-dom-testing (~> 2.0)
|
17
|
+
actionpack (5.2.2)
|
18
|
+
actionview (= 5.2.2)
|
19
|
+
activesupport (= 5.2.2)
|
20
|
+
rack (~> 2.0)
|
21
|
+
rack-test (>= 0.6.3)
|
22
|
+
rails-dom-testing (~> 2.0)
|
23
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
24
|
+
actionview (5.2.2)
|
25
|
+
activesupport (= 5.2.2)
|
26
|
+
builder (~> 3.1)
|
27
|
+
erubi (~> 1.4)
|
28
|
+
rails-dom-testing (~> 2.0)
|
29
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
30
|
+
activejob (5.2.2)
|
31
|
+
activesupport (= 5.2.2)
|
32
|
+
globalid (>= 0.3.6)
|
33
|
+
activesupport (5.2.2)
|
34
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
35
|
+
i18n (>= 0.7, < 2)
|
36
|
+
minitest (~> 5.1)
|
37
|
+
tzinfo (~> 1.1)
|
38
|
+
ast (2.4.0)
|
39
|
+
builder (3.2.3)
|
40
|
+
coderay (1.1.2)
|
41
|
+
concurrent-ruby (1.1.4)
|
42
|
+
coveralls (0.8.22)
|
43
|
+
json (>= 1.8, < 3)
|
44
|
+
simplecov (~> 0.16.1)
|
45
|
+
term-ansicolor (~> 1.3)
|
46
|
+
thor (~> 0.19.4)
|
47
|
+
tins (~> 1.6)
|
48
|
+
crass (1.0.4)
|
49
|
+
diff-lcs (1.3)
|
50
|
+
docile (1.3.1)
|
51
|
+
erubi (1.8.0)
|
52
|
+
globalid (0.4.2)
|
53
|
+
activesupport (>= 4.2.0)
|
54
|
+
i18n (1.5.3)
|
55
|
+
concurrent-ruby (~> 1.0)
|
56
|
+
jaro_winkler (1.5.2)
|
57
|
+
json (2.1.0)
|
58
|
+
jwt (2.1.0)
|
59
|
+
loofah (2.2.3)
|
60
|
+
crass (~> 1.0.2)
|
61
|
+
nokogiri (>= 1.5.9)
|
62
|
+
mail (2.7.1)
|
63
|
+
mini_mime (>= 0.1.1)
|
64
|
+
method_source (0.9.2)
|
65
|
+
mini_mime (1.0.1)
|
66
|
+
mini_portile2 (2.4.0)
|
67
|
+
minitest (5.11.3)
|
68
|
+
nokogiri (1.10.1)
|
69
|
+
mini_portile2 (~> 2.4.0)
|
70
|
+
notifications-ruby-client (2.10.0)
|
71
|
+
jwt (>= 1.5, < 3)
|
72
|
+
parallel (1.13.0)
|
73
|
+
parser (2.6.0.0)
|
74
|
+
ast (~> 2.4.0)
|
75
|
+
powerpack (0.1.2)
|
76
|
+
pry (0.12.2)
|
77
|
+
coderay (~> 1.1.0)
|
78
|
+
method_source (~> 0.9.0)
|
79
|
+
rack (2.0.6)
|
80
|
+
rack-test (1.1.0)
|
81
|
+
rack (>= 1.0, < 3)
|
82
|
+
rails-dom-testing (2.0.3)
|
83
|
+
activesupport (>= 4.2.0)
|
84
|
+
nokogiri (>= 1.6)
|
85
|
+
rails-html-sanitizer (1.0.4)
|
86
|
+
loofah (~> 2.2, >= 2.2.2)
|
87
|
+
rainbow (3.0.0)
|
88
|
+
rake (10.5.0)
|
89
|
+
rspec (3.8.0)
|
90
|
+
rspec-core (~> 3.8.0)
|
91
|
+
rspec-expectations (~> 3.8.0)
|
92
|
+
rspec-mocks (~> 3.8.0)
|
93
|
+
rspec-core (3.8.0)
|
94
|
+
rspec-support (~> 3.8.0)
|
95
|
+
rspec-expectations (3.8.2)
|
96
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
97
|
+
rspec-support (~> 3.8.0)
|
98
|
+
rspec-mocks (3.8.0)
|
99
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
100
|
+
rspec-support (~> 3.8.0)
|
101
|
+
rspec-support (3.8.0)
|
102
|
+
rubocop (0.63.1)
|
103
|
+
jaro_winkler (~> 1.5.1)
|
104
|
+
parallel (~> 1.10)
|
105
|
+
parser (>= 2.5, != 2.5.1.1)
|
106
|
+
powerpack (~> 0.1)
|
107
|
+
rainbow (>= 2.2.2, < 4.0)
|
108
|
+
ruby-progressbar (~> 1.7)
|
109
|
+
unicode-display_width (~> 1.4.0)
|
110
|
+
ruby-progressbar (1.10.0)
|
111
|
+
simplecov (0.16.1)
|
112
|
+
docile (~> 1.1)
|
113
|
+
json (>= 1.8, < 3)
|
114
|
+
simplecov-html (~> 0.10.0)
|
115
|
+
simplecov-html (0.10.2)
|
116
|
+
term-ansicolor (1.7.1)
|
117
|
+
tins (~> 1.0)
|
118
|
+
thor (0.19.4)
|
119
|
+
thread_safe (0.3.6)
|
120
|
+
tins (1.20.2)
|
121
|
+
tzinfo (1.2.5)
|
122
|
+
thread_safe (~> 0.1)
|
123
|
+
unicode-display_width (1.4.1)
|
124
|
+
|
125
|
+
PLATFORMS
|
126
|
+
ruby
|
127
|
+
|
128
|
+
DEPENDENCIES
|
129
|
+
bundler (~> 2.0)
|
130
|
+
coveralls (~> 0.8.22)
|
131
|
+
mail-notify!
|
132
|
+
pry (~> 0.12.0)
|
133
|
+
rake (~> 10.0)
|
134
|
+
rspec (~> 3.0)
|
135
|
+
rubocop (~> 0.63)
|
136
|
+
|
137
|
+
BUNDLED WITH
|
138
|
+
2.0.1
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 Stuart Harrison
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
[![CircleCI](https://circleci.com/gh/pezholio/mail-notify.svg?style=svg)](https://circleci.com/gh/pezholio/mail-notify)
|
2
|
+
|
3
|
+
# Mail::Notify
|
4
|
+
|
5
|
+
Rails / ActionMailer support for the [GOV.UK Notify API](https://www.notifications.service.gov.uk).
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'mail-notify'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install mail-notify
|
22
|
+
|
23
|
+
Then, add the following to your `config/environments/*.rb` (where * is `test`, `development`, `production` or
|
24
|
+
whatever other environment(s) you have) file(s):
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
config.action_mailer.delivery_method = :notify
|
28
|
+
config.action_mailer.notify_settings = {
|
29
|
+
api_key: YOUR_NOTIFY_API_KEY
|
30
|
+
}
|
31
|
+
```
|
32
|
+
|
33
|
+
## Usage
|
34
|
+
|
35
|
+
This gem assumes you have a very simple template set up in Notify, with a `((subject))` variable
|
36
|
+
in the subject line, and a `((body))` variable in the body field, as below:
|
37
|
+
|
38
|
+
![Example screenshot](docs/screenshot.png)
|
39
|
+
|
40
|
+
Support for further customisations may come further down the road.
|
41
|
+
|
42
|
+
### Mailers
|
43
|
+
|
44
|
+
Using mailers is pretty much identical to as if you were using any other action_mailer delivery method, the only difference is you'll need to add your `template_id` to your call to `mail`, eg:
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
class MyMailer < ApplicationMailer
|
48
|
+
def send_email
|
49
|
+
mail(
|
50
|
+
to: 'mail@somewhere.com',
|
51
|
+
subject: 'Subject line goes here',
|
52
|
+
template_id: 'YOUR_TEMPLATE_ID_GOES_HERE'
|
53
|
+
)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
```
|
57
|
+
|
58
|
+
### Views
|
59
|
+
|
60
|
+
Views should be simple `text.erb` files. You can add some markdown for headers, bullet points and links etc. These are handled in the same way as standard action_mailer views.
|
61
|
+
|
62
|
+
## Development
|
63
|
+
|
64
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
65
|
+
|
66
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
67
|
+
|
68
|
+
## Contributing
|
69
|
+
|
70
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/mail-notify. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
71
|
+
|
72
|
+
## License
|
73
|
+
|
74
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
75
|
+
|
76
|
+
## Code of Conduct
|
77
|
+
|
78
|
+
Everyone interacting in the Mail::Notify project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/mail-notify/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'mail/notify'
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require "pry"
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require 'irb'
|
15
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/docs/screenshot.png
ADDED
Binary file
|
data/lib/mail/notify.rb
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Mail
|
4
|
+
module Notify
|
5
|
+
class DeliveryMethod
|
6
|
+
attr_accessor :settings
|
7
|
+
|
8
|
+
def initialize(settings)
|
9
|
+
@settings = settings
|
10
|
+
end
|
11
|
+
|
12
|
+
def deliver!(mail)
|
13
|
+
initialize_params(mail)
|
14
|
+
send_email
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def client
|
20
|
+
@client ||= Notifications::Client.new(@settings[:api_key])
|
21
|
+
end
|
22
|
+
|
23
|
+
def initialize_params(mail)
|
24
|
+
@email_params = {
|
25
|
+
email_address: mail.to.first,
|
26
|
+
template_id: mail[:template_id].to_s,
|
27
|
+
personalisation: {
|
28
|
+
body: mail.body.raw_source,
|
29
|
+
subject: mail.subject
|
30
|
+
}
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
def send_email
|
35
|
+
client.send_email(@email_params)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Mail
|
4
|
+
module Notify
|
5
|
+
class Railtie < Rails::Railtie
|
6
|
+
initializer 'mail-notify.add_delivery_method', before: 'action_mailer.set_configs' do
|
7
|
+
ActionMailer::Base.add_delivery_method(:notify, Mail::Notify::DeliveryMethod)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
data/mail-notify.gemspec
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'mail/notify/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'mail-notify'
|
9
|
+
spec.version = Mail::Notify::VERSION
|
10
|
+
spec.authors = ['Stuart Harrison']
|
11
|
+
spec.email = ['pezholio@gmail.com']
|
12
|
+
|
13
|
+
spec.summary = 'ActionMailer support for the GOV.UK Notify API'
|
14
|
+
spec.homepage = 'https://github.com/dxw/mail-notify'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
# Specify which files should be added to the gem when it is released.
|
18
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
19
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
20
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
|
+
end
|
22
|
+
spec.bindir = 'exe'
|
23
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
+
spec.require_paths = ['lib']
|
25
|
+
|
26
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
27
|
+
spec.add_development_dependency 'coveralls', '~> 0.8.22'
|
28
|
+
spec.add_development_dependency 'pry', '~> 0.12.0'
|
29
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
30
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
31
|
+
spec.add_development_dependency 'rubocop', '~> 0.63'
|
32
|
+
|
33
|
+
spec.add_dependency 'actionmailer', '~> 5.0'
|
34
|
+
spec.add_dependency 'notifications-ruby-client', '~> 2.0'
|
35
|
+
end
|
metadata
ADDED
@@ -0,0 +1,177 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mail-notify
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Stuart Harrison
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-02-01 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: coveralls
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.8.22
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.8.22
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: pry
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.12.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.12.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0.63'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0.63'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: actionmailer
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '5.0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '5.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: notifications-ruby-client
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '2.0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '2.0'
|
125
|
+
description:
|
126
|
+
email:
|
127
|
+
- pezholio@gmail.com
|
128
|
+
executables: []
|
129
|
+
extensions: []
|
130
|
+
extra_rdoc_files: []
|
131
|
+
files:
|
132
|
+
- ".circleci/config.yml"
|
133
|
+
- ".circleci/setup-rubygems.sh"
|
134
|
+
- ".coveralls.yml"
|
135
|
+
- ".gitignore"
|
136
|
+
- ".rspec"
|
137
|
+
- ".rubocop.yml"
|
138
|
+
- ".ruby-version"
|
139
|
+
- ".travis.yml"
|
140
|
+
- CODE_OF_CONDUCT.md
|
141
|
+
- Gemfile
|
142
|
+
- Gemfile.lock
|
143
|
+
- LICENSE.txt
|
144
|
+
- README.md
|
145
|
+
- Rakefile
|
146
|
+
- bin/console
|
147
|
+
- bin/setup
|
148
|
+
- docs/screenshot.png
|
149
|
+
- lib/mail/notify.rb
|
150
|
+
- lib/mail/notify/delivery_method.rb
|
151
|
+
- lib/mail/notify/railtie.rb
|
152
|
+
- lib/mail/notify/version.rb
|
153
|
+
- mail-notify.gemspec
|
154
|
+
homepage: https://github.com/dxw/mail-notify
|
155
|
+
licenses:
|
156
|
+
- MIT
|
157
|
+
metadata: {}
|
158
|
+
post_install_message:
|
159
|
+
rdoc_options: []
|
160
|
+
require_paths:
|
161
|
+
- lib
|
162
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
168
|
+
requirements:
|
169
|
+
- - ">="
|
170
|
+
- !ruby/object:Gem::Version
|
171
|
+
version: '0'
|
172
|
+
requirements: []
|
173
|
+
rubygems_version: 3.0.1
|
174
|
+
signing_key:
|
175
|
+
specification_version: 4
|
176
|
+
summary: ActionMailer support for the GOV.UK Notify API
|
177
|
+
test_files: []
|