code_review_notifier 0.2.4 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/bin/code_review_notifier +1 -1
- data/lib/code_review_notifier.rb +19 -20
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90c7501938ba671fa4c5bec089c31206032ea038cb4fc2a353fd18f0b3e25e3f
|
4
|
+
data.tar.gz: 2856c54344f0db493f7cab42a2349d8d0228b089316238ed43932ff0d1eea165
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3571a987b11a3f61a5450c9557c2cb46e8cfb1f68d7b943054356d2e0ed2f2ab569dff0dce94f40c82d0259d8d40e6e9622fbf62617441caaa9c0aa40a85e5b3
|
7
|
+
data.tar.gz: b3a060f55b34b4d7839e30c0d45a4bc137b36843b6448a25a59ecf5cf8155b69a0cd4fd270e7837d26c1788ee4d8ee1c2a76269ab723634605f5a1cbf33009c2
|
data/Gemfile
CHANGED
data/bin/code_review_notifier
CHANGED
data/lib/code_review_notifier.rb
CHANGED
@@ -20,22 +20,24 @@ class CodeReviewNotifier < Rubiclifier::BaseApplication
|
|
20
20
|
|
21
21
|
def run_application
|
22
22
|
while true
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
code_change_activity
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
23
|
+
unless Rubiclifier::IdleDetector.is_idle?
|
24
|
+
is_first_run = is_first_run?
|
25
|
+
puts
|
26
|
+
puts("Querying API...")
|
27
|
+
all_code_changes = Api.current_api.all_code_changes
|
28
|
+
puts("Checking for notifications to display...")
|
29
|
+
all_activity = []
|
30
|
+
all_code_changes.each do |cc|
|
31
|
+
cc.code_change_activity.sort! { |a, b| a.created_at <=> b.created_at }
|
32
|
+
all_activity.concat(cc.code_change_activity)
|
33
|
+
end
|
34
|
+
all_activity.select(&:should_notify?).each do |code_change_activity|
|
35
|
+
code_change_activity.notified
|
36
|
+
unless is_first_run
|
37
|
+
puts("Notifying of change!")
|
38
|
+
CodeChangeNotification.new(code_change_activity).send
|
39
|
+
sleep(SECONDS_BETWEEN_NOTIFICATIONS)
|
40
|
+
end
|
39
41
|
end
|
40
42
|
end
|
41
43
|
sleep(SECONDS_BETWEEN_RUNS)
|
@@ -53,6 +55,7 @@ class CodeReviewNotifier < Rubiclifier::BaseApplication
|
|
53
55
|
[
|
54
56
|
Rubiclifier::Feature::BACKGROUND,
|
55
57
|
Rubiclifier::Feature::DATABASE,
|
58
|
+
Rubiclifier::Feature::IDLE_DETECTION,
|
56
59
|
Rubiclifier::Feature::NOTIFICATIONS
|
57
60
|
]
|
58
61
|
end
|
@@ -66,10 +69,6 @@ class CodeReviewNotifier < Rubiclifier::BaseApplication
|
|
66
69
|
]
|
67
70
|
end
|
68
71
|
|
69
|
-
def executable_name
|
70
|
-
"code_review_notifier"
|
71
|
-
end
|
72
|
-
|
73
72
|
def data_directory
|
74
73
|
"~/.code_review_notifier"
|
75
74
|
end
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: code_review_notifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle Grinstead
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
13
|
+
description:
|
14
14
|
email: kyleag@hey.com
|
15
15
|
executables:
|
16
16
|
- code_review_notifier
|
@@ -47,9 +47,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
requirements: []
|
50
|
-
rubyforge_project:
|
50
|
+
rubyforge_project:
|
51
51
|
rubygems_version: 2.7.6.2
|
52
|
-
signing_key:
|
52
|
+
signing_key:
|
53
53
|
specification_version: 4
|
54
54
|
summary: Get notifications when updates happen to patch sets/pull requests!
|
55
55
|
test_files: []
|