thincloud-postmark 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +71 -0
- data/Rakefile +2 -0
- data/lib/generators/thincloud/postmark/postmark_generator.rb +30 -0
- data/lib/generators/thincloud/postmark/templates/action_mailer.rb +2 -0
- data/lib/generators/thincloud/postmark/templates/mail_interceptor.rb +7 -0
- data/lib/generators/thincloud/postmark/templates/postmark.rb +6 -0
- data/lib/thincloud-postmark.rb +7 -0
- data/lib/thincloud-postmark/version.rb +5 -0
- data/thincloud-postmark.gemspec +17 -0
- metadata +59 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 New Leaders
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
# Thincloud::Postmark
|
2
|
+
|
3
|
+
## Description
|
4
|
+
|
5
|
+
[Postmark](http://postmarkapp.com) configuration for Rails apps.
|
6
|
+
|
7
|
+
## Requirements
|
8
|
+
|
9
|
+
This gem requires Rails 3.2+ and has been tested on the following versions:
|
10
|
+
|
11
|
+
* 3.2
|
12
|
+
|
13
|
+
This gem has been tested against the following Ruby versions:
|
14
|
+
|
15
|
+
* 1.9.3
|
16
|
+
|
17
|
+
|
18
|
+
## Installation
|
19
|
+
|
20
|
+
Add this line to your application's Gemfile:
|
21
|
+
|
22
|
+
``` ruby
|
23
|
+
gem "thincloud-postmark"
|
24
|
+
```
|
25
|
+
|
26
|
+
And then execute:
|
27
|
+
|
28
|
+
```
|
29
|
+
$ bundle
|
30
|
+
```
|
31
|
+
|
32
|
+
Or install it yourself as:
|
33
|
+
|
34
|
+
```
|
35
|
+
$ gem install thincloud-postmark
|
36
|
+
```
|
37
|
+
|
38
|
+
## Usage
|
39
|
+
|
40
|
+
This gem adds a generator to Rails, `thincloud:postmark`. Running the generator will install a Postmark initializer and a mail interceptor for non-production environments.
|
41
|
+
|
42
|
+
* Invoke the generator:
|
43
|
+
|
44
|
+
```
|
45
|
+
$ rails generate thincloud:postmark
|
46
|
+
```
|
47
|
+
|
48
|
+
## Contributing
|
49
|
+
|
50
|
+
1. Fork it
|
51
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
52
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
53
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
54
|
+
5. Create new Pull Request
|
55
|
+
|
56
|
+
|
57
|
+
## Contributing
|
58
|
+
|
59
|
+
1. [Fork it](https://github.com/newleaders/thincloud-postmark/fork_select)
|
60
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
61
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
62
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
63
|
+
5. [Create a Pull Request](hhttps://github.com/newleaders/thincloud-postmark/pull/new)
|
64
|
+
|
65
|
+
|
66
|
+
## License
|
67
|
+
|
68
|
+
* Freely distributable and licensed under the MIT-style license. See LICENSE file for details.
|
69
|
+
* Copyright (c) 2012 New Leaders
|
70
|
+
* [https://newleaders.com](https://newleaders.com)
|
71
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
require "rails"
|
2
|
+
|
3
|
+
module Thincloud
|
4
|
+
module Generators
|
5
|
+
class PostmarkGenerator < ::Rails::Generators::Base
|
6
|
+
source_root File.expand_path("../templates", __FILE__)
|
7
|
+
|
8
|
+
desc "Generates Postmark configuration for Rails app"
|
9
|
+
|
10
|
+
def postmark
|
11
|
+
|
12
|
+
gem "postmark-rails", "~> 0.4.1"
|
13
|
+
|
14
|
+
copy_file "action_mailer.rb", "config/initializers/action_mailer.rb"
|
15
|
+
copy_file "postmark.rb", "config/initializers/postmark.rb"
|
16
|
+
copy_file "mail_interceptor.rb", "lib/mail_interceptor.rb"
|
17
|
+
|
18
|
+
say_status "", ""
|
19
|
+
say_status "success", "Initial Postmark configuration has been created"
|
20
|
+
say_status "", "Don't forget to run `bundle`"
|
21
|
+
say_status "", ""
|
22
|
+
say_status "", "In application.rb, add:"
|
23
|
+
say_status "", %Q[ config.action_mailer.default_url_options = { host: "mydomain.com" } ]
|
24
|
+
say_status "", "In lib/mail_interceptor.rb:"
|
25
|
+
say_status "", "Set email address to your own pattern "
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path("../lib/thincloud-postmark/version", __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Robert Bousquet", "Phil Cohen"]
|
6
|
+
gem.email = ["rbousquet@newleaders.com", "pcohen@newleaders.com"]
|
7
|
+
gem.description = "Postmark configuration for Rails apps."
|
8
|
+
gem.summary = "Postmark configuration for Rails apps."
|
9
|
+
gem.homepage = ""
|
10
|
+
|
11
|
+
gem.files = `git ls-files`.split($\)
|
12
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
13
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
|
+
gem.name = "thincloud-postmark"
|
15
|
+
gem.require_paths = ["lib"]
|
16
|
+
gem.version = Thincloud::Postmark::VERSION
|
17
|
+
end
|
metadata
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: thincloud-postmark
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Robert Bousquet
|
9
|
+
- Phil Cohen
|
10
|
+
autorequire:
|
11
|
+
bindir: bin
|
12
|
+
cert_chain: []
|
13
|
+
date: 2012-08-17 00:00:00.000000000 Z
|
14
|
+
dependencies: []
|
15
|
+
description: Postmark configuration for Rails apps.
|
16
|
+
email:
|
17
|
+
- rbousquet@newleaders.com
|
18
|
+
- pcohen@newleaders.com
|
19
|
+
executables: []
|
20
|
+
extensions: []
|
21
|
+
extra_rdoc_files: []
|
22
|
+
files:
|
23
|
+
- .gitignore
|
24
|
+
- Gemfile
|
25
|
+
- LICENSE
|
26
|
+
- README.md
|
27
|
+
- Rakefile
|
28
|
+
- lib/generators/thincloud/postmark/postmark_generator.rb
|
29
|
+
- lib/generators/thincloud/postmark/templates/action_mailer.rb
|
30
|
+
- lib/generators/thincloud/postmark/templates/mail_interceptor.rb
|
31
|
+
- lib/generators/thincloud/postmark/templates/postmark.rb
|
32
|
+
- lib/thincloud-postmark.rb
|
33
|
+
- lib/thincloud-postmark/version.rb
|
34
|
+
- thincloud-postmark.gemspec
|
35
|
+
homepage: ''
|
36
|
+
licenses: []
|
37
|
+
post_install_message:
|
38
|
+
rdoc_options: []
|
39
|
+
require_paths:
|
40
|
+
- lib
|
41
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
48
|
+
none: false
|
49
|
+
requirements:
|
50
|
+
- - ! '>='
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '0'
|
53
|
+
requirements: []
|
54
|
+
rubyforge_project:
|
55
|
+
rubygems_version: 1.8.24
|
56
|
+
signing_key:
|
57
|
+
specification_version: 3
|
58
|
+
summary: Postmark configuration for Rails apps.
|
59
|
+
test_files: []
|