gem_release_helper 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +6 -1
- data/lib/gem_release_helper/tasks/generator/changelog.rb +24 -3
- data/lib/gem_release_helper/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 09406180e777f47eb6c74e78a8af005d8c78f4bd
|
4
|
+
data.tar.gz: 4b1823f475442108b9c1c6eb1b8a7eb94f719d85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3616a684c12df12da36c70f706e7d7529b98bc8c73f508df5ed05b671aea070c452a759d892f58c35d90bbb51dec86f4185df7dd9ac6eafa0e641bd936e6c50
|
7
|
+
data.tar.gz: 42ca0e30aec5334ff1aa2e4b09eef5c1c5589c85449ecec4ac578aaef7498ee34aa6727a0d32cda8d07e8a14bc10421d40131290a39543901a4ed4edd1ed056d
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## 1.0.2 - 2016-08-04
|
2
|
+
* [improve] Enable basic auth method to access private repo
|
3
|
+
|
1
4
|
## 1.0.1 - 2016-07-22
|
2
5
|
* [improve] Enable to detect/bump version using external file [#2](https://github.com/uu59/gem_release_helper/pull/2)
|
3
6
|
* [improve] Enable to access private repo [#1](https://github.com/uu59/gem_release_helper/pull/1)
|
data/README.md
CHANGED
@@ -29,9 +29,14 @@ Load rake tasks at your Rakefile:
|
|
29
29
|
require "gem_release_helper/tasks"
|
30
30
|
GemReleaseHelper::Tasks.install({
|
31
31
|
gemspec: "./your_gem.gemspec",
|
32
|
-
github_name: "user/repo",
|
32
|
+
github_name: "user/repo",
|
33
33
|
})
|
34
34
|
|
35
|
+
For a private repository, you can choose a way from below:
|
36
|
+
|
37
|
+
1. Set `GITHUB_OAUTH_TOKEN` environment variable.
|
38
|
+
2. Set `GITHUB_USER_NAME` and `GITHUB_TOKEN` environment variable.
|
39
|
+
3. Set by `git config --global github.user [your user name on GitHub]` and `git config --global github.token [your token]` (same as [this manner](https://github.com/blog/180-local-github-config))
|
35
40
|
|
36
41
|
## Usage
|
37
42
|
|
@@ -132,9 +132,18 @@ module GemReleaseHelper
|
|
132
132
|
end
|
133
133
|
|
134
134
|
def pull_request_info(number)
|
135
|
-
|
136
|
-
|
137
|
-
|
135
|
+
header =
|
136
|
+
if github_oauth_token
|
137
|
+
{
|
138
|
+
"Authentication" => "token #{ENV["GITHUB_OAUTH_TOKEN"]}"
|
139
|
+
}
|
140
|
+
else
|
141
|
+
{
|
142
|
+
http_basic_authentication: [github_user_name, github_personal_token]
|
143
|
+
}
|
144
|
+
end
|
145
|
+
|
146
|
+
body = open("https://api.github.com/repos/#{github_name}/issues/#{number}", header).read
|
138
147
|
JSON.parse(body)
|
139
148
|
end
|
140
149
|
|
@@ -161,6 +170,18 @@ module GemReleaseHelper
|
|
161
170
|
def changelog_path
|
162
171
|
root_dir.join("CHANGELOG.md")
|
163
172
|
end
|
173
|
+
|
174
|
+
def github_user_name
|
175
|
+
ENV["GITHUB_USER_NAME"] || `git config github.user`.strip
|
176
|
+
end
|
177
|
+
|
178
|
+
def github_personal_token
|
179
|
+
ENV["GITHUB_TOKEN"] || `git config github.token`.strip
|
180
|
+
end
|
181
|
+
|
182
|
+
def github_oauth_token
|
183
|
+
ENV["GITHUB_OAUTH_TOKEN"]
|
184
|
+
end
|
164
185
|
end
|
165
186
|
end
|
166
187
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem_release_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yoshihara
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-08-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|