elbping 0.2 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0358562a6ea6910403b67c5b10fa10d312117c05
4
+ data.tar.gz: ccae41a4035e26ceb20d6708511234f97bf99ff8
5
+ SHA512:
6
+ metadata.gz: 02d2a7befb7370bd436d9650874db1526108d80e161d6c6b83366ea8713fa9597de0afa5350d874a2c7a54a0611403568d8b11b9a363cd5fea22f9440aaa1a39
7
+ data.tar.gz: 15d3d33bffcfc7f722844030e2072494ba427b0d5ca6e8d8b3bfa641990b4b070da1191797a64ff946d27857d970ad5d9092780a135fdb59390ab5afe4198159
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2013 Charles Hooper
3
+ Copyright (c) 2013 Heroku <opensource@heroku.com>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/elbping.png)](http://badge.fury.io/rb/elbping)
4
4
 
5
- [![Build Status](https://travis-ci.org/chooper/elbping.png?branch=master)](https://travis-ci.org/chooper/elbping)
5
+ [![Build Status](https://travis-ci.org/heroku/elbping.png?branch=master)](https://travis-ci.org/heroku/elbping)
6
6
 
7
7
  `elbping` is a tool to ping all of the nodes that make up an Amazon Elastic
8
8
  Load Balancer. It only works for ELBs in HTTP and HTTPS mode and works by
@@ -23,7 +23,7 @@ If you want to build a development version or your own branch or fork,
23
23
  something like the following will work:
24
24
 
25
25
  ```
26
- $ git clone git@github.com:chooper/elbping.git
26
+ $ git clone git@github.com:heroku/elbping.git
27
27
  $ cd elbping
28
28
  $ bundle install
29
29
  ```
data/Rakefile CHANGED
@@ -1,4 +1,6 @@
1
1
  require 'rake/testtask'
2
+ require "bundler/gem_tasks"
3
+
2
4
 
3
5
  Rake::TestTask.new do |t|
4
6
  t.libs << 'test'
@@ -1,12 +1,12 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'elbping'
3
- s.version = '0.2'
4
- s.date = '2013-08-13'
3
+ s.version = '0.3'
4
+ s.date = '2014-12-01'
5
5
  s.summary = "Small tool to 'ping' the nodes that make up an Amazon Elastic Load Balancer"
6
6
  s.description = "elbping is a tool to ping all of the nodes behind an Amazon Elastic Load Balancer. It only works for ELBs in HTTP mode and works by triggering an HTTP 405 (METHOD NOT ALLOWED) error caused when the ELB receives a HTTP verb that is too long."
7
- s.authors = ["Charles Hooper"]
8
- s.email = 'chooper@plumata.com'
9
- s.homepage = 'https://github.com/chooper/elbping'
7
+ s.authors = ["Heroku", "Charles Hooper"]
8
+ s.email = 'opensource@heroku.com'
9
+ s.homepage = 'https://github.com/heroku/elbping'
10
10
  s.license = 'MIT'
11
11
 
12
12
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
@@ -17,6 +17,6 @@ Gem::Specification.new do |s|
17
17
  s.add_development_dependency "rake", "~> 10.0.4"
18
18
 
19
19
  s.homepage =
20
- 'https://github.com/chooper/elbping'
20
+ 'https://github.com/heroku/elbping'
21
21
  s.license = 'MIT'
22
22
  end
@@ -3,40 +3,32 @@ require 'elbping/latency_bucket.rb'
3
3
 
4
4
  class TestLatencyBucket < Test::Unit::TestCase
5
5
  def test_init
6
- bucket = nil
7
- assert_nothing_raised do
8
- bucket = LatencyBucket.new
9
- assert_not_nil bucket
10
- bucket << 1
11
- bucket << 2
12
- end
6
+ bucket = LatencyBucket.new
7
+ assert_not_nil bucket
8
+ bucket << 1
9
+ bucket << 2
13
10
  assert_equal bucket.to_a, [1, 2]
14
11
  end
15
12
  def test_sum
16
13
  bucket = LatencyBucket.new
14
+
15
+ # bucket.sum should initialize to zero
16
+ assert_equal bucket.sum, 0
17
+
18
+ # and still
17
19
  bucket << 0
18
- assert_nothing_raised do
19
- assert_equal bucket.sum, 0
20
- end
21
- bucket << 100
22
- bucket << 200
23
- bucket << 300
24
- bucket << 3
25
- assert_equal bucket.sum, (0 + 100 + 200 + 300 + 3)
20
+ assert_equal bucket.sum, 0
21
+ bucket << 1
22
+ assert_equal bucket.sum, 1
26
23
  end
27
24
  def test_mean
28
25
  bucket = LatencyBucket.new
29
- bucket << 100
30
- bucket << 200
31
- bucket << 300
32
- bucket << 0
33
- bucket << 3
34
- assert_equal bucket.mean, ((100 + 200 + 300 + 0 + 3)/5).to_i
35
- end
36
- def test_mean_divide_by_zero
37
- bucket = LatencyBucket.new
38
- assert_nothing_raised do
39
- assert_equal bucket.mean, 0
40
- end
26
+ assert_equal bucket.mean, 0
27
+ bucket << 2
28
+ assert_equal bucket.mean, 2
29
+ bucket << 2
30
+ assert_equal bucket.mean, 2
31
+ bucket << 8
32
+ assert_equal bucket.mean, 4
41
33
  end
42
34
  end
metadata CHANGED
@@ -1,44 +1,42 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elbping
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
5
- prerelease:
4
+ version: '0.3'
6
5
  platform: ruby
7
6
  authors:
7
+ - Heroku
8
8
  - Charles Hooper
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-13 00:00:00.000000000 Z
12
+ date: 2014-12-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
16
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
17
  requirements:
19
- - - ~>
18
+ - - "~>"
20
19
  - !ruby/object:Gem::Version
21
20
  version: 10.0.4
22
21
  type: :development
23
22
  prerelease: false
24
23
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
24
  requirements:
27
- - - ~>
25
+ - - "~>"
28
26
  - !ruby/object:Gem::Version
29
27
  version: 10.0.4
30
28
  description: elbping is a tool to ping all of the nodes behind an Amazon Elastic Load
31
29
  Balancer. It only works for ELBs in HTTP mode and works by triggering an HTTP 405
32
30
  (METHOD NOT ALLOWED) error caused when the ELB receives a HTTP verb that is too
33
31
  long.
34
- email: chooper@plumata.com
32
+ email: opensource@heroku.com
35
33
  executables:
36
34
  - elbping
37
35
  extensions: []
38
36
  extra_rdoc_files: []
39
37
  files:
40
- - .gitignore
41
- - .travis.yml
38
+ - ".gitignore"
39
+ - ".travis.yml"
42
40
  - Gemfile
43
41
  - LICENSE
44
42
  - README.md
@@ -57,29 +55,33 @@ files:
57
55
  - test/test_resolver.rb
58
56
  - test/test_stats.rb
59
57
  - test/test_tests.rb
60
- homepage: https://github.com/chooper/elbping
58
+ homepage: https://github.com/heroku/elbping
61
59
  licenses:
62
60
  - MIT
61
+ metadata: {}
63
62
  post_install_message:
64
63
  rdoc_options: []
65
64
  require_paths:
66
65
  - lib
67
66
  required_ruby_version: !ruby/object:Gem::Requirement
68
- none: false
69
67
  requirements:
70
- - - ! '>='
68
+ - - ">="
71
69
  - !ruby/object:Gem::Version
72
70
  version: '0'
73
71
  required_rubygems_version: !ruby/object:Gem::Requirement
74
- none: false
75
72
  requirements:
76
- - - ! '>='
73
+ - - ">="
77
74
  - !ruby/object:Gem::Version
78
75
  version: '0'
79
76
  requirements: []
80
77
  rubyforge_project:
81
- rubygems_version: 1.8.23
78
+ rubygems_version: 2.2.2
82
79
  signing_key:
83
- specification_version: 3
80
+ specification_version: 4
84
81
  summary: Small tool to 'ping' the nodes that make up an Amazon Elastic Load Balancer
85
- test_files: []
82
+ test_files:
83
+ - test/test_latencybucket.rb
84
+ - test/test_pinger.rb
85
+ - test/test_resolver.rb
86
+ - test/test_stats.rb
87
+ - test/test_tests.rb