sfc_ikiteru 0.0.4 → 0.0.5

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.
@@ -1,3 +1,7 @@
1
+ === 0.0.5 2011-03-24
2
+
3
+ * bugfix
4
+
1
5
  === 0.0.4 2011-03-24
2
6
 
3
7
  * use eventmachine
@@ -6,6 +6,10 @@
6
6
 
7
7
  check status of Keio Univ SFC.
8
8
 
9
+ == INSTALL:
10
+
11
+ * gem install sfc_ikiteru
12
+
9
13
 
10
14
  == SYNOPSIS:
11
15
 
@@ -14,6 +18,7 @@ check status of Keio Univ SFC.
14
18
  p per
15
19
  p details
16
20
 
21
+
17
22
  == TOOL:
18
23
 
19
24
  check status on CUI.
@@ -33,11 +38,7 @@ results
33
38
 
34
39
  == REQUIREMENTS:
35
40
 
36
- * Ruby 1.8.7
37
-
38
- == INSTALL:
39
-
40
- * gem install sfc_ikiteru
41
+ * Ruby 1.8.7 or 1.9.2
41
42
 
42
43
  == LICENSE:
43
44
 
@@ -5,7 +5,7 @@ require 'timeout'
5
5
  require 'eventmachine'
6
6
 
7
7
  module SfcIkiteru
8
- VERSION = '0.0.4'
8
+ VERSION = '0.0.5'
9
9
  def SfcIkiteru.servers
10
10
  [
11
11
  {:host => 'web.sfc.keio.ac.jp', :service => 'echo'},
@@ -21,18 +21,18 @@ module SfcIkiteru
21
21
  results = Array.new
22
22
 
23
23
  EM::run do
24
- servers.each{|s|
25
- EM::defer do
26
- res = ping(s[:host], timeout, s[:service])
27
- results << {:host => s[:host], :ping => res}
28
- end
29
- }
30
24
  EM::defer do
31
25
  loop do
32
26
  EM::stop if results.size >= servers.size
33
27
  sleep 0.1
34
28
  end
35
29
  end
30
+ servers.each{|s|
31
+ EM::defer do
32
+ res = ping(s[:host], timeout, s[:service])
33
+ results << {:host => s[:host], :ping => res}
34
+ end
35
+ }
36
36
  end
37
37
  count = 0
38
38
  results.each{|i|
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'rubygems'
3
- require File.dirname(__FILE__)+'/../lib/sfc_ikiteru'
4
- #require 'sfc_ikiteru'
3
+ #require File.dirname(__FILE__)+'/../lib/sfc_ikiteru'
4
+ require 'sfc_ikiteru'
5
5
 
6
6
  per, details = SfcIkiteru.ikiteru
7
7
  p per
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sfc_ikiteru
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sho Hashimoto