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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe98a79405c30d5a0ab08d8b8c3f0693cd1605fc81c413ddcfac136e52c54105
4
- data.tar.gz: 0a31a14ea309f530e8927962f109e8660c6d63a1bad7da504ca46091b01fba92
3
+ metadata.gz: 90c7501938ba671fa4c5bec089c31206032ea038cb4fc2a353fd18f0b3e25e3f
4
+ data.tar.gz: 2856c54344f0db493f7cab42a2349d8d0228b089316238ed43932ff0d1eea165
5
5
  SHA512:
6
- metadata.gz: 89a05dabf9bb56d0e43cd6295ee64cfd01b114416b420b84cb8147876d047f66533d490820fecda9dea2858877a56ca61b1cc66f053e9b96f07aea952e257c71
7
- data.tar.gz: 9a2af8b575e1a47781820937fd47b8ee6bc7b2c4dbe5356a470aeb721a60eaa762961ab7b9d36bf53e7cd3c2063661bbca7bb4fc4f2c8088de0b7b11ecb424b2
6
+ metadata.gz: 3571a987b11a3f61a5450c9557c2cb46e8cfb1f68d7b943054356d2e0ed2f2ab569dff0dce94f40c82d0259d8d40e6e9622fbf62617441caaa9c0aa40a85e5b3
7
+ data.tar.gz: b3a060f55b34b4d7839e30c0d45a4bc137b36843b6448a25a59ecf5cf8155b69a0cd4fd270e7837d26c1788ee4d8ee1c2a76269ab723634605f5a1cbf33009c2
data/Gemfile CHANGED
@@ -2,4 +2,4 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem "rubiclifier", "1.0.0"
5
+ gem "rubiclifier", "2.1.2"
@@ -2,4 +2,4 @@
2
2
 
3
3
  require_relative "../lib/code_review_notifier.rb"
4
4
 
5
- CodeReviewNotifier.new(ARGV).call
5
+ CodeReviewNotifier.new(ARGV, __FILE__.split("/").last).call
@@ -20,22 +20,24 @@ class CodeReviewNotifier < Rubiclifier::BaseApplication
20
20
 
21
21
  def run_application
22
22
  while true
23
- is_first_run = is_first_run?
24
- puts
25
- puts("Querying API...")
26
- all_code_changes = Api.current_api.all_code_changes
27
- puts("Checking for notifications to display...")
28
- all_activity = []
29
- all_code_changes.each do |cc|
30
- cc.code_change_activity.sort! { |a, b| a.created_at <=> b.created_at }
31
- all_activity.concat(cc.code_change_activity)
32
- end
33
- all_activity.select(&:should_notify?).each do |code_change_activity|
34
- code_change_activity.notified
35
- unless is_first_run
36
- puts("Notifying of change!")
37
- CodeChangeNotification.new(code_change_activity).send
38
- sleep(SECONDS_BETWEEN_NOTIFICATIONS)
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.2.4
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-10 00:00:00.000000000 Z
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: []