Class: Torba::RemoteSources::GithubRelease
- Defined in:
- lib/torba/remote_sources/github_release.rb
Overview
Represents / Github release.
Instance Attribute Summary collapse
- #repository_name ⇒ String readonly
- #repository_user ⇒ String readonly
-
#source ⇒ String
readonly
Repository user and name.
-
#tag ⇒ String
readonly
Repository tag.
Attributes inherited from Zip
Instance Method Summary collapse
-
#initialize(source, tag) ⇒ GithubRelease
constructor
A new instance of GithubRelease.
Methods included from Common
Constructor Details
#initialize(source, tag) ⇒ GithubRelease
Returns a new instance of GithubRelease.
29 30 31 32 33 34 35 |
# File 'lib/torba/remote_sources/github_release.rb', line 29 def initialize(source, tag) @source = source @tag = tag @repository_user, @repository_name = source.split("/") super("https://github.com/#{source}/archive/#{tag}.zip") @digest = "#{repository_name}-#{Torba.digest(url)}" end |
Instance Attribute Details
#repository_name ⇒ String (readonly)
16 17 18 |
# File 'lib/torba/remote_sources/github_release.rb', line 16 def repository_name @repository_name end |
#repository_user ⇒ String (readonly)
20 21 22 |
# File 'lib/torba/remote_sources/github_release.rb', line 20 def repository_user @repository_user end |
#source ⇒ String (readonly)
Returns repository user and name.
12 13 14 |
# File 'lib/torba/remote_sources/github_release.rb', line 12 def source @source end |
#tag ⇒ String (readonly)
Returns repository tag.
25 26 27 |
# File 'lib/torba/remote_sources/github_release.rb', line 25 def tag @tag end |