nutrella 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/exe/nutrella +1 -2
- data/lib/nutrella/task_board_name.rb +7 -17
- data/lib/nutrella/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '028df6d8d790fb53fcc4a46363d9fd232ce9885c0c812789e0fe3d7ed7103411'
|
4
|
+
data.tar.gz: c0d2d3d86b0c41e144bbeaeeb5ff98027de50319d77fe2a1c661d372ff3f4359
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05e5d5bd4ccfeb259f3d087baf21d20d2c85c77fd88cab817b8027c5117204a1e8a21e3ae9183ce8efe2dc4e26c9d66c404f788aa82ee377163a3e6d25d1b4ba
|
7
|
+
data.tar.gz: b3beec9904c278490a689107bf7ababa95f3ef7ccf01d564b36634eccba01904c9290dcb695594732c45892994dcde462c722681fb195e471f875fb05f81fc04
|
data/README.md
CHANGED
@@ -64,7 +64,7 @@ Create or open a Trello board based on the name of the current git branch:
|
|
64
64
|
|
65
65
|
Create or open a named Trello board:
|
66
66
|
|
67
|
-
$ nutrella <
|
67
|
+
$ nutrella <git-branch-name>
|
68
68
|
|
69
69
|
Note: you can invoke the `nutrella` from your project directory or from any subdirectory.
|
70
70
|
|
data/exe/nutrella
CHANGED
@@ -4,27 +4,17 @@ module Nutrella
|
|
4
4
|
#
|
5
5
|
# Knows the name of the task board associated with the current git branch.
|
6
6
|
#
|
7
|
-
|
8
|
-
|
7
|
+
# Note: will also accept the name of a branch as an argument.
|
8
|
+
#
|
9
|
+
class TaskBoardName
|
10
|
+
def self.board_name(args)
|
9
11
|
git_branch_name, status = Open3.capture2("git rev-parse --abbrev-ref HEAD")
|
12
|
+
return git_branch_name.chomp if status.success?
|
10
13
|
|
11
|
-
abort "Sorry. Can't find an associated git branch here." unless status.success?
|
12
|
-
|
13
|
-
normalize(git_branch_name)
|
14
|
-
end
|
15
|
-
|
16
|
-
def self.from_command_line(args)
|
17
14
|
git_branch_name = args[0]
|
15
|
+
return git_branch_name if git_branch_name.present?
|
18
16
|
|
19
|
-
abort "Sorry. Can't
|
20
|
-
|
21
|
-
normalize(git_branch_name)
|
22
|
-
end
|
23
|
-
|
24
|
-
private
|
25
|
-
|
26
|
-
def self.normalize(git_branch_name)
|
27
|
-
git_branch_name.chomp.titleize
|
17
|
+
abort "Sorry. Can't figure out a name for the board."
|
28
18
|
end
|
29
19
|
end
|
30
20
|
end
|
data/lib/nutrella/version.rb
CHANGED