commit ec621dbfdedf96941fc8352e33d2aebc8482a3a8 Author: Felipe Oliveira Date: Fri Dec 7 15:02:45 2012 -0200 First commit, gem structure. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b844b14 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +Gemfile.lock diff --git a/.rspec b/.rspec new file mode 100644 index 0000000..5f16476 --- /dev/null +++ b/.rspec @@ -0,0 +1,2 @@ +--color +--format progress diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..a1b93f3 --- /dev/null +++ b/Gemfile @@ -0,0 +1,3 @@ +source :rubygems + +gemspec diff --git a/README.md b/README.md new file mode 100644 index 0000000..c030227 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +NSCA Client +=========== + +NSCA is a Linux/Unix daemon allows you to integrate passive alerts and checks +from remote machines and applications with Nagios. Useful for processing +security alerts, as well as redundant and distributed Nagios setups. + +**This client allows you to send easily passive alerts and checks.** diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..f57ae68 --- /dev/null +++ b/Rakefile @@ -0,0 +1,2 @@ +#!/usr/bin/env rake +require "bundler/gem_tasks" diff --git a/lib/nsca/client.rb b/lib/nsca/client.rb new file mode 100644 index 0000000..e69de29 diff --git a/lib/nsca/client/version.rb b/lib/nsca/client/version.rb new file mode 100644 index 0000000..0aadbf8 --- /dev/null +++ b/lib/nsca/client/version.rb @@ -0,0 +1,5 @@ +module NSCA + module Client + VERSION = '1.0.0' + end +end diff --git a/nsca-client.gemspec b/nsca-client.gemspec new file mode 100644 index 0000000..679a53b --- /dev/null +++ b/nsca-client.gemspec @@ -0,0 +1,22 @@ +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) +require "nsca/client/version" + +Gem::Specification.new do |gem| + gem.authors = `git log --raw | grep Author: | awk -F ': | <|>' '{ print $2 }' | sort | uniq`.split("\n") + gem.email = `git log --raw | grep Author: | awk -F ': | <|>' '{ print $3 }' | sort | uniq`.split("\n") + gem.description = %q{Send passive notifications to Nagios Service Check Acceptor (NSCA).} + gem.summary = %q{NSCA Client} + gem.homepage = "http://felipecvo.github.com/nsca-client" + + gem.files = `git ls-files`.split($\) + gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) } + gem.test_files = gem.files.grep(%r{^spec/}) + gem.name = "nsca-client" + gem.require_paths = ["lib"] + gem.version = NSCA::Client::VERSION + + gem.add_dependency "send_nsca" + + gem.add_development_dependency "rspec" +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..dbc4f1a --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,17 @@ +# This file was generated by the `rspec --init` command. Conventionally, all +# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. +# Require this file using `require "spec_helper"` to ensure that it is only +# loaded once. +# +# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration +RSpec.configure do |config| + config.treat_symbols_as_metadata_keys_with_true_values = true + config.run_all_when_everything_filtered = true + config.filter_run :focus + + # Run specs in random order to surface order dependencies. If you find an + # order dependency and want to debug it, you can fix the order by providing + # the seed, which is printed after each run. + # --seed 1234 + config.order = 'random' +end