code_review_notifier 0.2.4 → 0.3.0

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/lib/code_review_notifier.rb +19 -16
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe98a79405c30d5a0ab08d8b8c3f0693cd1605fc81c413ddcfac136e52c54105
4
- data.tar.gz: 0a31a14ea309f530e8927962f109e8660c6d63a1bad7da504ca46091b01fba92
3
+ metadata.gz: 308e660e0f67acffeca0e216ed7ed61da80fd095053c980aef42ec958cd4896e
4
+ data.tar.gz: 909a4d189606fc053d8e08684873d79492adec0f2798b4cf2686e608e55b9025
5
5
  SHA512:
6
- metadata.gz: 89a05dabf9bb56d0e43cd6295ee64cfd01b114416b420b84cb8147876d047f66533d490820fecda9dea2858877a56ca61b1cc66f053e9b96f07aea952e257c71
7
- data.tar.gz: 9a2af8b575e1a47781820937fd47b8ee6bc7b2c4dbe5356a470aeb721a60eaa762961ab7b9d36bf53e7cd3c2063661bbca7bb4fc4f2c8088de0b7b11ecb424b2
6
+ metadata.gz: e329b52cc09b78df230a7ee383d0ad796a746cc6283a1704aadf38fedcaf5590a51b338036c369ff233d60541627229bdb0bfb39e124e636660c2c7dc5249b3f
7
+ data.tar.gz: 8bddaab17fbe6ce88db2f1b96f5f1a94fa06276bf616688319b9a1ec782dc0a99500fafb9549dd44bd730752909f1c4a4f9adfebffae5d659b29bfcdbbca4740
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", "1.2.0"
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
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.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Grinstead