ruboty-github 0.1.3 → 0.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c3b88329f4ad8ac7d2307f4461a7cbc8187841f5
4
- data.tar.gz: b17c904b6ddeee65a580ea31028835cf5bf67ce3
3
+ metadata.gz: 6ec8b03de436019f0accdda3ec4dcfea4cfe458e
4
+ data.tar.gz: 418118d889005e3a1f1680d67e2d3bdc240d4201
5
5
  SHA512:
6
- metadata.gz: 46395eaee13332168a55a3b7640c2d5b3b337fb782729029137a0a172b7fd540653c4fb3c0d8958aef5c7cfa40e2365ca99fa94c043bf8c476eae7adc8184688
7
- data.tar.gz: d299ae74ffd476a3ed3530222aa8a1f0237a84103be76888f289c0b1ffde0da61a84e6c880b17c59f96e8fc36276948755b91dc23a263102bce6f48fccb9aa85
6
+ metadata.gz: 280f46b8b332c5ad84c47487e7922019c65ae7756d1503599db7a53f277f5be6792d507385490e5e3f4929741210b27119a91a140667761d2cb2d087618ffcd4
7
+ data.tar.gz: 40ad2193ad9086bd71f4b032ece80f27cc91509d3ecea7652a6e0ac749eadfda81018af7a3cdfbb9ffa3b0e9534e837b8c21bd94db6f4de54534f298dfcdae4d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.2.0
2
+ - Change ENV from GITHUB_HOST to GITHUB_BASE_URL
3
+
1
4
  ## 0.1.3
2
5
  - Fix bug that would not respond to issue URL
3
6
 
data/README.md CHANGED
@@ -9,16 +9,16 @@ gem "ruboty-github"
9
9
 
10
10
  ## Usage
11
11
  ```
12
- @ruboty close issue <repo>#<number> - Close an Issue
12
+ @ruboty close <URL> - Close an Issue
13
13
  @ruboty create issue "<title>" on <repo>[\n<description>] - Create a new Issue
14
- @ruboty merge <repo>#<number> - Merge a Pull Request
14
+ @ruboty merge <URL> - Merge a Pull Request
15
15
  @ruboty pull request "<title>" from <from> to <to> - Create a new Pull Request
16
16
  @ruboty remember my github token <token> - Remember sender's GitHub access token
17
17
  ```
18
18
 
19
19
  ## ENV
20
20
  ```
21
- GITHUB_HOST - Pass GitHub Host if needed (e.g. github.example.com)
21
+ GITHUB_BASE_URL - Pass GitHub base URL if needed (e.g. https://github.example.com)
22
22
  ```
23
23
 
24
24
  ## Image
@@ -57,15 +57,21 @@ module Ruboty
57
57
  end
58
58
 
59
59
  def web_endpoint
60
- "https://#{github_host}/" if github_host
60
+ "#{github_base_url}/" if github_base_url
61
61
  end
62
62
 
63
63
  def api_endpoint
64
- "https://#{github_host}/api/v3" if github_host
64
+ "#{github_base_url}/api/v3" if github_base_url
65
65
  end
66
66
 
67
- def github_host
68
- ENV["GITHUB_HOST"]
67
+ # @note GITHUB_HOST will be deprecated on the next major version
68
+ def github_base_url
69
+ case
70
+ when ENV["GITHUB_BASE_URL"]
71
+ ENV["GITHUB_BASE_URL"]
72
+ when ENV["GITHUB_HOST"]
73
+ "https://#{ENV['GITHUB_HOST']}"
74
+ end
69
75
  end
70
76
  end
71
77
  end
@@ -1,5 +1,5 @@
1
1
  module Ruboty
2
2
  module Github
3
- VERSION = "0.1.3"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -3,7 +3,7 @@ module Ruboty
3
3
  class Github < Base
4
4
  ISSUE_PATTERN = %r<(?:https?://[^/]+/)?(?<repo>.+)(?:#|/pull/|/issues/)(?<number>\d+) ?>
5
5
 
6
- env :GITHUB_HOST, "Pass GitHub Host if needed (e.g. github.example.com)", optional: true
6
+ env :GITHUB_BASE_URL, "Pass GitHub URL if needed (e.g. https://github.example.com)", optional: true
7
7
 
8
8
  on(
9
9
  /create issue "(?<title>.+)" on (?<repo>.+)(?:\n(?<description>[\s\S]+))?\z/,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruboty-github
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-05 00:00:00.000000000 Z
11
+ date: 2015-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  version: '0'
169
169
  requirements: []
170
170
  rubyforge_project:
171
- rubygems_version: 2.2.2
171
+ rubygems_version: 2.4.5
172
172
  signing_key:
173
173
  specification_version: 4
174
174
  summary: Manage GitHub via Ruboty.