gesund 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,3 +2,8 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in gesund.gemspec
4
4
  gemspec
5
+
6
+ group :test do
7
+ gem "rspec", require: false
8
+ gem "simplecov", require: false
9
+ end
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gesund (0.0.2)
4
+ gesund (0.0.3)
5
5
  rack
6
6
  thor
7
7
 
@@ -9,6 +9,7 @@ GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
11
  diff-lcs (1.2.4)
12
+ multi_json (1.7.2)
12
13
  rack (1.5.2)
13
14
  rake (10.0.4)
14
15
  rspec (2.13.0)
@@ -19,6 +20,10 @@ GEM
19
20
  rspec-expectations (2.13.0)
20
21
  diff-lcs (>= 1.1.3, < 2.0)
21
22
  rspec-mocks (2.13.1)
23
+ simplecov (0.7.1)
24
+ multi_json (~> 1.0)
25
+ simplecov-html (~> 0.7.1)
26
+ simplecov-html (0.7.1)
22
27
  thor (0.18.1)
23
28
 
24
29
  PLATFORMS
@@ -29,3 +34,4 @@ DEPENDENCIES
29
34
  gesund!
30
35
  rake
31
36
  rspec
37
+ simplecov
data/gesund.gemspec CHANGED
@@ -20,7 +20,6 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.3"
22
22
  spec.add_development_dependency "rake"
23
- spec.add_development_dependency "rspec"
24
23
 
25
24
  spec.add_runtime_dependency "rack"
26
25
  spec.add_runtime_dependency "thor"
data/lib/gesund/check.rb CHANGED
@@ -8,5 +8,16 @@ module Gesund
8
8
  status = 500 unless self.message
9
9
  return [status, headers, [message]]
10
10
  end
11
+
12
+ def fail(message)
13
+ self.success = false
14
+ self.message = message
15
+ end
16
+
17
+ def pass(message)
18
+ self.success = true
19
+ self.message = message
20
+ end
21
+
11
22
  end
12
23
  end
data/lib/gesund/checks.rb CHANGED
@@ -2,5 +2,5 @@ require "gesund/checks/file"
2
2
  require "gesund/checks/link"
3
3
  require "gesund/checks/directory"
4
4
 
5
- module Checks
5
+ module Gesund::Checks
6
6
  end
@@ -1,3 +1,3 @@
1
1
  module Gesund
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -0,0 +1,4 @@
1
+ require "spec_helper"
2
+
3
+ describe Gesund::CheckRunner do
4
+ end
@@ -23,4 +23,12 @@ describe "Gesund::Check module" do
23
23
  dummy_check.success = true
24
24
  dummy_check.call.should == [500, headers, ["Class is broken!"]]
25
25
  end
26
+ it "fails when fail is called" do
27
+ dummy_check.fail("booo!")
28
+ dummy_check.call.should == [500, headers, ["booo!"]]
29
+ end
30
+ it "passes when pass is called" do
31
+ dummy_check.pass("yey!")
32
+ dummy_check.call.should == [200, headers, ["yey!"]]
33
+ end
26
34
  end
@@ -0,0 +1,4 @@
1
+ require "spec_helper"
2
+
3
+ describe Gesund::Checks do
4
+ end
@@ -0,0 +1,5 @@
1
+ require "spec_helper"
2
+ require "gesund/cli" # not usually required when requiring gesund
3
+
4
+ describe Gesund::CLI do
5
+ end
@@ -0,0 +1,4 @@
1
+ require "spec_helper"
2
+
3
+ describe Gesund::Dsl do
4
+ end
@@ -0,0 +1,4 @@
1
+ require "spec_helper"
2
+
3
+ describe Gesund::Errors::CheckNotFound do
4
+ end
@@ -0,0 +1,4 @@
1
+ require "spec_helper"
2
+
3
+ describe Gesund::Output::Rack do
4
+ end
@@ -0,0 +1,5 @@
1
+ require "spec_helper"
2
+
3
+ describe Gesund::Output::Text do
4
+ end
5
+
@@ -0,0 +1,4 @@
1
+ require "spec_helper"
2
+
3
+ describe Gesund::Output do
4
+ end
@@ -1,3 +1,3 @@
1
1
  describe Gesund::VERSION do
