Module: GithubReleases
- Defined in:
- lib/github_releases.rb,
lib/github_releases/engine.rb,
lib/github_releases/version.rb,
app/helpers/github_releases/application_helper.rb,
app/controllers/github_releases/application_controller.rb
Defined Under Namespace
Modules: ApplicationHelper, Client
Classes: ApplicationController, Engine, InstallGenerator, ReleasesController
Constant Summary
collapse
- RELEASES_KEY =
'releases'
- RELEASE_KEY =
'release'
- LATEST_ID =
'latest'
- VERSION =
'0.0.6'
Class Method Summary
collapse
Class Method Details
.all ⇒ Object
9
10
11
|
# File 'lib/github_releases.rb', line 9
def all
fetch(RELEASES_KEY, endpoint)
end
|
.current_version ⇒ Object
17
18
19
|
# File 'lib/github_releases.rb', line 17
def current_version
ENV['CURRENT_VERSION'] || find(LATEST_ID)['tag_name']
end
|
.find(id) ⇒ Object
13
14
15
|
# File 'lib/github_releases.rb', line 13
def find(id)
fetch("#{RELEASE_KEY}-#{id}", "#{endpoint}/#{id}")
end
|
.setup {|_self| ... } ⇒ Object
17
18
19
|
# File 'lib/github_releases/engine.rb', line 17
def self.setup(&block)
yield self
end
|