health_tools 0.0.1 → 0.0.2

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: 62189d573e2246476974aa86087c31e719dc4f78f0b2eb871233189c3b08cfdf
4
- data.tar.gz: 32d9380bd461c37119af9f53eab8bb74364a77657ee109dbf4f095e098039e8b
3
+ metadata.gz: 89bfc2e3f2516a455487442e86707b242ff960c1c1606e9f43704586f10ba1d5
4
+ data.tar.gz: ac7438c884c0a5ca3a1c57d84a68ea079c170f6184e7b89af9982e71788413e0
5
5
  SHA512:
6
- metadata.gz: e7a34d45d91adf99c161531aef34d6442ec61480679b779a54e8550441dfb15fdd97b95c7094dea943e62db0870467b02c167b57d7ab9867b411958d40fa1fd1
7
- data.tar.gz: '0964cb2d94c70fb746c66c97b1540d213957e7ed84ea170d3e3e92a2b74bf7272fc658219ed2b741a901618de46f6506a9f074744fb6edb015bd7c9b416f91e4'
6
+ metadata.gz: 5f4fda68564772cebc67a5c007deafe05a06fb5df2cb9cb03e88030c46757dc297a27e22f5ad2e45cbb4d4562a9d99cf12e2e56913533e11e1c82a947245b9a8
7
+ data.tar.gz: 9bf15e50f5661a9ec14927661f4bf89f798593406d1082370dda56f2520ee1544c6c7dcb8c82376128ac70675bff97b3ea687839ee98836c1ecd648d8ea56927
@@ -1 +1 @@
1
- ENV['api_url'] = "http://localhost:3000/api/reply"
1
+ ENV['api_url'] = "http://localhost:3000/api/report"
@@ -3,11 +3,13 @@
3
3
  require '../lib/health_tools'
4
4
  data = {
5
5
  "service_code" => ENV['service_code'],
6
- "action_name" => "check",
6
+ "component_id" => 1,
7
7
  "start_time" => DateTime.now.strftime("%d/%m/%Y %H:%M"),
8
- "status_code" => "400",
9
- "value" => "1",
10
- "note" => "cool",
8
+ "status_code" => 500,
9
+ "first_value" => 1,
10
+ "second_value" => 2,
11
+ "third_value" => 3,
12
+ "note" => 'cool',
11
13
  }
12
14
  puts HealthTools.check(data)
13
15
 
Binary file
@@ -1,7 +1,7 @@
1
1
  require 'rake'
2
2
  Gem::Specification.new do |s|
3
3
  s.name = 'health_tools'
4
- s.version = '0.0.1'
4
+ s.version = '0.0.2'
5
5
  s.date = '2021-01-08'
6
6
  s.summary = "Check up"
7
7
  s.description = "health_tools tools"
@@ -11,7 +11,17 @@ class HealthTools
11
11
  end
12
12
 
13
13
  def self.get_checksum(data)
14
+ data = self.convert_type(data)
14
15
  Digest::SHA2.hexdigest(data.to_s)
15
16
  end
16
17
 
18
+ def self.convert_type(data)
19
+ hash = {}
20
+ data.each do |key, value|
21
+ value = value.to_s
22
+ hash.store(key, value)
23
+ end
24
+ hash
25
+ end
26
+
17
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: health_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - bao
@@ -35,6 +35,7 @@ files:
35
35
  - README.md
36
36
  - app_environment_variables.rb
37
37
  - bin/health_tools
38
+ - health_tools-0.0.1.gem
38
39
  - health_tools.gemspec
39
40
  - lib/health_tools.rb
40
41
  - lib/health_tools/service.rb