acts_as_ecv 0.0.2 → 0.0.3

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 +41 -0
  2. metadata +5 -5
  3. data/README +0 -0
@@ -0,0 +1,41 @@
1
+ # acts_as_ecv
2
+ acts_as_ecv is a simple ruby gem that helps add ecv (Extended Content Verification) to Rails webapp. This functionality is
3
+ necessary for production environment where your servers sit behind a load balancer, and you want the load balancer to do more
4
+ than just a simple ping or tcp check to verify that the app is up and running.
5
+
6
+ ## Installation
7
+ It's hosted on [rubygems.org][rubygems].
8
+
9
+ sudo gem install acts_as_ecv
10
+
11
+ ## Usage
12
+
13
+ ```ruby
14
+ # Rails 2.3.x, add this to environment.rb
15
+ config.gem 'acts_as_ecv'
16
+
17
+ # Rails 3, add this to Gemfile
18
+ gem 'acts_as_ecv'
19
+
20
+ # Now, create a controller that will serve up the ecv
21
+ # For example, in ecv_controllers.rb
22
+ class EcvController < ApplicationController
23
+ acts_as_ecv :up_txt => "SYSTEM UP", :down_txt => "SYSTEM DOWN", :down_file => "file/for/marking/the/app/as/down"
24
+ end
25
+
26
+ # Now you can hit http://yourapp.com/ecv and you'll get back either "SYSTEM UP" or "SYSTEM DOWN" depending
27
+ # on whether the :down_file exists
28
+ ```
29
+
30
+
31
+ ### Parameters
32
+ down_file - if this file exists, the app is considered to be down (default value => public/system/down)
33
+
34
+ down_txt - determines the text that will be displayed for the ecv if the app is marked as down (default value: SYSTEM DOWN)
35
+
36
+ up_txt - determines the text that will be displayed for the ecv if the app is up (default value: SYSTEM UP)
37
+
38
+
39
+
40
+ ### Hooking it up with init script
41
+ You can now have methods in your init script to mark the app as up or down (simply by creating the "down_file" or removing it), and effectively telling the load balancer to direct traffic to your server or not.
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_ecv
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Darren Dao
@@ -27,7 +27,7 @@ extensions: []
27
27
  extra_rdoc_files: []
28
28
 
29
29
  files:
30
- - README
30
+ - README.md
31
31
  - lib/acts_as_ecv.rb
32
32
  homepage: http://github.com/darrendao/acts_as_ecv
33
33
  licenses: []
@@ -62,7 +62,7 @@ rubyforge_project:
62
62
  rubygems_version: 1.8.11
63
63
  signing_key:
64
64
  specification_version: 2
65
- summary: blah
65
+ summary: acts_as_ecv is a simple ruby gem that helps add ecv (Extended Content Verification) to Rails webapp
66
66
  test_files: []
67
67
 
68
68
  has_rdoc: true
data/README DELETED
File without changes