lib/jazzy/podspec_documenter.rb in jazzy-0.8.3 vs lib/jazzy/podspec_documenter.rb in jazzy-0.8.4

- old
+ new

@@ -1,9 +1,10 @@ require 'tmpdir' require 'json' module Jazzy + # rubocop:disable Metrics/ClassLength class PodspecDocumenter attr_reader :podspec def initialize(podspec) @podspec = podspec @@ -12,22 +13,23 @@ # Build documentation from the given options # @param [Config] options def sourcekitten_output(config) installation_root = Pathname(Dir.mktmpdir(['jazzy', podspec.name])) installation_root.rmtree if installation_root.exist? - Pod::Config.instance.with_changes(installation_root: installation_root) do + Pod::Config.instance.with_changes(installation_root: installation_root, + verbose: false) do sandbox = Pod::Sandbox.new(Pod::Config.instance.sandbox_root) installer = Pod::Installer.new(sandbox, podfile) installer.install! stdout = Dir.chdir(sandbox.root) do targets = installer.pod_targets .select { |pt| pt.pod_name == podspec.root.name } .map(&:label) targets.map do |t| args = %W[doc --module-name #{podspec.module_name} -- -target #{t}] - swift_version = (config.swift_version || '3')[0] + '.0' + swift_version = (config.swift_version || '4')[0] + '.0' args << "SWIFT_VERSION=\"#{swift_version}\"" SourceKitten.run_sourcekitten(args) end end stdout.reduce([]) { |a, s| a + JSON.parse(s) }.to_json @@ -115,11 +117,15 @@ [podspec, *podspec.recursive_subspecs].each do |ss| ss.available_platforms.each do |p| # Travis builds take too long when building docs for all available # platforms for the Moya integration spec, so we just document OSX. + # Also Moya's RxSwift subspec doesn't yet support Swift 4, so skip + # that too while we're at it. # TODO: remove once jazzy is fast enough. - next if ENV['JAZZY_INTEGRATION_SPECS'] && p.name != :osx + if ENV['JAZZY_INTEGRATION_SPECS'] + next if (p.name != :osx) || (ss.name == 'Moya/RxSwift') + end target("Jazzy-#{ss.name.gsub('/', '__')}-#{p.name}") do use_frameworks! platform p.name, p.deployment_target pod ss.name, path: path.realpath.to_s end