trainer 0.9.0 → 0.9.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 370827f7984bc0877d6426ec99391c75fa14c28d028a695655511a5c3951c410
4
- data.tar.gz: 26c93c9a62005c206a051f2608c1ef9d9e74a1779449120b7ffd70b5832167e2
2
+ SHA1:
3
+ metadata.gz: f78c56e79f3a325617a106cd2e55d763a98787c1
4
+ data.tar.gz: 79295da3d76a7149b36164286767f2d85ca7a265
5
5
  SHA512:
6
- metadata.gz: 5c2e6b31d8e060c805f75b7a19872dedd815f4d27803bbfde54903371e6a6fae2f8730355fd1ef4f224eb94128506465e3278e49a54c1860b3fd9cb302344142
7
- data.tar.gz: 51ba7341dae7de6a368008537de7015bcf77be703c4062ac68e89b27c47c113732208878b8a9dc94af8d1dfb799730778655ca8e92375866df079e0a74a1903f
6
+ metadata.gz: 6d7e3a0c1dbceda3863c5fbb4c3385703fd72776a088b90606055a32a07094a9bb56f5e9d3f36f41ac74c79d40b29f2e16614f8f80798824811558028f9d419f
7
+ data.tar.gz: 5b87fca2a184bcd3026a6615d9e6f055e4308f860de8f6e77707d118bd057ca6100244e22d6555d89273dd7171560b81ccc3d705b2a36ea3c933873f2ea16ccb
@@ -36,7 +36,12 @@ module Trainer
36
36
  files.each do |path|
37
37
  if config[:output_directory]
38
38
  FileUtils.mkdir_p(config[:output_directory])
39
- filename = File.basename(path).gsub(".plist", config[:extension])
39
+ # Remove .xcresult or .plist extension
40
+ if path.end_with?(".xcresult")
41
+ filename = File.basename(path).gsub(".xcresult", config[:extension])
42
+ else
43
+ filename = File.basename(path).gsub(".plist", config[:extension])
44
+ end
40
45
  to_path = File.join(config[:output_directory], filename)
41
46
  else
42
47
  # Remove .xcresult or .plist extension
@@ -142,6 +147,9 @@ module Trainer
142
147
  end
143
148
 
144
149
  def parse_xcresult(path)
150
+ require 'shellwords'
151
+ path = Shellwords.escape(path)
152
+
145
153
  # Executes xcresulttool to get JSON format of the result bundle object
146
154
  result_bundle_object_raw = execute_cmd("xcrun xcresulttool get --format json --path #{path}")
147
155
  result_bundle_object = JSON.parse(result_bundle_object_raw)
@@ -1,4 +1,4 @@
1
1
  module Trainer
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  DESCRIPTION = "Convert xcodebuild plist and xcresult files to JUnit reports"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trainer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-10 00:00:00.000000000 Z
11
+ date: 2019-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: plist
@@ -152,7 +152,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
152
  - !ruby/object:Gem::Version
153
153
  version: '0'
154
154
  requirements: []
155
- rubygems_version: 3.0.3
155
+ rubyforge_project:
156
+ rubygems_version: 2.5.2.3
156
157
  signing_key:
157
158
  specification_version: 4
158
159
  summary: Convert xcodebuild plist and xcresult files to JUnit reports