letsencrypt_webfaction 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.codeclimate.yml +2 -2
- data/.travis.yml +1 -1
- data/CHANGELOG.md +6 -0
- data/README.md +23 -0
- data/letsencrypt_webfaction.gemspec +2 -3
- data/lib/letsencrypt_webfaction.rb +1 -1
- data/lib/letsencrypt_webfaction/application.rb +1 -1
- data/lib/letsencrypt_webfaction/args_parser.rb +6 -0
- data/lib/letsencrypt_webfaction/domain_validator.rb +0 -4
- data/lib/letsencrypt_webfaction/emailer.rb +3 -1
- metadata +4 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f80a89c3d834f421b0284b77471e9417384f7e67
|
4
|
+
data.tar.gz: 4446d3527bc746de8dc5f8b48dc1353b73eb2ba3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b24b706c95298e09e2d126f53123240b4f2d12b32d1f1822c0c8c61704e6c43decb90fec32c9f3776b33891e75522619c65faae23f3551033b9f87554a51dcf
|
7
|
+
data.tar.gz: 29b1f9645e0162ab53654c50faa62153bc8cde3779714cd3534b975c427b7490b9e0d25708c121cf4ba700f02581dd2333fd0e0fcb850df486925e90cb7472a6
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/.codeclimate.yml
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
v1.1.0
|
2
|
+
|
3
|
+
* Support for additional special email configuration.
|
4
|
+
* Building on the previous feature, additional documentation around Gmail support.
|
5
|
+
* Fix issue where users had to specify all params in a custom config file.
|
6
|
+
|
1
7
|
v1.0.1
|
2
8
|
|
3
9
|
* Clean up help response.
|
data/README.md
CHANGED
@@ -103,6 +103,29 @@ In the case of a PHP site, such as Drupal or Wordpress, look for the folder with
|
|
103
103
|
|
104
104
|
In the case of a Rails app, look for a folder called `public/`. If you are deploying your app with Capistrano, this could show up in `/home/myuser/webapps/myapp/current/public/`.
|
105
105
|
|
106
|
+
### Custom email configuration
|
107
|
+
|
108
|
+
Particularly in the case of Gmail, you may need to override the default usage of Sendmail and use SMTP. You can add custom configuration to the config file you pass, in order to accomplish this.
|
109
|
+
|
110
|
+
A Gmail example might be:
|
111
|
+
|
112
|
+
```yaml
|
113
|
+
email_configuration:
|
114
|
+
:via: 'smtp'
|
115
|
+
:via_options:
|
116
|
+
:address: 'smtp.gmail.com'
|
117
|
+
:port: '587'
|
118
|
+
:enable_starttls_auto: true
|
119
|
+
:user_name: 'myuser@gmail.com'
|
120
|
+
:password: 'password_see_note'
|
121
|
+
:authentication: 'plain'
|
122
|
+
:domain: 'localhost.localdomain' # the HELO domain provided by the client to the server
|
123
|
+
```
|
124
|
+
|
125
|
+
See the wiki for additional Gmail specific notes.
|
126
|
+
|
127
|
+
For all possible options, see [the Pony configuration](https://github.com/benprew/pony).
|
128
|
+
|
106
129
|
## Development
|
107
130
|
|
108
131
|
To run the script directly from the repository, use:
|
@@ -14,8 +14,7 @@ Gem::Specification.new do |spec|
|
|
14
14
|
'LetsEncrypt on Webfaction hosts. It can be added to ' \
|
15
15
|
'cron where it will validate your domains ' \
|
16
16
|
'automatically, place the generated certs in a common ' \
|
17
|
-
'folder, and then email
|
18
|
-
'text to send the WebFaction support team.'
|
17
|
+
'folder, and then email the WebFaction support team directions'
|
19
18
|
spec.homepage = 'https://github.com/will-in-wi/letsencrypt-webfaction'
|
20
19
|
spec.license = 'MIT'
|
21
20
|
|
@@ -25,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
25
24
|
spec.require_paths = %w(lib)
|
26
25
|
|
27
26
|
spec.cert_chain = ['certs/will_in_wi.pem']
|
28
|
-
spec.signing_key = File.expand_path('~/.ssh/gem-private_key.pem') if $
|
27
|
+
spec.signing_key = File.expand_path('~/.ssh/gem-private_key.pem') if $PROGRAM_NAME.end_with?('gem')
|
29
28
|
|
30
29
|
spec.required_ruby_version = '>= 2.1.0'
|
31
30
|
|
@@ -33,7 +33,7 @@ module LetsencryptWebfaction
|
|
33
33
|
private
|
34
34
|
|
35
35
|
def emailer
|
36
|
-
@emails ||= LetsencryptWebfaction::Emailer.new instructions, support_email: @options.support_email, account_email: @options.account_email, notification_email: @options.admin_notification_email
|
36
|
+
@emails ||= LetsencryptWebfaction::Emailer.new instructions, support_email: @options.support_email, account_email: @options.account_email, notification_email: @options.admin_notification_email, email_configuration: @options.email_configuration
|
37
37
|
end
|
38
38
|
|
39
39
|
def instructions
|
@@ -29,6 +29,9 @@ module LetsencryptWebfaction
|
|
29
29
|
attr_reader field
|
30
30
|
end
|
31
31
|
|
32
|
+
# EMail config is special, as it only comes from the config file, due to complexity.
|
33
|
+
attr_reader :email_configuration
|
34
|
+
|
32
35
|
def initialize(options)
|
33
36
|
@options = options
|
34
37
|
|
@@ -64,8 +67,11 @@ module LetsencryptWebfaction
|
|
64
67
|
def load_config!(config_path)
|
65
68
|
config = YAML.load_file(config_path)
|
66
69
|
FIELDS.each do |field|
|
70
|
+
next unless config[field.identifier.to_s]
|
67
71
|
instance_variable_set("@#{field.identifier}", config[field.identifier.to_s])
|
68
72
|
end
|
73
|
+
|
74
|
+
@email_configuration = config['email_configuration'] || {}
|
69
75
|
end
|
70
76
|
|
71
77
|
def handle_config(opts)
|
@@ -4,7 +4,7 @@ module LetsencryptWebfaction
|
|
4
4
|
class Emailer
|
5
5
|
SUBJECT_MESSAGE = 'New certificate installation'.freeze
|
6
6
|
|
7
|
-
def initialize(instructions, support_email: '', account_email: '', notification_email: '')
|
7
|
+
def initialize(instructions, support_email: '', account_email: '', notification_email: '', email_configuration: {})
|
8
8
|
@instructions = instructions
|
9
9
|
|
10
10
|
raise Error, 'Missing account_email' if account_email == '' || account_email.nil?
|
@@ -13,6 +13,8 @@ module LetsencryptWebfaction
|
|
13
13
|
@support_email = support_email
|
14
14
|
@account_email = account_email
|
15
15
|
@notification_email = notification_email
|
16
|
+
|
17
|
+
Pony.options = email_configuration
|
16
18
|
end
|
17
19
|
|
18
20
|
def send!
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: letsencrypt_webfaction
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Johnston
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
urnVFSXSvmjoq2UEqNf39Ffw4ZJ2QYuxlOLEInXhf1Rij1+KYHwHoT6qaOmk+fgY
|
31
31
|
XWr3WAp8Tv/ogSwGuBGWtsjMTEzbRxAJbRXQDFEMeXJAvzon0o6hUtU=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2016-
|
33
|
+
date: 2016-05-05 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: acme-client
|
@@ -160,8 +160,8 @@ dependencies:
|
|
160
160
|
version: '3.3'
|
161
161
|
description: A tool to simplify the manual process of using LetsEncrypt on Webfaction
|
162
162
|
hosts. It can be added to cron where it will validate your domains automatically,
|
163
|
-
place the generated certs in a common folder, and then email
|
164
|
-
|
163
|
+
place the generated certs in a common folder, and then email the WebFaction support
|
164
|
+
team directions
|
165
165
|
email:
|
166
166
|
- william@johnstonhaus.us
|
167
167
|
executables:
|
metadata.gz.sig
CHANGED
Binary file
|