slack_webhook_logger 0.5.5 → 0.6.0

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
  SHA256:
3
- metadata.gz: 96e88ffe219e928ae89d442a038315b73e4fa4b57134f426aef3e5b62e5b807e
4
- data.tar.gz: ed1a29838a186cd9cf488ccdc0d45c89f964d17385c1884079d4ea1aa9d512be
3
+ metadata.gz: 83b1e6053d5d56948daf29d6fb73bbff0bac8a16c2c00d39eaeed2058e85015f
4
+ data.tar.gz: f88d270cc93af6de1034fa09168853b137c31b4679fbfc8e376a718e88aea47d
5
5
  SHA512:
6
- metadata.gz: 2b969a4ec3c7d972803877749e74732707ecf9dc997e66bde91b4f168e0e8a0371d86fcf91468a35e5f74ddcbe7a9d7bb56130c112af329684328fdc67781c32
7
- data.tar.gz: e2a3a168dd998f9cce18dd91d34d10274b78b8dc0b47773c2ae7b2df75f1df40dca8918b09162a545565b2462300ec3818a43fc0aee541d40ea70c0516dfe674
6
+ metadata.gz: 825657fb963061c8c64bc2f614d07785de5c33837ab959351b34feb0b7405558af771e52846de3fe1d22b7ed7a847102a2f5853feff373e951a9f360dff934dc
7
+ data.tar.gz: aaae0faa6d0e9aa69b6dee863be0d121f440d7debcc6fe269973753088c4ed2643df1b75839b40ebc987bf92db5282bd4b1e3cad3a225933286eaa1ab5b54f24
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [v0.5.5] - 16-08-2023
2
+ ## What's Changed
3
+ * Changes for new char limits by @gjtorikian in https://github.com/gjtorikian/slack_webhook_logger/pull/15
4
+
5
+
6
+ **Full Changelog**: https://github.com/gjtorikian/slack_webhook_logger/compare/v0.5.4...v0.5.5
1
7
  ## [v0.5.4] - 06-07-2023
2
8
  null
3
9
  ## [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,7 +29,7 @@ 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
  #{msg2str(msg)}
@@ -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.0"
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.0
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-17 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