letsencrypt_webfaction 2.1.0 → 2.2.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/CHANGELOG.md +4 -0
- data/README.md +3 -1
- data/config.defaults.yml +1 -0
- data/lib/letsencrypt_webfaction.rb +1 -1
- data/lib/letsencrypt_webfaction/application.rb +9 -0
- data/lib/letsencrypt_webfaction/args_parser.rb +11 -1
- data/lib/letsencrypt_webfaction/args_parser/field.rb +14 -0
- metadata +1 -1
- 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: 720148a070975d55b1b50b4fc1e987fe98ef1943
|
4
|
+
data.tar.gz: 130323d83e8b3a85426ab7bbf08e47950a2296dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 472c79571beb51ed3654e34071872008470b116301eea63d1740b896e8a631029e4582e506a9ed0ffdbb3c4d3d207628200c0644c7e11896a9e1875acdac6184
|
7
|
+
data.tar.gz: b25dc311e3a4097958fea417e183c41d635e8b5178f055b8c1ede981cd2467f429bfa21d0d295dcca8c5b2a848f4e67b5641f940d3d22bbfb1bb1d27f22724d2
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
v2.2.0
|
2
|
+
|
3
|
+
* Output helpful message on success unless `--quiet` flag is used. Fixes #86.
|
4
|
+
|
1
5
|
v2.1.0
|
2
6
|
|
3
7
|
* Allow multiple public directories to be used. The authorization responses will be duplicated across all of them, allowing a single cert to serve multiple applications. Fixes #96 (thanks @lsemprini for the suggestion!)
|
data/README.md
CHANGED
@@ -69,7 +69,7 @@ After saving `~/.bash_profile`, run the command `source $HOME/.bash_profile` to
|
|
69
69
|
|
70
70
|
Now, you are ready to run `letsencrypt_webfaction` from your SSH session to get certificates. See below for usage.
|
71
71
|
|
72
|
-
### RBEnv
|
72
|
+
### RBEnv (advanced)
|
73
73
|
|
74
74
|
This method is useful if you are already using RBEnv to manage Ruby, or if you are already a Ruby developer. If neither of these cases are true, just use the system Ruby method.
|
75
75
|
|
@@ -139,6 +139,8 @@ Here is a basic example which issues one certificate for both yourdomain.com and
|
|
139
139
|
|
140
140
|
*Note: Passing the password via the command line as seen here is insecure. You should use the `--config` mechanism mentioned later.*
|
141
141
|
|
142
|
+
After you run this command, you will see a new certificate in the webfaction admin panel, called yourdomain_com (in this case). You need to change your application to point to this certificate after the certificate has been issued. Future runs of this command will update the existing certificate entry and not require a change in the admin. You can change the name in the admin interface using the `--cert_name` parameter.
|
143
|
+
|
142
144
|
### Testing
|
143
145
|
|
144
146
|
To test certificate issuance, consider using the [LetsEncrypt staging server](https://community.letsencrypt.org/t/testing-against-the-lets-encrypt-staging-environment/6763). This doesn't have the rate limit of 5 certs per domain every 7 days. You can add the `--endpoint https://acme-staging.api.letsencrypt.org/` parameter to the `letsencrypt_webfaction` command to do so.
|
data/config.defaults.yml
CHANGED
@@ -30,6 +30,8 @@ module LetsencryptWebfaction
|
|
30
30
|
|
31
31
|
# Write the obtained certificates.
|
32
32
|
certificate_installer.install!
|
33
|
+
|
34
|
+
output_success_help
|
33
35
|
end
|
34
36
|
|
35
37
|
private
|
@@ -79,5 +81,12 @@ module LetsencryptWebfaction
|
|
79
81
|
def private_key
|
80
82
|
OpenSSL::PKey::RSA.new(@options.key_size)
|
81
83
|
end
|
84
|
+
|
85
|
+
def output_success_help
|
86
|
+
return if @options.quiet?
|
87
|
+
puts 'Your new certificate is now created and installed.'
|
88
|
+
puts "You will need to change your application to use the #{@options.cert_name} certificate."
|
89
|
+
puts 'Add the `--quiet` parameter in your cron task to remove this message.'
|
90
|
+
end
|
82
91
|
end
|
83
92
|
end
|
@@ -26,6 +26,7 @@ module LetsencryptWebfaction
|
|
26
26
|
Field.new(:password, 'The password for your Webfaction account.', [StringValidator.new]),
|
27
27
|
Field.new(:servername, 'The server on which this application resides (e.g. Web123).', [StringValidator.new]),
|
28
28
|
Field.new(:cert_name, 'The name of the certificate in the Webfaction UI.', [StringValidator.new]),
|
29
|
+
Field::BooleanField.new(:quiet, 'Whether to display text on success.', []),
|
29
30
|
].freeze
|
30
31
|
|
31
32
|
# Set up getters.
|
@@ -33,6 +34,13 @@ module LetsencryptWebfaction
|
|
33
34
|
attr_reader field
|
34
35
|
end
|
35
36
|
|
37
|
+
# Set up boolean getters
|
38
|
+
FIELDS.reject(&:value?).map(&:identifier).each do |field|
|
39
|
+
define_method "#{field}?" do
|
40
|
+
instance_variable_get("@#{field}") || false
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
36
44
|
# EMail config is special, as it only comes from the config file, due to complexity.
|
37
45
|
attr_reader :email_configuration
|
38
46
|
|
@@ -100,7 +108,9 @@ module LetsencryptWebfaction
|
|
100
108
|
end
|
101
109
|
|
102
110
|
def handle_field(opts, field)
|
103
|
-
|
111
|
+
argument = "--#{field.identifier}"
|
112
|
+
argument += "=#{field.identifier.upcase}" if field.value?
|
113
|
+
opts.on(argument, field.description) do |val|
|
104
114
|
instance_variable_set("@#{field.identifier}", field.sanitize(val))
|
105
115
|
end
|
106
116
|
end
|
@@ -17,6 +17,10 @@ module LetsencryptWebfaction
|
|
17
17
|
validators.reject { |validator| validator.valid?(val) }.empty?
|
18
18
|
end
|
19
19
|
|
20
|
+
def value?
|
21
|
+
true
|
22
|
+
end
|
23
|
+
|
20
24
|
class IntegerField < Field
|
21
25
|
def sanitize(val)
|
22
26
|
val.to_i
|
@@ -28,6 +32,16 @@ module LetsencryptWebfaction
|
|
28
32
|
val.split(',').map(&:strip).compact
|
29
33
|
end
|
30
34
|
end
|
35
|
+
|
36
|
+
class BooleanField < Field
|
37
|
+
def sanitize(val)
|
38
|
+
val || false
|
39
|
+
end
|
40
|
+
|
41
|
+
def value?
|
42
|
+
false
|
43
|
+
end
|
44
|
+
end
|
31
45
|
end
|
32
46
|
end
|
33
47
|
end
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|