chef-deployment-monitor 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZWE3YjZhYWE5MWI5OTQ0ZjQ4MmJlZmVhMTlkZTc3MzM4YzZiZWM1ZQ==
4
+ NDFkZmRiMTBmZTMyYTYzOTQwMjlkNmQ3MDI3YmYwMjRlNjczMjc2NA==
5
5
  data.tar.gz: !binary |-
6
- ZDRiYTBmNzlhYTJjMTE4MjYxOTc0MDE2OTc3MmQ2MDY0MzRkMjRlMw==
6
+ ZjIwNzgyMmQ1MWYzZGM5YzAyZmM1NzUxZWI2MTA1YjA3YzYyNWMyMQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NzAzMWEzZTY5ZjBlZGM0YzdiN2QyZmQxNTM1MDk4ZTQzN2NiMzIwZmJlM2Q0
10
- MGFjNmNlM2RjN2FkOTRlM2FmYTJmZTAxY2Q2NmJhMmQzZjRhMjkwZDFhMzc1
11
- MmE0Y2YyMmZlNjc0YTUwMjNlZDRlYjlmYmZjOGE0MjI0ZTQ4NDM=
9
+ MzQ1Y2U4OTI3NjAxZGNkYTBmZjE1ZDc0NjU2OTk1ZTllODIyNWUxZTRhMGRk
10
+ NzI1MDAzMzdmNjYyZDFhMWRlNTcxZTU0ZjFiNWQzZWE2ZWRjZDJlMTk1ZDVj
11
+ ZGI4YjMyZDE0MDM2NmE2ZjdlZDIyNDc4NjAxYzBlY2NhZDI1ODA=
12
12
  data.tar.gz: !binary |-
13
- YTlhNmFkYWRmOGQ0ZWJkZjZkY2VjOGQ5OTNlZjA0YzBkODY3YzMxYWRkNzQ1
14
- MzEyOGJlNjlkMzFmZjMxMDZhNjM4NjkzYTc5ZTA2MGIzMzNkMmMxMzhiMTkz
15
- YTY3ZTBiZDBhNTNiMjlhNTViYTA5NzlhM2Q5NTYwMDNmYTEwZjg=
13
+ YTBlNDg4NjNlMzE3MzNmZjJmY2M0YzY5YTA0MDA4NDFhYThlNzM5MjlkNmFj
14
+ YTdlOWM3ZDcwZmY4NGIyOGRhM2Q0Yjk3MTk3N2VkYzQ4ODlmYTdhYmZkMmY0
15
+ NDc4MzQ0ODliNTc0NWQwZjMyZWFlYWJjZTU1ZDE5NWFlOGI0ODA=
@@ -15,6 +15,8 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
 
18
+ require 'date'
19
+
18
20
  class Chef
19
21
  class Deployment
20
22
  class Monitor
@@ -29,6 +31,7 @@ class Chef
29
31
  mon.backward(1)
30
32
  mon.tail do |line|
31
33
  data = scan(line)
34
+ data = format(data)
32
35
  # skipping the objects 'checksum-.*' and 'reports'
33
36
  unless data.nil? || data['org'].nil? || data['object'] =~ /(^checksum-.*$|^reports$)/
34
37
  unless filter(data)
@@ -41,6 +44,13 @@ class Chef
41
44
  end
42
45
  end
43
46
 
47
+ def format(data)
48
+ # convert to timestamp
49
+ data_dup = data.dup
50
+ data_dup['time'] = DateTime.strptime(data['time'], '%d/%b/%C:%T %z').to_time.to_i
51
+ data_dup
52
+ end
53
+
44
54
  def filter(data)
45
55
  filter_user(data) || filter_action(data)
46
56
  end
@@ -18,7 +18,7 @@
18
18
  class Chef
19
19
  class Deployment
20
20
  class Monitor
21
- VERSION = '0.3.0'
21
+ VERSION = '0.3.1'
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.3.0
4
+ version: 0.3.1
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: 2015-07-29 00:00:00.000000000 Z
12
+ date: 2015-07-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: file-tail