yggdrasil 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +1 -1
- data/lib/yggdrasil/update.rb +0 -1
- data/lib/yggdrasil/version.rb +1 -1
- data/lib/yggdrasil.rb +0 -1
- data/lib/yggdrasil_server/results.rb +1 -0
- data/spec/check_spec.rb +15 -9
- data/spec/server_results_spec.rb +3 -2
- metadata +4 -4
data/README.md
CHANGED
@@ -63,7 +63,7 @@ Prepare yggdrasil client to report check results to yggdrasil server, every day:
|
|
63
63
|
|
64
64
|
$ crontab -e
|
65
65
|
add following line(you should check path by 'which ygg')
|
66
|
-
17 5 * * * $GEMPATH/ygg check
|
66
|
+
17 5 * * * $GEMPATH/ygg check --non-interactive
|
67
67
|
|
68
68
|
Check updates of configurations/conditions on host:$YGG_SERVER:
|
69
69
|
|
data/lib/yggdrasil/update.rb
CHANGED
data/lib/yggdrasil/version.rb
CHANGED
data/lib/yggdrasil.rb
CHANGED
@@ -100,7 +100,6 @@ class Yggdrasil
|
|
100
100
|
elsif File.file?("/#{file}")
|
101
101
|
if !File.exist?("#@mirror_dir/#{file}")
|
102
102
|
cmd = "#@svn revert #{file}"
|
103
|
-
cmd += username_password_options_to_read_repo
|
104
103
|
system3 cmd
|
105
104
|
end
|
106
105
|
#FileUtils.copy_file "/#{file}", "#@mirror_dir/#{file}"
|
data/spec/check_spec.rb
CHANGED
@@ -86,8 +86,9 @@ EOS
|
|
86
86
|
|
87
87
|
cmd = %w{check --username hoge --password foo --non-interactive}
|
88
88
|
out = catch_out {Yggdrasil.command(cmd, "Y\n")}
|
89
|
+
out.gsub! /[ ]+/, ' '
|
89
90
|
out.should == <<"EOS"
|
90
|
-
A
|
91
|
+
A 0 tmp/yggdrasil-test/.yggdrasil/checker_result/hoge
|
91
92
|
|
92
93
|
Index: tmp/yggdrasil-test/.yggdrasil/checker_result/hoge
|
93
94
|
===================================================================
|
@@ -117,11 +118,12 @@ EOS
|
|
117
118
|
`rm -f /tmp/yggdrasil-test/.yggdrasil/checker/hoge`
|
118
119
|
cmd = %w{check --username hoge --password foo}
|
119
120
|
out = catch_out {Yggdrasil.command(cmd, "Y\n")}
|
121
|
+
out.gsub! /[ ]+/, ' '
|
120
122
|
out.should == <<"EOS"
|
121
123
|
|
122
124
|
0:D tmp/yggdrasil-test/.yggdrasil/checker_result/hoge
|
123
125
|
OK? [Y|n|<num to diff>]:
|
124
|
-
D
|
126
|
+
D 4 tmp/yggdrasil-test/.yggdrasil/checker_result/hoge
|
125
127
|
|
126
128
|
Index: tmp/yggdrasil-test/.yggdrasil/checker_result/hoge
|
127
129
|
===================================================================
|
@@ -183,11 +185,13 @@ EOS
|
|
183
185
|
files = Dir.entries('/tmp/yggdrasil-test/.yggdrasil/results')
|
184
186
|
result_files = files.select{|file| %r{^#{Socket.gethostname}} =~ file}
|
185
187
|
result_files.size.should == 1
|
186
|
-
`cat /tmp/yggdrasil-test/.yggdrasil/results/#{result_files[0]}
|
187
|
-
|
188
|
-
|
189
|
-
A
|
190
|
-
A
|
188
|
+
out = `cat /tmp/yggdrasil-test/.yggdrasil/results/#{result_files[0]}`
|
189
|
+
out.gsub! /[ ]+/, ' '
|
190
|
+
out.should == <<"EOS"
|
191
|
+
A 0 tmp
|
192
|
+
A 0 tmp/yggdrasil-test
|
193
|
+
A 0 tmp/yggdrasil-test/.yggdrasil
|
194
|
+
A 0 tmp/yggdrasil-test/.yggdrasil/checker_result
|
191
195
|
|
192
196
|
EOS
|
193
197
|
end
|
@@ -205,8 +209,10 @@ EOS
|
|
205
209
|
|
206
210
|
files = Dir.entries('/tmp/yggdrasil-test/.yggdrasil/results')
|
207
211
|
result_files = files.select{|file| %r{^#{Socket.gethostname}} =~ file}
|
208
|
-
`cat /tmp/yggdrasil-test/.yggdrasil/results/#{result_files[0]}
|
209
|
-
|
212
|
+
out = `cat /tmp/yggdrasil-test/.yggdrasil/results/#{result_files[0]}`
|
213
|
+
out.gsub! /[ ]+/, ' '
|
214
|
+
out.should == <<"EOS"
|
215
|
+
M 2 tmp/yggdrasil-test/A
|
210
216
|
|
211
217
|
Index: tmp/yggdrasil-test/A
|
212
218
|
===================================================================
|
data/spec/server_results_spec.rb
CHANGED
@@ -63,11 +63,12 @@ describe YggdrasilServer, 'results' do
|
|
63
63
|
out = catch_out do
|
64
64
|
lambda{YggdrasilServer.command(%w{results --expire 30})}.should raise_error(SystemExit)
|
65
65
|
end
|
66
|
-
|
66
|
+
out.gsub! /[ ]+/, ' '
|
67
67
|
out.should == <<"EOS"
|
68
68
|
######## hoge-old: last check is too old: 2001-05-01 00:00:00 +0900
|
69
|
+
|
69
70
|
######## #{Socket.gethostname}_127.0.0.1 Mismatch:
|
70
|
-
M
|
71
|
+
M 2 tmp/yggdrasil-test/A
|
71
72
|
|
72
73
|
Index: tmp/yggdrasil-test/A
|
73
74
|
===================================================================
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yggdrasil
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
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: 2013-02-
|
12
|
+
date: 2013-02-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -116,7 +116,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
116
116
|
version: '0'
|
117
117
|
segments:
|
118
118
|
- 0
|
119
|
-
hash:
|
119
|
+
hash: 1459074757574721274
|
120
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
121
|
none: false
|
122
122
|
requirements:
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
version: '0'
|
126
126
|
segments:
|
127
127
|
- 0
|
128
|
-
hash:
|
128
|
+
hash: 1459074757574721274
|
129
129
|
requirements: []
|
130
130
|
rubyforge_project:
|
131
131
|
rubygems_version: 1.8.25
|