cocoapods-whitelist 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a49d340692ecaa352c48b9970b6820303342d5063364296512169b5a317c5db5
4
- data.tar.gz: 7e0d1d9a788778ec9dfd2a934a5ef87f7ae12f13d15d3455336fdbcc66966563
3
+ metadata.gz: 8db09e9db31c86562ece1491930f2adccc7ed6db5297f63bfbfdfa59ec0eccbb
4
+ data.tar.gz: 5df5e48ef9a8a3ed4e5bb870639cd91ed6e26d2c45409eb5ae83e47bfbdcb3a4
5
5
  SHA512:
6
- metadata.gz: b48688ae3e2269e569c949229aea2a10b10a617d30ddff8ebb3c905c02984910097076c51de843783077d54539fe9fe32a9411ae61539c27edb78d516cc140db
7
- data.tar.gz: 51d17dc94984f8ef2fdcec75e79bb50ef3c0c922af9edeaf7ee3d23360dc47d17d3cc9add6a174357b6db11752faa30b1ced9a712163721217efd4687ce32b08
6
+ metadata.gz: caa0386ed5f8cfd44e1fadbce177bcdd941eb144b62a9bf4f772a38895e18c98fe6443b8bf116ae007fc97263313521000849256852c5d2ff902d7fc7be71443
7
+ data.tar.gz: 4547337346ebf721b9814d740772a0a12ba3a86fb75fd461c43293c77a1f29cd103909e66d446fc99412c24e1b854b7c80d07eecfc4b235adc20574923574b03
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.2.1
2
+ ### Changed
3
+ - Improve dependency injection message to inform the local source is being used.
4
+
1
5
  ## 0.2.0
2
6
  ### Changed
3
7
  - Avoid using whitelist to validate dependencies source
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-whitelist (0.1.0)
4
+ cocoapods-whitelist (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -109,4 +109,4 @@ DEPENDENCIES
109
109
  rake (~> 12.0)
110
110
 
111
111
  BUNDLED WITH
112
- 2.0.2
112
+ 2.1.4
@@ -1,3 +1,3 @@
1
1
  module CocoapodsWhitelist
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -10,25 +10,35 @@ module Pod
10
10
  ## If you have a dependency problem, then no specification is returned from :search_for
11
11
  specifications = original_search_for(dependency)
12
12
 
13
- valid_specifications = validate_dependency(dependency,specifications)
14
- if valid_specifications.size != specifications.size
15
- Pod::UI.puts "WARNING: More than 1 specification for dependency #{dependency.root_name} was found.".yellow
16
- Pod::UI.puts "WARNING: Check if this could be a potencial dependency inyection".red
13
+ valid_specifications = validate_dependency(dependency, specifications)
14
+
15
+ ## If we have removed some specifications due to dependency injection, inform the user once.
16
+ if valid_specifications.size != specifications.size and !informed_di_set.include?(dependency.root_name)
17
+ Pod::UI.puts "WARNING: More than 1 specification for dependency #{dependency.root_name} was found. Using private source.".yellow
18
+ informed_di_set.add(dependency.root_name)
17
19
  end
18
20
 
19
21
  valid_specifications
20
22
  end
21
23
 
24
+ private
25
+
22
26
  # Returns the valids specifications for a given dependency
23
27
  # Params:
24
28
  # +dependency+:: dependency to be validated
25
29
  # +specifications+:: potencial unsecure specs
26
- # @returs the result of the validation
30
+ # @returns the result of the validation
27
31
  def validate_dependency(dependency, specifications)
28
32
  private_sources = get_private_sources()
29
33
  SourceHelper.instance.setup(sources, private_sources) unless SourceHelper.instance.is_filled
30
34
  validator = SourceValidator.new(SourceHelper.instance.specs, private_sources)
31
- return validator.filter_dependency(dependency.root_name, specifications)
35
+ return validator.filter_dependency(dependency.root_name, specifications)
36
+ end
37
+
38
+ # A set where we save the dependencies which already informed of a dependency injection.
39
+ # @returns a set of dependency_name
40
+ def informed_di_set
41
+ @invalid_specifications_set ||= Set.new
32
42
  end
33
43
  end
34
44
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-whitelist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mobile Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-16 00:00:00.000000000 Z
11
+ date: 2021-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  - !ruby/object:Gem::Version
113
113
  version: '0'
114
114
  requirements: []
115
- rubygems_version: 3.0.9
115
+ rubygems_version: 3.0.8
116
116
  signing_key:
117
117
  specification_version: 4
118
118
  summary: A longer description of cocoapods-whitelist.