dug 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -1
- data/dug.gemspec +0 -1
- data/lib/dug.rb +2 -1
- data/lib/dug/configurator.rb +3 -4
- data/lib/dug/util.rb +12 -0
- data/lib/dug/version.rb +1 -1
- metadata +5 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f086fce6becaf00bcb6685e6919ebabcf12b5ac9
|
4
|
+
data.tar.gz: 64d6ab6b5695831c9d5c5083f57180f2b97d9e52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26412d703a03fcc36f5ac639d23ab200f6d20071199de1e3defaee1c806dc98101e6a75f6a700d77cd790a937136b8cb1631ab888bda9183f26808d9b291ae8c
|
7
|
+
data.tar.gz: 8d31c479b4bd39af0f4970e1f49c6e8d2a260352f1cdd3f1d49c9a34a3a2c72a797c69c8a4ef09b097b523e87815e2658e962bfeded8c84312aab7adeaf19ffb
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,10 @@
|
|
1
1
|
### Unreleased
|
2
2
|
[Full Changelog](http://github.com/chrisarcand/dug/compare/v1.0.1...master)
|
3
3
|
|
4
|
-
|
4
|
+
* Removed ActiveSupport dependency with an in-house pluralization implementation in a new
|
5
|
+
Util module.
|
6
|
+
Issue: https://github.com/chrisarcand/dug/issues/14
|
7
|
+
PR: https://github.com/chrisarcand/dug/pull/18
|
5
8
|
|
6
9
|
### 1.0.0 / 2016-03-11
|
7
10
|
[Full Changelog](http://github.com/chrisarcand/dug/compare/v1.0.0...v1.0.1)
|
data/dug.gemspec
CHANGED
@@ -20,7 +20,6 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
22
|
spec.add_dependency "google-api-client", "~> 0.9"
|
23
|
-
spec.add_dependency "activesupport", ">= 2.2.1"
|
24
23
|
|
25
24
|
spec.add_development_dependency "bundler", "~> 1.11"
|
26
25
|
spec.add_development_dependency "rake", "~> 10.0"
|
data/lib/dug.rb
CHANGED
@@ -6,10 +6,11 @@ require "dug/logger"
|
|
6
6
|
require "dug/message_processor"
|
7
7
|
require "dug/notification_decorator"
|
8
8
|
require "dug/runner"
|
9
|
+
require "dug/util"
|
9
10
|
|
10
11
|
module Dug
|
11
12
|
LABEL_RULE_TYPES = %w(organization repository reason state)
|
12
|
-
GITHUB_REASONS = %w(author comment mention team_mention state_change assign manual subscribed)
|
13
|
+
GITHUB_REASONS = %w(author comment mention team_mention state_change assign manual subscribed push)
|
13
14
|
ISSUE_STATES = %(merged closed reopened)
|
14
15
|
|
15
16
|
def self.authorize!
|
data/lib/dug/configurator.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'yaml'
|
2
|
-
require 'active_support/inflector'
|
3
2
|
|
4
3
|
module Dug
|
5
4
|
class Configurator
|
@@ -14,7 +13,7 @@ module Dug
|
|
14
13
|
def initialize
|
15
14
|
@label_rules = {}
|
16
15
|
LABEL_RULE_TYPES.each do |type|
|
17
|
-
label_rules[
|
16
|
+
label_rules[Util.pluralize(type)] = {}
|
18
17
|
end
|
19
18
|
end
|
20
19
|
|
@@ -52,7 +51,7 @@ module Dug
|
|
52
51
|
type = type.to_s
|
53
52
|
run_validations(type, name)
|
54
53
|
|
55
|
-
rule = label_rules[
|
54
|
+
rule = label_rules[Util.pluralize(type)][name]
|
56
55
|
case rule
|
57
56
|
when String, nil
|
58
57
|
rule
|
@@ -91,7 +90,7 @@ module Dug
|
|
91
90
|
loaded_rules = YAML.load_file(rule_file)
|
92
91
|
|
93
92
|
LABEL_RULE_TYPES.each do |type|
|
94
|
-
type =
|
93
|
+
type = Util.pluralize(type)
|
95
94
|
@label_rules[type] = loaded_rules[type] if loaded_rules[type]
|
96
95
|
end
|
97
96
|
|
data/lib/dug/util.rb
ADDED
data/lib/dug/version.rb
CHANGED
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.
|
4
|
+
version: 1.0.2
|
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-
|
11
|
+
date: 2016-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-api-client
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.9'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: activesupport
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 2.2.1
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 2.2.1
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: bundler
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -176,6 +162,7 @@ files:
|
|
176
162
|
- lib/dug/message_processor.rb
|
177
163
|
- lib/dug/notification_decorator.rb
|
178
164
|
- lib/dug/runner.rb
|
165
|
+
- lib/dug/util.rb
|
179
166
|
- lib/dug/validations.rb
|
180
167
|
- lib/dug/version.rb
|
181
168
|
homepage: https://github.com/chrisarcand/dug
|
@@ -198,9 +185,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
198
185
|
version: '0'
|
199
186
|
requirements: []
|
200
187
|
rubyforge_project:
|
201
|
-
rubygems_version: 2.
|
188
|
+
rubygems_version: 2.6.3
|
202
189
|
signing_key:
|
203
190
|
specification_version: 4
|
204
191
|
summary: "[D]amn yo[u], [G]mail. A gem to organize your GitHub notification emails
|
205
192
|
in ways Gmail filters can't."
|
206
193
|
test_files: []
|
194
|
+
has_rdoc:
|