nutcracker-web 0.0.10 → 0.0.11

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: 9281586f00f21e9be35313a09d3442054b060d8e
4
- data.tar.gz: 5985c18a684e7a4d601aaba1a2e1a568de5c5d74
3
+ metadata.gz: 9556cc53f5173af776c4137acabe20ec300a5a53
4
+ data.tar.gz: b8592b44ae6f60b1f13c9f82ece5ea7c44be10fb
5
5
  SHA512:
6
- metadata.gz: 58da78811af97d7d5aab4c703cada506128467a157fb1945bfdd55b6931ed4631367cc6e1322324a30c16256f4ad1d747243909ee9a4fb1162cc59425c6b0df9
7
- data.tar.gz: d747a544587eeeca2426eeb5d92ea8c6c87f93e525c9ed1eae872efaa29569ea96e3d8de00ebcb50d986de766ac46826e5647d710f044c1ddabf7f85da403bf1
6
+ metadata.gz: 5dce95488c0bbc7cf78556c27b02925cc8be10b6c769e0a0438651fe7c140882164248e115c4ae34b8505c7bcc6d72e4bb35dc01ca9dae9b440cbcba9d738d2f
7
+ data.tar.gz: a25465a6cae3856b36073e968f243c38e7606585d5a8d9dd334c513fbdd5f3170b9e56e330e3907ab011d5d363811f60327f67e4f6b0c77b84f3f65a0babca4b
data/Gemfile CHANGED
@@ -8,4 +8,4 @@ gem 'coffee-script'
8
8
  gem 'eco'
9
9
  gem 'json'
10
10
  gem 'uglifier'
11
- gem 'nutcracker'
11
+ gem 'nutcracker', ">=0.4.1.20"
@@ -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.18)
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.1)
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.10.4
55
+ 1.11.2
@@ -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 = { stats_port: 22222 }
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("-s", "--stats-port PORT", "Nutcracker stats port - #{options[:stats_port]}") do |v|
22
- options[:stats_port] = v.to_i
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[:stats_port]
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('127.0.0.1',options[:stats_port]) rescue nil)
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[:stats_port]} )\n" +
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
@@ -1,5 +1,5 @@
1
1
  module Nutcracker
2
2
  module Web
3
- VERSION="0.0.10"
3
+ VERSION="0.0.11"
4
4
  end
5
5
  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.10
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: 2015-09-29 00:00:00.000000000 Z
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.2.4.5
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.2.4.5
54
+ version: 0.4.1.20
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rack
57
57
  requirement: !ruby/object:Gem::Requirement