fastlane-plugin-periphery 0.1.0 → 0.2.1

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: 193810e605fc8f7f7f7285417cab60d865e5654b33c0e773ef616680a7303dfa
4
- data.tar.gz: 4a0bdb31f320deee68c070247b9387f8ca80f9ef77ca98e42a019eb1815d150d
3
+ metadata.gz: bf7b105c16ddb2ea866aba9dceff585dcb50d834cad2db9314a8226db239aa9d
4
+ data.tar.gz: d3b4305ab70bf7a0708238e40d1c2e21a68798f7e347b83a4046d22c9c68cd21
5
5
  SHA512:
6
- metadata.gz: 7b986b0b8bb0269d3ce1c090447ce07cd06273099ae9e54b4bd4aa804421457580ae5a186ceec22b319d252667844886c2167b7185257cbe2abfdf148f66ed31
7
- data.tar.gz: 80ebe6ecb9e9bf1bfbced75300d54f8368996eb73925992b77cb5c8bbe9baf4bd2d124c7725236284caafff9acb462e9579f5b93623672bd00f9795cd4101df8
6
+ metadata.gz: a72c8043a2a579951ce7f38a26134109064e615e82c18dd202a75acf0b675b046de9afcb36aa4be7314253560fa75d40918a0c7d5c5e498e8946339adcd520a1
7
+ data.tar.gz: 9a73a859207c08c03b53f758cb118a9ca3f67d07166f3972398d1f43c62a164e6d80eb0c7c597f4fcdb1c0aa073a9468c3902fb75af4304188e384b91cfe2a87
@@ -1,4 +1,5 @@
1
1
  require 'fastlane/action'
2
+ require 'fastlane_core/helper'
2
3
 
3
4
  module Fastlane
4
5
  module Actions
@@ -23,6 +24,19 @@ module Fastlane
23
24
  end
24
25
  end
25
26
 
27
+ # fastlane dumps the 'Lane Context' when an action fails
28
+ # Because the results array can contain thousands of items,
29
+ # we don't want to dump them all in the console.
30
+ # Instead, use a custom array which limits the output
31
+ #
32
+ # https://github.com/liamnichols/fastlane-plugin-periphery/issues/2
33
+ class Results < Array
34
+ def to_s
35
+ return super.to_s if length < 2
36
+ "[#{first.inspect}, ...] (#{length} items)"
37
+ end
38
+ end
39
+
26
40
  class Runner
27
41
  attr_reader :executable, :config, :skip_build, :index_store_path, :results
28
42
 
@@ -66,7 +80,7 @@ module Fastlane
66
80
  })
67
81
 
68
82
  # Decode the JSON output and assign to the property/lane_context
69
- @results = JSON.parse(output).map { |raw| Result.new(raw) }
83
+ @results = Results.new(JSON.parse(output).map { |raw| Result.new(raw) })
70
84
  Actions.lane_context[SharedValues::PERIPHERY_RESULTS] = results
71
85
  end
72
86
 
@@ -103,10 +117,18 @@ module Fastlane
103
117
 
104
118
  # Alternatively, use the derived data path defined by a prior action
105
119
  derived_data_path = find_derived_data_path
106
- return File.join(derived_data_path, 'Index', 'DataStore') unless derived_data_path.nil?
107
120
 
108
121
  # Fail if we couldn't automatically resolve the path
109
- UI.user_error!("The index store path could not be resolved. Either specify it using the index_store_path argument or provide a path to derived data when using build_app or xcodebuild actions.")
122
+ if derived_data_path.nil?
123
+ UI.user_error!("The index store path could not be resolved. Either specify it using the index_store_path argument or provide a path to derived data when using build_app or xcodebuild actions.")
124
+ end
125
+
126
+ # https://github.com/peripheryapp/periphery#xcode
127
+ if Helper.xcode_at_least?("14.0.0")
128
+ return File.join(derived_data_path, 'Index.noindex', 'DataStore')
129
+ else
130
+ return File.join(derived_data_path, 'Index', 'DataStore')
131
+ end
110
132
  end
111
133
 
112
134
  def find_derived_data_path
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Periphery
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-periphery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Liam Nichols
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-03 00:00:00.000000000 Z
11
+ date: 2023-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -136,7 +136,7 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: 2.156.1
139
- description:
139
+ description:
140
140
  email: liam.nichols.ln@gmail.com
141
141
  executables: []
142
142
  extensions: []
@@ -151,7 +151,7 @@ homepage: https://github.com/liamnichols/fastlane-plugin-periphery
151
151
  licenses:
152
152
  - MIT
153
153
  metadata: {}
154
- post_install_message:
154
+ post_install_message:
155
155
  rdoc_options: []
156
156
  require_paths:
157
157
  - lib
@@ -166,8 +166,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
166
  - !ruby/object:Gem::Version
167
167
  version: '0'
168
168
  requirements: []
169
- rubygems_version: 3.0.3
170
- signing_key:
169
+ rubygems_version: 3.2.22
170
+ signing_key:
171
171
  specification_version: 4
172
172
  summary: Identifies unused code in Swift projects using Periphery
173
173
  test_files: []