2
- it { should == "0.0.2" }
2
+ it { should == "0.0.3" }
3
3
  end
@@ -0,0 +1,4 @@
1
+ require "spec_helper"
2
+
3
+ describe Gesund do
4
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require "bundler/setup"
2
+ require "simplecov"
2
3
  require File.expand_path "../../lib/gesund", __FILE__
3
4
  # This file was generated by the `rspec --init` command. Conventionally, all
4
5
  # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
@@ -6,6 +7,9 @@ require File.expand_path "../../lib/gesund", __FILE__
6
7
  # loaded once.
7
8
  #
8
9
  # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
10
+ SimpleCov.start do
11
+ add_filter 'bundle'
12
+ end
9
13
  RSpec.configure do |config|
10
14
  config.treat_symbols_as_metadata_keys_with_true_values = true
11
15
  config.run_all_when_everything_filtered = true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gesund
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -43,22 +43,6 @@ dependencies:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0'
46
- - !ruby/object:Gem::Dependency
47
- name: rspec
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ! '>='
52
- - !ruby/object:Gem::Version
53
- version: '0'
54
- type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
46
  - !ruby/object:Gem::Dependency
63
47
  name: rack
64
48
  requirement: !ruby/object:Gem::Requirement
@@ -123,11 +107,20 @@ files:
123
107
  - lib/gesund/output/rack.rb
124
108
  - lib/gesund/output/text.rb
125
109
  - lib/gesund/version.rb
110
+ - spec/lib/gesund/check_runner_spec.rb
126
111
  - spec/lib/gesund/check_spec.rb
127
112
  - spec/lib/gesund/checks/directory_spec.rb
128
113
  - spec/lib/gesund/checks/file_spec.rb
129
114
  - spec/lib/gesund/checks/link_spec.rb
115
+ - spec/lib/gesund/checks_spec.rb
116
+ - spec/lib/gesund/cli_spec.rb
117
+ - spec/lib/gesund/dsl_spec.rb
118
+ - spec/lib/gesund/errors_spec.rb
119
+ - spec/lib/gesund/output/rack_spec.rb
120
+ - spec/lib/gesund/output/text_spec.rb
121
+ - spec/lib/gesund/output_spec.rb
130
122
  - spec/lib/gesund/version_spec.rb
123
+ - spec/lib/gesund_spec.rb
131
124
  - spec/spec_helper.rb
132
125
  homepage: ''
133
126
  licenses:
@@ -144,7 +137,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
144
137
  version: '0'
145
138
  segments:
146
139
  - 0
147
- hash: -1461887031316332670
140
+ hash: -987443717623063982
148
141
  required_rubygems_version: !ruby/object:Gem::Requirement
149
142
  none: false
150
143
  requirements:
@@ -153,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
146
  version: '0'
154
147
  segments:
155
148
  - 0
156
- hash: -1461887031316332670
149
+ hash: -987443717623063982
157
150
  requirements: []
158
151
  rubyforge_project:
159
152
  rubygems_version: 1.8.25
@@ -161,9 +154,18 @@ signing_key:
161
154
  specification_version: 3
162
155
  summary: Health checker for services and state.
163
156
  test_files:
157
+ - spec/lib/gesund/check_runner_spec.rb
164
158
  - spec/lib/gesund/check_spec.rb
165
159
  - spec/lib/gesund/checks/directory_spec.rb
166
160
  - spec/lib/gesund/checks/file_spec.rb
167
161
  - spec/lib/gesund/checks/link_spec.rb
162
+ - spec/lib/gesund/checks_spec.rb
163
+ - spec/lib/gesund/cli_spec.rb
164
+ - spec/lib/gesund/dsl_spec.rb
165
+ - spec/lib/gesund/errors_spec.rb
166
+ - spec/lib/gesund/output/rack_spec.rb
167
+ - spec/lib/gesund/output/text_spec.rb
168
+ - spec/lib/gesund/output_spec.rb
168
169
  - spec/lib/gesund/version_spec.rb
170
+ - spec/lib/gesund_spec.rb
169
171
  - spec/spec_helper.rb