letsencrypt_standalone 0.1.11 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f5cfab69f72511700b1af722b981aa051b7df7af
4
- data.tar.gz: ce88586ddcdc681eaa8326c9d48e5f7e7596a116
3
+ metadata.gz: 26fec214a144f113adc3a955e996d5979dbd617c
4
+ data.tar.gz: 5fec46b41eb100b8eebf6956c64f4b19d53c2b83
5
5
  SHA512:
6
- metadata.gz: 7130decc64246670ce93c85cc844307f7b65dcdd41b68e118c0d00b3f4876e399de7bafd7307776771721b4a3f04f192db22c551580dd52c680e25721477d600
7
- data.tar.gz: 50a6ef511005d4319d5072206cd4c4446cb73ff4d2fc319196d6534fc89e1135f0c5e67819a49e441e18fc52b807004c12f9ec38b7f12ef4de1af1f39f919d8c
6
+ metadata.gz: 6120ce8242e00d8fe3056ac3ae22c51fb0b643f487a3d3eef7661a03499bbde551ee3930fed3ec735935247e966fe244bd88cfbf7e2763bddf847bd8f3620655
7
+ data.tar.gz: 329b84e55168d26c79ec1282e988b5f567cf98a8384661ddcaf1ef5f6d8cc4d043850dfe529e629f73e7686afdf8a239a391d2c3404c7b49726444726c61f1a2
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2016 Grigory Aksentev
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 all
13
+ 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 THE
21
+ SOFTWARE.
data/exe/le_standalone CHANGED
@@ -10,6 +10,10 @@ require 'letsencrypt_standalone'
10
10
  # Default logger
11
11
  logger = LetsencryptStandalone::Base.logger
12
12
 
13
+ # Default config
14
+ config_file = 'le_standalone.json'
15
+ options = {}
16
+
13
17
  OptionParser.new do |opts|
14
18
  opts.banner = "le_standalone [options]"
15
19
 
@@ -18,11 +22,11 @@ OptionParser.new do |opts|
18
22
  end
19
23
 
20
24
  opts.on("-p", "--port N", Integer, "Port. Default: 12080") do |port|
21
- config.port = port if !port.nil?
25
+ options[:port] = port
22
26
  end
23
27
 
24
28
  opts.on("-a", "--add Domains", Array, "Add domain(s) to config, generate key and try to obtain certificate.") do |list|
25
- config.add(domains: list)
29
+ options[:domains] = list
26
30
  end
27
31
 
28
32
  opts.on("-l", "--log File", String, "Log file") do |file|
@@ -44,8 +48,9 @@ end.parse!
44
48
  begin
45
49
 
46
50
  # Config
47
- config = LetsencryptStandalone::Config.new
48
- config.port = 12080
51
+ config = LetsencryptStandalone::Config.new(config_file: config_file)
52
+ config.port = options[:port].nil? ? 12080 : options[:port]
53
+ config.add(domains: options[:domains]) if options[:domains]
49
54
 
50
55
  # Webrick conf
51
56
  FileUtils.mkdir_p(config.www_root)
data/le_standalone.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "path": "./",
3
3
  "email": "admin@example.com",
4
- ::
5
4
  "domains": [
6
5
  {
7
6
  "host": "example.com",
@@ -4,7 +4,7 @@ module LetsencryptStandalone
4
4
  class Config < Base
5
5
  attr_accessor :config, :location, :port
6
6
  def initialize(config_file: nil)
7
- @location ||= 'le_standalone.json'
7
+ @location ||= config_file
8
8
  @config = JSON.parse(File.read(@location), :symbolize_names => true)
9
9
  end
10
10
 
@@ -1,3 +1,3 @@
1
1
  module LetsencryptStandalone
2
- VERSION = "0.1.11"
2
+ VERSION = "0.1.12"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: letsencrypt_standalone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grigory Aksentyev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-31 00:00:00.000000000 Z
11
+ date: 2016-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -108,6 +108,7 @@ files:
108
108
  - ".travis.yml"
109
109
  - CODE_OF_CONDUCT.md
110
110
  - Gemfile
111
+ - LICENSE
111
112
  - README.md
112
113
  - Rakefile
113
114
  - bin/console