services 1.1.0 → 1.1.1

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: 5e3a4eda849ba7c5dfa6aedd6fa7f405c942bb0e
4
- data.tar.gz: 16e437174cf3a28070d2c70cb1fcbe4a0bc72a42
3
+ metadata.gz: a7004c57ec38e0a50c485274eb889a7d86eb3604
4
+ data.tar.gz: 8d2295ec5857505fffdb5bbf1a745ff5b3cdc505
5
5
  SHA512:
6
- metadata.gz: eab5ca8ffb5a39029b42351230b31aa2106ab36a9d93e008b16940c451d3a508bce74a7d243522b3a0dfdea004d88d7d926094ff0c2377b921af80a82c671e8c
7
- data.tar.gz: 0932d4b1d53c5add16846778e117e73437018786043722f85c59087523992565ffe4a2cd3748f232ea96d91f00eea6cbf1e7c53ef8b425954afd387f40d8ca9d
6
+ metadata.gz: 9c79defb87ccc2c3f4b6b52e91273248de62c5c38853912299d240a0949d05571beb51032c8c30e6bbcd169d8ef63e5b73a0d20c13dd5091c7f34769029dc941
7
+ data.tar.gz: 377da1dd477a4a80a5bd9f3ab0175b5389969fa2e9d5a7f8a9e7469bc00aa77da31adb102d932b92bb8db26d24b8b1f49f9ac2e2cc3960c7482e70efff16273e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.1.1
2
+
3
+ * When logging to Redis, convert all values to strings first
4
+
1
5
  ## 1.1.0
2
6
 
3
7
  * Change arguments for log call in file and Redis logger, replace tag array with meta hash
@@ -8,9 +8,9 @@ module Services
8
8
  def log(message, meta = {}, severity = :info)
9
9
  value = {
10
10
  time: Time.now.to_i,
11
- message: message,
12
- severity: severity,
13
- meta: meta
11
+ message: message.to_s,
12
+ severity: severity.to_s,
13
+ meta: meta.map { |k, v| [k.to_s, v.to_s] }.to_h
14
14
  }
15
15
  @redis.lpush @key, value.to_json
16
16
  end
@@ -1,3 +1,3 @@
1
1
  module Services
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Services::Logger::Redis do
4
- let(:meta) { { foo: 'bar' } }
4
+ let(:meta) { { foo: 'bar', class: Services::Base, object: redis } }
5
5
  let(:message) { "One day baby we'll be old" }
6
6
  let(:severity) { 'critical' }
7
7
  let(:key) { 'custom_log_key' }
@@ -30,7 +30,7 @@ describe Services::Logger::Redis do
30
30
  'time' => Time.now.to_i,
31
31
  'message' => message,
32
32
  'severity' => severity,
33
- 'meta' => meta.stringify_keys
33
+ 'meta' => meta.map { |k, v| [k.to_s, v.to_s] }.to_h
34
34
  }
35
35
  expect do
36
36
  logger.log message, meta, severity
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: services
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Meurer