github_releases 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8df93686d5c35a861acdb0fd62da461a9f8690d8
4
- data.tar.gz: 9c5e71e95a7cf628918e55c591b73e68ffbb2113
3
+ metadata.gz: 669c33f3e39d6f7bd4782c196b71765274cdcc6d
4
+ data.tar.gz: e0bcb779856ce4f80a4c05f48dd14f461eadd9f5
5
5
  SHA512:
6
- metadata.gz: c2792271d180d4b92309766c26379623f8f75952ca6d3dbcc5a123924c16fbb23f67d08f65552d78535e2a1c0249e4c10a367da02630edb33cd703421850dc7f
7
- data.tar.gz: 16b740d878071b602019adb1aeac68b1ab9a4387ae0f75c5a6005bb10e5fb741b42cfba728074b52caaee7da170914e13168f6a78b905ded97de3b812829140e
6
+ metadata.gz: e709985355aa787cd8eebb41f4eed9baa66029aaa7069b36de1530592fccb141b1f8f4e8d0becde5589acb04c9bdc289184529dd796f05dc5cddb2223bed97b7
7
+ data.tar.gz: 1878b7cb7f824c841561a576f982c041f6b2a29f9a6470fe91fb54faaade21ddb1e6aac044056ab484c56e8d03723ff3af73a4f1a9cda47a248ccffe47ee768f
data/README.md CHANGED
@@ -46,44 +46,30 @@ An app that utilizes Github's release feature
46
46
  ```
47
47
 
48
48
  This mounts the engine at `/releases`.
49
-
50
- If you're using a pure Rails app, and want to use the current_version view helper, add GithubReleases::ApplicationHelper to your ApplicationController.
51
-
52
- ```ruby
53
- class ApplicationController < ActionController::Base
54
- helper GithubReleases::ApplicationHelper
55
- end
56
- ```
57
49
 
58
50
  ## Usage
59
51
 
60
52
  The engine exposes an endpoint at '/releases' that will list all of the app's
61
- releases in json. '/releases/latest' will expose the latest release to use in
62
- displaying your apps current version. You may also access any single release
63
- by id '/releases/:id'.
53
+ releases in json. '/releases/latest' will expose the latest release. '/releases/current_version' will return the version number of the latest release. You may also access any single release by id '/releases/:id'.
64
54
 
65
- For pure Rails apps, you may access the current_version of your app with a view helper...
55
+ For pure Rails apps, you may access the current_version of your app with a class method...
66
56
 
67
57
  ```Ruby
68
- <%= current_version %>
58
+ <%= GithubReleases.current_version %>
69
59
  ```
70
60
 
71
- Or if you don't want to add the helper module to your controller, you can call the class directly...
72
-
73
- ```Ruby
74
- <%= GithubReleases.release('latest')['tag_name'] %>
75
- ```
61
+ For staging environments or temp fixes, you may set a CURRENT_VERSION environment variable that will override the Github version number.
76
62
 
77
63
  **IMPORTANT** All calls to the GitHub API are cached. It's up to you to refresh the cache when releases should be updated. There are two ways to do this. Via the rake task...
78
64
 
79
65
  ```
80
- rake github_releases:refresh_cache
66
+ rake github_releases:refresh
81
67
  ```
82
68
 
83
69
  Or via a Ruby class method...
84
70
 
85
71
  ```Ruby
86
- GithubReleases.refresh_cache
72
+ GithubReleases.refresh
87
73
  ```
88
74
 
89
75
  One strategy is to run the rake task in a post deploy hook.
@@ -1,3 +1,3 @@
1
1
  module GithubReleases
2
- VERSION = "0.0.4"
2
+ VERSION = '0.0.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github_releases
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
- - bbauer
7
+ - Brian Bauer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-04 00:00:00.000000000 Z
11
+ date: 2015-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -45,7 +45,7 @@ dependencies:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
- type: :runtime
48
+ type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
@@ -80,7 +80,7 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
- description: Exposes an apps Github releases
83
+ description: Exposes an apps Github releases and current version
84
84
  email:
85
85
  - brian.bauer@g5platform.com
86
86
  executables: []
@@ -105,7 +105,7 @@ files:
105
105
  - lib/github_releases/version.rb
106
106
  - lib/tasks/github_releases_tasks.rake
107
107
  - lib/tasks/refresh.rake
108
- homepage: ''
108
+ homepage: https://rubygems.org/gems/github_releases
109
109
  licenses:
110
110
  - MIT
111
111
  metadata: {}
@@ -128,5 +128,5 @@ rubyforge_project:
128
128
  rubygems_version: 2.4.5
129
129
  signing_key:
130
130
  specification_version: 4
131
- summary: Exposes an apps Github releases
131
+ summary: Exposes an apps Github releases and current version
132
132
  test_files: []