cocoapods-dependencies 0.2.1 → 0.3.0
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 +4 -4
- data/lib/cocoapods_dependencies.rb +1 -1
- data/lib/pod/command/dependencies.rb +59 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 003404a5b3ff8e166064c092a39b6acdcdfc77a3
|
4
|
+
data.tar.gz: 399610903d83d9062b206590f94788e9f1dadf13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 946125627d445fde912a98e9f09bff89a0f4b786efa1852874a56f7b1b27d3aed6bde3e7cfedc764a3737b016ef393c88768bf5d1c3defe555db40df49a4823a
|
7
|
+
data.tar.gz: 952f705d820b08466c052cd349cd15bed003dd276be8ca43b41bb6756090110fc14d30add4e9b7bc70be68eae692b9701552170dbcbc82db34fc18feec6ed7a3
|
@@ -9,35 +9,86 @@ module Pod
|
|
9
9
|
|
10
10
|
def self.options
|
11
11
|
[
|
12
|
-
['--ignore-lockfile', '
|
12
|
+
['--ignore-lockfile', 'Whether the lockfile should be ignored when calculating the dependency graph'],
|
13
|
+
['--repo-update', 'Fetch external podspecs and run `pod repo update` before calculating the dependency graph'],
|
14
|
+
].concat(super)
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.arguments
|
18
|
+
[
|
19
|
+
CLAide::Argument.new('PODSPEC', false)
|
13
20
|
].concat(super)
|
14
21
|
end
|
15
22
|
|
16
23
|
def initialize(argv)
|
24
|
+
@podspec_name = argv.shift_argument
|
17
25
|
@ignore_lockfile = argv.flag?('ignore-lockfile', false)
|
26
|
+
@repo_update = argv.flag?('repo-update', false)
|
18
27
|
super
|
19
28
|
end
|
20
29
|
|
30
|
+
def validate!
|
31
|
+
super
|
32
|
+
if @podspec_name
|
33
|
+
require 'pathname'
|
34
|
+
path = Pathname.new(@podspec_name)
|
35
|
+
if path.exist?
|
36
|
+
@podspec = Specification.from_file(path)
|
37
|
+
else
|
38
|
+
@podspec = SourcesManager.
|
39
|
+
search(Dependency.new(@podspec_name)).
|
40
|
+
specification.
|
41
|
+
subspec_by_name(@podspec_name)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
21
46
|
def run
|
22
|
-
UI.
|
23
|
-
|
47
|
+
UI.title 'Dependencies' do
|
48
|
+
UI.puts dependencies.to_yaml
|
24
49
|
end
|
25
50
|
end
|
26
51
|
|
27
52
|
def dependencies
|
28
53
|
@dependencies ||= begin
|
29
|
-
verify_podfile_exists!
|
30
54
|
analyzer = Installer::Analyzer.new(
|
31
|
-
|
32
|
-
|
55
|
+
sandbox,
|
56
|
+
podfile,
|
33
57
|
@ignore_lockfile ? nil : config.lockfile
|
34
58
|
)
|
35
|
-
|
36
|
-
|
59
|
+
|
60
|
+
integrate_targets = config.integrate_targets
|
61
|
+
config.integrate_targets = false
|
62
|
+
specs = analyzer.analyze(@repo_update).specs_by_target.values.flatten(1)
|
63
|
+
config.integrate_targets = integrate_targets
|
64
|
+
|
65
|
+
lockfile = Lockfile.generate(podfile, specs)
|
37
66
|
pods = lockfile.to_hash['PODS']
|
38
67
|
end
|
39
68
|
end
|
40
69
|
|
70
|
+
def podfile
|
71
|
+
@podfile ||= begin
|
72
|
+
if podspec = @podspec
|
73
|
+
platform = podspec.available_platforms.first
|
74
|
+
platform_name, platform_version = platform.name, platform.deployment_target.to_s
|
75
|
+
sources = SourcesManager.all.map(&:url)
|
76
|
+
Podfile.new do
|
77
|
+
sources.each { |s| source s }
|
78
|
+
platform platform_name, platform_version
|
79
|
+
pod podspec.name
|
80
|
+
end
|
81
|
+
else
|
82
|
+
verify_podfile_exists!
|
83
|
+
config.podfile
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
def sandbox
|
89
|
+
@podspec ? Sandbox.new(Dir.mktmpdir) : config.sandbox
|
90
|
+
end
|
91
|
+
|
41
92
|
end
|
42
93
|
end
|
43
94
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-dependencies
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel E. Giddins
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|