letsencrypt-cli 0.1.0.pre → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 86ee840afe7b3b99a02ed340a99ae67fed641bc3
4
- data.tar.gz: 7f6386f763b68d9ddf8b95804863efa57cacb67c
3
+ metadata.gz: 13fdaac7e4df11532b0bd073c686011054f5bab1
4
+ data.tar.gz: 7805d292345e002848567c117a5ad0b9f058c11a
5
5
  SHA512:
6
- metadata.gz: ada07e70db33b208e2a6e3dbf9f269f0d2d7c523672062501105e06737a589a798af0e7f92dc401387869d1d2131e317e7cf0753b8fcacd4fb8eb906bee0c282
7
- data.tar.gz: 8fa6bd4884512ceae4f4c9e40a68121c471f0697ca2303b8fbf50e02f8d4a66ecc08a9a53543077a1dc13bfba3d5266df4b884c9cd4acd520de978d003af2898
6
+ metadata.gz: 1f71051e7666506734ecd71ba7118dc4438f819c68b8b7ccc41cfb5c3eed3d0e0736c5323598bdb7ffebd67270cd9a8ad4c4ebc1766b8a0e168567484d6ea83f
7
+ data.tar.gz: 63524b84c31c375fec6ec49494a820d1fefe372cb0e00ec5b14fab3a1ca92180aeb4a01965d84fbf810fd09a2ae1621b5fc26c0ff631d4d71492b3109e570d12
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Letsencrypt::Cli
2
2
 
3
3
  [![Build Status](https://travis-ci.org/zealot128/ruby-letsencrypt-cli.svg?branch=travis)](https://travis-ci.org/zealot128/ruby-letsencrypt-cli)
4
+ [![Gem Version](https://badge.fury.io/rb/letsencrypt-cli.svg)](https://badge.fury.io/rb/letsencrypt-cli)
4
5
 
5
6
  Yet another Letsencrypt client using Ruby.
6
7
 
@@ -14,7 +15,7 @@ Yet another Letsencrypt client using Ruby.
14
15
 
15
16
  ## Usage
16
17
 
17
- Specify ``-p`` to use letsencrypt production server. Without it, all requests are called against the staging server. (live server has some hard rate limiting, so use the staging server for playing first).
18
+ Specify ``-t`` to use Letsencrypt test server. Without it, all requests are called against the production server, that might have same more strict rate limiting. If you are just toying around, add the -t flag.
18
19
 
19
20
  ```bash
20
21
  # show all commands
@@ -25,19 +26,19 @@ letsencrypt-cli help
25
26
  letsencrypt-cli help cert
26
27
 
27
28
  # creates account_key.json in current_dir
28
- letsencrypt-cli register -p myemail@example.com
29
+ letsencrypt-cli register -t myemail@example.com
29
30
 
30
31
 
31
32
  # authorize one or more domains/subdomains
32
- letsencrypt-cli authorize -p --webroot-path /var/www/default example.com www.example.com somedir.example.com
33
+ letsencrypt-cli authorize -t --webroot-path /var/www/default example.com www.example.com somedir.example.com
33
34
 
34
35
  # experimental: authorize all server_names in /etc/nginx/sites-enabled/*
35
- letsencrypt-cli authorize_all -p --webroot-path /var/www/default
36
+ letsencrypt-cli authorize_all -t --webroot-path /var/www/default
36
37
 
37
38
 
38
39
  # create a certificate for before authorized domains.
39
40
  # the first domain will be the cn subject. All other are subjectAlternateName
40
- letsencrypt-cli cert example.com www.exaple.com somdir.example.com
41
+ letsencrypt-cli cert -t example.com www.example.com somdir.example.com
41
42
  # will create key.pem fullchain.pem chain.pem and cert.pem
42
43
  ```
43
44
 
@@ -105,14 +105,13 @@ class AcmeWrapper
105
105
  end
106
106
 
107
107
  def endpoint
108
- if @options[:production]
109
- ""
108
+ if @options[:test]
109
+ "https://acme-staging.api.letsencrypt.org"
110
110
  else
111
- 'https://acme-staging.api.letsencrypt.org'
111
+ "https://acme-v01.api.letsencrypt.org"
112
112
  end
113
113
  end
114
114
 
115
-
116
115
  def account_key
117
116
  @account_key ||= find_or_create_pkey(@options[:account_key], "account key", @options[:key_length] || 4096)
118
117
  end
@@ -5,7 +5,7 @@ module Letsencrypt
5
5
  module Cli
6
6
  class App < Thor
7
7
  class_option :account_key, desc: "Path to private key file (will be created if not exists)", aliases: "-a", default: 'account_key.pem'
8
- class_option :production, desc: "Use production url of letsencrypt instead of staging server", aliases: "-p", type: :boolean
8
+ class_option :test, desc: "Use staging url of Letsencrypt instead of production server", aliases: "-t", type: :boolean
9
9
  class_option :log_level, desc: "Log Level (debug, info, warn, error, fatal)", default: "info"
10
10
  class_option :color, desc: "Disable colorize", default: true, type: :boolean
11
11
 
@@ -62,6 +62,13 @@ module Letsencrypt
62
62
  wrapper.cert(domains)
63
63
  end
64
64
 
65
+ map %w[--version -v] => :__print_version
66
+
67
+ desc "--version, -v", "print the version"
68
+ def __print_version
69
+ puts Letsencrypt::Cli::VERSION
70
+ end
71
+
65
72
  private
66
73
 
67
74
  def wrapper
@@ -1,5 +1,5 @@
1
1
  module Letsencrypt
2
2
  module Cli
3
- VERSION = "0.1.0.pre"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: letsencrypt-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Wienert
@@ -203,9 +203,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
203
203
  version: 2.0.0
204
204
  required_rubygems_version: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - ">"
206
+ - - ">="
207
207
  - !ruby/object:Gem::Version
208
- version: 1.3.1
208
+ version: '0'
209
209
  requirements: []
210
210
  rubyforge_project:
211
211
  rubygems_version: 2.2.2