bakeConv 1.5.2 → 1.5.3
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.
- checksums.yaml +4 -4
- data/lib/Bake.rb +2 -2
- data/lib/ConfigParser.rb +1 -1
- data/lib/Converter.rb +8 -3
- data/lib/PathAdapt.rb +3 -2
- data/lib/Util.rb +2 -2
- data/lib/Version.rb +1 -1
- data/lib/bakeConverter.rb +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77a23202d00aacf618f97272a61931f882fa737f
|
4
|
+
data.tar.gz: 8e4fc77e651741768e88d69a666b77edee2e1917
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
data/lib/Converter.rb
CHANGED
@@ -15,8 +15,12 @@ module BConv
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def convert
|
18
|
-
|
19
|
-
|
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,
|
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(
|
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,
|
9
|
+
def self.makeAbsolute(file, pwd)
|
10
10
|
if File.isAbsolute?(file)
|
11
11
|
outputfilename = file
|
12
12
|
else
|
13
|
-
outputfilename = File.
|
13
|
+
outputfilename = File.join(pwd,file)
|
14
14
|
end
|
15
15
|
return outputfilename
|
16
16
|
end
|
data/lib/Version.rb
CHANGED
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
|
-
|
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.
|
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:
|
11
|
+
date: 2016-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: launchy
|