healtcheck_proxy_client 0.3.0 → 0.4.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8b84b7ab6d8b213d9f5d4f9013c9ea6e94174753edd17db829cd9730b4ebe94
4
- data.tar.gz: 8ac82252438c18f6bc9735f1d79aca716238ea6576649e43ad1736c7330d3da0
3
+ metadata.gz: e03484f7f03d8c19e9f0eeb8ca6705a4445db23be964df46f9df1d508229cf04
4
+ data.tar.gz: 8ed6ebdfcd536a6582e6dae1ef2c0dd91e94471cc68209d5017b3695c5bb6374
5
5
  SHA512:
6
- metadata.gz: 514a46a1293d2fff13cd73eae2bd658ff8dbed1291f55bf7be9dc5f6a80888cb9f7df3a9820eb0dca13f1335d445356a5da9a1aec9b80e01cc7aaaea0cb77981
7
- data.tar.gz: a8f7361521f948402455db98c2d72474ca2002676e5fba31d9ce0fbf950617d115f89c50f3d5e0372978a71ef3871a5022b6690ca009defa26d7801ec353392c
6
+ metadata.gz: 384a277de59e1c8ff60956e0c63b3f088833c8398824058dba4c3c2b0d9436500a5924f7d2e9f5d3e304b50a72103848709f2e123ad9d847fa49666517169971
7
+ data.tar.gz: fe7783e7b3cf6853eab6d6f4d5ba8ab3d65536cc523567045b73cb38f991c131df44f16824e123fa903943259ce76c3d969194fb6e5a298891143610a1a92bc3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- healtcheck_proxy_client (0.3.0)
4
+ healtcheck_proxy_client (0.4.0)
5
5
  faraday (~> 0.10)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -30,6 +30,19 @@ HealtcheckProxyClient.configure do |config|
30
30
  end
31
31
  ```
32
32
 
33
+ Call the library directly:
34
+
35
+ ```
36
+ HealtcheckProxyClient.ping('my_healthcheck_name')
37
+
38
+ ```
39
+
40
+ Or via a rake task:
41
+
42
+ ```
43
+ bin/rails healthcheck:notify check=my_healthcheck_name
44
+ ```
45
+
33
46
  ## Development
34
47
 
35
48
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -0,0 +1,7 @@
1
+ module HealtcheckProxyClient
2
+ class Railtie < Rails::Railtie
3
+ rake_tasks do
4
+ load 'tasks/healthcheck.rake'
5
+ end
6
+ end
7
+ end
@@ -1,3 +1,3 @@
1
1
  module HealtcheckProxyClient
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -3,6 +3,7 @@ require "faraday"
3
3
  require "healtcheck_proxy_client/version"
4
4
  require "healtcheck_proxy_client/client"
5
5
  require "healtcheck_proxy_client/http_error"
6
+ require "healtcheck_proxy_client/railtie" if defined?(Rails)
6
7
 
7
8
  module HealtcheckProxyClient
8
9
  class << self
@@ -0,0 +1,11 @@
1
+ namespace :healthcheck do
2
+ desc 'Notify the healthcheck API'
3
+ task notify: :environment do
4
+ check = ENV["check"]
5
+ if check.nil? || check == ""
6
+ raise ArgumentError.new("please provide the name of a check by passing check=checkname")
7
+ end
8
+ puts "Calling healthcheck check: #{check}"
9
+ HealtcheckProxyClient.ping(check)
10
+ end
11
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: healtcheck_proxy_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hendrik Kleinwaechter
@@ -87,7 +87,9 @@ files:
87
87
  - lib/healtcheck_proxy_client.rb
88
88
  - lib/healtcheck_proxy_client/client.rb
89
89
  - lib/healtcheck_proxy_client/http_error.rb
90
+ - lib/healtcheck_proxy_client/railtie.rb
90
91
  - lib/healtcheck_proxy_client/version.rb
92
+ - lib/tasks/healthcheck.rake
91
93
  homepage: https://github.com/trivago/healthbot-proxy
92
94
  licenses:
93
95
  - MIT