nutcracker-web 0.0.10 → 0.0.11
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/Gemfile +1 -1
- data/Gemfile.lock +4 -4
- data/bin/nutcracker-web +9 -8
- data/lib/nutcracker/web/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9556cc53f5173af776c4137acabe20ec300a5a53
|
4
|
+
data.tar.gz: b8592b44ae6f60b1f13c9f82ece5ea7c44be10fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5dce95488c0bbc7cf78556c27b02925cc8be10b6c769e0a0438651fe7c140882164248e115c4ae34b8505c7bcc6d72e4bb35dc01ca9dae9b440cbcba9d738d2f
|
7
|
+
data.tar.gz: a25465a6cae3856b36073e968f243c38e7606585d5a8d9dd334c513fbdd5f3170b9e56e330e3907ab011d5d363811f60327f67e4f6b0c77b84f3f65a0babca4b
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -16,12 +16,12 @@ GEM
|
|
16
16
|
haml (4.0.7)
|
17
17
|
tilt
|
18
18
|
json (1.8.3)
|
19
|
-
nutcracker (0.4.1.
|
19
|
+
nutcracker (0.4.1.20)
|
20
20
|
redis
|
21
21
|
rack (1.6.4)
|
22
22
|
rack-protection (1.5.3)
|
23
23
|
rack
|
24
|
-
redis (3.2
|
24
|
+
redis (3.3.2)
|
25
25
|
sinatra (1.4.6)
|
26
26
|
rack (~> 1.4)
|
27
27
|
rack-protection (~> 1.4)
|
@@ -45,11 +45,11 @@ DEPENDENCIES
|
|
45
45
|
eco
|
46
46
|
haml
|
47
47
|
json
|
48
|
-
nutcracker
|
48
|
+
nutcracker (>= 0.4.1.20)
|
49
49
|
sinatra
|
50
50
|
sprockets
|
51
51
|
thin
|
52
52
|
uglifier
|
53
53
|
|
54
54
|
BUNDLED WITH
|
55
|
-
1.
|
55
|
+
1.11.2
|
data/bin/nutcracker-web
CHANGED
@@ -7,8 +7,9 @@ require 'optparse'
|
|
7
7
|
require 'fileutils'
|
8
8
|
require 'socket'
|
9
9
|
require 'open3'
|
10
|
+
require 'uri'
|
10
11
|
|
11
|
-
options = {
|
12
|
+
options = { stats_uri: URI("tcp://localhost:22222") }
|
12
13
|
|
13
14
|
OptionParser.new do |opts|
|
14
15
|
opts.set_summary_indent " "
|
@@ -17,9 +18,9 @@ OptionParser.new do |opts|
|
|
17
18
|
opts.separator ""
|
18
19
|
opts.separator "[web-options]"
|
19
20
|
opts.separator ""
|
20
|
-
|
21
|
-
opts.on("-
|
22
|
-
options[:
|
21
|
+
|
22
|
+
opts.on("-u", "--stats-uri URI", "Nutcracker stats uri, default is tcp://localhost:22222") do |v|
|
23
|
+
options[:stats_uri] = URI(v)
|
23
24
|
end
|
24
25
|
|
25
26
|
opts.on("-c","--config FILE", "Nutcracker cluster config file") do |v|
|
@@ -63,7 +64,7 @@ abort "Please specified nutcracker config file" if options[:config_file].nil?
|
|
63
64
|
abort "Can't find the specified config file @ #{options[:config_file]}" unless File.exists? options[:config_file]
|
64
65
|
|
65
66
|
args = ARGV.to_a
|
66
|
-
args << "--stats-port" << options[:
|
67
|
+
args << "--stats-port" << options[:stats_uri].port
|
67
68
|
|
68
69
|
if options[:pid]
|
69
70
|
args << "--pid-file" << options[:nutcracker_pid]
|
@@ -88,11 +89,11 @@ end
|
|
88
89
|
if options[:launch_nutcracker]
|
89
90
|
nutcracker = Nutcracker.start(options.merge(args: args))
|
90
91
|
else
|
91
|
-
if (TCPSocket.new(
|
92
|
+
if (TCPSocket.new(options[:stats_uri].host,options[:stats_uri].port) rescue nil)
|
92
93
|
nutcracker = Nutcracker.attach(options)
|
93
94
|
else
|
94
|
-
abort "Failed to attach, are you sure that Nutcracker is running ?\n"
|
95
|
-
"the specified stats port is closed ( #{options[:
|
95
|
+
abort "Failed to attach, are you sure that Nutcracker is running ?\n" +
|
96
|
+
"the specified stats port is closed ( #{options[:stats_uri].host}:#{options[:stats_uri].port} )\n" +
|
96
97
|
"If you want to launch Nutcracker instance as well use the --launch switch"
|
97
98
|
end
|
98
99
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nutcracker-web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eran Barak Levi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.4.1.20
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.4.1.20
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rack
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|