github-pr 0.0.94 → 0.0.95
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/github-pr/poster.rb +3 -1
- data/test/test_poster.rb +27 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b896148383896d20190818c44a116766866b731
|
4
|
+
data.tar.gz: 24f15690fcfcd263b201b998c4ff47202b9bd75e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a66c01839540b48badc1b4eeed4eb875cddff3ce081334c02ae1d2149eeecf4b6c11be257ed45ae34f7a4be8328c8b2d87dd30fc8e9a628b46aee2b1d18ffc0
|
7
|
+
data.tar.gz: c026d92355a9b204411c7f6862de02eea90e0208bf64494a72c210f679ddee43bb638e9c048008cc2732d5cc6f12e5f3750bed5e2ad83766bc5d80964f976a3f
|
data/lib/github-pr/poster.rb
CHANGED
@@ -16,7 +16,9 @@ module GitHubPr
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
def postPrivate(client, options)
|
19
|
-
|
19
|
+
userAndReponame = cut_scheme_and_host(repo_url())
|
20
|
+
repo = userAndReponame.split(File::SEPARATOR).last
|
21
|
+
pull_request = client.create_pull_request(userAndReponame,
|
20
22
|
options[:base],
|
21
23
|
options[:feature],
|
22
24
|
options[:title], nil)
|
data/test/test_poster.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'minitest/autorun'
|
2
|
+
require 'github-pr/poster'
|
3
|
+
|
4
|
+
module GitHubPr
|
5
|
+
|
6
|
+
describe Poster do
|
7
|
+
|
8
|
+
describe "Url parsing" do
|
9
|
+
it "must return correct path" do
|
10
|
+
poster = Poster.new("token")
|
11
|
+
repo_url = "https://github.com/user/reponame"
|
12
|
+
userAndReponame = poster.cut_scheme_and_host(repo_url)
|
13
|
+
userAndReponame.must_equal "user/reponame"
|
14
|
+
end
|
15
|
+
|
16
|
+
it "must return repo name" do
|
17
|
+
poster = Poster.new("token")
|
18
|
+
repo_url = "https://github.com/user/reponame"
|
19
|
+
userAndReponame = poster.cut_scheme_and_host(repo_url)
|
20
|
+
repo = userAndReponame.split(File::SEPARATOR).last
|
21
|
+
repo.must_equal "reponame"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github-pr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.95
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hovhannes Safaryan
|
@@ -52,6 +52,7 @@ files:
|
|
52
52
|
- lib/github-pr/runner.rb
|
53
53
|
- lib/github-pr/token.rb
|
54
54
|
- test/test_github-pr.rb
|
55
|
+
- test/test_poster.rb
|
55
56
|
- test/test_runner.rb
|
56
57
|
- test/test_token.rb
|
57
58
|
homepage: http://rubygems.org/gems/github-pr
|