highway 1.0.6 → 1.0.8

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
  SHA256:
3
- metadata.gz: 470af68392dfcbc58452bc54eb5bea71bfe008b83b03de55b0f902113694298a
4
- data.tar.gz: d86fc2e7fcd80362a98a688d6500972af20c5528cfa2b487f9deba97b007e997
3
+ metadata.gz: 73c3b2d6c45a2813f981ce86191943dba7c3774da04ad24ada4aae9caef2ed76
4
+ data.tar.gz: 24e6239b66417a222f2ffc21c97060a407442e94c1670b12fb6acfe94b58b46b
5
5
  SHA512:
6
- metadata.gz: 0bead069ffbdf46d9221aa99b2feb1407dd50fb724fa1c5e30ce6cca9ae5e4e7cb3a3c9285a22a49efd43fe5db28bd26ea4428fb90566d22fa7e30dd570af857
7
- data.tar.gz: 5a464d1abb3fde76a40acd5ddfe280ad8110ec1138340f71e59a2744821e30a856d0b9037efa54819360348a78ebca7da7e20e4a3ff5934c5c672dfc43153760
6
+ metadata.gz: c90c5b3b82ae4bf4a65d1c895da8dc3b0c293650351154621478b9fdcecc40ce58d9c98aed012535a66423d58d664334a340cbdeb4df7bdfeeabfa1236db98d9
7
+ data.tar.gz: 92ed02e66e35dfe8b0f2837f48302d72549770800175066480c2e435388d5813189ce3491c9fc0709ac3c374abfa9dfadac4047b8dc361f505d257d413f7e7de
@@ -200,9 +200,9 @@ module Highway
200
200
  # @param bundle_exec [Boolean] Whether to use `bundle exec` if possible.
201
201
  # @param silent [Boolean] Whether to run the command silently.
202
202
  # @param on_error [Proc] Called if command exits with a non-zero code.
203
- def run_sh(command, bundle_exec: false, silent: false, rescue_error: nil)
203
+ def run_sh(command, bundle_exec: false, silent: false, on_error: nil)
204
204
  command = ["bundle exec", command].flatten if bundle_exec && should_use_bundle_exec?
205
- Fastlane::Actions.sh(command, log: !silent, error_callback: rescue_error)
205
+ Fastlane::Actions.sh(command, log: !silent, error_callback: on_error)
206
206
  end
207
207
 
208
208
  private
@@ -68,7 +68,12 @@ module Highway
68
68
  name: "code_coverage",
69
69
  type: Types::Bool.new(),
70
70
  required: false,
71
- )
71
+ ),
72
+ Parameters::Single.new(
73
+ name: "fastlane_params",
74
+ type: Types::Hash.new(Types::Any.new()),
75
+ required: false
76
+ ),
72
77
  ]
73
78
  end
74
79
 
@@ -83,6 +88,7 @@ module Highway
83
88
  scheme = parameters["scheme"]
84
89
  skip_build = parameters["skip_build"]
85
90
  code_coverage = parameters["code_coverage"]
91
+ fastlane_params = parameters["fastlane_params"]
86
92
 
87
93
  flags = parameters["flags"].join(" ")
88
94
  settings = parameters["settings"].map { |setting, value| "#{setting}=\"#{value.shellescape}\"" }.join(" ")
@@ -120,29 +126,31 @@ module Highway
120
126
  rescued_error = nil
121
127
 
122
128
  # Run the build and test.
129
+ options = {
123
130
 
124
- begin
125
-
126
- context.run_action("run_tests", options: {
131
+ project_key => project_value,
127
132
 
128
- project_key => project_value,
133
+ clean: clean,
134
+ configuration: configuration,
135
+ device: device,
136
+ scheme: scheme,
137
+ code_coverage: code_coverage,
138
+ skip_build: skip_build,
129
139
 
130
- clean: clean,
131
- configuration: configuration,
132
- device: device,
133
- scheme: scheme,
134
- code_coverage: code_coverage,
135
- skip_build: skip_build,
140
+ xcargs: xcargs,
136
141
 
137
- xcargs: xcargs,
142
+ buildlog_path: output_raw_temp_dir,
143
+ output_directory: output_dir,
144
+ output_types: output_types,
145
+ output_files: output_files,
146
+ xcodebuild_formatter: xcodebuild_formatter,
138
147
 
139
- buildlog_path: output_raw_temp_dir,
140
- output_directory: output_dir,
141
- output_types: output_types,
142
- output_files: output_files,
143
- xcodebuild_formatter: xcodebuild_formatter,
148
+ }
144
149
 
145
- })
150
+ begin
151
+ fastlane_params = fastlane_params.nil? ? {} : fastlane_params
152
+ combined_options = fastlane_params.merge(options)
153
+ context.run_action("run_tests", options: combined_options)
146
154
 
147
155
  rescue FastlaneCore::Interface::FastlaneBuildFailure => error
148
156
 
@@ -184,11 +192,15 @@ module Highway
184
192
  # That will output a machine-readable information about everything
185
193
  # that happened in the build.
186
194
 
187
- xcpretty_json_formatter_path = context.run_sh("xcpretty-json-formatter", bundle_exec: true, silent: true)
195
+ error_callback = ->(error) {
196
+ rescued_error = error
197
+ }
198
+
199
+ xcpretty_json_formatter_path = context.run_sh("xcpretty-json-formatter", bundle_exec: true, silent: true, on_error: error_callback)
188
200
  temp_json_report_path = File.join(Dir.mktmpdir(), "report.json")
189
201
 
190
202
  context.with_modified_env({"XCPRETTY_JSON_FILE_OUTPUT" => temp_json_report_path}) do
191
- context.run_sh(["cat", output_raw_path, "| xcpretty --formatter", xcpretty_json_formatter_path], bundle_exec: true, silent: true)
203
+ context.run_sh(["cat", output_raw_path, "| xcpretty --formatter", xcpretty_json_formatter_path], bundle_exec: true, silent: true, on_error: error_callback)
192
204
  end
193
205
 
194
206
  # Export JSON file report to environment variable
@@ -6,6 +6,6 @@
6
6
  module Highway
7
7
 
8
8
  # Version of Highway gem.
9
- VERSION = "1.0.6".freeze
9
+ VERSION = "1.0.8".freeze
10
10
 
11
11
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: highway
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Netguru
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-20 00:00:00.000000000 Z
11
+ date: 2023-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.0
19
+ version: 2.201.0
20
20
  - - "<="
21
21
  - !ruby/object:Gem::Version
22
22
  version: 3.0.0
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 2.0.0
29
+ version: 2.201.0
30
30
  - - "<="
31
31
  - !ruby/object:Gem::Version
32
32
  version: 3.0.0