chef-monitor 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/chef-monitor.gemspec +0 -1
- data/lib/chef_monitor/item.rb +6 -3
- data/lib/chef_monitor/itemlist.rb +4 -3
- data/lib/chef_monitor/version.rb +1 -1
- data/lib/chef_monitor/worker.rb +0 -1
- metadata +2 -18
data/.gitignore
CHANGED
data/chef-monitor.gemspec
CHANGED
data/lib/chef_monitor/item.rb
CHANGED
@@ -96,7 +96,8 @@ class Monitor
|
|
96
96
|
begin
|
97
97
|
item = rest.get_rest(object)
|
98
98
|
result = JSON.pretty_generate(item)
|
99
|
-
rescue
|
99
|
+
rescue Exception => e
|
100
|
+
Monitor::Log.new(e.message + ' with object: ' + @organization + "/" + object , 'ERROR')
|
100
101
|
return nil
|
101
102
|
end
|
102
103
|
return result
|
@@ -104,7 +105,7 @@ class Monitor
|
|
104
105
|
|
105
106
|
def commit(path)
|
106
107
|
current_dir = Dir.pwd
|
107
|
-
commit_dir = File.join(path, @organization
|
108
|
+
commit_dir = File.join(path, @organization)
|
108
109
|
Dir.chdir(commit_dir)
|
109
110
|
@version ? object = [@organization, @object, @name, @version].join('/') : object = [@organization, @object, @name].join('/')
|
110
111
|
text = "User : " + @user + "\nObject : " + object + "\nAction : " + @action + "\nLog Time : " + @time
|
@@ -121,7 +122,7 @@ class Monitor
|
|
121
122
|
|
122
123
|
def commit_nohook(path)
|
123
124
|
current_dir = Dir.pwd
|
124
|
-
commit_dir = File.join(path, @organization
|
125
|
+
commit_dir = File.join(path, @organization)
|
125
126
|
Dir.chdir(commit_dir)
|
126
127
|
%x(git config hooks.exclude true)
|
127
128
|
%x(git add .)
|
@@ -149,6 +150,8 @@ class Monitor
|
|
149
150
|
download.config[:latest] = true unless @version
|
150
151
|
download.config[:force] = true
|
151
152
|
result = (download.run())
|
153
|
+
file = File.join(download_dir, @name + "-" + @version, ".gitignore")
|
154
|
+
File.delete(file) if File.exist?(file)
|
152
155
|
self.path = download_dir
|
153
156
|
rescue Exception => e
|
154
157
|
return e
|
@@ -85,10 +85,11 @@ class Monitor
|
|
85
85
|
str[1..-1] if str[0] == '/'
|
86
86
|
end
|
87
87
|
|
88
|
-
def get_rest_item(
|
88
|
+
def get_rest_item(object)
|
89
89
|
begin
|
90
|
-
result = rest.get_rest(
|
91
|
-
rescue
|
90
|
+
result = rest.get_rest(object)
|
91
|
+
rescue Exception => e
|
92
|
+
Monitor::Log.new(e.message + ' with object: ' + @organization + "/" + object , 'ERROR')
|
92
93
|
return []
|
93
94
|
end
|
94
95
|
return result
|
data/lib/chef_monitor/version.rb
CHANGED
data/lib/chef_monitor/worker.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-monitor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-02-
|
12
|
+
date: 2014-02-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bunny
|
@@ -59,22 +59,6 @@ dependencies:
|
|
59
59
|
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 1.1.9
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: chef
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
|
-
requirements:
|
67
|
-
- - ! '>='
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: 10.0.0
|
70
|
-
type: :runtime
|
71
|
-
prerelease: false
|
72
|
-
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
|
-
requirements:
|
75
|
-
- - ! '>='
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: 10.0.0
|
78
62
|
description: Chef Monitoring tool to monitor all changes made
|
79
63
|
email:
|
80
64
|
- sander.botman@gmail.com
|