dug 1.0.2 → 1.0.3

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
  SHA1:
3
- metadata.gz: f086fce6becaf00bcb6685e6919ebabcf12b5ac9
4
- data.tar.gz: 64d6ab6b5695831c9d5c5083f57180f2b97d9e52
3
+ metadata.gz: 671e8403af18b4a6fa939e17e6e501839e641ba0
4
+ data.tar.gz: 6c5d5f7def9fb4c63591ac6cc45c541c5daf975a
5
5
  SHA512:
6
- metadata.gz: 26412d703a03fcc36f5ac639d23ab200f6d20071199de1e3defaee1c806dc98101e6a75f6a700d77cd790a937136b8cb1631ab888bda9183f26808d9b291ae8c
7
- data.tar.gz: 8d31c479b4bd39af0f4970e1f49c6e8d2a260352f1cdd3f1d49c9a34a3a2c72a797c69c8a4ef09b097b523e87815e2658e962bfeded8c84312aab7adeaf19ffb
6
+ metadata.gz: f854e38f6ddd3ee8e7071335e50ee57c7d54a3f9003369334ba8a6d4926fbeb7fcf61f06fd2aa848809053a53675286726e413c62bbfeea94542bbbb636d4a37
7
+ data.tar.gz: cfd05e94e1c2ab31b98fdf3e2ff9f49abb9e9b68c80a7ac25ddd1a1ba009579f1a11fac807ac57fd8bba79d6273498c148b38ddd18de9e701b2a6edda1fb972d
data/lib/dug.rb CHANGED
@@ -10,7 +10,7 @@ require "dug/util"
10
10
 
11
11
  module Dug
12
12
  LABEL_RULE_TYPES = %w(organization repository reason state)
13
- GITHUB_REASONS = %w(author comment mention team_mention state_change assign manual subscribed push)
13
+ GITHUB_REASONS = %w(author comment mention team_mention state_change assign manual subscribed push your_activity)
14
14
  ISSUE_STATES = %(merged closed reopened)
15
15
 
16
16
  def self.authorize!
@@ -9,6 +9,7 @@ module Dug
9
9
  attr_accessor :token_store
10
10
  attr_accessor :application_credentials_file
11
11
  attr_accessor :unprocessed_label_name
12
+ attr_accessor :processed_label_name
12
13
 
13
14
  def initialize
14
15
  @label_rules = {}
@@ -37,6 +38,10 @@ module Dug
37
38
  @unprocessed_label_name || "GitHub/Unprocessed"
38
39
  end
39
40
 
41
+ def processed_label_name
42
+ @processed_label_name ||= "GitHub"
43
+ end
44
+
40
45
  def rule_file
41
46
  @rule_file
42
47
  end
@@ -52,7 +52,7 @@ module Dug
52
52
  attr_reader :servicer
53
53
 
54
54
  def labels_to_add
55
- @labels_to_add ||= ["GitHub"]
55
+ @labels_to_add ||= [Dug.configuration.processed_label_name]
56
56
  end
57
57
 
58
58
  def labels_to_remove
@@ -33,6 +33,7 @@ module Dug
33
33
  @unprocessed_notifications = nil
34
34
  end
35
35
  unprocessed_label = servicer.labels(use_cache: use_cache)[Dug.configuration.unprocessed_label_name]
36
+ raise "Create the label '#{Dug.configuration.unprocessed_label_name}' on gmail" unless unprocessed_label
36
37
 
37
38
  # The reverse! is required because we want to process messages in order
38
39
  # and Google doesn't allow you to sort by anything because labels. Order
@@ -1,3 +1,3 @@
1
1
  module Dug
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dug
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Arcand
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-05 00:00:00.000000000 Z
11
+ date: 2016-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-api-client
@@ -191,4 +191,3 @@ specification_version: 4
191
191
  summary: "[D]amn yo[u], [G]mail. A gem to organize your GitHub notification emails
192
192
  in ways Gmail filters can't."
193
193
  test_files: []
194
- has_rdoc: