komachi_alive_monitoring 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,20 @@
1
+ Copyright 2013 Takumi MIURA
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.
@@ -0,0 +1,17 @@
1
+ # KomachiAliveMonitoring
2
+
3
+ ## About
4
+ Rails アプリケーションとDBサーバーの死活監視するためのURLを提供するEngine
5
+ schema_migrationsテーブルへのクエリを発行する
6
+ 問題がなければ200 OKを返す
7
+
8
+ ## Usage
9
+
10
+ 1. write Gemfile
11
+ `gem "komachi_alive_monitoring"`
12
+ 1. `bundle install`
13
+ 1. write config/routes.rb
14
+ `mount KomachiAliveMonitoring::Engine => "/monitor"`
15
+
16
+
17
+ This project rocks and uses MIT-LICENSE.
@@ -0,0 +1,27 @@
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
+ begin
8
+ require 'rdoc/task'
9
+ rescue LoadError
10
+ require 'rdoc/rdoc'
11
+ require 'rake/rdoctask'
12
+ RDoc::Task = Rake::RDocTask
13
+ end
14
+
15
+ RDoc::Task.new(:rdoc) do |rdoc|
16
+ rdoc.rdoc_dir = 'rdoc'
17
+ rdoc.title = 'KomachiAliveMonitoring'
18
+ rdoc.options << '--line-numbers'
19
+ rdoc.rdoc_files.include('README.rdoc')
20
+ rdoc.rdoc_files.include('lib/**/*.rb')
21
+ end
22
+
23
+
24
+
25
+
26
+ Bundler::GemHelper.install_tasks
27
+
@@ -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,4 @@
1
+ module KomachiAliveMonitoring
2
+ class ApplicationController < ActionController::Base
3
+ end
4
+ end
@@ -0,0 +1,10 @@
1
+ require_dependency "komachi_alive_monitoring/application_controller"
2
+
3
+ module KomachiAliveMonitoring
4
+ class PingController < ApplicationController
5
+ def index
6
+ ActiveRecord::Base.connection.execute "SELECT * FROM `schema_migrations` LIMIT 1"
7
+ head :ok
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,4 @@
1
+ module KomachiAliveMonitoring
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>KomachiAliveMonitoring</title>
5
+ <%= stylesheet_link_tag "komachi_alive_monitoring/application", :media => "all" %>
6
+ <%= javascript_include_tag "komachi_alive_monitoring/application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,3 @@
1
+ KomachiAliveMonitoring::Engine.routes.draw do
2
+ root to: "ping#index"
3
+ end
@@ -0,0 +1,4 @@
1
+ require "komachi_alive_monitoring/engine"
2
+
3
+ module KomachiAliveMonitoring
4
+ end
@@ -0,0 +1,5 @@
1
+ module KomachiAliveMonitoring
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace KomachiAliveMonitoring
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ module KomachiAliveMonitoring
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :komachi_alive_monitoring do
3
+ # # Task goes here
4
+ # end
metadata ADDED
@@ -0,0 +1,97 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: komachi_alive_monitoring
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Takumi MIURA
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-01-07 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '3.2'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '3.2'
30
+ - !ruby/object:Gem::Dependency
31
+ name: sqlite3
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ description: Alive Monitoring of Application Server and DB Server.
47
+ email:
48
+ - mitaku1104@gmail.com
49
+ executables: []
50
+ extensions: []
51
+ extra_rdoc_files: []
52
+ files:
53
+ - app/assets/javascripts/komachi_alive_monitoring/application.js
54
+ - app/assets/stylesheets/komachi_alive_monitoring/application.css
55
+ - app/controllers/komachi_alive_monitoring/application_controller.rb
56
+ - app/controllers/komachi_alive_monitoring/ping_controller.rb
57
+ - app/helpers/komachi_alive_monitoring/application_helper.rb
58
+ - app/views/layouts/komachi_alive_monitoring/application.html.erb
59
+ - config/routes.rb
60
+ - lib/komachi_alive_monitoring/engine.rb
61
+ - lib/komachi_alive_monitoring/version.rb
62
+ - lib/komachi_alive_monitoring.rb
63
+ - lib/tasks/komachi_alive_monitoring_tasks.rake
64
+ - MIT-LICENSE
65
+ - Rakefile
66
+ - README.md
67
+ homepage: https://github.com/mitaku/komachi_alive_monitoring
68
+ licenses: []
69
+ post_install_message:
70
+ rdoc_options: []
71
+ require_paths:
72
+ - lib
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ segments:
80
+ - 0
81
+ hash: 1685039450421766499
82
+ required_rubygems_version: !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ segments:
89
+ - 0
90
+ hash: 1685039450421766499
91
+ requirements: []
92
+ rubyforge_project:
93
+ rubygems_version: 1.8.24
94
+ signing_key:
95
+ specification_version: 3
96
+ summary: Rails Application Alive Monitoring Engine.
97
+ test_files: []