a_okay 0.0.1
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.
- data/README.rdoc +12 -0
- data/Rakefile +32 -0
- data/VERSION +1 -0
- data/a_okay.gemspec +48 -0
- data/app/controllers/a_okay_controller.rb +7 -0
- data/config/routes.rb +4 -0
- data/lib/a_okay.rb +1 -0
- data/test/controllers/a_okay_controller_test.rb +19 -0
- data/test/test_helper.rb +10 -0
- metadata +64 -0
data/README.rdoc
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
= AOkay
|
2
|
+
|
3
|
+
Simple controller that spits out if the server is reponding. Created after I stupidly set Pingdom to search for a specific term on our homepage, creating a huge spike in our MixPanel analytics.
|
4
|
+
Now Pingdom just looks at /a_okay and tests for the string "Everything is a okay!"
|
5
|
+
|
6
|
+
In the future I hope to add "a okay" testing for:
|
7
|
+
|
8
|
+
* Database connections
|
9
|
+
* Mailers
|
10
|
+
* Er, can't think of anythign else right now.
|
11
|
+
|
12
|
+
Copyright (c) 2009 Richard Hart, released under the MIT license
|
data/Rakefile
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'rake'
|
2
|
+
require 'rake/testtask'
|
3
|
+
require 'rubygems'
|
4
|
+
|
5
|
+
desc 'Default: run unit tests.'
|
6
|
+
task :default => :test
|
7
|
+
|
8
|
+
desc 'Test the a_okay plugin.'
|
9
|
+
Rake::TestTask.new(:test) do |t|
|
10
|
+
t.libs << 'lib'
|
11
|
+
t.libs << 'test'
|
12
|
+
t.pattern = 'test/**/*_test.rb'
|
13
|
+
t.verbose = true
|
14
|
+
end
|
15
|
+
|
16
|
+
begin
|
17
|
+
require 'jeweler'
|
18
|
+
Jeweler::Tasks.new do |gemspec|
|
19
|
+
gemspec.name = "a_okay"
|
20
|
+
gemspec.summary = "A simple controller that just returns if everything is 'a okay'!"
|
21
|
+
gemspec.description = "A simple controller that just returns if everything is 'a okay'!"
|
22
|
+
gemspec.email = "richard@ur-ban.com"
|
23
|
+
gemspec.homepage = "http://github.com/hates/a_okay"
|
24
|
+
gemspec.authors = ["Richard Hart"]
|
25
|
+
end
|
26
|
+
Jeweler::GemcutterTasks.new
|
27
|
+
rescue LoadError
|
28
|
+
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
29
|
+
end
|
30
|
+
|
31
|
+
Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].sort.each { |ext| load ext }
|
32
|
+
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
data/a_okay.gemspec
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{a_okay}
|
8
|
+
s.version = "0.0.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Richard Hart"]
|
12
|
+
s.date = %q{2009-11-15}
|
13
|
+
s.description = %q{A simple controller that just returns if everything is 'a okay'!}
|
14
|
+
s.email = %q{richard@ur-ban.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"README.rdoc"
|
17
|
+
]
|
18
|
+
s.files = [
|
19
|
+
"README.rdoc",
|
20
|
+
"Rakefile",
|
21
|
+
"VERSION",
|
22
|
+
"a_okay.gemspec",
|
23
|
+
"app/controllers/a_okay_controller.rb",
|
24
|
+
"config/routes.rb",
|
25
|
+
"lib/a_okay.rb",
|
26
|
+
"test/controllers/a_okay_controller_test.rb",
|
27
|
+
"test/test_helper.rb"
|
28
|
+
]
|
29
|
+
s.homepage = %q{http://github.com/hates/a_okay}
|
30
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
31
|
+
s.require_paths = ["lib"]
|
32
|
+
s.rubygems_version = %q{1.3.5}
|
33
|
+
s.summary = %q{A simple controller that just returns if everything is 'a okay'!}
|
34
|
+
s.test_files = [
|
35
|
+
"test/controllers/a_okay_controller_test.rb",
|
36
|
+
"test/test_helper.rb"
|
37
|
+
]
|
38
|
+
|
39
|
+
if s.respond_to? :specification_version then
|
40
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
41
|
+
s.specification_version = 3
|
42
|
+
|
43
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
44
|
+
else
|
45
|
+
end
|
46
|
+
else
|
47
|
+
end
|
48
|
+
end
|
data/config/routes.rb
ADDED
data/lib/a_okay.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# AOkay
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper.rb'
|
2
|
+
require 'app/controllers/a_okay_controller'
|
3
|
+
require 'action_controller/test_process'
|
4
|
+
|
5
|
+
class AOkayController; def rescue_action(e) raise e end; end
|
6
|
+
|
7
|
+
class AOkayControllerTest < ActionController::TestCase
|
8
|
+
|
9
|
+
def test_show_route
|
10
|
+
assert_generates "/a_okay", {:controller => "a_okay", :action => "show"}
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_show
|
14
|
+
get :show
|
15
|
+
assert_equal "Everything is a okay!", @response.body
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
ENV['RAILS_ENV'] = 'test'
|
2
|
+
ENV['RAILS_ROOT'] ||= File.dirname(__FILE__) + '/../../../..'
|
3
|
+
|
4
|
+
require 'rubygems'
|
5
|
+
require 'test/unit'
|
6
|
+
require 'active_support'
|
7
|
+
require 'active_support/test_case'
|
8
|
+
|
9
|
+
require File.expand_path(File.join(ENV['RAILS_ROOT'], 'config/environment.rb'))
|
10
|
+
|
metadata
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: a_okay
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Richard Hart
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-11-15 00:00:00 +00:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description: A simple controller that just returns if everything is 'a okay'!
|
17
|
+
email: richard@ur-ban.com
|
18
|
+
executables: []
|
19
|
+
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files:
|
23
|
+
- README.rdoc
|
24
|
+
files:
|
25
|
+
- README.rdoc
|
26
|
+
- Rakefile
|
27
|
+
- VERSION
|
28
|
+
- a_okay.gemspec
|
29
|
+
- app/controllers/a_okay_controller.rb
|
30
|
+
- config/routes.rb
|
31
|
+
- lib/a_okay.rb
|
32
|
+
- test/controllers/a_okay_controller_test.rb
|
33
|
+
- test/test_helper.rb
|
34
|
+
has_rdoc: true
|
35
|
+
homepage: http://github.com/hates/a_okay
|
36
|
+
licenses: []
|
37
|
+
|
38
|
+
post_install_message:
|
39
|
+
rdoc_options:
|
40
|
+
- --charset=UTF-8
|
41
|
+
require_paths:
|
42
|
+
- lib
|
43
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: "0"
|
48
|
+
version:
|
49
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: "0"
|
54
|
+
version:
|
55
|
+
requirements: []
|
56
|
+
|
57
|
+
rubyforge_project:
|
58
|
+
rubygems_version: 1.3.5
|
59
|
+
signing_key:
|
60
|
+
specification_version: 3
|
61
|
+
summary: A simple controller that just returns if everything is 'a okay'!
|
62
|
+
test_files:
|
63
|
+
- test/controllers/a_okay_controller_test.rb
|
64
|
+
- test/test_helper.rb
|