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.3"
Class Method Summary
collapse
Class Method Details
.refresh_cache ⇒ Object
9
10
11
12
|
# File 'lib/github_releases.rb', line 9
def refresh_cache
cache.write(RELEASES_KEY, get(endpoint))
cache.write("#{RELEASE_KEY}-#{LATEST_ID}", get("#{endpoint}/#{LATEST_ID}"))
end
|
.release(id) ⇒ Object
18
19
20
|
# File 'lib/github_releases.rb', line 18
def release(id)
fetch("#{RELEASE_KEY}-#{id}", "#{endpoint}/#{id}")
end
|
.releases ⇒ Object
14
15
16
|
# File 'lib/github_releases.rb', line 14
def releases
fetch(RELEASES_KEY, endpoint)
end
|
.setup {|_self| ... } ⇒ Object
17
18
19
|
# File 'lib/github_releases/engine.rb', line 17
def self.setup(&block)
yield self
end
|