lib/jazzy/podspec_documenter.rb in jazzy-0.5.0 vs lib/jazzy/podspec_documenter.rb in jazzy-0.6.0
- old
+ new
@@ -14,11 +14,11 @@
installer = Pod::Installer.new(sandbox, podfile)
installer.install!
stdout = Dir.chdir(sandbox.root) do
pod_targets.map do |t|
SourceKitten.run_sourcekitten(
- %W(doc --module-name #{podspec.module_name} -target #{t})
+ %W(doc --module-name #{podspec.module_name} -- -target #{t}),
)
end
end
stdout.reduce([]) { |a, s| a + JSON.load(s) }.to_json
end
@@ -60,26 +60,26 @@
# @!group Config helper methods
def self.author_name(podspec)
if podspec.authors.respond_to? :to_hash
podspec.authors.keys.to_sentence || ''
- else
- if podspec.authors.respond_to? :to_ary
- podspec.authors.to_sentence
- else
- podspec.authors
- end
- end || ''
+ elsif podspec.authors.respond_to? :to_ary
+ podspec.authors.to_sentence
+ end || podspec.authors || ''
end
+ private_class_method :author_name
+
def self.github_file_prefix(podspec)
return unless podspec.source[:url] =~ %r{github.com[:/]+(.+)/(.+)}
org, repo = Regexp.last_match
return unless org && repo
repo.sub!(/\.git$/, '')
return unless rev = podspec.source[:tag] || podspec.source[:commit]
"https://github.com/#{org}/#{repo}/blob/#{rev}"
end
+
+ private_class_method :github_file_prefix
# @!group SourceKitten output helper methods
attr_reader :pod_targets