opener-property-tagger 2.2.1 → 2.2.2
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 +4 -4
- data/bin/property-tagger-server +26 -29
- data/lib/opener/property_tagger/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82ca8f5699711207bc1d8e887283935485fbea9e
|
4
|
+
data.tar.gz: 6fd3356565e075bb6aa1090022d78c6acaf6440b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74944c1fff030df12a81d22638e6045b6848d7527b04d1aeb04a12fc3cf4226694de371f698de7c9adb5f117a202d41c3a1406bf8aed0da5ef824644448df5db
|
7
|
+
data.tar.gz: b7748f186238dab3c8c70e35e46d279cffe7d88020aac9b377878e2fb8ef00aadc9cb1822b73a2e70bbe045cdcbaaf588b3b024a666af466b65e0d80f9e287e6
|
data/bin/property-tagger-server
CHANGED
@@ -4,50 +4,47 @@ require 'puma/cli'
|
|
4
4
|
require 'optparse'
|
5
5
|
require 'opener/core/resource_switcher'
|
6
6
|
|
7
|
-
# Puma sadly does not provide a system that allows us to cleanly inject custom
|
8
|
-
# options into their CLI. At the same time Puma doesn't provide an easy system
|
9
|
-
# of starting it *without* using the `Puma::CLI` class.
|
10
|
-
#
|
11
|
-
# To work around these problems we create our own parser and ignore any invalid
|
12
|
-
# option errors it throws up. This parser is used to handle options for the
|
13
|
-
# resource switcher.
|
14
|
-
|
15
7
|
rack_config = File.expand_path('../../config.ru', __FILE__)
|
16
8
|
switcher = Opener::Core::ResourceSwitcher.new
|
9
|
+
puma_args = [rack_config]
|
17
10
|
switcher_opts = {}
|
18
|
-
show_help = false
|
19
11
|
|
20
|
-
|
12
|
+
option_parser = OptionParser.new do |opts|
|
21
13
|
opts.banner = "Usage: #{File.basename($0)} [OPTIONS]"
|
22
14
|
|
23
|
-
opts.separator "\nOptions:\n"
|
15
|
+
opts.separator "\nOptions:\n\n"
|
24
16
|
|
25
|
-
# Don't abort in this block as we otherwise can't show Puma's help message.
|
26
17
|
opts.on('-h', '--help', 'Shows this help message') do
|
27
|
-
|
18
|
+
abort option_parser.to_s
|
19
|
+
end
|
28
20
|
|
29
|
-
|
21
|
+
opts.on('-S', '--state PATH', 'Where to store the state details') do |val|
|
22
|
+
puma_args += ['--state', val]
|
30
23
|
end
|
31
24
|
|
32
|
-
|
25
|
+
opts.on('-b', '--bind URI', 'URI to bind to (tcp://, unix://, ssl://)') do |val|
|
26
|
+
puma_args += ['--bind', val]
|
27
|
+
end
|
33
28
|
|
34
|
-
opts.
|
35
|
-
|
29
|
+
opts.on('--pidfile PATH', 'Use PATH as a pidfile') do |val|
|
30
|
+
puma_args += ['--pidfile', val]
|
31
|
+
end
|
36
32
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
end
|
33
|
+
opts.on('--daemon', 'Daemonize the server into the background') do |val|
|
34
|
+
puma_args << '--daemon'
|
35
|
+
end
|
36
|
+
|
37
|
+
opts.on('-e', '--environment ENVIRONMENT', 'The environment to use') do |val|
|
38
|
+
puma_args += ['--environment', val]
|
39
|
+
end
|
44
40
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
ARGV << '--help'
|
41
|
+
opts.separator "\nResource Options:\n\n"
|
42
|
+
|
43
|
+
switcher.bind(opts, switcher_opts)
|
49
44
|
end
|
50
45
|
|
46
|
+
option_parser.parse!(ARGV)
|
47
|
+
|
51
48
|
switcher.install(switcher_opts)
|
52
49
|
|
53
|
-
Puma::CLI.new(
|
50
|
+
Puma::CLI.new(puma_args).run
|