hookworm-handlers 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/hookworm-annotator +1 -3
- data/bin/hookworm-build-index-handler +1 -3
- data/bin/hookworm-logging-handler +1 -3
- data/bin/hookworm-rogue-commit-handler +1 -3
- data/hookworm-handlers.gemspec +0 -1
- data/lib/hookworm/annotator.rb +3 -2
- data/lib/hookworm/build_index_handler.rb +3 -2
- data/lib/hookworm/handlers/version.rb +1 -1
- data/lib/hookworm/logging_handler.rb +3 -2
- data/lib/hookworm/rogue_commit_handler.rb +10 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61221e9f79a523de8c5cfed29b84f5e095e3e693
|
4
|
+
data.tar.gz: 4ebd7d6558808ef526a4d65316c65f7905b0f782
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8ab68e87cd5fdece07e421ddf63de839dc1ae0443df8fd3d966b2821cdf39c15085dc4dc862ae27e853806087442af32fa236d194824db861cc4b045c5fe85f
|
7
|
+
data.tar.gz: 6644ba27fe9bc3cb852aff3c6827b22b930781c755d4061930f3542142d0b1cb4361e48679ce55cd0f90dd014687c471c206007427fbcccc7825c01ff58b788d
|
data/bin/hookworm-annotator
CHANGED
data/hookworm-handlers.gemspec
CHANGED
data/lib/hookworm/annotator.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
require 'English'
|
3
2
|
require 'json'
|
4
3
|
require 'hookworm-base'
|
5
4
|
require_relative 'github_payload_annotator'
|
@@ -47,3 +46,5 @@ module Hookworm
|
|
47
46
|
end
|
48
47
|
end
|
49
48
|
end
|
49
|
+
|
50
|
+
exit Hookworm::Annotator.new.run!(ARGV) if $PROGRAM_NAME == __FILE__
|
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
require 'English'
|
3
2
|
require 'erb'
|
4
3
|
require 'json'
|
5
4
|
require 'net/smtp'
|
@@ -75,10 +74,11 @@ module Hookworm
|
|
75
74
|
end
|
76
75
|
|
77
76
|
class Judger
|
78
|
-
attr_reader :cfg
|
77
|
+
attr_reader :cfg, :env
|
79
78
|
|
80
|
-
def initialize(cfg)
|
79
|
+
def initialize(cfg, env = ENV)
|
81
80
|
@cfg = cfg
|
81
|
+
@env = env
|
82
82
|
end
|
83
83
|
|
84
84
|
def judge_payload(payload)
|
@@ -181,7 +181,10 @@ module Hookworm
|
|
181
181
|
end
|
182
182
|
|
183
183
|
def emailer
|
184
|
-
@emailer ||= Hookworm::Emailer.new(
|
184
|
+
@emailer ||= Hookworm::Emailer.new(
|
185
|
+
env['HOOKWORM_EMAIL_URI'] || cfg[:worm_flags][:email_uri],
|
186
|
+
env['HOOKWORM_EMAIL_HELO'] || 'localhost'
|
187
|
+
)
|
185
188
|
end
|
186
189
|
|
187
190
|
def log_rogue_commit(payload)
|
@@ -238,3 +241,5 @@ module Hookworm
|
|
238
241
|
end
|
239
242
|
end
|
240
243
|
end
|
244
|
+
|
245
|
+
exit Hookworm::RogueCommitHandler.new.run!(ARGV) if $PROGRAM_NAME == __FILE__
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hookworm-handlers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Buch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|