Module: SwaggerUIStandalone
- Defined in:
- lib/swagger_ui_standalone.rb,
lib/swagger_ui_standalone/cli.rb,
lib/swagger_ui_standalone/http.rb,
lib/swagger_ui_standalone/github.rb,
lib/swagger_ui_standalone/version.rb,
lib/swagger_ui_standalone/zipball.rb
Defined Under Namespace
Modules: GitHub, HTTP, Zipball Classes: CLI
Constant Summary collapse
- SOURCE_REPO =
"swagger-api/swagger-ui"- DIST_DIR =
"dist"- VERSION =
"0.2.5"
Class Method Summary collapse
Methods included from GitHub
archive_link, latest_release_archive_link
Methods included from HTTP
Methods included from Zipball
Class Method Details
.download_source(output_directory, repo: SOURCE_REPO, ref: nil, pattern: "*/#{DIST_DIR}/**") ⇒ Object
16 17 18 19 20 |
# File 'lib/swagger_ui_standalone.rb', line 16 def self.download_source(output_directory, repo: SOURCE_REPO, ref: nil, pattern: "*/#{DIST_DIR}/**") url = ref.nil? ? latest_release_archive_link(repo) : archive_link(repo, ref) zipball = download url extract zipball, pattern:, destination_directory: output_directory end |