cocoapods-protected-dependencies 0.0.1 → 0.0.3

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: 8c700906e21cff422cbddf28322ad9dfd4a51ba51b8245d109c4ef4a267fc4bb
4
- data.tar.gz: 86e9639391ba85e57a8f5f360eea5e2524b848ac59c629f162e79d0e71ae2e1d
3
+ metadata.gz: 68ebd7cd4d699fd7cb9fd1c6b1809ad481eb9ecadf26a6f6b857455bd0519bff
4
+ data.tar.gz: fc09e3ed786a7a507c17c6fa0d1fdb4ce5f2ea8f7c350ae6529481e86bfaaf87
5
5
  SHA512:
6
- metadata.gz: 3bc397653697bc5df3c398ada0a43ec1422baff3480313ac4e85596fafbddf33a1d05446a13d6135ff33b9eaf3062964600077c5d066a8aee4560a1bfe7242f3
7
- data.tar.gz: 8a76d1d2706b375720ea844805590b92b180d563ea341270b14b1db797a1f5cdc3bd68f96ddfc102a7a10e8287230158339663ce15208e6191014857a8a06444
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?
@@ -1,3 +1,3 @@
1
1
  module CocoapodsProtectedPrivate
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-protected-dependencies
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - itay