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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a2a39df5350d3ae528addf0baaebe5a122b1701b08e2e503afd9b0500910120c
4
- data.tar.gz: a8a277843eb2606251f8c6000cd25b2e11c60a94c69998046e59f5c0010c4489
3
+ metadata.gz: ee82fa5d39fe0144efe36f7d89e9f70434b237f3f71685425cef401e3e77e3c0
4
+ data.tar.gz: 26c3d95d95360ae4d2253cce58d8ae6eb7fcdf5d76241ba99622feceecf73e5b
5
5
  SHA512:
6
- metadata.gz: 519c4bf9ab0662a599eeef50e6e6bb637203f22c24a4cdc121bc94f28f239f856d9ff1380422259b67b64cb19554d18e76abb39ceabeb87ea408a9fde6398876
7
- data.tar.gz: ad11db916b235f4bc0aaca73aae01b36f38c222555a76004fa4ac7f7e34efa32bc4fb80768366536dfd29a6f56ac5ec0912c6ac7eb1be63e62c7e03cec44170b
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"
@@ -27,6 +27,6 @@
27
27
  module Chook
28
28
 
29
29
  ### The version of the Chook framework
30
- VERSION = '1.1.5b1'.freeze
30
+ VERSION = '1.1.5'.freeze
31
31
 
32
32
  end # module
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.5b1
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-13 00:00:00.000000000 Z
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: 1.3.1
184
+ version: '0'
185
185
  requirements: []
186
186
  rubygems_version: 3.0.3
187
187
  signing_key: