slack_log_device 2.2.0 → 2.2.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: 825e9f635d6d804f3b3221de1bc7c6f2e8f75702
4
- data.tar.gz: 4ec127d12b83a824df28e0ed50c979f5dc71049c
3
+ metadata.gz: 9cfc79231db8c0601302350b62ab1dfcf9ba35e1
4
+ data.tar.gz: 940ea3dc4ae1abbdf0fac69e52d3b91b675fd19d
5
5
  SHA512:
6
- metadata.gz: 2d42f60c686262a582f5b346f0fa46df4129beaa6cf391ee6fe7e76c776e6f854f4b37c6ac52eee7d79b82656dda1947fa5b63e061c70a68086457207a6ff31e
7
- data.tar.gz: 9746e95b665bc59d0dd0db446bc794163e99d755d6274e213b26b73eb8d84bdcf3edc88522e3a95bb5c4f6d4d5ff8c84756804e7155f0e3db3bb4561bfcffe7e
6
+ metadata.gz: 73a6a4b5678ed1a78d89363a8f3dcf0c9e69522e67c8868b45f6620b615494c439619f36faa95b9e3c4a6de3da09733913a92c2f01ccc22ee8c0050c0a7d7c56
7
+ data.tar.gz: 62491db406792b5faabef96ab8e3e7713d17d10e82bfab7f6714a3c63f7c564c83849cd356cd3b3d6d1dbc83d894d1f3cfb768f408d774b974175f0d6cc4f4f0
data/README.mdown CHANGED
@@ -56,7 +56,7 @@ For a rails application, it is recommanded to use following configuration into
56
56
 
57
57
  ```ruby
58
58
  config.logger = ActiveSupport::Logger.new(SlackLogDevice.new(webhook_url: 'https://hooks.slack.com/services/...', username: 'MyRailsApp'))
59
- config.logger.formatter = ::Logger::Formatter.new
59
+ config.logger.formatter = SlackLogDevice::FORMATTER
60
60
  config.log_level = :warn
61
61
  ```
62
62
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.0
1
+ 2.2.1
@@ -13,7 +13,7 @@ class SlackLogDevice
13
13
  if message.is_a?(Exception)
14
14
  text << "A `#{message.class}` occurred: #{message.message}\n\n```"
15
15
  backtrace = message.backtrace.join("\n")
16
- backtrace = backtrace[0, MAX_MESSAGE_LENGTH - 7 - text.size] << "\n..." if backtrace.size > MAX_MESSAGE_LENGTH - 3
16
+ backtrace = backtrace[0, MAX_MESSAGE_LENGTH - 6 - text.size] << "..." if backtrace.size > MAX_MESSAGE_LENGTH - 3
17
17
  text << backtrace << '```'
18
18
  else
19
19
  text << message
@@ -42,7 +42,7 @@ describe SlackLogDevice do
42
42
  exception.set_backtrace(['a' * 4500])
43
43
  message = formatter.call('DEBUG', Time.now, 'My App', exception)
44
44
  expect(message.size).to eq(4000)
45
- expect(message).to end_with("aaaaaa\n...```")
45
+ expect(message).to end_with("aaaaaa...```")
46
46
  end
47
47
 
48
48
  it 'can be exactly 4000 chars (without three dots)' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack_log_device
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexis Toulotte
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-20 00:00:00.000000000 Z
11
+ date: 2017-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport