munin-plugin 0.0.2 → 0.0.3

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/Rakefile CHANGED
@@ -1 +1,3 @@
1
- require "bundler/gem_tasks"
1
+ require "bundler/gem_tasks"
2
+
3
+ Dir['lib/tasks/*.rake'].each { |t| load t }
data/lib/munin.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  $:.unshift(File.dirname(__FILE__)) unless
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
- include 'munin/version'
4
+ require 'munin/version'
5
5
 
6
6
  module Munin
7
7
 
data/lib/munin/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Munin
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
@@ -0,0 +1,9 @@
1
+ require 'rspec/core'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ RSpec::Core::RakeTask.new(:rcov) do |t|
7
+ t.rcov = true
8
+ t.rcov_opts = %w{--exclude osx\/objc,gems\/,spec\/,lib\/database_cleaner\/}
9
+ end
data/munin-plugin.gemspec CHANGED
@@ -1,5 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  $:.push File.expand_path("../lib", __FILE__)
3
+
3
4
  require "munin/version"
4
5
 
5
6
  Gem::Specification.new do |s|
@@ -20,5 +21,6 @@ Gem::Specification.new do |s|
20
21
 
21
22
  # specify any dependencies here; for example:
22
23
  s.add_development_dependency "rake"
24
+ s.add_development_dependency "rspec"
23
25
  # s.add_runtime_dependency "rest-client"
24
26
  end
data/spec/munin_spec.rb CHANGED
@@ -1,19 +1,16 @@
1
1
  require File.dirname(__FILE__) + '/spec_helper.rb'
2
2
 
3
3
  class TestPlugin < Munin::Plugin
4
-
4
+ declare_field :test
5
5
  end
6
6
 
7
7
  describe Munin::Plugin do
8
8
 
9
9
  before(:each) do
10
- @plugin = TestPlugin.new
10
+ @plugin = TestPlugin.new
11
11
  end
12
12
 
13
13
  it "should have a new field with declare_field" do
14
- class TestPlugin
15
- declare_field :test
16
- end
17
14
  @plugin.fields.should == [ Munin::Field.new(:test) ]
18
15
  end
19
16
 
data/spec/spec_helper.rb CHANGED
@@ -1,10 +1,4 @@
1
- begin
2
- require 'spec'
3
- rescue LoadError
4
- require 'rubygems'
5
- gem 'rspec'
6
- require 'spec'
7
- end
1
+ require 'rspec'
8
2
 
9
3
  $:.unshift(File.dirname(__FILE__) + '/../lib')
10
4
  require 'munin'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: munin-plugin
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alban Peignier
@@ -31,6 +31,20 @@ dependencies:
31
31
  version: "0"
32
32
  name: rake
33
33
  version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
35
+ prerelease: false
36
+ type: :development
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ hash: 3
43
+ segments:
44
+ - 0
45
+ version: "0"
46
+ name: rspec
47
+ version_requirements: *id002
34
48
  description: The munin gem provides a base class to create munin plugins in ruby
35
49
  email:
36
50
  - alban@tryphon.eu
@@ -47,6 +61,7 @@ files:
47
61
  - Rakefile
48
62
  - lib/munin.rb
49
63
  - lib/munin/version.rb
64
+ - lib/tasks/spec.rake
50
65
  - munin-plugin.gemspec
51
66
  - script/console
52
67
  - script/destroy