lib/puppet_forge/v3/release.rb
# Downloads the Release tarball to the specified file path.
#
# @param path [Pathname]
# @return [void]
Downloads the Release tarball to the specified file path.
Downloads the Release tarball to the specified file path .
def download(path)
        resp = self.class.conn.get(download_url)
        path.open('wb') { |fh| fh.write(resp.body) }
      rescue Faraday::ResourceNotFound => e
        raise PuppetForge::ReleaseNotFound, (_("The module release %{release_slug} does not exist on %{url}.") % {release_slug: slug, url: self.class.conn.url_prefix}), e.backtrace
      rescue Faraday::ClientError => e
        if e.response && e.response[:status] == 403
          raise PuppetForge::ReleaseForbidden.from_response(e.response)
        else
          raise e
        end
      end
def download ( path ) resp = self . class . conn . get ( download_url ) path . open ( 'wb' ) { | fh | fh . write ( resp . body ) } rescue Faraday :: ResourceNotFound => e raise PuppetForge :: ReleaseNotFound , ( _ ( "The module release %{release_slug} does not exist on %{url}." ) % { release_slug : slug , url : self . class . conn . url_prefix } ) , e . backtrace rescue Faraday :: ClientError => e if e . response && e . response [ :status ] == 403 raise PuppetForge :: ReleaseForbidden . from_response ( e . response ) else raise e end end
Downloads the Release tarball to the specified file path.
Downloads the Release tarball to the specified file path .
None
void
path
<not_specific>
<not_specific>
None