slack_webhook_logger 0.5.5 → 0.6.1

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: 96e88ffe219e928ae89d442a038315b73e4fa4b57134f426aef3e5b62e5b807e
4
- data.tar.gz: ed1a29838a186cd9cf488ccdc0d45c89f964d17385c1884079d4ea1aa9d512be
3
+ metadata.gz: 27a2c17dec0d526a567e6acc823f96c0107a8e6e4cc4065c389fe96f5236724f
4
+ data.tar.gz: 3a765849c688ea4a72397b10b68d76fa036b6211627ffbdff86feb7089a38eb2
5
5
  SHA512:
6
- metadata.gz: 2b969a4ec3c7d972803877749e74732707ecf9dc997e66bde91b4f168e0e8a0371d86fcf91468a35e5f74ddcbe7a9d7bb56130c112af329684328fdc67781c32
7
- data.tar.gz: e2a3a168dd998f9cce18dd91d34d10274b78b8dc0b47773c2ae7b2df75f1df40dca8918b09162a545565b2462300ec3818a43fc0aee541d40ea70c0516dfe674
6
+ metadata.gz: d14e721990069f1a1c860320e1fa82975da92fcaa2ee426e009587bfa743216a683360f3598805735fc9ea7fb02938c944b4a1b509ea7cbd95a1c2fd37ddf3ce
7
+ data.tar.gz: f3f10f9ccae69aa34a4cfc3ea84f1c5e94e566d2574f4b532ed8d5bc74e1f0547f79620888b5cbb477e524fb88701e73011a2408f4175f4ce8e427bbbe7c4e69
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [v0.6.0] - 17-08-2023
2
+ ## What's Changed
3
+ * Add the application_name to the message by @gjtorikian in https://github.com/gjtorikian/slack_webhook_logger/pull/16
4
+
5
+
6
+ **Full Changelog**: https://github.com/gjtorikian/slack_webhook_logger/compare/v0.5.5...v0.6.0
7
+ ## [v0.5.5] - 16-08-2023
8
+ ## What's Changed
9
+ * Changes for new char limits by @gjtorikian in https://github.com/gjtorikian/slack_webhook_logger/pull/15
10
+
11
+
12
+ **Full Changelog**: https://github.com/gjtorikian/slack_webhook_logger/compare/v0.5.4...v0.5.5
1
13
  ## [v0.5.4] - 06-07-2023
2
14
  null
3
15
  ## [v0.5.2] - 06-07-2023
data/README.md CHANGED
@@ -38,7 +38,7 @@ end
38
38
 
39
39
  ## Configuration
40
40
 
41
- You should have a file in `config/initializers/slack_webhook_logger.rb` that looks somrthing like this:
41
+ You should have a file in `config/initializers/slack_webhook_logger.rb` that looks something like this:
42
42
 
43
43
  ```ruby
44
44
  SlackWebhookLogger.setup do |config|
@@ -18,4 +18,8 @@ SlackWebhookLogger.setup do |config|
18
18
  # You can provide an array of regular expressions to ignore certain messages
19
19
  # from being sent to Slack. This is optional.
20
20
  # config.ignore_patterns = []
21
+
22
+ # You can provide a specific name for your app; otherwise, it will default to
23
+ # the name of your Rails app. This is optional.
24
+ # config.application_name = []
21
25
  end
@@ -29,10 +29,12 @@ module SlackWebhookLogger
29
29
  "🪵 *Logger*"
30
30
  end
31
31
 
32
- title = "#{heading} (#{time}) [#{ENV.fetch("RAILS_ENV", nil)}]"
32
+ title = "#{heading} #{SlackWebhookLogger.application_name} [#{ENV.fetch("RAILS_ENV", nil)}] (#{time})"
33
33
 
34
34
  text = <<~MSG
35
+ ```
35
36
  #{msg2str(msg)}
37
+ ```
36
38
  MSG
37
39
 
38
40
  slackify(truncate(title), truncate(text))
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SlackWebhookLogger
4
- VERSION = "0.5.5"
4
+ VERSION = "0.6.1"
5
5
  end
@@ -17,6 +17,7 @@ module SlackWebhookLogger
17
17
  mattr_accessor :level
18
18
  mattr_accessor :formatter
19
19
  mattr_accessor :ignore_patterns
20
+ mattr_accessor :application_name
20
21
 
21
22
  # Used internally
22
23
  mattr_reader :webhook_uri
@@ -39,6 +40,7 @@ module SlackWebhookLogger
39
40
  raise ArgumentError, "Invalid URI for webhook_url"
40
41
  end
41
42
 
43
+ @@application_name ||= Rails.application.class.module_parent_name
42
44
  @@ignore_patterns ||= []
43
45
  end
44
46
  # rubocop:enable Style/ClassVars
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack_webhook_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen J. Torikian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-16 00:00:00.000000000 Z
11
+ date: 2023-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  - !ruby/object:Gem::Version
121
121
  version: '0'
122
122
  requirements: []
123
- rubygems_version: 3.4.18
123
+ rubygems_version: 3.4.19
124
124
  signing_key:
125
125
  specification_version: 4
126
126
  summary: A slim wrapper for posting to Rails logs to Slack