gitcycle 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/gitcycle.gemspec +1 -1
- data/lib/gitcycle.rb +16 -1
- metadata +3 -3
data/gitcycle.gemspec
CHANGED
data/lib/gitcycle.rb
CHANGED
@@ -75,6 +75,20 @@ class Gitcycle
|
|
75
75
|
end
|
76
76
|
alias :co :checkout
|
77
77
|
|
78
|
+
def commit_all
|
79
|
+
branch_info = get('branch',
|
80
|
+
'branch[name]' => branches(:current => true),
|
81
|
+
'create' => 0
|
82
|
+
)
|
83
|
+
|
84
|
+
if branch_info && (title = branch_info["title"]) && id = branch_info["body"].match(/#\d+/)
|
85
|
+
commit_msg = "[#{id}] #{title}"
|
86
|
+
end
|
87
|
+
|
88
|
+
run "git add . && git commit -am" + (commit_msg ? " \"#{commit_msg}\"" : "")
|
89
|
+
end
|
90
|
+
alias :ca :commit_all
|
91
|
+
|
78
92
|
def create_branch(url_or_title, reset=false)
|
79
93
|
require_git && require_config
|
80
94
|
|
@@ -634,7 +648,8 @@ class Gitcycle
|
|
634
648
|
exit
|
635
649
|
end
|
636
650
|
|
637
|
-
|
651
|
+
match = json.match(/Gitcycle error reference code (\d+)/)
|
652
|
+
error = match && match[1]
|
638
653
|
|
639
654
|
if error
|
640
655
|
puts "\nSomething went wrong :(".red
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitcycle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 6
|
10
|
+
version: 0.2.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Winton Welsh
|