togman 0.2 → 0.3
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.
- data/bin/togman +2 -2
- data/lib/mantis.rb +23 -15
- data/lib/toggl.rb +2 -0
- metadata +4 -4
data/bin/togman
CHANGED
@@ -30,8 +30,8 @@ end
|
|
30
30
|
config = YAML::load_file configfile
|
31
31
|
|
32
32
|
Savon.configure do |setting|
|
33
|
-
setting.log = false
|
34
|
-
#
|
33
|
+
setting.log = false # disable logging
|
34
|
+
#setting.log_level = :debug # changing the log level
|
35
35
|
end
|
36
36
|
|
37
37
|
t = Toggl.new config['toggl_api_key'], config['nonbill']
|
data/lib/mantis.rb
CHANGED
@@ -25,20 +25,28 @@ XML
|
|
25
25
|
def add_note (issue_id, text, time_tracking)
|
26
26
|
user = @user
|
27
27
|
password = @password
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
28
|
+
begin
|
29
|
+
res = @client.request "mc_issue_note_add" do
|
30
|
+
soap.body = {
|
31
|
+
"username" => user,
|
32
|
+
"password" => password,
|
33
|
+
"issue_id" => issue_id,
|
34
|
+
"note" => {
|
35
|
+
"text" => text,
|
36
|
+
"view_state" => {
|
37
|
+
"name" => "private",
|
38
|
+
"id" => 50,
|
39
|
+
:order! => ["name", "id"]
|
40
|
+
},
|
41
|
+
"time_tracking" => time_tracking,
|
42
|
+
:order! => ["text", "view_state", "time_tracking"]
|
43
|
+
},
|
44
|
+
:order! => ["username","password","issue_id","note"]
|
45
|
+
}
|
46
|
+
end
|
47
|
+
rescue Savon::Error
|
48
|
+
puts "ERROR!"
|
49
|
+
exit
|
50
|
+
end
|
43
51
|
end
|
44
52
|
end
|
data/lib/toggl.rb
CHANGED
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: togman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: "0.
|
8
|
+
- 3
|
9
|
+
version: "0.3"
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Benjamin Johnson
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-
|
17
|
+
date: 2011-11-02 00:00:00 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: patron
|