cocoapods-whitelist 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: cf23a30117897a6467e11b44087ad09a8bdbcd51
4
- data.tar.gz: 6183ef966ab86e5aaab202bdd354fd8b566a3329
3
+ metadata.gz: e5d9b4ac40951e4b43fb64d48a34e478e9a1fa1d
4
+ data.tar.gz: 6b702f225f4f9f615f3407699ff63ccadef98e5b
5
5
  SHA512:
6
- metadata.gz: 843846f1b260439b6676a8619c1e6eb98e530f1114252c847d021617f477527c2ff1a4c0a3b92c8d7106766d7d217004d6e16ba64587f21dd3fac504546c5e51
7
- data.tar.gz: 20013be046ad6c51ba4febb4361c7eb2a808ff6db18b399361997e195f5f252ea682cde5530ab5ba3ef2b9990b51866a6f83d60bfad4b21edb1e206acbfeb8b7
6
+ metadata.gz: 184354b70faf57d5c2ef5409650811daafd36d36f972f2b62047f616a2e3120e83675b08b2abc40c9463b8a97a8ec530ca2a4b7dc6ee36069b7903aa974b1425
7
+ data.tar.gz: 6c13acc44416b942e6e730cf8abe77b0ca3cd9ae2cd8b0577f61ee88246b57473fd0aae59e11b0ef7a3d89364035e2e622ce460d0d12d7db83b654ae3e6efe88
@@ -88,7 +88,7 @@ DEPENDENCIES
88
88
  mocha
89
89
  mocha-on-bacon
90
90
  prettybacon
91
- rake
91
+ rake (~> 12.0)
92
92
 
93
93
  BUNDLED WITH
94
94
  1.13.6
@@ -15,9 +15,9 @@ end
15
15
  module Pod
16
16
  class Command
17
17
  class Whitelist < Command
18
- self.summary = 'Short description of cocoapods-whitelist.'
18
+ self.summary = "Validate Podspec's dependencies against a whitelist of pods."
19
19
  self.description = <<-DESC
20
- Longer description of cocoapods-whitelist.
20
+ Validate Podspec's dependencies against a whitelist of pods.
21
21
  DESC
22
22
 
23
23
  self.arguments = [ CLAide::Argument.new('config', false),
@@ -46,9 +46,16 @@ module Pod
46
46
  def run
47
47
  whitelist = get_whitelist
48
48
  specifications = get_podspec_specifications
49
+
50
+ if specifications.empty?
51
+ UI.puts "No Podspec found".yellow
52
+ return
53
+ end
54
+
49
55
  specifications.map do |specification|
50
56
  validate_dependencies(JSON.parse(specification.to_json), whitelist)
51
57
  end
58
+
52
59
  show_error_message
53
60
  end
54
61
 
@@ -64,7 +71,7 @@ module Pod
64
71
  # Checks the dependencies the project contains are in the whitelist
65
72
  def validate_dependencies(podspec, whitelist, parentName = nil)
66
73
  pod_name = parentName ? "#{parentName}/#{podspec['name']}" : podspec['name']
67
- puts "Verifying dependencies in #{pod_name}"
74
+ UI.puts "Verifying dependencies in #{pod_name}"
68
75
 
69
76
  dependencies = podspec["dependencies"] ? podspec["dependencies"] : []
70
77
  not_allowed = []
@@ -1,3 +1,3 @@
1
1
  module CocoapodsWhitelist
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -95,6 +95,11 @@ module Pod
95
95
  lambda { command.run }.should.not.raise
96
96
  end
97
97
 
98
+ it 'should not fail when no podspecs are found' do
99
+ command = Command.parse(['whitelist', "--config=#{WHITELIST_FILE}"])
100
+ lambda { command.run }.should.not.raise
101
+ end
102
+
98
103
  end
99
104
  end
100
105
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-whitelist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mobile Team