cocoapods-protected-dependencies 0.0.1 → 0.0.3
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 68ebd7cd4d699fd7cb9fd1c6b1809ad481eb9ecadf26a6f6b857455bd0519bff
|
|
4
|
+
data.tar.gz: fc09e3ed786a7a507c17c6fa0d1fdb4ce5f2ea8f7c350ae6529481e86bfaaf87
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9ad382186ba1c3fd227ebe505415471a1e503069bf7eda1e478377e4d5574162de7f4a6883d240bdfb701b53deb1da1b49f6f2219044a1e23b1c07bacfd6f947
|
|
7
|
+
data.tar.gz: e3cb57a2ce137c11fc361ddb3a05adc512c0b1b85a59f049b35cd9b8dcc10b77d67c6b0f026d8ff40134c32c736850e350df05c35f2efa759065d89040baae65
|
|
@@ -5,6 +5,7 @@ module CocoapodsProtectedPrivate
|
|
|
5
5
|
class Configuration
|
|
6
6
|
include Singleton
|
|
7
7
|
attr_accessor :config
|
|
8
|
+
attr_accessor :config_loaded
|
|
8
9
|
|
|
9
10
|
def config
|
|
10
11
|
@config ||= []
|
|
@@ -17,13 +18,17 @@ module CocoapodsProtectedPrivate
|
|
|
17
18
|
def load_configuration
|
|
18
19
|
unless File.file?('protected-specs.yml')
|
|
19
20
|
Pod::UI.puts "No 'protected-specs.yml' file, make sure you have created one".red
|
|
21
|
+
@config_loaded = false
|
|
20
22
|
return
|
|
21
23
|
end
|
|
22
24
|
|
|
23
25
|
@config = YAML.load(File.read('protected-specs.yml'))
|
|
26
|
+
@config_loaded = true
|
|
24
27
|
end
|
|
25
28
|
|
|
26
29
|
def filter_dependency(pod, specifications)
|
|
30
|
+
return specifications unless @config_loaded
|
|
31
|
+
|
|
27
32
|
filtered = specifications.select { |spec| spec_is_valid(pod, spec) }
|
|
28
33
|
|
|
29
34
|
Pod::UI.puts "Dependency #{pod} is not allowed".red if filtered.empty?
|