chook 1.1.5b1 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chook/event/handled_event/handlers.rb +9 -0
- data/lib/chook/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee82fa5d39fe0144efe36f7d89e9f70434b237f3f71685425cef401e3e77e3c0
|
4
|
+
data.tar.gz: 26c3d95d95360ae4d2253cce58d8ae6eb7fcdf5d76241ba99622feceecf73e5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e01538dfdeae7eab7a338d4ee979ab8d69c0e4d04b9dda69e8815c49c39d38a3943afc3b90df3c3ea96c4c9330e33f0996bec1bf2bffa49286ae1f799e9dcfe3
|
7
|
+
data.tar.gz: dc949d58fe469d841803347a5841ee0d458f5510c634a52c1a2cd117db068638cb3b7b9300dd5ea90b91f4ec04b52cddf53aae610563374c1592d61911e3a479
|
@@ -68,6 +68,9 @@ module Chook
|
|
68
68
|
# The Handlers namespace module
|
69
69
|
module Handlers
|
70
70
|
|
71
|
+
# Don't load any handlers whose filenames start with this
|
72
|
+
DO_NOT_LOAD_PREFIX = 'Ignore-'.freeze
|
73
|
+
|
71
74
|
DEFAULT_HANDLER_DIR = '/Library/Application Support/Chook'.freeze
|
72
75
|
|
73
76
|
# Handlers that are only called by name using the route:
|
@@ -191,6 +194,9 @@ module Chook
|
|
191
194
|
Chook.logger.info "#{load_type} general handlers from directory: #{handler_dir}"
|
192
195
|
if handler_dir.directory? && handler_dir.readable?
|
193
196
|
handler_dir.children.each do |handler_file|
|
197
|
+
# ignore if marked to
|
198
|
+
next if handler_file.basename.to_s.start_with? DO_NOT_LOAD_PREFIX
|
199
|
+
|
194
200
|
load_general_handler(handler_file) if handler_file.file? && handler_file.readable?
|
195
201
|
end
|
196
202
|
Chook.logger.info handlers.empty? ? 'No general handlers found' : "Loaded #{handlers.values.flatten.size} general handlers for #{handlers.keys.size} event triggers"
|
@@ -202,6 +208,9 @@ module Chook
|
|
202
208
|
Chook.logger.info "#{load_type} named handlers from directory: #{named_handler_dir}"
|
203
209
|
if named_handler_dir.directory? && named_handler_dir.readable?
|
204
210
|
named_handler_dir.children.each do |handler_file|
|
211
|
+
# ignore if marked to
|
212
|
+
next if handler_file.basename.to_s.start_with? DO_NOT_LOAD_PREFIX
|
213
|
+
|
205
214
|
load_named_handler(handler_file) if handler_file.file? && handler_file.readable?
|
206
215
|
end
|
207
216
|
Chook.logger.info "Loaded #{named_handlers.size} named handlers"
|
data/lib/chook/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Lasell
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-12-
|
12
|
+
date: 2020-12-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sinatra
|
@@ -179,9 +179,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
179
179
|
version: '0'
|
180
180
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
181
181
|
requirements:
|
182
|
-
- - "
|
182
|
+
- - ">="
|
183
183
|
- !ruby/object:Gem::Version
|
184
|
-
version:
|
184
|
+
version: '0'
|
185
185
|
requirements: []
|
186
186
|
rubygems_version: 3.0.3
|
187
187
|
signing_key:
|