yore 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +5 -0
- data/LICENSE +23 -0
- data/Rakefile +64 -57
- data/VERSION +1 -0
- data/bin/yore +6 -11
- data/lib/yore/yore_core.rb +70 -43
- data/notes.txt +27 -0
- data/test/S3_test.rb +2 -5
- data/test/test_helper.rb +10 -0
- data/test/test_job_b.xml +1 -1
- data/test/yore_browsercms_loadsave_test.rb +191 -0
- data/test/{loadsave_yore_test.rb → yore_spree_loadsave_test.rb} +9 -10
- data/test/yore_test.rb +1 -4
- data/test.crontab +5 -0
- data/yore.vpj +120 -0
- data/yore.vpw +6 -0
- metadata +38 -82
- data/History.txt +0 -22
- data/Manifest.txt +0 -26
- data/PostInstall.txt +0 -7
- data/lib/ihl_ruby/config.rb +0 -202
- data/lib/ihl_ruby/database_utils.rb +0 -89
- data/lib/ihl_ruby/enum.rb +0 -50
- data/lib/ihl_ruby/extend_base_classes.rb +0 -319
- data/lib/ihl_ruby/logging.rb +0 -159
- data/lib/ihl_ruby/misc_utils.rb +0 -382
- data/lib/ihl_ruby/shell_extras.rb +0 -84
- data/lib/ihl_ruby/string_utils.rb +0 -53
- data/lib/ihl_ruby/xml_utils.rb +0 -177
- data/lib/yore.orig.rb +0 -6
- data/script/console +0 -10
- data/script/destroy +0 -14
- data/script/generate +0 -14
data/.document
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
Copyright (c) 2008-2009 Gary McGhee - Buzzware Solutions, Western Australia - gary@buzzware.com.au
|
2
|
+
|
3
|
+
MIT Licence
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
|
+
|
data/Rakefile
CHANGED
@@ -1,57 +1,64 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'rake
|
3
|
-
|
4
|
-
|
5
|
-
require
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
end
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "yore"
|
8
|
+
gem.summary = %Q{yore (as in "days of yore") is a user data management utility for web applications.}
|
9
|
+
gem.description = %Q{yore (as in "days of yore") is a user data management utility for web applications.}
|
10
|
+
gem.email = "contact@buzzware.com.au"
|
11
|
+
gem.homepage = "http://github.com/buzzware/yore"
|
12
|
+
gem.authors = ["buzzware"]
|
13
|
+
gem.rubyforge_project = "buzzware"
|
14
|
+
gem.add_dependency('buzzcore', '>= 0.2.5')
|
15
|
+
gem.add_development_dependency "thoughtbot-shoulda"
|
16
|
+
#gem.files.include %w(
|
17
|
+
# lib/buzzcore.rb
|
18
|
+
#)
|
19
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
20
|
+
end
|
21
|
+
Jeweler::RubyforgeTasks.new do |rubyforge|
|
22
|
+
rubyforge.doc_task = "rdoc"
|
23
|
+
end
|
24
|
+
rescue LoadError
|
25
|
+
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
26
|
+
end
|
27
|
+
|
28
|
+
require 'rake/testtask'
|
29
|
+
Rake::TestTask.new(:test) do |test|
|
30
|
+
test.libs << 'lib' << 'test'
|
31
|
+
test.pattern = 'test/**/*_test.rb'
|
32
|
+
test.verbose = true
|
33
|
+
end
|
34
|
+
|
35
|
+
begin
|
36
|
+
require 'rcov/rcovtask'
|
37
|
+
Rcov::RcovTask.new do |test|
|
38
|
+
test.libs << 'test'
|
39
|
+
test.pattern = 'test/**/*_test.rb'
|
40
|
+
test.verbose = true
|
41
|
+
end
|
42
|
+
rescue LoadError
|
43
|
+
task :rcov do
|
44
|
+
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
task :test => :check_dependencies
|
49
|
+
|
50
|
+
task :default => :test
|
51
|
+
|
52
|
+
require 'rake/rdoctask'
|
53
|
+
Rake::RDocTask.new do |rdoc|
|
54
|
+
if File.exist?('VERSION')
|
55
|
+
version = File.read('VERSION')
|
56
|
+
else
|
57
|
+
version = ""
|
58
|
+
end
|
59
|
+
|
60
|
+
rdoc.rdoc_dir = 'rdoc'
|
61
|
+
rdoc.title = "yore #{version}"
|
62
|
+
rdoc.rdoc_files.include('README*')
|
63
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
64
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.5
|
data/bin/yore
CHANGED
@@ -3,15 +3,9 @@
|
|
3
3
|
require 'fileutils'
|
4
4
|
|
5
5
|
require 'rubygems'
|
6
|
-
gem '
|
7
|
-
require_paths '.','../../..'
|
8
|
-
|
6
|
+
gem 'buzzware-buzzcore'; require 'buzzcore';
|
9
7
|
gem 'cmdparse'; require 'cmdparse'
|
10
8
|
|
11
|
-
require 'ihl_ruby/misc_utils'
|
12
|
-
require 'ihl_ruby/xml_utils'
|
13
|
-
require 'ihl_ruby/extend_base_classes'
|
14
|
-
|
15
9
|
require 'yore/yore_core'
|
16
10
|
|
17
11
|
CMD_OPTIONS = {} # options given on command line
|
@@ -23,10 +17,11 @@ def command(aParser,aController,aAction,aShortDescription=nil,aOptionParser=nil,
|
|
23
17
|
c.description = aOther[:description] if aOther[:description]
|
24
18
|
c.options = aOptionParser if aOptionParser
|
25
19
|
c.set_execution_block do |args|
|
26
|
-
if
|
27
|
-
|
28
|
-
|
29
|
-
|
20
|
+
CMD_OPTIONS[:config] = args.first if aAction == :backup
|
21
|
+
CMD_OPTIONS[:config] = 'yore.config.xml' if !CMD_OPTIONS[:config] && File.exists?('yore.config.xml')
|
22
|
+
aController.configure(CMD_OPTIONS[:config],CMD_OPTIONS) unless CMD_OPTIONS.empty?
|
23
|
+
|
24
|
+
aController.do_action(aAction,args)
|
30
25
|
end
|
31
26
|
aParser.add_command(c)
|
32
27
|
end
|
data/lib/yore/yore_core.rb
CHANGED
@@ -1,20 +1,9 @@
|
|
1
1
|
require 'rubygems'
|
2
|
-
gem '
|
3
|
-
require_paths '.','..'
|
4
|
-
|
2
|
+
gem 'buzzware-buzzcore'; require 'buzzcore';
|
5
3
|
|
6
4
|
require 'fileutils'
|
7
5
|
require 'net/smtp'
|
8
6
|
|
9
|
-
require 'ihl_ruby/misc_utils'
|
10
|
-
require 'ihl_ruby/logging'
|
11
|
-
require 'ihl_ruby/string_utils'
|
12
|
-
require 'ihl_ruby/xml_utils'
|
13
|
-
require 'ihl_ruby/extend_base_classes'
|
14
|
-
require 'ihl_ruby/shell_extras'
|
15
|
-
require 'ihl_ruby/config'
|
16
|
-
require 'ihl_ruby/database_utils'
|
17
|
-
|
18
7
|
THIS_FILE = File.expand_path(__FILE__)
|
19
8
|
THIS_DIR = File.dirname(THIS_FILE)
|
20
9
|
|
@@ -156,11 +145,20 @@ module YoreCore
|
|
156
145
|
return xdoc.root
|
157
146
|
end
|
158
147
|
|
159
|
-
def get_rails_db_details(aRailsPath,aRailsEnv)
|
148
|
+
def get_rails_db_details(aRailsPath,aRailsEnv,aFile=nil)
|
160
149
|
return nil unless aRailsPath && aRailsEnv && aRailsEnv!=''
|
161
|
-
|
150
|
+
yml_file = MiscUtils.path_combine(aRailsPath,aFile || 'config/database.yml')
|
151
|
+
return nil unless dbyml = (YAML::load(File.open(yml_file)) rescue nil)
|
162
152
|
return dbyml[aRailsEnv] && dbyml[aRailsEnv].symbolize_keys
|
163
153
|
end
|
154
|
+
|
155
|
+
def self.find_upwards(aStartPath,aPath)
|
156
|
+
curr_path = File.expand_path(aStartPath)
|
157
|
+
while curr_path && !(test_path_exists = File.exists?(test_path = File.join(curr_path,aPath))) do
|
158
|
+
curr_path = MiscUtils.path_parent(curr_path)
|
159
|
+
end
|
160
|
+
curr_path && test_path_exists ? test_path : nil
|
161
|
+
end
|
164
162
|
|
165
163
|
def expand_app_option(kind=nil)
|
166
164
|
kind = config[:kind] unless kind && !kind.empty?
|
@@ -173,7 +171,23 @@ module YoreCore
|
|
173
171
|
if xmlSources
|
174
172
|
strSource = <<-EOS
|
175
173
|
<Source Type="File">
|
176
|
-
<IncludePath
|
174
|
+
<IncludePath BasePath="public/assets">products</IncludePath>
|
175
|
+
</Source>
|
176
|
+
EOS
|
177
|
+
XmlUtils.add_xml_from_string(strSource,xmlSources)
|
178
|
+
end
|
179
|
+
expand_app_option('rails') # do again
|
180
|
+
#
|
181
|
+
# if capistrano deployed, uploads are assumed to be in shared/uploads
|
182
|
+
#
|
183
|
+
when 'browsercms'
|
184
|
+
# add file source
|
185
|
+
xmlSources = XmlUtils.single_node(config.xmlRoot,'/Yore/Sources')
|
186
|
+
if xmlSources
|
187
|
+
uploadParent = File.join(config[:basepath],'tmp') unless config[:basepath]['/releases/'] && uploadParent = Yore.find_upwards(config[:basepath],'shared')
|
188
|
+
strSource = <<-EOS
|
189
|
+
<Source Type="File">
|
190
|
+
<IncludePath BasePath="#{uploadParent}">uploads</IncludePath>
|
177
191
|
</Source>
|
178
192
|
EOS
|
179
193
|
XmlUtils.add_xml_from_string(strSource,xmlSources)
|
@@ -185,12 +199,12 @@ module YoreCore
|
|
185
199
|
#if (dbyml = YAML::load(File.open(File.expand_path('config/database.yml',config[:basepath]))) rescue nil)
|
186
200
|
# if env = (config[:RAILS_ENV] && config[:RAILS_ENV]!='' && config[:RAILS_ENV])
|
187
201
|
# if (db_details = dbyml[env]) &&
|
188
|
-
db_details = get_rails_db_details(config[:basepath],config[:RAILS_ENV])
|
189
202
|
xmlSources = XmlUtils.single_node(config.xmlRoot,'/Yore/Sources')
|
190
|
-
if
|
203
|
+
if xmlSources
|
204
|
+
#<Database Name="#{db_details[:database]}" Host="#{db_details[:host]}" User="#{db_details[:username]}" Password="#{db_details[:password]}">
|
191
205
|
strSource = <<-EOS
|
192
206
|
<Source Type="MySql" >
|
193
|
-
<Database
|
207
|
+
<Database Yml="config/database.yml">
|
194
208
|
<ArchiveFile>rails_app.sql</ArchiveFile>
|
195
209
|
</Database>
|
196
210
|
</Source>
|
@@ -240,10 +254,10 @@ module YoreCore
|
|
240
254
|
@keepers << KeepMonthly.new(config[:keep_monthly])
|
241
255
|
end
|
242
256
|
|
243
|
-
def do_action(aAction,aArgs
|
257
|
+
def do_action(aAction,aArgs)
|
244
258
|
logger.info "Executing command: #{aAction} ...\n"
|
245
259
|
begin
|
246
|
-
send(aAction,aArgs
|
260
|
+
send(aAction,aArgs)
|
247
261
|
rescue Exception => e
|
248
262
|
logger.info {e.backtrace.join("\n")}
|
249
263
|
logger.warn "#{e.class.to_s}: during #{aAction.to_s}(#{(aArgs && aArgs.inspect).to_s}): #{e.message.to_s}"
|
@@ -416,15 +430,25 @@ module YoreCore
|
|
416
430
|
)
|
417
431
|
end
|
418
432
|
|
419
|
-
def
|
420
|
-
|
421
|
-
:host => aDatabaseNode.attributes['Host'],
|
422
|
-
:username => aDatabaseNode.attributes['User'],
|
423
|
-
:password => aDatabaseNode.attributes['Password'],
|
424
|
-
:database => aDatabaseNode.attributes['Name'],
|
433
|
+
def database_from_xml(aDatabaseNode)
|
434
|
+
result = {
|
425
435
|
:file => XmlUtils::peek_node_value(aDatabaseNode, "ToFile"),
|
426
436
|
:archive_file => XmlUtils::peek_node_value(aDatabaseNode, "ArchiveFile")
|
427
|
-
|
437
|
+
}
|
438
|
+
if config[:RAILS_ENV] && (yml=aDatabaseNode.attributes['Yml'] || !aDatabaseNode.attributes['Name']) # has yml or doesn't have database name
|
439
|
+
raise StandardError.new("RAILS_ENV must be given to read #{yml}") if !config[:RAILS_ENV] || config[:RAILS_ENV].empty?
|
440
|
+
db_details = get_rails_db_details(config[:basepath],config[:RAILS_ENV],yml)
|
441
|
+
raise StandardError.new('insufficient or missing database configuration') if !db_details
|
442
|
+
result.merge!(db_details)
|
443
|
+
else
|
444
|
+
result.merge!({
|
445
|
+
:host => aDatabaseNode.attributes['Host'],
|
446
|
+
:username => aDatabaseNode.attributes['User'],
|
447
|
+
:password => aDatabaseNode.attributes['Password'],
|
448
|
+
:database => aDatabaseNode.attributes['Name'],
|
449
|
+
})
|
450
|
+
end
|
451
|
+
result
|
428
452
|
end
|
429
453
|
|
430
454
|
|
@@ -438,10 +462,11 @@ module YoreCore
|
|
438
462
|
when 'File' then
|
439
463
|
# BasePath tag provides base path for IncludePaths to be relative to. Also indicates root folder for archive
|
440
464
|
bp = MiscUtils.path_combine(config[:basepath],XmlUtils::peek_node_value(xmlSource, "@BasePath"))
|
441
|
-
filelist << '-C'+bp
|
442
465
|
REXML::XPath.each(xmlSource, 'IncludePath') do |xmlPath|
|
443
|
-
|
444
|
-
|
466
|
+
bp2 = MiscUtils.path_combine(bp,XmlUtils::peek_node_value(xmlPath,"@BasePath"))
|
467
|
+
filelist << '-C'+bp2
|
468
|
+
files = MiscUtils::recursive_file_list(MiscUtils::path_combine(bp2,xmlPath.text))
|
469
|
+
files.map!{|f| MiscUtils.path_debase(f,bp2)}
|
445
470
|
filelist += files
|
446
471
|
sourceFound = true
|
447
472
|
end
|
@@ -452,10 +477,10 @@ module YoreCore
|
|
452
477
|
# </Database>
|
453
478
|
#</Source>
|
454
479
|
REXML::XPath.each(xmlSource, 'Database') do |xmlDb|
|
455
|
-
args =
|
480
|
+
args = database_from_xml(xmlDb)
|
456
481
|
file = args.delete(:file) #legacy, absolute path
|
457
482
|
arc_file = args.delete(:archive_file) #path in archive
|
458
|
-
unless args[:
|
483
|
+
unless args[:username] && args[:password] && args[:database] && (file||arc_file)
|
459
484
|
raise StandardError.new("Invalid or missing parameter")
|
460
485
|
end
|
461
486
|
if arc_file
|
@@ -506,17 +531,12 @@ module YoreCore
|
|
506
531
|
# ACTIONS
|
507
532
|
#
|
508
533
|
|
509
|
-
def save(aArgs
|
534
|
+
def save(aArgs)
|
510
535
|
fnArchive = aArgs.is_a?(Array) ? aArgs.first : aArgs #only supported argument
|
511
|
-
configure(nil,aCmdOptions)
|
512
536
|
save_internal(fnArchive)
|
513
537
|
end
|
514
538
|
|
515
|
-
def backup(aArgs
|
516
|
-
unless aCmdOptions && aCmdOptions[:config] # assume already configured if config option specified, but back supports first arg being config file
|
517
|
-
job = aArgs.first
|
518
|
-
configure(job,aCmdOptions || {})
|
519
|
-
end
|
539
|
+
def backup(aArgs) # was aJobFiles
|
520
540
|
temp_file = File.expand_path('backup.tar',temp_path)
|
521
541
|
save_internal(temp_file)
|
522
542
|
backup_file = File.expand_path(encode_file_name(),temp_path)
|
@@ -527,7 +547,6 @@ module YoreCore
|
|
527
547
|
|
528
548
|
def load(aArgs,aCmdOptions=nil)
|
529
549
|
fnArchive = aArgs.is_a?(Array) ? aArgs.first : aArgs #only supported argument
|
530
|
-
configure(nil,aCmdOptions)
|
531
550
|
|
532
551
|
FileUtils.mkdir_p(archive_path = File.join(temp_path,'archive'))
|
533
552
|
uncompress(fnArchive,archive_path)
|
@@ -538,18 +557,26 @@ module YoreCore
|
|
538
557
|
#<Source Type="File">
|
539
558
|
# <IncludePath>public/assets/products</IncludePath>
|
540
559
|
#</Source>
|
560
|
+
#
|
561
|
+
# arcparent = parent_folder(IncludePath.text)
|
562
|
+
# arcfolder = File.basename(IncludePath.text)
|
563
|
+
# destination = MiscUtils.path_combine(basepath,IncludePath.text)
|
564
|
+
bpSource = MiscUtils.path_combine(config[:basepath],XmlUtils::peek_node_value(xmlSource, "@BasePath"))
|
541
565
|
REXML::XPath.each(xmlSource,'IncludePath') do |xmlIncludePath|
|
566
|
+
bpInclude = MiscUtils.path_combine(bpSource,XmlUtils::peek_node_value(xmlIncludePath, "@BasePath"))
|
567
|
+
|
542
568
|
pathArchive = xmlIncludePath.text()
|
543
569
|
pathUncompressed = File.join(archive_path,pathArchive)
|
544
570
|
pathTmp = File.join(rails_tmp_path,pathArchive)
|
545
|
-
pathDest = File.join(
|
546
|
-
|
571
|
+
pathDest = File.join(bpInclude,pathArchive)
|
572
|
+
|
573
|
+
# move basepath/relativepath to tmp/yore/090807-010203/relativepath (out of the way)
|
547
574
|
Yore::move_folder(pathDest,pathTmp) if File.exists?(pathDest)
|
548
575
|
# get <IncludeFiles> and copy to basepath/relativepath
|
549
576
|
Yore::copy_folder(pathUncompressed,pathDest) if File.exists?(pathUncompressed)
|
550
577
|
end
|
551
578
|
when 'MySql' then
|
552
|
-
db_details =
|
579
|
+
db_details = database_from_xml(XmlUtils.single_node(xmlSource,'Database'))
|
553
580
|
DatabaseUtils.load_database(db_details,File.join(archive_path,db_details[:archive_file]))
|
554
581
|
end
|
555
582
|
end
|
data/notes.txt
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
|
2
|
+
debug,info,warning,error
|
3
|
+
|
4
|
+
* log warning and above to STDERR
|
5
|
+
* report used with all detail levels, all sent to log ?
|
6
|
+
* log warning and above sent to report
|
7
|
+
|
8
|
+
Perhaps :
|
9
|
+
* one logger.
|
10
|
+
* Report includes info+
|
11
|
+
* STDERR includes warning+
|
12
|
+
|
13
|
+
Write log splitter that looks like a logger, and is created with an array of other loggers.
|
14
|
+
All log actions are replicated on the array of loggers
|
15
|
+
|
16
|
+
loggers :
|
17
|
+
ConsoleLogger: (debug-info to STDOUT,warning+ to STDERR) (no timestamp)
|
18
|
+
ReportLogger: (info+ to report file) standard logger class (minimised timestamp)
|
19
|
+
SystemLogger: all levels to /var/log (rolling file) SysLogLogger ? (standard timestamp)
|
20
|
+
|
21
|
+
|
22
|
+
* only 2 files
|
23
|
+
*
|
24
|
+
|
25
|
+
*** Use this for parsing PHP configs
|
26
|
+
http://github.com/mattfawcett/ruby-reads-php/tree/master
|
27
|
+
|
data/test/S3_test.rb
CHANGED
@@ -1,8 +1,5 @@
|
|
1
1
|
require 'rubygems'
|
2
|
-
gem '
|
3
|
-
require_paths '../../..','../lib'
|
4
|
-
require 'ihl_ruby/misc_utils'
|
5
|
-
require 'ihl_ruby/shell_extras'
|
2
|
+
gem 'buzzware-buzzcore'; require 'buzzcore';
|
6
3
|
require 'yore/yore_core'
|
7
4
|
require 'test/unit'
|
8
5
|
gem 'Shoulda'; require 'shoulda'
|
@@ -93,7 +90,7 @@ class S3Test < Test::Unit::TestCase
|
|
93
90
|
_xmlRoot = XmlUtils.get_xml_root(job_content)
|
94
91
|
cmd_options = {:config => job_file}
|
95
92
|
@yore_upload = YoreCore::Yore::launch(_xmlRoot,cmd_options,{:basepath => File.dirname(File.expand_path(job_file))})
|
96
|
-
@yore_upload.backup([job_file]
|
93
|
+
@yore_upload.backup([job_file])
|
97
94
|
rescue ::StandardError => e
|
98
95
|
flunk e.inspect
|
99
96
|
end
|
data/test/test_helper.rb
ADDED
data/test/test_job_b.xml
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
<Item Name="log_level">INFO</Item>
|
13
13
|
<Item Name="email_report">false</Item>
|
14
14
|
|
15
|
-
<Item Name="mail_host">mail.
|
15
|
+
<Item Name="mail_host">mail.com</Item>
|
16
16
|
<Item Name="mail_port">25</Item>
|
17
17
|
<Item Name="mail_helodomain">blah.com</Item>
|
18
18
|
<Item Name="mail_user">erewrwer</Item>
|