yore 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.9
1
+ 0.0.10
@@ -125,6 +125,10 @@ module YoreCore
125
125
 
126
126
  #aOptions may require {:basepath => File.dirname(File.expand_path(job))}
127
127
  def self.launch(aConfigXml,aCmdOptions=nil,aOptions=nil)
128
+ if !aConfigXml
129
+ path = MiscUtils.path_combine(aOptions && aOptions[:basepath],'yore.config.xml')
130
+ aConfigXml = path if File.exists?(path)
131
+ end
128
132
  result = Yore.new()
129
133
  result.configure(aConfigXml,aCmdOptions,aOptions)
130
134
  return result
@@ -336,6 +340,7 @@ module YoreCore
336
340
  end
337
341
 
338
342
  def uncompress(aArchive,aDestination=nil,aArchiveContent=nil)
343
+ logger.info "uncompressing #{aArchive}"
339
344
  #tarfile = File.expand_path(MiscUtils.file_change_ext(File.basename(aArchive),'tar'),temp_dir)
340
345
  #shell("bunzip2 #{tarfile}; mv #{tarfile}.bz2 #{aDestFile}")
341
346
  #
@@ -465,7 +470,9 @@ module YoreCore
465
470
  REXML::XPath.each(xmlSource, 'IncludePath') do |xmlPath|
466
471
  bp2 = MiscUtils.path_combine(bp,XmlUtils::peek_node_value(xmlPath,"@BasePath"))
467
472
  filelist << '-C'+bp2
468
- files = MiscUtils::recursive_file_list(MiscUtils::path_combine(bp2,xmlPath.text))
473
+ destPath = MiscUtils::path_combine(bp2,xmlPath.text)
474
+ logger.info "saving files from #{destPath}"
475
+ files = MiscUtils::recursive_file_list(destPath)
469
476
  files.map!{|f| MiscUtils.path_debase(f,bp2)}
470
477
  filelist += files
471
478
  sourceFound = true
@@ -483,6 +490,7 @@ module YoreCore
483
490
  unless args[:username] && args[:password] && args[:database] && (file||arc_file)
484
491
  raise StandardError.new("Invalid or missing parameter")
485
492
  end
493
+ logger.info "saving database #{args[:database]}"
486
494
  if arc_file
487
495
  arc_file = MiscUtils.path_debase(arc_file,'/')
488
496
  sql_file = File.expand_path(arc_file,aTempFolder)
@@ -570,6 +578,7 @@ module YoreCore
570
578
  pathUncompressed = File.join(archive_path,pathArchive)
571
579
  pathTmp = File.join(rails_tmp_path,pathArchive)
572
580
  pathDest = File.join(bpInclude,pathArchive)
581
+ logger.info "loading files into #{pathDest}"
573
582
 
574
583
  # move basepath/relativepath to tmp/yore/090807-010203/relativepath (out of the way)
575
584
  Yore::move_folder(pathDest,pathTmp) if File.exists?(pathDest)
@@ -578,6 +587,7 @@ module YoreCore
578
587
  end
579
588
  when 'MySql' then
580
589
  db_details = database_from_xml(XmlUtils.single_node(xmlSource,'Database'))
590
+ logger.info "loading database #{db_details[:database]}"
581
591
  DatabaseUtils.load_database(db_details,File.join(archive_path,db_details[:archive_file]))
582
592
  end
583
593
  end
@@ -1,9 +1,6 @@
1
1
  require 'rubygems'
2
2
  gem 'buzzcore'; require 'buzzcore';
3
3
 
4
- #gem 'RequirePaths'; require 'require_paths'
5
- #require_paths '../../..','../lib'
6
-
7
4
  require 'yore/yore_core'
8
5
  require 'test/unit'
9
6
  gem 'Shoulda'; require 'shoulda'
@@ -1,9 +1,6 @@
1
1
  require 'rubygems'
2
2
  gem 'buzzcore'; require 'buzzcore';
3
3
 
4
- #gem 'RequirePaths'; require 'require_paths'
5
- #require_paths '../../..','../lib'
6
-
7
4
  require 'yore/yore_core'
8
5
  require 'test/unit'
9
6
  gem 'Shoulda'; require 'shoulda'
data/yore.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{yore}
8
- s.version = "0.0.9"
8
+ s.version = "0.0.10"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["buzzware"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - buzzware