xcpretty-bb 0.1.12.bb6 → 0.1.12.bb7

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: c81c8e09b95ca82dbdb2a2cd9dd57e8ce845afe6
4
- data.tar.gz: bf26e5f02ce0ab358c8af61e960f68f49e1ca420
3
+ metadata.gz: a3a90a578738aa61add714bac1e796f6d4fc1799
4
+ data.tar.gz: 966214dd5945a34bcc51efd3ce9821a28cc733d5
5
5
  SHA512:
6
- metadata.gz: 5d48f0957b4a84a7ed88e516502d2c07807259ee4f09b01fc81890c8ff00e842bc1891a1c91bb2418ed8c388743833c7b954526773cd3f1b4a600e2b8b8a26ad
7
- data.tar.gz: e1a95f5cd3ca3d5e1a722ae0ac43e878353e01830b96f4980684aba704315c045032839a75d3eb787d4233ca4ac8c98b30c22b40580bd73ce5906c4d1866b411
6
+ metadata.gz: 892ef7dedb2d146353e582687031ca070a92dabae4906e9174edb984e4fd65406d2777db0e5e668d3e4d6c671fe87478272de5b92bf19f37ecd3ef4516a411e6
7
+ data.tar.gz: 381a635e7147a5dad5028dab1f5a0326b9ab1dbce6f3801791e5cce4f350e82ca2a2aef381f45230c754ab51d2d8d27f99b48d58bdf5f85e2d317ef711cd5f19
@@ -178,6 +178,8 @@ module XCPretty
178
178
  WRITE_AUXILIARY_FILES = /^Write auxiliary files/
179
179
 
180
180
  module PhaseScript
181
+ MAX_PHASE_SCRIPT_OUTPUT_LEN = 100
182
+
181
183
  # @regex Captured groups
182
184
  # $1 = phase_details
183
185
  PHASE_SCRIPT_EXECUTION_MATCHER = /^PhaseScriptExecution\s(.*)/
@@ -412,11 +414,26 @@ module XCPretty
412
414
 
413
415
  def update_phase_script_state(text)
414
416
  case text
417
+ when GENERIC_WARNING_MATCHER
418
+ # ignore for now
415
419
  when PHASE_SCRIPT_EXECUTION_MATCHER
416
420
  @current_phase_script_output = [text]
417
421
  when PHASE_SCRIPT_COMMAND_FAILED_MATCHER, PHASE_SCRIPT_NO_SUCH_FILE_OR_DIRECTORY_MATCHER
418
422
  unless @current_phase_script_output.nil?
419
423
  @current_phase_script_output << text
424
+
425
+ if @current_phase_script_output.length > MAX_PHASE_SCRIPT_OUTPUT_LEN
426
+ output_len = @current_phase_script_output.length;
427
+
428
+ output_middle = output_len / 2;
429
+ truncate_amount = (output_len - MAX_PHASE_SCRIPT_OUTPUT_LEN) / 2;
430
+ truncate_start = output_middle - truncate_amount;
431
+ truncate_end = output_middle + truncate_amount;
432
+
433
+ @current_phase_script_output.slice!(truncate_start..truncate_end);
434
+ @current_phase_script_output.insert(MAX_PHASE_SCRIPT_OUTPUT_LEN / 2, "\n\n############truncated output############\n\n")
435
+ end
436
+
420
437
  current_phase_script_failure[:output] = @current_phase_script_output
421
438
  current_phase_script_failure[:error] = text
422
439
  end
@@ -1,4 +1,4 @@
1
1
  module XCPretty
2
- VERSION = "0.1.12.bb6"
2
+ VERSION = "0.1.12.bb7"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcpretty-bb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12.bb6
4
+ version: 0.1.12.bb7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marin Usalj
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-10-20 00:00:00.000000000 Z
12
+ date: 2015-11-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rouge