action_reporter 1.0.7 → 1.1.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: f7b18e69aacb2c2e5c3c78668f0e628e7d332f3665a8deb19c26d75d8890a4e4
4
- data.tar.gz: 738c776f0ac5447f92a62a12bd3ff0aea68aa01b163f367ee22903bae6c7b75f
3
+ metadata.gz: 13e5a1b759408acb2b8af922f9075aad25fa5b1dcc39e931a6d171ea81bc4b9a
4
+ data.tar.gz: 5ac0c5e94e6c9b56bb25c88df82ce80350c4d43fa67284c60e8af7c8b87bba19
5
5
  SHA512:
6
- metadata.gz: 2bdd4c08e577f33521485d9b1abc099f00e447879700e308e311faa425c464930e0fdb1a149168e5bc3ff8bd536f667dada69e49bb4d7b3e3506f84149ecc3a8
7
- data.tar.gz: 420ad582cdf6fa8616efcddcfbda793f9b36a90251147021ec38686ec030b38f21ab9d39da6633ff51c76d0752bcea0fd7249c72433ff0eecd3995c4caa00f97
6
+ metadata.gz: 9a8c8d4991ed7b85e5822ec28a56d4b5f3a383cec09e5651be332d12943b6fdc63cd97e71f9b56d00e54b675faddaac657027d9e9290a8cde570ac70483ae5c1
7
+ data.tar.gz: f155b3a4484e67f1e2b4e06d885b0759335eda30ce47b739f293dbb2cfdf541b51a13211762598bc894e8d8c57650d581cc00d011e0d47ef261ee274319074d7
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 1.1.0
2
+
3
+ * Add reporter check-in method
4
+
1
5
  # 1.0.7
2
6
 
3
7
  * Moving Sentry context under `context` key
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "action_reporter"
3
- s.version = "1.0.7"
3
+ s.version = "1.1.0"
4
4
 
5
5
  s.license = "MIT"
6
6
 
@@ -17,6 +17,16 @@ module ActionReporter
17
17
  end
18
18
  end
19
19
 
20
+ def resolve_check_in_id(identifier)
21
+ if identifier.is_a?(String)
22
+ identifier
23
+ elsif identifier.respond_to?(:reporter_check_in)
24
+ identifier.reporter_check_in
25
+ else
26
+ raise ArgumentError, "Unknown check-in identifier: #{identifier.inspect}"
27
+ end
28
+ end
29
+
20
30
  def notify(*)
21
31
  end
22
32
 
@@ -15,5 +15,10 @@ module ActionReporter
15
15
  def reset_context
16
16
  Honeybadger.context.clear!
17
17
  end
18
+
19
+ def check_in(identifier)
20
+ check_in_id = resolve_check_in_id(identifier)
21
+ Honeybadger.check_in(check_in_id)
22
+ end
18
23
  end
19
24
  end
@@ -13,5 +13,10 @@ module ActionReporter
13
13
  new_context = transform_context(args)
14
14
  Rails.logger.info("Reporter context: #{new_context.inspect}")
15
15
  end
16
+
17
+ def check_in(identifier)
18
+ check_in_id = resolve_check_in_id(identifier)
19
+ Rails.logger.info("Reporter check-in: #{check_in_id}")
20
+ end
16
21
  end
17
22
  end
@@ -1,3 +1,3 @@
1
1
  module ActionReporter
2
- VERSION = '1.0.7'
2
+ VERSION = '1.1.0'
3
3
  end
@@ -63,4 +63,12 @@ module ActionReporter
63
63
  reporter.audited_user = user
64
64
  end
65
65
  end
66
+
67
+ def check_in(identifier)
68
+ enabled_reporters.each do |reporter|
69
+ next unless reporter.respond_to?(:check_in)
70
+
71
+ reporter.check_in(identifier)
72
+ end
73
+ end
66
74
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_reporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Makarov