refinement 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/refinement/analyzer.rb +7 -2
- data/lib/refinement/changeset.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc6b7da6738a2abb9d51bbb8b07333f370ef7f819307217e01cee42cde2b4ea4
|
4
|
+
data.tar.gz: bf21a6db5de7f51904296972c4e45f27b8853b5751ec31705d7d3e45d2d7f80f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7333b23a303b68863872011b638d1bab86fb29ea56dd244a33e194873e0c90c4969a1340636c2a80bcee4d0f141b5f12003d038e21ecd10f566e3590d14e63a1
|
7
|
+
data.tar.gz: 024b7afb50f77256b0b399c3c349a3cd2abb92eeda59e51a4dfd1c3a80a757e1901937417e64471be04282470c692489ba10ec23482c72618f8e6e3fa9ec9c8d
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.6.0
|
data/lib/refinement/analyzer.rb
CHANGED
@@ -57,9 +57,10 @@ module Refinement
|
|
57
57
|
# `:building` and `:testing`, with the only difference being `BuildActionEntry` are not
|
58
58
|
# filtered out when building for testing, since test action macro expansion could
|
59
59
|
# depend on a build entry being present.
|
60
|
-
# @
|
60
|
+
# @param each_target [Proc] A proc called each time a target was determined to have changed or not.
|
61
|
+
# @return [Xcodeproj::XCScheme] a scheme whose unchanged targets have been removed.
|
61
62
|
def filtered_scheme(scheme_path:, change_level: :full_transitive, filter_when_scheme_has_changed: false, log_changes: false,
|
62
|
-
filter_scheme_for_build_action:)
|
63
|
+
filter_scheme_for_build_action:, each_target: nil)
|
63
64
|
scheme = Xcodeproj::XCScheme.new(scheme_path)
|
64
65
|
|
65
66
|
sections_to_filter =
|
@@ -93,9 +94,11 @@ module Refinement
|
|
93
94
|
suite_name = buildable_reference.attributes['BlueprintName']
|
94
95
|
if (change_reason = changes_by_suite_name[suite_name])
|
95
96
|
puts "#{suite_name} changed because #{change_reason}" if log_changes
|
97
|
+
each_target&.call(type: :changed, target_name: suite_name, change_reason: change_reason)
|
96
98
|
next
|
97
99
|
end
|
98
100
|
puts "#{suite_name} did not change, removing from scheme" if log_changes
|
101
|
+
each_target&.call(type: :unchanged, target_name: suite_name, change_reason: nil)
|
99
102
|
buildable_reference.parent.remove
|
100
103
|
end
|
101
104
|
end
|
@@ -105,9 +108,11 @@ module Refinement
|
|
105
108
|
suite_name = buildable_reference.attributes['BlueprintName']
|
106
109
|
if (change_reason = changes_by_suite_name[suite_name])
|
107
110
|
puts "#{suite_name} changed because #{change_reason}" if log_changes
|
111
|
+
each_target&.call(type: :changed, target_name: suite_name, change_reason: change_reason)
|
108
112
|
next
|
109
113
|
end
|
110
114
|
puts "#{suite_name} did not change, setting to not build for testing" if log_changes
|
115
|
+
each_target&.call(type: :unchanged, target_name: suite_name, change_reason: nil)
|
111
116
|
buildable_reference.parent.attributes['buildForTesting'] = 'NO'
|
112
117
|
end
|
113
118
|
end
|
data/lib/refinement/changeset.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refinement
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Giddins
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xcodeproj
|