Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Now using Bundler for dependancies. Pulled in changes by kivanio

  • Loading branch information...
commit 06c2b33d953a9ba07618f83e4373f0fea30dc5b9 1 parent 16fa3f2
Matthew Fawcett authored
View
1  .gitignore
@@ -0,0 +1 @@
+.bundle
View
9 Gemfile
@@ -0,0 +1,9 @@
+source 'http://rubygems.org'
+
+gem 'nokogiri'
+gem 'sinatra'
+
+group :test do
+ gem 'rspec'
+ gem 'rack-test', :require => 'rack/test'
+end
View
19 Gemfile.lock
@@ -0,0 +1,19 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ nokogiri (1.4.3.1)
+ rack (1.2.1)
+ rack-test (0.5.4)
+ rack (>= 1.0)
+ rspec (1.3.0)
+ sinatra (1.0)
+ rack (>= 1.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ nokogiri
+ rack-test
+ rspec
+ sinatra
View
17 README → README.md
@@ -1,14 +1,9 @@
-Monit Aggregator is a Sinatra app that aggregates your monit web interfaces into 1 place. Used on runslikeclockwork.com server monitoring
-
-Detailed instructions coming soon
-
-1. To get going, install everything
-# gem install sinatra nokogiri haml
+Monit Aggregator
+================
-2. Now clone the repo
-# git clone git://github.com/mattfawcett/monit-aggregator.git
+Monit Aggregator is a Sinatra app that aggregates your monit web interfaces into 1 place. Used on runslikeclockwork.com server monitoring
+1. Clone the repo `git clone git://github.com/mattfawcett/monit-aggregator.git`
+2. Install the neccessary packages with `bundle install` (you will need bundler installed `gem install bundler`)
3. Edit the monit_installations.yml file to include the details of your Monit installations (it currently doesn't support HTTPS)
-
-4. Now run the app
-# ruby app.rb
+4. Now run the app `ruby app.rb`
View
7 app.rb
@@ -1,11 +1,8 @@
require 'rubygems'
-require 'nokogiri'
-require 'open-uri'
-require 'net/http'
+require 'bundler/setup'
require 'sinatra'
-require 'erb'
-require 'helpers'
require 'monit_instance'
+require 'helpers'
use Rack::Auth::Basic do |username, password|
[username, password] == ['admin', 'password']
View
5 monit_installations.yml
@@ -1,7 +1,4 @@
server1:
url: http://matthewfawcett.co.uk:80
username: admin
- password: password
-
-
-
+ password: password
View
4 monit_instance.rb
@@ -1,3 +1,7 @@
+require 'nokogiri'
+require 'open-uri'
+require 'net/http'
+
class MonitInstance
attr_accessor :url
View
1  spec/spec_helper.rb
@@ -1,4 +1,5 @@
require 'rubygems'
+require 'bundler/setup'
require 'spec'
require 'spec/interop/test'
require 'rack/test'
Please sign in to comment.
Something went wrong with that request. Please try again.