app_status 0.1.0
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/MIT-LICENSE +20 -0
- data/README.md +115 -0
- data/Rakefile +39 -0
- data/app/assets/javascripts/app_status/application.js +15 -0
- data/app/assets/stylesheets/app_status/application.css +13 -0
- data/app/controllers/app_status/application_controller.rb +4 -0
- data/app/controllers/app_status/status_controller.rb +13 -0
- data/app/helpers/app_status/application_helper.rb +4 -0
- data/app/models/app_status/check_collection.rb +106 -0
- data/app/views/app_status/status/index.html.haml +16 -0
- data/app/views/layouts/app_status/application.html.erb +14 -0
- data/bin/autospec +16 -0
- data/bin/erubis +16 -0
- data/bin/haml +16 -0
- data/bin/htmldiff +16 -0
- data/bin/ldiff +16 -0
- data/bin/rackup +16 -0
- data/bin/rails +16 -0
- data/bin/rake +16 -0
- data/bin/rdoc +16 -0
- data/bin/ri +16 -0
- data/bin/rspec +16 -0
- data/bin/sprockets +16 -0
- data/bin/thor +16 -0
- data/bin/tilt +16 -0
- data/bin/tt +16 -0
- data/config/routes.rb +4 -0
- data/lib/app_status/engine.rb +12 -0
- data/lib/app_status/version.rb +3 -0
- data/lib/app_status.rb +5 -0
- data/lib/tasks/app_status_tasks.rb +4 -0
- data/spec/controllers/status_controller_spec.rb +29 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config/application.rb +65 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +4 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/log/test.log +43 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/models/check_collection_spec.rb +105 -0
- data/spec/spec_helper.rb +18 -0
- metadata +243 -0
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2013 Alex Dean
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,115 @@
|
|
1
|
+
# AppStatus
|
2
|
+
|
3
|
+
AppStatus is a Rails engine which makes it easy to expose application status
|
4
|
+
data in a way easily consumed by Nagios or other monitoring packages.
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
### `Gemfile`
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'app_status'
|
12
|
+
```
|
13
|
+
|
14
|
+
### `config/routes.rb`
|
15
|
+
|
16
|
+
Wire it up.
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
mount AppStatus::Engine, at: "/status"
|
20
|
+
```
|
21
|
+
|
22
|
+
This exposes the following URLs
|
23
|
+
- `http://localhost:3000/status`
|
24
|
+
renders html or json according to Accept headers. Defaults to JSON.
|
25
|
+
- `http://localhost:3000/status/index.json`
|
26
|
+
- `http://localhost:3000/status/index.html` <-- fugly
|
27
|
+
|
28
|
+
|
29
|
+
### `config/initializers/app_status.rb`
|
30
|
+
|
31
|
+
This is where you set up the checks which you want to be run when
|
32
|
+
someone hits the URL above. Set up some calls which evaluate the health
|
33
|
+
of your application and call `add` for each one.
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
AppStatus::CheckCollection.configure do |c|
|
37
|
+
value = some_service_check
|
38
|
+
c.add(:name => 'some_service', :status => :ok, :details => value)
|
39
|
+
end
|
40
|
+
```
|
41
|
+
|
42
|
+
The checks that you set up here are not run when you configure them. They're
|
43
|
+
run whenever someone hits the check URL.
|
44
|
+
|
45
|
+
Status values (in ascending order of seriousness)
|
46
|
+
- :ok
|
47
|
+
- :warning
|
48
|
+
- :critical
|
49
|
+
- :unknown
|
50
|
+
|
51
|
+
These are set up to be compatible with Nagios.
|
52
|
+
|
53
|
+
Details doesn't have to be a string. It can be anything which is serializable
|
54
|
+
as JSON.
|
55
|
+
|
56
|
+
## Usage
|
57
|
+
|
58
|
+
`$ curl -H 'Accept: application/json' http://localhost:3000/status`
|
59
|
+
|
60
|
+
Output will look something like this:
|
61
|
+
```json
|
62
|
+
{
|
63
|
+
"status": "critical",
|
64
|
+
"status_code": 2,
|
65
|
+
"run_time_ms": 52,
|
66
|
+
"finished": "2013-10-03T21:28:10Z",
|
67
|
+
"details": {
|
68
|
+
"some_service": {
|
69
|
+
"status": "ok",
|
70
|
+
"status_code": 0,
|
71
|
+
"details": "Looks good!"
|
72
|
+
},
|
73
|
+
"failing_service": {
|
74
|
+
"status": "critical",
|
75
|
+
"status_code": 2,
|
76
|
+
"details": "Oh noes!"
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
80
|
+
```
|
81
|
+
|
82
|
+
The overall status will be the worst status which is actually observed in your
|
83
|
+
individual checks.
|
84
|
+
|
85
|
+
## Nagios Integration
|
86
|
+
|
87
|
+
[bin/check_app_status.rb](https://github.com/alexdean/app_status/blob/master/bin/check_app_status.rb)
|
88
|
+
is a Nagios check script which can be used to monitor the output from `app_status`
|
89
|
+
|
90
|
+
```
|
91
|
+
$ bin/check_app_status.rb --help
|
92
|
+
Nagios check script for app_status. See https://github.com/alexdean/app_status
|
93
|
+
-v, --verbose Output more information
|
94
|
+
-V, --version Output version information
|
95
|
+
-h, --help Display this screen
|
96
|
+
-u, --url VAL Url to monitor
|
97
|
+
-a, --auth VAL HTTP basic auth in the form 'user:password'
|
98
|
+
-t, --timeout VAL Timeout after waiting this long for a response.
|
99
|
+
```
|
100
|
+
|
101
|
+
The script's exit status is derived from the overall status returned by the
|
102
|
+
server. Individual detail items will be grouped by status for display.
|
103
|
+
(Unknowns are displayed together, then criticals, then warnings, then OKs.)
|
104
|
+
|
105
|
+
Sample output (using verbose mode)
|
106
|
+
|
107
|
+
```
|
108
|
+
$ bin/check_app_status.rb --url http://localhost:3000/status -v
|
109
|
+
2013-10-03T20:54:16-05:00 options: {:timeout=>10, :url=>"http://localhost:3000/status"}
|
110
|
+
2013-10-03T20:54:16-05:00 timeout: 10s
|
111
|
+
2013-10-03T20:54:16-05:00 response body: {"status":"warning","status_code":1,"run_time_ms":0,"finished":"2013-10-04T01:54:16Z","details":{"some_service":{"status":"ok","status_code":0,"details":"Looks good!"},"failing_service":{"status":"warning","status_code":1,"details":"Oh noes!"}}}
|
112
|
+
|
113
|
+
WARN: failing_service:'Oh noes!'
|
114
|
+
OK: some_service:'Looks good!'
|
115
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
begin
|
3
|
+
require 'bundler/setup'
|
4
|
+
rescue LoadError
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
+
end
|
7
|
+
|
8
|
+
begin
|
9
|
+
require 'rdoc/task'
|
10
|
+
rescue LoadError
|
11
|
+
require 'rdoc/rdoc'
|
12
|
+
require 'rake/rdoctask'
|
13
|
+
RDoc::Task = Rake::RDocTask
|
14
|
+
end
|
15
|
+
|
16
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
17
|
+
rdoc.rdoc_dir = 'rdoc'
|
18
|
+
rdoc.title = 'AppStatus'
|
19
|
+
rdoc.options << '--line-numbers'
|
20
|
+
rdoc.rdoc_files.include('README.rdoc')
|
21
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
22
|
+
end
|
23
|
+
|
24
|
+
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
|
25
|
+
load 'rails/tasks/engine.rake'
|
26
|
+
|
27
|
+
|
28
|
+
Bundler::GemHelper.install_tasks
|
29
|
+
|
30
|
+
|
31
|
+
Dir[File.join(File.dirname(__FILE__), 'tasks/**/*.rake')].each {|f| load f }
|
32
|
+
|
33
|
+
require 'rspec/core'
|
34
|
+
require 'rspec/core/rake_task'
|
35
|
+
|
36
|
+
desc "Run all specs in spec directory (excluding plugin specs)"
|
37
|
+
RSpec::Core::RakeTask.new(:spec)
|
38
|
+
|
39
|
+
task :default => :spec
|
@@ -0,0 +1,15 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// the compiled file.
|
9
|
+
//
|
10
|
+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
+
// GO AFTER THE REQUIRES BELOW.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require jquery_ujs
|
15
|
+
//= require_tree .
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require_tree .
|
13
|
+
*/
|
@@ -0,0 +1,106 @@
|
|
1
|
+
# collect a variety of checks for reporting to nagios
|
2
|
+
|
3
|
+
module AppStatus
|
4
|
+
|
5
|
+
class CheckCollection
|
6
|
+
|
7
|
+
@@config_proc = nil
|
8
|
+
|
9
|
+
# Add checks here.
|
10
|
+
#
|
11
|
+
# These checks are re-run whenever evaluate! is called on an instance.
|
12
|
+
# They aren't run at configure time.
|
13
|
+
#
|
14
|
+
# The block recieves an instance of AppStatus::CheckCollection as an
|
15
|
+
# argument.
|
16
|
+
#
|
17
|
+
# example (put this in config/initalizers/app_status.rb):
|
18
|
+
#
|
19
|
+
# AppStatus::CheckCollection.configure do |c|
|
20
|
+
#
|
21
|
+
# value = some_service_check
|
22
|
+
# status = value > 100 ? :ok : :critical
|
23
|
+
# c.add(:name => 'some_service', :status => status, :details => value)
|
24
|
+
#
|
25
|
+
# end
|
26
|
+
def self.configure(&block)
|
27
|
+
@@config_proc = block
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.clear_checks!
|
31
|
+
@@config_proc = nil
|
32
|
+
end
|
33
|
+
|
34
|
+
def initialize
|
35
|
+
@valid_status = {
|
36
|
+
ok: 0,
|
37
|
+
warning: 1,
|
38
|
+
critical: 2,
|
39
|
+
unknown: 3
|
40
|
+
}.freeze
|
41
|
+
|
42
|
+
@checks = HashWithIndifferentAccess.new
|
43
|
+
@eval_finished = nil
|
44
|
+
@eval_time = 0
|
45
|
+
end
|
46
|
+
|
47
|
+
# add the results of a check to the collection.
|
48
|
+
# this should describe the health of some portion of your application
|
49
|
+
#
|
50
|
+
# example:
|
51
|
+
# value = some_service_check
|
52
|
+
# c.add(:name => 'some_service', :status => :ok, :details => value)
|
53
|
+
def add(options={})
|
54
|
+
raise ArgumentError, ":name option is required." if ! options[:name]
|
55
|
+
raise ArgumentError, ":status option is required." if ! options[:status]
|
56
|
+
|
57
|
+
name = options[:name].to_sym
|
58
|
+
status = options[:status].to_sym
|
59
|
+
details = options[:details].to_s
|
60
|
+
|
61
|
+
# blow up if someone sends us options we don't understand.
|
62
|
+
other_options = options.keys - [:name, :status, :details]
|
63
|
+
if other_options.size > 0
|
64
|
+
raise ArgumentError, "Unrecognized option(s) for '#{name}' check: #{other_options.join(',')}"
|
65
|
+
end
|
66
|
+
|
67
|
+
raise ArgumentError, "'#{status}' is not a valid status for check '#{name}'." if ! valid_status?(status)
|
68
|
+
raise ArgumentError, "Check name '#{name}' has already been added." if @checks.keys.include?(name)
|
69
|
+
|
70
|
+
@checks[name] = {status: status, status_code: @valid_status[status], details: details}
|
71
|
+
end
|
72
|
+
|
73
|
+
def valid_status?(status)
|
74
|
+
@valid_status.keys.include?(status)
|
75
|
+
end
|
76
|
+
|
77
|
+
# run the checks added via configure
|
78
|
+
# results of the checks are available via as_json
|
79
|
+
def evaluate!
|
80
|
+
start = Time.now
|
81
|
+
@checks = {}
|
82
|
+
@@config_proc.call(self) if @@config_proc
|
83
|
+
@eval_finished = Time.now.utc
|
84
|
+
@eval_time = (Time.now - start) * 1000
|
85
|
+
end
|
86
|
+
|
87
|
+
def as_json
|
88
|
+
if @checks.size == 0
|
89
|
+
max_status = :unknown
|
90
|
+
max_int = @valid_status[max_status]
|
91
|
+
else
|
92
|
+
max_int = @checks.inject([]){ |memo,val| memo << val[1][:status_code]; memo}.max
|
93
|
+
max_status = @valid_status.invert[max_int]
|
94
|
+
end
|
95
|
+
|
96
|
+
HashWithIndifferentAccess.new({
|
97
|
+
status: max_status,
|
98
|
+
status_code: max_int,
|
99
|
+
run_time_ms: @eval_time.to_i,
|
100
|
+
finished: @eval_finished.iso8601,
|
101
|
+
checks: @checks
|
102
|
+
})
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>App Status</title>
|
5
|
+
<%= stylesheet_link_tag "app_status/application", :media => "all" %>
|
6
|
+
<%= javascript_include_tag "app_status/application" %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
data/bin/autospec
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'autospec' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('rspec-core', 'autospec')
|
data/bin/erubis
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'erubis' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('erubis', 'erubis')
|
data/bin/haml
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'haml' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('haml', 'haml')
|
data/bin/htmldiff
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'htmldiff' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('diff-lcs', 'htmldiff')
|
data/bin/ldiff
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'ldiff' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('diff-lcs', 'ldiff')
|
data/bin/rackup
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'rackup' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('rack', 'rackup')
|
data/bin/rails
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'rails' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('railties', 'rails')
|
data/bin/rake
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'rake' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('rake', 'rake')
|
data/bin/rdoc
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'rdoc' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('rdoc', 'rdoc')
|
data/bin/ri
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'ri' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('rdoc', 'ri')
|
data/bin/rspec
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'rspec' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('rspec-core', 'rspec')
|
data/bin/sprockets
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'sprockets' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('sprockets', 'sprockets')
|
data/bin/thor
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'thor' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('thor', 'thor')
|
data/bin/tilt
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'tilt' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('tilt', 'tilt')
|
data/bin/tt
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'tt' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('treetop', 'tt')
|
data/config/routes.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
module AppStatus
|
2
|
+
class Engine < ::Rails::Engine
|
3
|
+
isolate_namespace AppStatus
|
4
|
+
|
5
|
+
config.generators do |g|
|
6
|
+
g.test_framework :rspec, :fixture => false
|
7
|
+
#g.fixture_replacement :factory_girl, :dir => 'spec/factories'
|
8
|
+
g.assets false
|
9
|
+
g.helper false
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
data/lib/app_status.rb
ADDED