heartcheck 1.0.9 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f453fe772e89019258c5529253762586d84b4d0d
4
- data.tar.gz: 95fa1f098160b9765d8cec5fca106e53cc1c138c
3
+ metadata.gz: 886a4c71131b14ae3c3321037fedb4a6f7b3e5a1
4
+ data.tar.gz: 411865a225e63216ff06ebb053ec6a23d8626168
5
5
  SHA512:
6
- metadata.gz: 9c38b0500aec51b26110e2f79a98b334658313a8bfbcae0acd8a694fee7e04fda8c0bc7c08610ab5447b779ad26978d4aa015e6294bf3d80c10071145bed155a
7
- data.tar.gz: a6770ba110925f634e99d47d0e952970f47146f2af772541cfd67d9a929e4a990cc6cf74027fcd7319036840feb68be227b988b56de6c4757d4f2e4251c8b735
6
+ metadata.gz: 8df2f1a43a2c76c4b5b338e11b66fb0d98da778ead056a8a0390e841747fd21535456feea4cf7e3c6800255e4f2439234be783bb954ab5bd54076547942cc287
7
+ data.tar.gz: 0058d5d6ed93cc788556fff83541595a66fdd4266dea36506f1e609fd9e62cd86227c86d418d24ed109aaaf315d82345de64d76b33dae506587e0b2c187bd65c
data/README.md CHANGED
@@ -1,15 +1,15 @@
1
1
  Heartcheck
2
2
  ==============
3
3
 
4
- [![Build Status](https://travis-ci.org/locaweb/heartcheck.svg)](https://travis-ci.org/locaweb/heartcheck)
4
+ [![Build Status](https://travis-ci.org/locaweb/heartcheck.svg)](https://travis-ci.org/locaweb/heartcheck)
5
+ [![Code Climate](https://codeclimate.com/github/locaweb/heartcheck/badges/gpa.svg)](https://codeclimate.com/github/locaweb/heartcheck)
5
6
 
6
7
  Check your applications' heart.
7
8
 
8
9
  About
9
10
  -----
10
11
 
11
- ### Endpoint JSON documentation:
12
-
12
+ ### Endpoint JSON
13
13
  https://github.com/locaweb/heartcheck/wiki/Endpoint-Json
14
14
 
15
15
  ## How to setup
@@ -56,8 +56,17 @@ https://github.com/locaweb/heartcheck/wiki/Endpoint-Json
56
56
 
57
57
  ## How to use
58
58
 
59
- You can see how to use in template that is generated when install:
60
- https://github.com/locaweb/heartcheck/blob/master/lib/heartcheck/generators/templates/config.rb
59
+ You can see how to use in [template](https://github.com/locaweb/heartcheck/blob/master/lib/heartcheck/generators/templates/config.rb) that is generated when install:
60
+
61
+
62
+ ## Plugins
63
+ * [ActiveRecord](https://github.com/locaweb/heartcheck-activerecord)
64
+ * [Cache](https://github.com/locaweb/heartcheck-cache)
65
+ * [Cas](https://github.com/locaweb/heartcheck-cas)
66
+ * [Redis](https://github.com/locaweb/heartcheck-redis)
67
+ * [Resque](https://github.com/locaweb/heartcheck-resque)
68
+ * [Sidekiq](https://github.com/locaweb/heartcheck-sidekiq)
69
+ * [Webservice](https://github.com/locaweb/heartcheck-webservice)
61
70
 
62
71
  ## Git tags
63
72
 
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.require_paths = ["lib"]
19
19
 
20
20
  spec.add_runtime_dependency 'rack', '~> 1', '>= 1.4.0'
21
- spec.add_runtime_dependency 'oj'
21
+ spec.add_runtime_dependency 'multi_json', '~> 1.0'
22
22
  spec.add_runtime_dependency 'net-telnet', '~> 0.1.1'
23
23
 
24
24
  spec.add_development_dependency 'pry-nav', '~> 0.2.0', '>= 0.2.4'
@@ -26,6 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.add_development_dependency 'rubocop', '~> 0.27.0', '>= 0.27.1'
27
27
  spec.add_development_dependency 'thor', '~> 0.19.0', '>= 0.19.1'
28
28
  spec.add_development_dependency 'rack-test', '~> 0.6.0', '>= 0.6.3'
29
+ spec.add_development_dependency 'oj'
29
30
  # for documentation
30
31
  spec.add_development_dependency 'yard', '~> 0.8.0', '>= 0.8.7.6'
31
32
  spec.add_development_dependency 'concurrent-ruby', '~> 0.9.1', '>= 0.9.1'
@@ -1,7 +1,7 @@
1
1
  require 'rack'
2
- require 'oj'
2
+ require 'multi_json'
3
3
 
4
- Oj.default_options = { mode: :compat }
4
+ Oj.default_options = { mode: :compat } if defined?(Oj)
5
5
 
6
6
  module Heartcheck
7
7
  module Controllers
@@ -13,7 +13,7 @@ module Heartcheck
13
13
  protected
14
14
 
15
15
  def check(who)
16
- Oj.dump(executor.dispatch(Heartcheck.send("#{who}_checks")))
16
+ MultiJson.dump(executor.dispatch(Heartcheck.send("#{who}_checks")))
17
17
  end
18
18
 
19
19
  private
@@ -19,7 +19,7 @@ module Heartcheck
19
19
  end
20
20
 
21
21
  results << { 'total_execution_time' => total_execution_time }
22
- Oj.dump(results)
22
+ MultiJson.dump(results)
23
23
  end
24
24
 
25
25
  private
@@ -2,7 +2,7 @@ module Heartcheck
2
2
  module Controllers
3
3
  class HealthCheck < Base
4
4
  def index
5
- Oj.dump({ status: 'ok' })
5
+ MultiJson.dump({ status: 'ok' })
6
6
  end
7
7
  end
8
8
  end
@@ -2,7 +2,7 @@ module Heartcheck
2
2
  module Controllers
3
3
  class Info < Base
4
4
  def index
5
- Oj.dump(Heartcheck
5
+ MultiJson.dump(Heartcheck
6
6
  .info_checks
7
7
  .map(&:informations))
8
8
  end
@@ -11,7 +11,7 @@ module Heartcheck
11
11
  started = Time.now
12
12
  checker.check.tap do |checked|
13
13
  checked[:time] = ((Time.now - started) * 1_000.0)
14
- Logger.info Oj.dump(checked)
14
+ Logger.info MultiJson.dump(checked)
15
15
  end
16
16
  end
17
17
  end
@@ -1,3 +1,3 @@
1
1
  module Heartcheck
2
- VERSION = '1.0.9'
2
+ VERSION = '1.1.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heartcheck
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Locaweb
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-29 00:00:00.000000000 Z
11
+ date: 2016-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -31,19 +31,19 @@ dependencies:
31
31
  - !ruby/object:Gem::Version
32
32
  version: 1.4.0
33
33
  - !ruby/object:Gem::Dependency
34
- name: oj
34
+ name: multi_json
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ">="
37
+ - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0'
39
+ version: '1.0'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ">="
44
+ - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '0'
46
+ version: '1.0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: net-telnet
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -158,6 +158,20 @@ dependencies:
158
158
  - - ">="
159
159
  - !ruby/object:Gem::Version
160
160
  version: 0.6.3
161
+ - !ruby/object:Gem::Dependency
162
+ name: oj
163
+ requirement: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
168
+ type: :development
169
+ prerelease: false
170
+ version_requirements: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - ">="
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
161
175
  - !ruby/object:Gem::Dependency
162
176
  name: yard
163
177
  requirement: !ruby/object:Gem::Requirement