rack-server_status 0.0.1 → 0.0.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/README.md +1 -1
- data/examples/Gemfile +4 -0
- data/examples/Gemfile.lock +20 -0
- data/examples/config.ru +16 -0
- data/examples/paralell_test.rb +13 -0
- data/examples/tmp/status_42641 +0 -0
- data/examples/tmp/status_42642 +0 -0
- data/examples/tmp/status_42643 +0 -0
- data/examples/tmp/status_42644 +0 -0
- data/examples/unicorn.rb +1 -0
- data/lib/rack/server_status/version.rb +1 -1
- data/lib/rack/server_status.rb +4 -1
- data/rack-server_status.gemspec +1 -1
- metadata +20 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: caa82f8072806ea781d249afc13d797d1c190cf5
|
4
|
+
data.tar.gz: 4325c47c0a318d934638bad864f87522a8b359b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00ec1c5c1da7d646bc564a738de8e8221b5e9eb273d561c14913fb86d764509975394374672ce4b5883316bc82476035d655316c9652a940764b173e167f7aa5
|
7
|
+
data.tar.gz: 536a54465b8b6f09cfca95f138f2ddf7e7571662a23285896717da3e2d9957b4263aa187cc6ce31a5cd572ebe43bfa3ff221c97e4ae326641d9c505f39b91b8d
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Rack::ServerStatus [](https://travis-ci.org/SpringMT/rack-server_status)
|
2
2
|
|
3
|
-
|
3
|
+
This is a Ruby version of [kazeburo/Plack-Middleware-ServerStatus-Lite](https://github.com/kazeburo/Plack-Middleware-ServerStatus-Lite).
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
data/examples/Gemfile
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
GEM
|
2
|
+
remote: https://rubygems.org/
|
3
|
+
specs:
|
4
|
+
kgio (2.9.3)
|
5
|
+
parallel (1.3.3)
|
6
|
+
rack (1.6.1)
|
7
|
+
raindrops (0.13.0)
|
8
|
+
unicorn (4.9.0)
|
9
|
+
kgio (~> 2.6)
|
10
|
+
rack
|
11
|
+
raindrops (~> 0.7)
|
12
|
+
worker_scoreboard (0.0.2)
|
13
|
+
|
14
|
+
PLATFORMS
|
15
|
+
ruby
|
16
|
+
|
17
|
+
DEPENDENCIES
|
18
|
+
parallel
|
19
|
+
unicorn
|
20
|
+
worker_scoreboard
|
data/examples/config.ru
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__), '..', 'lib/')
|
2
|
+
require 'rack/server_status'
|
3
|
+
|
4
|
+
use Rack::ServerStatus, scoreboard_path: './tmp'
|
5
|
+
|
6
|
+
class HelloWorldApp
|
7
|
+
def call(env)
|
8
|
+
sleep 10
|
9
|
+
[ 200, { 'Content-Type' => 'text/plain' }, ['Hello World!'] ]
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
map "/foo" do
|
14
|
+
run HelloWorldApp.new
|
15
|
+
end
|
16
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'parallel'
|
2
|
+
require 'net/http'
|
3
|
+
$proc_num = 5
|
4
|
+
$execute_num = 10
|
5
|
+
|
6
|
+
Parallel.map([1,2,3,4,5,6], :in_processes => $proc_num) do |letter|
|
7
|
+
$execute_num.times do
|
8
|
+
http = Net::HTTP.new('localhost', 3000)
|
9
|
+
req = Net::HTTP::Get.new('/foo')
|
10
|
+
http.request(req)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/examples/unicorn.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
worker_processes 4
|
data/lib/rack/server_status.rb
CHANGED
data/rack-server_status.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
|
20
20
|
spec.files = `git ls-files -z`.split("\x0")
|
21
21
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
22
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
22
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features|examples)/})
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
25
|
spec.add_dependency "worker_scoreboard"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-server_status
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SpringMT
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: worker_scoreboard
|
@@ -81,6 +81,15 @@ files:
|
|
81
81
|
- LICENSE.txt
|
82
82
|
- README.md
|
83
83
|
- Rakefile
|
84
|
+
- examples/Gemfile
|
85
|
+
- examples/Gemfile.lock
|
86
|
+
- examples/config.ru
|
87
|
+
- examples/paralell_test.rb
|
88
|
+
- examples/tmp/status_42641
|
89
|
+
- examples/tmp/status_42642
|
90
|
+
- examples/tmp/status_42643
|
91
|
+
- examples/tmp/status_42644
|
92
|
+
- examples/unicorn.rb
|
84
93
|
- lib/rack/server_status.rb
|
85
94
|
- lib/rack/server_status/version.rb
|
86
95
|
- rack-server_status.gemspec
|
@@ -111,6 +120,15 @@ signing_key:
|
|
111
120
|
specification_version: 4
|
112
121
|
summary: Show server status
|
113
122
|
test_files:
|
123
|
+
- examples/Gemfile
|
124
|
+
- examples/Gemfile.lock
|
125
|
+
- examples/config.ru
|
126
|
+
- examples/paralell_test.rb
|
127
|
+
- examples/tmp/status_42641
|
128
|
+
- examples/tmp/status_42642
|
129
|
+
- examples/tmp/status_42643
|
130
|
+
- examples/tmp/status_42644
|
131
|
+
- examples/unicorn.rb
|
114
132
|
- spec/server_status_spec.rb
|
115
133
|
- spec/spec_helper.rb
|
116
134
|
has_rdoc:
|