cocoapods 0.39.0.beta.1 → 0.39.0.beta.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 +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/cocoapods/gem_version.rb +1 -1
- metadata +35 -63
- data/lib/cocoapods/command/cache/clean.rb +0 -90
- data/lib/cocoapods/command/cache/list.rb +0 -69
- data/lib/cocoapods/command/repo/add.rb +0 -53
- data/lib/cocoapods/command/repo/lint.rb +0 -77
- data/lib/cocoapods/command/repo/list.rb +0 -93
- data/lib/cocoapods/command/repo/push.rb +0 -223
- data/lib/cocoapods/command/repo/remove.rb +0 -36
- data/lib/cocoapods/command/repo/update.rb +0 -27
- data/lib/cocoapods/command/spec/cat.rb +0 -51
- data/lib/cocoapods/command/spec/create.rb +0 -279
- data/lib/cocoapods/command/spec/edit.rb +0 -94
- data/lib/cocoapods/command/spec/lint.rb +0 -119
- data/lib/cocoapods/command/spec/which.rb +0 -43
- data/lib/cocoapods/generator/acknowledgements/markdown.rb +0 -38
- data/lib/cocoapods/generator/acknowledgements/plist.rb +0 -80
- data/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb +0 -260
- data/lib/cocoapods/generator/xcconfig/pod_xcconfig.rb +0 -83
- data/lib/cocoapods/generator/xcconfig/xcconfig_helper.rb +0 -213
- data/lib/cocoapods/installer/analyzer/analysis_result.rb +0 -46
- data/lib/cocoapods/installer/analyzer/locking_dependency_analyzer.rb +0 -79
- data/lib/cocoapods/installer/analyzer/sandbox_analyzer.rb +0 -262
- data/lib/cocoapods/installer/analyzer/specs_state.rb +0 -76
- data/lib/cocoapods/installer/analyzer/target_inspection_result.rb +0 -41
- data/lib/cocoapods/installer/analyzer/target_inspector.rb +0 -203
- data/lib/cocoapods/installer/target_installer/aggregate_target_installer.rb +0 -186
- data/lib/cocoapods/installer/target_installer/pod_target_installer.rb +0 -297
- data/lib/cocoapods/installer/user_project_integrator/target_integrator.rb +0 -318
- data/lib/cocoapods/installer/user_project_integrator/target_integrator/xcconfig_integrator.rb +0 -173
@@ -1,69 +0,0 @@
|
|
1
|
-
module Pod
|
2
|
-
class Command
|
3
|
-
class Cache < Command
|
4
|
-
class List < Cache
|
5
|
-
self.summary = 'List the paths of pod caches for each known pod'
|
6
|
-
|
7
|
-
self.description = <<-DESC
|
8
|
-
Shows the content of the pods cache as a YAML tree output, organized by pod.
|
9
|
-
If `NAME` is given, only the caches for that pod will be included in the output.
|
10
|
-
DESC
|
11
|
-
|
12
|
-
self.arguments = [
|
13
|
-
CLAide::Argument.new('NAME', false),
|
14
|
-
]
|
15
|
-
|
16
|
-
def self.options
|
17
|
-
[[
|
18
|
-
'--short', 'Only print the path relative to the cache root'
|
19
|
-
]].concat(super)
|
20
|
-
end
|
21
|
-
|
22
|
-
def initialize(argv)
|
23
|
-
@pod_name = argv.shift_argument
|
24
|
-
@short_output = argv.flag?('short')
|
25
|
-
super
|
26
|
-
end
|
27
|
-
|
28
|
-
def run
|
29
|
-
UI.puts("$CACHE_ROOT: #{@cache.root}") if @short_output
|
30
|
-
if @pod_name.nil? # Print all
|
31
|
-
@cache.cache_descriptors_per_pod.each do |pod_name, cache_descriptors|
|
32
|
-
print_pod_cache_infos(pod_name, cache_descriptors)
|
33
|
-
end
|
34
|
-
else # Print only for the requested pod
|
35
|
-
cache_descriptors = @cache.cache_descriptors_per_pod[@pod_name]
|
36
|
-
if cache_descriptors.nil?
|
37
|
-
UI.notice("No cache for pod named #{@pod_name} found")
|
38
|
-
else
|
39
|
-
print_pod_cache_infos(@pod_name, cache_descriptors)
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
private
|
45
|
-
|
46
|
-
# Prints the list of specs & pod cache dirs for a single pod name.
|
47
|
-
#
|
48
|
-
# This output is valid YAML so it can be parsed with 3rd party tools
|
49
|
-
#
|
50
|
-
# @param [Array<Hash>] cache_descriptors
|
51
|
-
# The various infos about a pod cache. Keys are
|
52
|
-
# :spec_file, :version, :release and :slug
|
53
|
-
#
|
54
|
-
def print_pod_cache_infos(pod_name, cache_descriptors)
|
55
|
-
UI.puts "#{pod_name}:"
|
56
|
-
cache_descriptors.each do |desc|
|
57
|
-
if @short_output
|
58
|
-
[:spec_file, :slug].each { |k| desc[k] = desc[k].relative_path_from(@cache.root) }
|
59
|
-
end
|
60
|
-
UI.puts(" - Version: #{desc[:version]}")
|
61
|
-
UI.puts(" Type: #{pod_type(desc)}")
|
62
|
-
UI.puts(" Spec: #{desc[:spec_file]}")
|
63
|
-
UI.puts(" Pod: #{desc[:slug]}")
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
@@ -1,53 +0,0 @@
|
|
1
|
-
module Pod
|
2
|
-
class Command
|
3
|
-
class Repo < Command
|
4
|
-
class Add < Repo
|
5
|
-
self.summary = 'Add a spec repo.'
|
6
|
-
|
7
|
-
self.description = <<-DESC
|
8
|
-
Clones `URL` in the local spec-repos directory at `~/.cocoapods/repos/`. The
|
9
|
-
remote can later be referred to by `NAME`.
|
10
|
-
DESC
|
11
|
-
|
12
|
-
self.arguments = [
|
13
|
-
CLAide::Argument.new('NAME', true),
|
14
|
-
CLAide::Argument.new('URL', true),
|
15
|
-
CLAide::Argument.new('BRANCH', false),
|
16
|
-
]
|
17
|
-
|
18
|
-
def self.options
|
19
|
-
[
|
20
|
-
['--shallow', 'Create a shallow clone (fast clone, but no push capabilities)'],
|
21
|
-
].concat(super)
|
22
|
-
end
|
23
|
-
|
24
|
-
def initialize(argv)
|
25
|
-
@shallow = argv.flag?('shallow', false)
|
26
|
-
@name, @url, @branch = argv.shift_argument, argv.shift_argument, argv.shift_argument
|
27
|
-
super
|
28
|
-
end
|
29
|
-
|
30
|
-
def validate!
|
31
|
-
super
|
32
|
-
unless @name && @url
|
33
|
-
help! 'Adding a repo needs a `NAME` and a `URL`.'
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
def run
|
38
|
-
prefix = @shallow ? 'Creating shallow clone of' : 'Cloning'
|
39
|
-
UI.section("#{prefix} spec repo `#{@name}` from `#{@url}`#{" (branch `#{@branch}`)" if @branch}") do
|
40
|
-
config.repos_dir.mkpath
|
41
|
-
Dir.chdir(config.repos_dir) do
|
42
|
-
command = ['clone', @url, @name]
|
43
|
-
command << '--depth=1' if @shallow
|
44
|
-
git!(command)
|
45
|
-
end
|
46
|
-
Dir.chdir(dir) { git!('checkout', @branch) } if @branch
|
47
|
-
SourcesManager.check_version_information(dir)
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
@@ -1,77 +0,0 @@
|
|
1
|
-
module Pod
|
2
|
-
class Command
|
3
|
-
class Repo < Command
|
4
|
-
class Lint < Repo
|
5
|
-
self.summary = 'Validates all specs in a repo.'
|
6
|
-
|
7
|
-
self.description = <<-DESC
|
8
|
-
Lints the spec-repo `NAME`. If a directory is provided it is assumed
|
9
|
-
to be the root of a repo. Finally, if `NAME` is not provided this
|
10
|
-
will lint all the spec-repos known to CocoaPods.
|
11
|
-
DESC
|
12
|
-
|
13
|
-
self.arguments = [
|
14
|
-
CLAide::Argument.new(%w(NAME DIRECTORY), false),
|
15
|
-
]
|
16
|
-
|
17
|
-
def self.options
|
18
|
-
[
|
19
|
-
['--only-errors', 'Lint presents only the errors'],
|
20
|
-
].concat(super)
|
21
|
-
end
|
22
|
-
|
23
|
-
def initialize(argv)
|
24
|
-
@name = argv.shift_argument
|
25
|
-
@only_errors = argv.flag?('only-errors')
|
26
|
-
super
|
27
|
-
end
|
28
|
-
|
29
|
-
# Run the command
|
30
|
-
#
|
31
|
-
# @todo Part of this logic needs to be ported to cocoapods-core so web
|
32
|
-
# services can validate the repo.
|
33
|
-
#
|
34
|
-
# @todo add UI.print and enable print statements again.
|
35
|
-
#
|
36
|
-
def run
|
37
|
-
if @name
|
38
|
-
dirs = File.exist?(@name) ? [Pathname.new(@name)] : [dir]
|
39
|
-
else
|
40
|
-
dirs = config.repos_dir.children.select(&:directory?)
|
41
|
-
end
|
42
|
-
dirs.each do |dir|
|
43
|
-
SourcesManager.check_version_information(dir)
|
44
|
-
UI.puts "\nLinting spec repo `#{dir.realpath.basename}`\n".yellow
|
45
|
-
|
46
|
-
validator = Source::HealthReporter.new(dir)
|
47
|
-
validator.pre_check do |_name, _version|
|
48
|
-
UI.print '.'
|
49
|
-
end
|
50
|
-
report = validator.analyze
|
51
|
-
UI.puts
|
52
|
-
UI.puts
|
53
|
-
|
54
|
-
report.pods_by_warning.each do |message, versions_by_name|
|
55
|
-
UI.puts "-> #{message}".yellow
|
56
|
-
versions_by_name.each { |name, versions| UI.puts " - #{name} (#{versions * ', '})" }
|
57
|
-
UI.puts
|
58
|
-
end
|
59
|
-
|
60
|
-
report.pods_by_error.each do |message, versions_by_name|
|
61
|
-
UI.puts "-> #{message}".red
|
62
|
-
versions_by_name.each { |name, versions| UI.puts " - #{name} (#{versions * ', '})" }
|
63
|
-
UI.puts
|
64
|
-
end
|
65
|
-
|
66
|
-
UI.puts "Analyzed #{report.analyzed_paths.count} podspecs files.\n\n"
|
67
|
-
if report.pods_by_error.count.zero?
|
68
|
-
UI.puts 'All the specs passed validation.'.green << "\n\n"
|
69
|
-
else
|
70
|
-
raise Informative, "#{report.pods_by_error.count} podspecs failed validation."
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
77
|
-
end
|
@@ -1,93 +0,0 @@
|
|
1
|
-
module Pod
|
2
|
-
class Command
|
3
|
-
class Repo < Command
|
4
|
-
class List < Repo
|
5
|
-
self.summary = 'List repos'
|
6
|
-
|
7
|
-
self.description = <<-DESC
|
8
|
-
List the repos from the local spec-repos directory at `~/.cocoapods/repos/.`
|
9
|
-
DESC
|
10
|
-
|
11
|
-
def self.options
|
12
|
-
[['--count-only', 'Show the total number of repos']].concat(super)
|
13
|
-
end
|
14
|
-
|
15
|
-
def initialize(argv)
|
16
|
-
@count_only = argv.flag?('count-only')
|
17
|
-
super
|
18
|
-
end
|
19
|
-
|
20
|
-
# @output Examples:
|
21
|
-
#
|
22
|
-
# master
|
23
|
-
# - type: git (master)
|
24
|
-
# - URL: https://github.com/CocoaPods/Specs.git
|
25
|
-
# - path: /Users/lascorbe/.cocoapods/repos/master
|
26
|
-
#
|
27
|
-
# test
|
28
|
-
# - type: local copy
|
29
|
-
# - URL: file:///Users/lascorbe/.cocoapods/repos/test
|
30
|
-
# - path: /Users/lascorbe/.cocoapods/repos/test
|
31
|
-
#
|
32
|
-
def run
|
33
|
-
sources = SourcesManager.all
|
34
|
-
print_sources(sources) unless @count_only
|
35
|
-
print_count_of_sources(sources)
|
36
|
-
end
|
37
|
-
|
38
|
-
private
|
39
|
-
|
40
|
-
# Pretty-prints the source at the given path.
|
41
|
-
#
|
42
|
-
# @param [Source] source
|
43
|
-
# The source repository to be printed.
|
44
|
-
#
|
45
|
-
# @return [void]
|
46
|
-
#
|
47
|
-
def print_source(source)
|
48
|
-
if SourcesManager.git_repo?(source.repo)
|
49
|
-
Dir.chdir(source.repo) do
|
50
|
-
branch_name = `git name-rev --name-only HEAD 2>/dev/null`.strip
|
51
|
-
branch_name = 'unknown' if branch_name.empty?
|
52
|
-
UI.puts "- Type: git (#{branch_name})"
|
53
|
-
end
|
54
|
-
else
|
55
|
-
UI.puts '- Type: local'
|
56
|
-
end
|
57
|
-
|
58
|
-
UI.puts "- URL: #{source.url}"
|
59
|
-
UI.puts "- Path: #{source.repo}"
|
60
|
-
end
|
61
|
-
|
62
|
-
# Pretty-prints the given sources.
|
63
|
-
#
|
64
|
-
# @param [Array<Source>] sources
|
65
|
-
# The sources that should be printed.
|
66
|
-
#
|
67
|
-
# @return [void]
|
68
|
-
#
|
69
|
-
def print_sources(sources)
|
70
|
-
sources.each do |source|
|
71
|
-
UI.title source.name do
|
72
|
-
print_source(source)
|
73
|
-
end
|
74
|
-
end
|
75
|
-
UI.puts "\n"
|
76
|
-
end
|
77
|
-
|
78
|
-
# Pretty-prints the number of sources.
|
79
|
-
#
|
80
|
-
# @param [Array<Source>] sources
|
81
|
-
# The sources whose count should be printed.
|
82
|
-
#
|
83
|
-
# @return [void]
|
84
|
-
#
|
85
|
-
def print_count_of_sources(sources)
|
86
|
-
number_of_repos = sources.length
|
87
|
-
repo_string = number_of_repos != 1 ? 'repos' : 'repo'
|
88
|
-
UI.puts "#{number_of_repos} #{repo_string}".green
|
89
|
-
end
|
90
|
-
end
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|
@@ -1,223 +0,0 @@
|
|
1
|
-
require 'fileutils'
|
2
|
-
require 'active_support/core_ext/string/inflections'
|
3
|
-
|
4
|
-
module Pod
|
5
|
-
class Command
|
6
|
-
class Repo < Command
|
7
|
-
class Push < Repo
|
8
|
-
self.summary = 'Push new specifications to a spec-repo'
|
9
|
-
|
10
|
-
self.description = <<-DESC
|
11
|
-
Validates `NAME.podspec` or `*.podspec` in the current working dir,
|
12
|
-
creates a directory and version folder for the pod in the local copy of
|
13
|
-
`REPO` (~/.cocoapods/repos/[REPO]), copies the podspec file into the
|
14
|
-
version directory, and finally it pushes `REPO` to its remote.
|
15
|
-
DESC
|
16
|
-
|
17
|
-
self.arguments = [
|
18
|
-
CLAide::Argument.new('REPO', true),
|
19
|
-
CLAide::Argument.new('NAME.podspec', false),
|
20
|
-
]
|
21
|
-
|
22
|
-
def self.options
|
23
|
-
[
|
24
|
-
['--allow-warnings', 'Allows pushing even if there are warnings'],
|
25
|
-
['--use-libraries', 'Linter uses static libraries to install the spec'],
|
26
|
-
['--sources=https://github.com/artsy/Specs,master', 'The sources from which to pull dependent pods ' \
|
27
|
-
'(defaults to all available repos). ' \
|
28
|
-
'Multiple sources must be comma-delimited.'],
|
29
|
-
['--local-only', 'Does not perform the step of pushing REPO to its remote'],
|
30
|
-
['--no-private', 'Lint includes checks that apply only to public repos'],
|
31
|
-
].concat(super)
|
32
|
-
end
|
33
|
-
|
34
|
-
def initialize(argv)
|
35
|
-
@allow_warnings = argv.flag?('allow-warnings')
|
36
|
-
@local_only = argv.flag?('local-only')
|
37
|
-
@repo = argv.shift_argument
|
38
|
-
@source_urls = argv.option('sources', SourcesManager.all.map(&:url).join(',')).split(',')
|
39
|
-
@podspec = argv.shift_argument
|
40
|
-
@use_frameworks = !argv.flag?('use-libraries')
|
41
|
-
@private = argv.flag?('private', true)
|
42
|
-
super
|
43
|
-
end
|
44
|
-
|
45
|
-
def validate!
|
46
|
-
super
|
47
|
-
help! 'A spec-repo name is required.' unless @repo
|
48
|
-
end
|
49
|
-
|
50
|
-
def run
|
51
|
-
check_if_master_repo
|
52
|
-
validate_podspec_files
|
53
|
-
check_repo_status
|
54
|
-
update_repo
|
55
|
-
add_specs_to_repo
|
56
|
-
push_repo unless @local_only
|
57
|
-
end
|
58
|
-
|
59
|
-
#---------------------------------------------------------------------#
|
60
|
-
|
61
|
-
private
|
62
|
-
|
63
|
-
# @!group Push sub-steps
|
64
|
-
|
65
|
-
extend Executable
|
66
|
-
executable :git
|
67
|
-
|
68
|
-
# Temporary check to ensure that users do not push accidentally private
|
69
|
-
# specs to the master repo.
|
70
|
-
#
|
71
|
-
def check_if_master_repo
|
72
|
-
remotes = Dir.chdir(repo_dir) { `git remote -v 2>&1` }
|
73
|
-
master_repo_urls = [
|
74
|
-
'git@github.com:CocoaPods/Specs.git',
|
75
|
-
'https://github.com/CocoaPods/Specs.git',
|
76
|
-
]
|
77
|
-
is_master_repo = master_repo_urls.any? do |url|
|
78
|
-
remotes.include?(url)
|
79
|
-
end
|
80
|
-
|
81
|
-
if is_master_repo
|
82
|
-
raise Informative, 'To push to the CocoaPods master repo use ' \
|
83
|
-
"the `pod trunk push` command.\n\nIf you are using a fork of " \
|
84
|
-
'the master repo for private purposes we recommend to migrate ' \
|
85
|
-
'to a clean private repo. To disable this check remove the ' \
|
86
|
-
'remote pointing to the CocoaPods master repo.'
|
87
|
-
end
|
88
|
-
end
|
89
|
-
|
90
|
-
# Performs a full lint against the podspecs.
|
91
|
-
#
|
92
|
-
def validate_podspec_files
|
93
|
-
UI.puts "\nValidating #{'spec'.pluralize(count)}".yellow
|
94
|
-
podspec_files.each do |podspec|
|
95
|
-
validator = Validator.new(podspec, @source_urls)
|
96
|
-
validator.allow_warnings = @allow_warnings
|
97
|
-
validator.use_frameworks = @use_frameworks
|
98
|
-
validator.ignore_public_only_results = @private
|
99
|
-
begin
|
100
|
-
validator.validate
|
101
|
-
rescue => e
|
102
|
-
raise Informative, "The `#{podspec}` specification does not validate." \
|
103
|
-
"\n\n#{e.message}"
|
104
|
-
end
|
105
|
-
raise Informative, "The `#{podspec}` specification does not validate." unless validator.validated?
|
106
|
-
end
|
107
|
-
end
|
108
|
-
|
109
|
-
# Checks that the repo is clean.
|
110
|
-
#
|
111
|
-
# @raise If the repo is not clean.
|
112
|
-
#
|
113
|
-
# @todo Add specs for staged and unstaged files.
|
114
|
-
#
|
115
|
-
# @todo Gracefully handle the case where source is not under git
|
116
|
-
# source control.
|
117
|
-
#
|
118
|
-
# @return [void]
|
119
|
-
#
|
120
|
-
def check_repo_status
|
121
|
-
clean = Dir.chdir(repo_dir) { `git status --porcelain 2>&1` } == ''
|
122
|
-
raise Informative, "The repo `#{@repo}` at #{UI.path repo_dir} is not clean" unless clean
|
123
|
-
end
|
124
|
-
|
125
|
-
# Updates the git repo against the remote.
|
126
|
-
#
|
127
|
-
# @return [void]
|
128
|
-
#
|
129
|
-
def update_repo
|
130
|
-
UI.puts "Updating the `#{@repo}' repo\n".yellow
|
131
|
-
Dir.chdir(repo_dir) { UI.puts `git pull 2>&1` }
|
132
|
-
end
|
133
|
-
|
134
|
-
# Commits the podspecs to the source, which should be a git repo.
|
135
|
-
#
|
136
|
-
# @note The pre commit hook of the repo is skipped as the podspecs have
|
137
|
-
# already been linted.
|
138
|
-
#
|
139
|
-
# @return [void]
|
140
|
-
#
|
141
|
-
def add_specs_to_repo
|
142
|
-
UI.puts "\nAdding the #{'spec'.pluralize(count)} to the `#{@repo}' repo\n".yellow
|
143
|
-
podspec_files.each do |spec_file|
|
144
|
-
spec = Pod::Specification.from_file(spec_file)
|
145
|
-
output_path = File.join(repo_dir, spec.name, spec.version.to_s)
|
146
|
-
if Pathname.new(output_path).exist?
|
147
|
-
message = "[Fix] #{spec}"
|
148
|
-
elsif Pathname.new(File.join(repo_dir, spec.name)).exist?
|
149
|
-
message = "[Update] #{spec}"
|
150
|
-
else
|
151
|
-
message = "[Add] #{spec}"
|
152
|
-
end
|
153
|
-
|
154
|
-
FileUtils.mkdir_p(output_path)
|
155
|
-
FileUtils.cp(spec_file, output_path)
|
156
|
-
Dir.chdir(repo_dir) do
|
157
|
-
# only commit if modified
|
158
|
-
if git!('status', '--porcelain').include?(spec.name)
|
159
|
-
UI.puts " - #{message}"
|
160
|
-
git!('add', spec.name)
|
161
|
-
git!('commit', '--no-verify', '-m', message)
|
162
|
-
else
|
163
|
-
UI.puts " - [No change] #{spec}"
|
164
|
-
end
|
165
|
-
end
|
166
|
-
end
|
167
|
-
end
|
168
|
-
|
169
|
-
# Pushes the git repo against the remote.
|
170
|
-
#
|
171
|
-
# @return [void]
|
172
|
-
#
|
173
|
-
def push_repo
|
174
|
-
UI.puts "\nPushing the `#{@repo}' repo\n".yellow
|
175
|
-
Dir.chdir(repo_dir) { UI.puts `git push origin master 2>&1` }
|
176
|
-
end
|
177
|
-
|
178
|
-
#---------------------------------------------------------------------#
|
179
|
-
|
180
|
-
private
|
181
|
-
|
182
|
-
# @!group Private helpers
|
183
|
-
|
184
|
-
# @return [Pathname] The directory of the repository.
|
185
|
-
#
|
186
|
-
def repo_dir
|
187
|
-
specs_dir = Pathname.new(File.join(config.repos_dir, @repo, 'Specs'))
|
188
|
-
dir = config.repos_dir + @repo
|
189
|
-
if specs_dir.exist?
|
190
|
-
dir = specs_dir
|
191
|
-
elsif dir.exist?
|
192
|
-
dir
|
193
|
-
else
|
194
|
-
raise Informative, "`#{@repo}` repo not found either in #{specs_dir} or #{dir}"
|
195
|
-
end
|
196
|
-
dir
|
197
|
-
end
|
198
|
-
|
199
|
-
# @return [Array<Pathname>] The path of the specifications to push.
|
200
|
-
#
|
201
|
-
def podspec_files
|
202
|
-
if @podspec
|
203
|
-
path = Pathname(@podspec)
|
204
|
-
raise Informative, "Couldn't find #{@podspec}" unless path.exist?
|
205
|
-
[path]
|
206
|
-
else
|
207
|
-
files = Pathname.glob('*.podspec{,.json}')
|
208
|
-
raise Informative, "Couldn't find any podspec files in current directory" if files.empty?
|
209
|
-
files
|
210
|
-
end
|
211
|
-
end
|
212
|
-
|
213
|
-
# @return [Integer] The number of the podspec files to push.
|
214
|
-
#
|
215
|
-
def count
|
216
|
-
podspec_files.count
|
217
|
-
end
|
218
|
-
|
219
|
-
#---------------------------------------------------------------------#
|
220
|
-
end
|
221
|
-
end
|
222
|
-
end
|
223
|
-
end
|