chef-deployment-monitor 0.6.1 → 1.0.0

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: 8e0dd1cc1293c4efbdff1e5a360ab117f259b9c6
4
- data.tar.gz: 52d1f71a55bf757a9d6fb17e8884df5c07fbe006
3
+ metadata.gz: 878cf5d20b8ce0505205f07f679b8532c0e3fe10
4
+ data.tar.gz: 31206a5a68bff4f37ba8b0e564e574e30e419496
5
5
  SHA512:
6
- metadata.gz: 382b2a4393f2b9555161ed5c0f3bc1ba7e777dc991bc069db4702e2b5c42fddfc82d40e913dccafc5603a5b00c579d9ec08efc456d3191fe4bcd6f487c5d04f0
7
- data.tar.gz: 22b8ec84580a9ab248375b2a5574ef884162fd375c1074608b69977cd7d6ce2467f1fd20f6215473046e0f30db2470572e34e9654cc389a8a7b0e5a11f4af3a9
6
+ metadata.gz: ea7bde4f69f7aa531c021f9ad3b234c852bb83e1740f905b3b71b158e7a91d0e4d06bb3253015b5c11d876815c3c02f1e10e5c4f5e098d7d0214e78470629330
7
+ data.tar.gz: c9f178524f05478e4dc38ae7cf92ded5b7e3b2266ff2d3adffe98cbd4e5c68fe6ccff61b56c10af835e7c9226b3b3539b20919e1a62d405d77d8014a66edb430
@@ -24,12 +24,9 @@ class Chef
24
24
  extend Mixlib::Config
25
25
  config_strict_mode true
26
26
 
27
+ default :blacklisted?, Proc.new { |data| false }
27
28
  default :marker_file, '/tmp/last_chef_deployment'
28
- default :action_blacklist, /GET/
29
29
  %w(
30
- user_blacklist
31
- object_blacklist
32
- org_blacklist
33
30
  mon_file
34
31
  log_dir
35
32
  pid_dir
@@ -63,27 +63,7 @@ class Chef
63
63
  end
64
64
 
65
65
  def filter(data)
66
- filter_user(data) || filter_action(data) || filter_object(data) || filter_org(data)
67
- end
68
-
69
- def filter_user(data)
70
- user_blacklist = Monitor::Config[:user_blacklist]
71
- user_blacklist && (data['user'] =~ user_blacklist)
72
- end
73
-
74
- def filter_object(data)
75
- object_blacklist = Monitor::Config[:object_blacklist]
76
- object_blacklist && (data['object'] =~ object_blacklist)
77
- end
78
-
79
- def filter_org(data)
80
- org_blacklist = Monitor::Config[:org_blacklist]
81
- org_blacklist && (data['org'] =~ org_blacklist)
82
- end
83
-
84
- def filter_action(data)
85
- action_blacklist = Monitor::Config[:action_blacklist]
86
- action_blacklist && (data['action'] =~ action_blacklist)
66
+ Monitor::Config[:blacklisted?].call(data)
87
67
  end
88
68
 
89
69
  def scan(line)
@@ -18,7 +18,7 @@
18
18
  class Chef
19
19
  class Deployment
20
20
  class Monitor
21
- VERSION = '0.6.1'
21
+ VERSION = '1.0.0'
22
22
  MAJOR, MINOR, TINY = VERSION.split('.')
23
23
  end
24
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-deployment-monitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sander Botman
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-05-27 00:00:00.000000000 Z
12
+ date: 2016-06-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: file-tail
@@ -129,4 +129,3 @@ signing_key:
129
129
  specification_version: 4
130
130
  summary: Chef Monitoring tool to monitor all changes made
131
131
  test_files: []
132
- has_rdoc: false