idle_whacker 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +10 -9
  2. data/bin/idle_whacker +26 -0
  3. metadata +6 -3
data/README.md CHANGED
@@ -10,21 +10,22 @@ Idle whacker installs a crontab entry on a given (host) machine which then uses
10
10
 
11
11
  ## Installation
12
12
 
13
- Idle whacker depends on `ab` being available on the command line. `ab` (apache-bench) can be installed via `apt-get install apache2-utils` - this is a really small util, with libreadline at its only dependency.
14
-
15
- gem install idle_whacker
13
+ Idle whacker depends on `ab` being available on the command line. `ab` (apache-bench) can be installed via `apt-get install apache2-utils` - this is a really small util, with libreadline at its only dependency. After the gem install, you may need to run `rbenv rehash` based on your environment.
16
14
 
17
15
  ## Usage
18
16
 
19
- > rake -T
20
- rake idle_whacker:install # Install the whack
21
- rake idle_whacker:remove # Removes all whacks
22
- rake idle_whacker:show # Shows all the whacking installed
23
- rake idle_whacker:test # Test a sample whack
17
+ > idle_whacker [command]
18
+
19
+ Available commands:
20
+
21
+ install: Installs a whack
22
+ remove : Removes all installed whacks
23
+ show : Show installed whacks
24
+ test : Test a whack
24
25
 
25
26
  _A sample session of installing a whack_
26
27
 
27
- > rake idle_whacker:install
28
+ > idle_whacker install
28
29
  URL to whack, eg(http://www.foobar-server.com/lazy_boy.html): http://www.nest.com/about/ #URL to poll for.
29
30
  Whacker install host eg(www.foobar-server.com): www.whacker.com #Machine where the crontab will be installed
30
31
  Username: deployer #Login to the above install host
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require File.expand_path('../../whacker', __FILE__)
4
+
5
+ command = case ARGV[0]
6
+ when "install"
7
+ :install
8
+ when "remove"
9
+ :remove
10
+ when "show"
11
+ :show
12
+ when "test"
13
+ :test
14
+ else
15
+ puts ""
16
+ puts "Usage: idle_whacker [command]"
17
+ puts ""
18
+ puts "Available commands:"
19
+ puts "install: Installs a whack"
20
+ puts "remove : Removes all installed whacks"
21
+ puts "show : Show installed whacks"
22
+ puts "test : Test a whack"
23
+ exit
24
+ end
25
+
26
+ Whacker.new.send command
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: idle_whacker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-26 00:00:00.000000000 Z
12
+ date: 2012-05-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: net-ssh
@@ -63,7 +63,8 @@ description: Idle whacker polls a given url periodically so that the app server
63
63
  goes to sleep.
64
64
  email:
65
65
  - projects@akshay.cc
66
- executables: []
66
+ executables:
67
+ - idle_whacker
67
68
  extensions: []
68
69
  extra_rdoc_files: []
69
70
  files:
@@ -72,6 +73,8 @@ files:
72
73
  - Gemfile
73
74
  - README.md
74
75
  - whacker.rb
76
+ - !binary |-
77
+ YmluL2lkbGVfd2hhY2tlcg==
75
78
  homepage: http://portfolio.akshay.cc/idle_whacker/
76
79
  licenses: []
77
80
  post_install_message: