fastlane-plugin-merge_junit_report 0.1.1 → 0.1.2

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: fee63f2d65579d77edaa4dfbcc9461ab901b8518
4
- data.tar.gz: 2c803f59dc4f62733f0e4448a6bd3624b4635375
3
+ metadata.gz: 3716bcc208607f2d0575d51d729d02e24f5c344b
4
+ data.tar.gz: 06a769322105e450d733cbeeb6d82668a2743571
5
5
  SHA512:
6
- metadata.gz: e0a34ff24ef1744fa811a210b6dab776ae4bccf1537ca745484ae88e5a6f801e76f3c3b4dc39b0e8a171e478708640dd07e164579abf729c93128086e2834a8e
7
- data.tar.gz: b8ee1ba25f1deca07801d4ca2a3932cd7f98cfc2ac67d890583aac0fb79ec7457b4670537b7ce80d6f5b35b78ed1e7f0d0361b45bc112d6ff00508930abe0719
6
+ metadata.gz: 3fa421899c5a53dac78598ff99ab40cdaf3c1eb981e9bf91056fba23072f3b95a23d6b897492b7ccd46798a95fd01ade7075ad0586f99ac1f5ff0551c1d930a9
7
+ data.tar.gz: df720f764e7426af86d5c4c82d6f33034d975e3da15dfb988202d67a5d8f5befe13494f6dce4cd565b2a55ad4249b931fdb12eaf87015e68dab1ef13954b903f
data/README.md CHANGED
@@ -12,9 +12,7 @@ fastlane add_plugin merge_junit_report
12
12
 
13
13
  ## About merge_junit_report
14
14
 
15
- Foo
16
-
17
- **Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
15
+ Merges multiple Junit reports into one.
18
16
 
19
17
  ## Example
20
18
 
@@ -1,20 +1,10 @@
1
1
  module Fastlane
2
2
  module Actions
3
3
  class MergeJunitReportAction < Action
4
+ UI = FastlaneCore::UI
5
+
4
6
  def self.run(params)
5
7
  input_files = params[:input_files]
6
-
7
- if input_files.length < 1
8
- ui.error("No input files!")
9
- return
10
- end
11
-
12
- input_files.each { |input_file|
13
- if !File.file?(input_file)
14
- ui.error("File not found: #{input_file}")
15
- return
16
- end
17
- }
18
8
 
19
9
  xml_docs = input_files.map { |file| Nokogiri::XML(File.open(file))}
20
10
  merger = Fastlane::Plugin::MergeJunitReport::Merger.new(xml_docs)
@@ -22,9 +12,10 @@ module Fastlane
22
12
 
23
13
  # write to output_file
24
14
  output_file = File.absolute_path(params[:output_file])
15
+ FileUtils.mkdir_p(File.dirname(output_file))
25
16
  File.write(output_file, merged.to_xml)
26
17
 
27
- ui.success("Reports merged to #{output_file} successfully")
18
+ UI.success("Reports merged to #{output_file} successfully")
28
19
  end
29
20
 
30
21
  def self.description
@@ -45,7 +36,13 @@ module Fastlane
45
36
  env_name: "MERGE_JUNIT_REPORT_INPUT_FILES",
46
37
  description: "A list of junit report files to merge from",
47
38
  optional: false,
48
- type: Array),
39
+ type: Array,
40
+ verify_block: proc do |input_files|
41
+ UI.user_error!("No input files!") if input_files.length < 1
42
+ input_files.each { |input_file|
43
+ UI.user_error!("File not found: #{input_file}") if !File.file?(input_file)
44
+ }
45
+ end),
49
46
  FastlaneCore::ConfigItem.new(key: :output_file,
50
47
  env_name: "MERGE_JUNIT_REPORT_OUTPUT_FILE",
51
48
  description: "The output file where all input files will be merged into",
@@ -62,14 +59,6 @@ module Fastlane
62
59
  # [:ios, :mac, :android].include?(platform)
63
60
  true
64
61
  end
65
-
66
- class << self
67
- attr_accessor :ui
68
- end
69
-
70
- def self.ui
71
- @ui ||= FastlaneCore::UI.new
72
- end
73
62
 
74
63
  end
75
64
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module MergeJunitReport
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-merge_junit_report
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Yang