bakeConv 1.5.2 → 1.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ccaf42df2dd2839f2b59740ac7709eb6002326f0
4
- data.tar.gz: bea04047131fca20b5fe52d41e1fc6b96972b016
3
+ metadata.gz: 77a23202d00aacf618f97272a61931f882fa737f
4
+ data.tar.gz: 8e4fc77e651741768e88d69a666b77edee2e1917
5
5
  SHA512:
6
- metadata.gz: 0c1d6e7bce4bc0087356ec68c66601beafb89f4eba369fafd532dcb7c7c2b5882cc4be5a1843eb73b07ebf817349093fa1981fce0e0e365447499f173f08206a
7
- data.tar.gz: 2670d654360ed1456282c7d8632dba4e90ee896a4aeeab40d1ad341f2e5779c145d497c64e1e4168199322b5de274995be280138cf88522a395d9392f132cd80
6
+ metadata.gz: 0aa01576efe2c7b8ffb74d35eaf7b1e6410d2cf912f55de0006da535d64cf4b308b14a17f395c9785b892c3a14a3dad72a95bfd888bb49a6b8a043975a5a961e
7
+ data.tar.gz: b8fa9751fac12a72ab778cdde8d168dac74a99df26cab54ecc8a93bfa4456101a9b822e436cf681f489b949ab4e6328ef40f699efecab3f2ba53db70ccc57acb
data/lib/Bake.rb CHANGED
@@ -30,9 +30,9 @@ module BConv
30
30
  cmd << '--conversion_info'
31
31
  Util.strToArray('Workspace', @map).each { |w| cmd << '-w' << w }
32
32
 
33
- Dir.chdir(File.dirname(@configFile)) do
33
+ #Dir.chdir(File.dirname(@configFile)) do
34
34
  bakeLines = `#{cmd.join(' ')}`
35
- end
35
+ #end
36
36
 
37
37
  rescue Exception => e
38
38
  puts e.message
data/lib/ConfigParser.rb CHANGED
@@ -64,7 +64,7 @@ module BConv
64
64
  return 0, mappings
65
65
  rescue Exception => e
66
66
  puts e.message
67
- puts e.back_trace if @debugMode == true
67
+ #puts e.back_trace if @debugMode == true
68
68
  abort
69
69
  end
70
70
  end
data/lib/Converter.rb CHANGED
@@ -15,8 +15,12 @@ module BConv
15
15
  end
16
16
 
17
17
  def convert
18
- outputfilename = Util.makeAbsolute(@map['OutputFile'], @configFile)
19
- templatefilename = Util.makeAbsolute(@map['TemplateFile'], @configFile)
18
+ pwd = @map['Workspace'][1..-2]
19
+
20
+ #outputfilename = Util.makeAbsolute(@map['OutputFile'], @configFile)
21
+ outputfilename = Util.makeAbsolute(@map['OutputFile'], pwd)
22
+ #templatefilename = Util.makeAbsolute(@map['TemplateFile'], @configFile)
23
+ templatefilename = Util.makeAbsolute(@map['TemplateFile'], pwd)
20
24
 
21
25
  lineIdx = 0
22
26
  tmpLineIdx = 0
@@ -44,7 +48,8 @@ module BConv
44
48
  postfix = preAndPostfixOpt[0][1]
45
49
  end
46
50
 
47
- filename = Util.makeAbsolute(@map[key], @configFile)
51
+ #filename = Util.makeAbsolute(@map[key], @configFile)
52
+ filename = Util.makeAbsolute(@map[key], pwd)
48
53
  raise "Error: Template file #{File.basename(filename)} is empty!" if File.zero?(filename)
49
54
  raise "Error: File #{File.basename(filename)} does not exist!" if !File.exist?(filename)
50
55
 
data/lib/PathAdapt.rb CHANGED
@@ -10,13 +10,14 @@ module BConv
10
10
  SLASH = "/"
11
11
  COLON = ":"
12
12
 
13
- def self.adapt_path(outputFilePath, bhash, cfgFleFromCmdLne, debugMode)
13
+ def self.adapt_path(outputFilePath, bhash, pwd, debugMode)
14
14
  diffPathLevels, diffPathLevelsDown = 0, 0
15
15
  dir, diffUp = "", ""
16
16
  diffArr = []
17
17
 
18
18
  begin
19
- splitOutputFile = File.expand_path(File.dirname(outputFilePath),File.dirname(cfgFleFromCmdLne)).split("/")
19
+ #splitOutputFile = File.expand_path(File.dirname(outputFilePath),File.dirname(pwd)).split("/")
20
+ splitOutputFile = File.expand_path(File.dirname(outputFilePath),pwd).split("/")
20
21
  splitProjMeta = bhash['BAKE_PROJECTDIR'][0].split("/") if bhash['BAKE_PROJECTDIR'][0].include?("/") && bhash['BAKE_PROJECTDIR'] != nil
21
22
  #raise "Error: BAKE_PROJDIR is missing!" if bhash['BAKE_PROJECTDIR'] == nil
22
23
 
data/lib/Util.rb CHANGED
@@ -6,11 +6,11 @@ require_relative 'File_ext'
6
6
 
7
7
  class Util
8
8
 
9
- def self.makeAbsolute(file, configFile)
9
+ def self.makeAbsolute(file, pwd)
10
10
  if File.isAbsolute?(file)
11
11
  outputfilename = file
12
12
  else
13
- outputfilename = File.dirname(configFile) + "/" + file
13
+ outputfilename = File.join(pwd,file)
14
14
  end
15
15
  return outputfilename
16
16
  end
data/lib/Version.rb CHANGED
@@ -2,7 +2,7 @@ module BConv
2
2
 
3
3
  class Version
4
4
  def self.number
5
- return "1.5.2"
5
+ return "1.5.3"
6
6
  end
7
7
  end
8
8
 
data/lib/bakeConverter.rb CHANGED
@@ -112,7 +112,7 @@ def main
112
112
  puts "Reading config..."
113
113
  status, mappings = cp.readConfig
114
114
 
115
- abort "Error: Config file is empty OR the requested project(s) is commented out!" if mappings.length == 0
115
+ abort "Error: Config file is empty OR the requested project(s) is commented out OR the project doesn't exist!" if mappings.length == 0
116
116
  puts "Converting #{mappings.length} projects..."
117
117
  idxCnt = 0
118
118
 
@@ -131,7 +131,8 @@ def main
131
131
  bhash = BConv::Filter.hashFilter(k, v, bhash)
132
132
  end
133
133
  end
134
- bhash_adapted = BConv::PathAdapt.adapt_path(map['OutputFile'], bhash, cfgFleFromCmdLne, debugMode)
134
+ # bhash_adapted = BConv::PathAdapt.adapt_path(map['OutputFile'], bhash, cfgFleFromCmdLne, debugMode)
135
+ bhash_adapted = BConv::PathAdapt.adapt_path(map['OutputFile'], bhash, map['Workspace'][1..-2], debugMode)
135
136
  end
136
137
 
137
138
  if bhash_adapted != nil
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bakeConv
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frauke Blossey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-15 00:00:00.000000000 Z
11
+ date: 2016-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: launchy