todone 0.2.3 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/todone/views.rb +5 -5
- data/lib/todone.rb +4 -4
- data/spec/libs/message_processor_spec.rb +1 -1
- data/todone.gemspec +2 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.5
|
data/lib/todone/views.rb
CHANGED
@@ -16,14 +16,14 @@ module Todone
|
|
16
16
|
"Error: No project id"
|
17
17
|
end
|
18
18
|
|
19
|
-
def
|
19
|
+
def exists_prepare_commit_msg_hook data
|
20
20
|
"It looks like you're already using your pre-commit hook.\n" +
|
21
21
|
"I was planning on putting something like the following in there:\n" +
|
22
22
|
"todone tickets #{data[:project_id]} -m"
|
23
23
|
|
24
24
|
end
|
25
25
|
|
26
|
-
def
|
26
|
+
def updated_prepare_commit_msg_hook
|
27
27
|
"Your pre-commit hook has been updated."
|
28
28
|
end
|
29
29
|
|
@@ -37,12 +37,12 @@ module Todone
|
|
37
37
|
last_commit_msg << last_commit.collect{|line| "##{line}"}.join("\n")+"\n"
|
38
38
|
end
|
39
39
|
=end
|
40
|
-
|
40
|
+
prepare_commit_msg = "#==================Open Tickets================\n"
|
41
41
|
unless data[:stories].nil?
|
42
42
|
data[:stories].each do |story|
|
43
|
-
|
43
|
+
prepare_commit_msg << "#[#{story['id']}] #{story['name']}\n"
|
44
44
|
end
|
45
|
-
|
45
|
+
prepare_commit_msg
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
data/lib/todone.rb
CHANGED
@@ -72,13 +72,13 @@ module Todone
|
|
72
72
|
|
73
73
|
def add_hook project_id
|
74
74
|
if File.exists? Todone::Consts::HOOK_FILE
|
75
|
-
return ['
|
75
|
+
return ['exists_prepare_commit_msg_hook',{:project_id => project_id}]
|
76
76
|
else
|
77
77
|
File.open(Todone::Consts::HOOK_FILE,'w') do |f|
|
78
|
-
f.write("todone tickets
|
78
|
+
f.write("todone tickets -s -w")
|
79
79
|
end
|
80
80
|
FileUtils.chmod 0751, Todone::Consts::HOOK_FILE
|
81
|
-
return "
|
81
|
+
return "prepare_commit_msg_hook_updated"
|
82
82
|
end
|
83
83
|
end
|
84
84
|
|
@@ -101,7 +101,7 @@ module Todone
|
|
101
101
|
if api_data.class == Hash
|
102
102
|
api_data.delete("error")
|
103
103
|
else
|
104
|
-
["show_pivotal_stories", :stories => api_data]
|
104
|
+
["show_pivotal_stories", { :stories => api_data } ]
|
105
105
|
end
|
106
106
|
end
|
107
107
|
|
@@ -56,7 +56,7 @@ describe Todone::MessageProcessor do
|
|
56
56
|
it "should not add a hook if .git/hooks/pre-commit is present" do
|
57
57
|
File.stubs(:exists?).returns(true)
|
58
58
|
data = @mp.add_project(@project)
|
59
|
-
data.shift.should == "
|
59
|
+
data.shift.should == "exists_prepare_commit_msg_hook"
|
60
60
|
end
|
61
61
|
|
62
62
|
it "should not add a hook if .git/hooks/ cannot be found" do
|
data/todone.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{todone}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["A Flores"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-06-11}
|
13
13
|
s.default_executable = %q{todone}
|
14
14
|
s.description = %q{Toone is a command-line tool that gives you the ability to better integrate git with your project manager(which is currently only allowed to be pivotal tracker). Todone will keep track of the tickets your working on so you don't have to.}
|
15
15
|
s.email = %q{ctrl4ltdeleteme@gmail.com}
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: todone
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.2.
|
5
|
+
version: 0.2.5
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- A Flores
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-06-11 00:00:00 +02:00
|
14
14
|
default_executable: todone
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -145,7 +145,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
145
145
|
requirements:
|
146
146
|
- - ">="
|
147
147
|
- !ruby/object:Gem::Version
|
148
|
-
hash: -
|
148
|
+
hash: -3768701804106802281
|
149
149
|
segments:
|
150
150
|
- 0
|
151
151
|
version: "0"
|