health-reporter 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: bec795aa467f18c19a4082de1a606a7f9f85a1f1
4
+ data.tar.gz: 6cc065ff3b203db1b5ec80be22c143f98fc2ad70
5
+ SHA512:
6
+ metadata.gz: 9efeb9f05cbb9c332e41a742061b771a1e0fd396c93a98faa9dd98ad035e2dfdacf45e818cf5ff068d308bc9d41852bc96023d7aea6f490f5258b4716364a184
7
+ data.tar.gz: 6b5048d5c2ef58ae49363915fd62efa39307c13f01f0a05c272c7e1fdb958538190f43dd096de1a8d8e8eecdd6b6bf1d467e660fe3946b377a6b84ce75111363
data/.gitignore ADDED
@@ -0,0 +1,52 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+
13
+ # Used by dotenv library to load environment variables.
14
+ # .env
15
+
16
+ ## Specific to RubyMotion:
17
+ .dat*
18
+ .repl_history
19
+ build/
20
+ *.bridgesupport
21
+ build-iPhoneOS/
22
+ build-iPhoneSimulator/
23
+
24
+ ## Specific to RubyMotion (use of CocoaPods):
25
+ #
26
+ # We recommend against adding the Pods directory to your .gitignore. However
27
+ # you should judge for yourself, the pros and cons are mentioned at:
28
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
29
+ #
30
+ # vendor/Pods/
31
+
32
+ ## Documentation cache and generated files:
33
+ /.yardoc/
34
+ /_yardoc/
35
+ /doc/
36
+ /rdoc/
37
+
38
+ ## Environment normalization:
39
+ /.bundle/
40
+ /vendor/bundle
41
+ /lib/bundler/man/
42
+
43
+ # for a library or gem, you might want to ignore these files since the code is
44
+ # intended to run in multiple environments; otherwise, check them in:
45
+ # Gemfile.lock
46
+ # .ruby-version
47
+ # .ruby-gemset
48
+
49
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
50
+ .rvmrc
51
+
52
+ Gemfile.lock
data/Dockerfile ADDED
@@ -0,0 +1,8 @@
1
+ FROM ruby:2.5.0
2
+
3
+ WORKDIR /usr/local/src/
4
+ ADD . /usr/local/src/
5
+ RUN gem install bundler
6
+ RUN bundle install
7
+
8
+ CMD bundle exec rspec -cfd spec/*
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source "https://rubygems.org"
2
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # HealthReporter
2
+
3
+
4
+ ## Installation
5
+
6
+ Add this line to your application's Gemfile:
7
+
8
+ ```ruby
9
+ gem 'health_reporter'
10
+ ```
11
+
12
+ And then execute:
13
+ ```bash
14
+ bundle
15
+ ```
16
+
17
+ Or install it yourself as:
18
+ ```bash
19
+ gem install health_reporter
20
+ ```
21
+
22
+ ## Configuration
23
+
24
+
25
+ ## Testing
26
+
27
+ Run the rspec test tests using docker compose:
28
+
29
+ ```bash
30
+ docker-compose build
31
+ docker-compose run --rm health-reporter bundle exec rspec -cfd spec/*
32
+ ```
33
+
34
+ ## Usage
35
+
36
+
37
+ ## Contributing
38
+
39
+ Bug reports and feature requests are welcome by email to barney dot de dot villiers at hetzner dot co dot za. This gem is sponsored by Hetzner (Pty) Ltd (http://hetzner.co.za)
40
+
41
+
42
+ ## License
43
+
44
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ task :default => :spec
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "health_reporter"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,7 @@
1
+ version: '3.0'
2
+ services:
3
+ health-reporter:
4
+ build: .
5
+ image: health-reporter
6
+ volumes:
7
+ - .:/usr/local/src/
@@ -0,0 +1,28 @@
1
+ # coding: utf-8
2
+
3
+ lib = File.expand_path('../lib', __FILE__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require 'health_reporter/version'
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = "health-reporter"
9
+ spec.version = HealthReporter::VERSION
10
+ spec.authors = ["Barney de Villiers"]
11
+ spec.email = ["barney.de.villiers@hetzner.co.za"]
12
+ spec.description = %q{Health reporter}
13
+ spec.summary = %q{Health reporter with dependency monitoring and caching capabilties}
14
+ spec.homepage = "https://github.com/hetznerZA/health-reporter"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files`.split($/)
18
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_development_dependency 'bundler', '~> 1.3'
23
+ spec.add_development_dependency 'rake', '~> 10.0'
24
+ spec.add_development_dependency 'rspec', '~> 2.13'
25
+ spec.add_development_dependency 'simplecov', '~> 0'
26
+ spec.add_development_dependency 'simplecov-rcov', '~> 0'
27
+ spec.add_development_dependency 'byebug', '~> 10'
28
+ end
@@ -0,0 +1,15 @@
1
+ require 'json'
2
+
3
+ module HealthReporter
4
+ class Reporter
5
+ def initialize(healthy: true)
6
+ @healthy = healthy
7
+ end
8
+
9
+
10
+
11
+ def healthy
12
+ @healthy
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,3 @@
1
+ module HealthReporter
2
+ VERSION = '0.0.1'
3
+ end
@@ -0,0 +1,5 @@
1
+ module HealthReporter
2
+ end
3
+
4
+ require 'health_reporter/reporter'
5
+ require 'health_reporter/version'
data/sanity/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ .byebug_history
11
+ *.gem
@@ -0,0 +1 @@
1
+ sanity
@@ -0,0 +1 @@
1
+ ruby-2.5.0
data/sanity/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'health_reporter', :path => "../"
data/sanity/sanity.rb ADDED
@@ -0,0 +1,9 @@
1
+ require 'health_reporter'
2
+ require 'yaml'
3
+
4
+ class Main
5
+
6
+ end
7
+
8
+ main = Main.new
9
+ main.run
data/spec/reporter.rb ADDED
@@ -0,0 +1,12 @@
1
+ require 'spec_helper'
2
+ require 'yaml'
3
+
4
+ describe HealthReporter::Reporter do
5
+ subject { HealthReporter::Reporter }
6
+
7
+ it 'has a version number' do
8
+ expect(HealthReporter::VERSION).not_to be nil
9
+ end
10
+
11
+
12
+ end
@@ -0,0 +1,11 @@
1
+ require 'simplecov'
2
+ require 'simplecov-rcov'
3
+
4
+ SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
5
+ SimpleCov.start do
6
+ add_filter "/spec/"
7
+ end
8
+
9
+ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
10
+
11
+ require 'health_reporter'
metadata ADDED
@@ -0,0 +1,152 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: health-reporter
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Barney de Villiers
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-04-06 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '2.13'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '2.13'
55
+ - !ruby/object:Gem::Dependency
56
+ name: simplecov
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: simplecov-rcov
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: byebug
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: '10'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: '10'
97
+ description: Health reporter
98
+ email:
99
+ - barney.de.villiers@hetzner.co.za
100
+ executables:
101
+ - console
102
+ - setup
103
+ extensions: []
104
+ extra_rdoc_files: []
105
+ files:
106
+ - .gitignore
107
+ - Dockerfile
108
+ - Gemfile
109
+ - LICENSE
110
+ - README.md
111
+ - Rakefile
112
+ - bin/console
113
+ - bin/setup
114
+ - docker-compose.yml
115
+ - health-reporter.gemspec
116
+ - lib/health_reporter.rb
117
+ - lib/health_reporter/reporter.rb
118
+ - lib/health_reporter/version.rb
119
+ - sanity/.gitignore
120
+ - sanity/.ruby-gemset
121
+ - sanity/.ruby-version
122
+ - sanity/Gemfile
123
+ - sanity/sanity.rb
124
+ - spec/reporter.rb
125
+ - spec/spec_helper.rb
126
+ homepage: https://github.com/hetznerZA/health-reporter
127
+ licenses:
128
+ - MIT
129
+ metadata: {}
130
+ post_install_message:
131
+ rdoc_options: []
132
+ require_paths:
133
+ - lib
134
+ required_ruby_version: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - '>='
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ required_rubygems_version: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - '>='
142
+ - !ruby/object:Gem::Version
143
+ version: '0'
144
+ requirements: []
145
+ rubyforge_project:
146
+ rubygems_version: 2.4.8
147
+ signing_key:
148
+ specification_version: 4
149
+ summary: Health reporter with dependency monitoring and caching capabilties
150
+ test_files:
151
+ - spec/reporter.rb
152
+ - spec/spec_helper.rb