cp8_cli 4.0.1 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/cp8 +5 -0
- data/lib/cp8_cli/branch.rb +5 -0
- data/lib/cp8_cli/ci.rb +20 -0
- data/lib/cp8_cli/main.rb +4 -0
- data/lib/cp8_cli/pull_request.rb +1 -1
- data/lib/cp8_cli/repo.rb +10 -3
- data/lib/cp8_cli/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fab69b664610ab8d0acab4322f83f6343582f4f
|
4
|
+
data.tar.gz: 6159063e617b8233b527dcf047b5ffcc97d367fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27374bea941347b1d71fc32014f33c89d72e9887339f68ec85a3c1a0c9bd846860d8ba722af3e783d97a0053046a435c4eaa44fd89a74d552eca249beb192eca
|
7
|
+
data.tar.gz: f57023a70369b6acc2ba5c06c54133d3e5b62899949af0c4ae28cb628d1d90bbecaac7d9008742a8e56c73258dec44253d5c039e528b3b2a833d52ad47913c7d
|
data/exe/cp8
CHANGED
data/lib/cp8_cli/branch.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require "active_support/core_ext/string/inflections"
|
2
|
+
require "cp8_cli/ci"
|
2
3
|
require "cp8_cli/pull_request"
|
3
4
|
require "cp8_cli/branch_name"
|
4
5
|
require "cp8_cli/story_query"
|
@@ -30,6 +31,10 @@ module Cp8Cli
|
|
30
31
|
pr.open
|
31
32
|
end
|
32
33
|
|
34
|
+
def open_ci
|
35
|
+
Ci.new(branch_name: name, repo: Repo.current).open
|
36
|
+
end
|
37
|
+
|
33
38
|
def open_story_in_browser
|
34
39
|
if current_story
|
35
40
|
Command.open_url current_story.url
|
data/lib/cp8_cli/ci.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
module Cp8Cli
|
2
|
+
class Ci
|
3
|
+
def initialize(branch_name:, repo:)
|
4
|
+
@branch_name = branch_name
|
5
|
+
@repo = repo
|
6
|
+
end
|
7
|
+
|
8
|
+
def open
|
9
|
+
Command.open_url url
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
attr_reader :branch_name, :repo
|
15
|
+
|
16
|
+
def url
|
17
|
+
"https://circleci.com/gh/#{repo.user}/#{repo.name}/tree/#{URI.escape branch_name}"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/cp8_cli/main.rb
CHANGED
data/lib/cp8_cli/pull_request.rb
CHANGED
data/lib/cp8_cli/repo.rb
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
module Cp8Cli
|
2
2
|
class Repo
|
3
|
+
def self.current
|
4
|
+
path = Command.read("git config --get remote.origin.url").match(/github.com[:\/](\S+\/\S+)\.git/)[1]
|
5
|
+
new(path)
|
6
|
+
end
|
7
|
+
|
8
|
+
def initialize(path)
|
9
|
+
@path = path
|
10
|
+
end
|
11
|
+
|
3
12
|
def user
|
4
13
|
path.split('/').first
|
5
14
|
end
|
@@ -14,8 +23,6 @@ module Cp8Cli
|
|
14
23
|
|
15
24
|
private
|
16
25
|
|
17
|
-
|
18
|
-
@_path ||= Command.read("git config --get remote.origin.url").match(/github.com[:\/](\S+\/\S+)\.git/)[1]
|
19
|
-
end
|
26
|
+
attr_reader :path
|
20
27
|
end
|
21
28
|
end
|
data/lib/cp8_cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cp8_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Balvig
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -304,6 +304,7 @@ files:
|
|
304
304
|
- lib/cp8_cli.rb
|
305
305
|
- lib/cp8_cli/branch.rb
|
306
306
|
- lib/cp8_cli/branch_name.rb
|
307
|
+
- lib/cp8_cli/ci.rb
|
307
308
|
- lib/cp8_cli/cleanup.rb
|
308
309
|
- lib/cp8_cli/command.rb
|
309
310
|
- lib/cp8_cli/config_store.rb
|