flight_plan_cli 0.2.6 → 0.2.8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f8285ccf8079adbe2b1eb0395c8ff767df3183f
|
4
|
+
data.tar.gz: 98a454fb40337e4155a5c8b958e8ab64032a6c79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 651f743ff125ef6241c60f1626cf58311341c93678ce55e6a5882b749a86ae629c703b53c40ac9eaa310938a3b6838cf2da95d02cc86fb7d3676e00d4f4282c2
|
7
|
+
data.tar.gz: 3689605b90a4df412a3f3950256dac6f4fda9771a0b18f7b32774f29a984fbfc45c8eadc876589aa84b2d71e2d29c1d85eba6489db813c330aa9ed06add49138
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.8
|
@@ -86,8 +86,8 @@ module FlightPlanCli
|
|
86
86
|
def credentials
|
87
87
|
@ssh_agent ||= Rugged::Credentials::SshKey.new(
|
88
88
|
username: 'git',
|
89
|
-
publickey: File.expand_path(
|
90
|
-
privatekey: File.expand_path(
|
89
|
+
publickey: File.expand_path(ssh_public_key),
|
90
|
+
privatekey: File.expand_path(ssh_private_key)
|
91
91
|
)
|
92
92
|
end
|
93
93
|
end
|
@@ -1,10 +1,11 @@
|
|
1
1
|
module FlightPlanCli
|
2
2
|
module Commands
|
3
|
-
class
|
3
|
+
class List
|
4
4
|
module Color
|
5
5
|
SWIMLANE = :cyan
|
6
6
|
ISSUE = :yellow
|
7
|
-
ISSUE_NO = :
|
7
|
+
ISSUE_NO = :light_red
|
8
|
+
CHECKED_OUT_BACKGROUND = :light_black
|
8
9
|
end
|
9
10
|
|
10
11
|
include FlightPlanCli::Config
|
@@ -51,13 +52,20 @@ module FlightPlanCli
|
|
51
52
|
.colorize(Color::SWIMLANE)
|
52
53
|
|
53
54
|
swimlane['tickets'].each do |ticket|
|
54
|
-
|
55
|
-
title = title.underline if git.head.name =~ /##{ticket['remote_number']}[^0-9]/
|
56
|
-
print " #{ticket['remote_number']} ".colorize(Color::ISSUE_NO)
|
57
|
-
puts title.colorize(Color::ISSUE)
|
55
|
+
print_ticket(ticket)
|
58
56
|
end
|
59
57
|
puts
|
60
58
|
end
|
59
|
+
|
60
|
+
def print_ticket(ticket)
|
61
|
+
checked_out = git.head.name =~ /##{ticket['remote_number']}[^0-9]/
|
62
|
+
line =
|
63
|
+
" #{ticket['remote_number']}".colorize(Color::ISSUE_NO) +
|
64
|
+
" #{ticket['remote_title']} ".colorize(Color::ISSUE)
|
65
|
+
line = line.colorize(background: Color::CHECKED_OUT_BACKGROUND) if checked_out
|
66
|
+
|
67
|
+
puts line
|
68
|
+
end
|
61
69
|
end
|
62
70
|
end
|
63
71
|
end
|
@@ -17,6 +17,14 @@ module FlightPlanCli
|
|
17
17
|
@api_secret = ENV['FLIGHT_PLAN_API_SECRET']
|
18
18
|
end
|
19
19
|
|
20
|
+
def ssh_private_key
|
21
|
+
ENV['GIT_SSH_PRIVATE_KEY'] || '~/.ssh/id_rsa'
|
22
|
+
end
|
23
|
+
|
24
|
+
def ssh_public_key
|
25
|
+
ENV['GIT_SSH_PUBLIC_KEY'] || '~/.ssh/id_rsa.pub'
|
26
|
+
end
|
27
|
+
|
20
28
|
def client
|
21
29
|
@client ||= FlightPlanCli::Api.new(
|
22
30
|
url: api_url,
|
data/lib/flight_plan_cli.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flight_plan_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Cleary
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -191,7 +191,7 @@ files:
|
|
191
191
|
- lib/flight_plan_cli.rb
|
192
192
|
- lib/flight_plan_cli/api.rb
|
193
193
|
- lib/flight_plan_cli/commands/checkout.rb
|
194
|
-
- lib/flight_plan_cli/commands/
|
194
|
+
- lib/flight_plan_cli/commands/list.rb
|
195
195
|
- lib/flight_plan_cli/config.rb
|
196
196
|
- lib/flight_plan_cli/initializer.rb
|
197
197
|
- lib/flight_plan_cli/version.rb
|