git2mite 0.0.1 → 0.0.2
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/README.md +11 -2
- data/lib/git2mite.rb +1 -2
- data/lib/git2mite/gui.rb +2 -2
- data/lib/git2mite/mite_client.rb +1 -1
- data/spec/git_repo_spec.rb +1 -1
- data/spec/gui_spec.rb +1 -1
- data/spec/mite_client_spec.rb +19 -0
- metadata +31 -17
data/README.md
CHANGED
@@ -1,7 +1,16 @@
|
|
1
|
+
# Description
|
2
|
+
|
1
3
|
This tool allows to you to write the commit log of your git repository to your mite (http://mite.yo.lk - an impressive time tracking tool) account in order to auto-fill your timesheets.
|
2
4
|
|
5
|
+
# Installation
|
6
|
+
|
7
|
+
git2mite is available as gem, so installation is as easy as running:
|
8
|
+
gem install git2mite
|
9
|
+
|
10
|
+
Note: You might need to add gemcutter.org to your gem sources if you haven't done this already:
|
11
|
+
gem sources -a http://gemcutter.org
|
12
|
+
|
3
13
|
# Usage
|
4
14
|
|
5
15
|
Just run it from within the project you want to add mite entries for and follow the onscreen instructions
|
6
|
-
|
7
|
-
` #project_path ruby path_to_git2mite/git2mite.rb `
|
16
|
+
#project_path git2mite
|
data/lib/git2mite.rb
CHANGED
data/lib/git2mite/gui.rb
CHANGED
@@ -8,8 +8,8 @@ module Git2Mite
|
|
8
8
|
your git repository to your mite account in order
|
9
9
|
to auto-fill your timesheets.
|
10
10
|
|
11
|
-
Brought to you by http://
|
12
|
-
|
11
|
+
Brought to you by http://upstre.am
|
12
|
+
Questions, Problems, Source Code: http://github.com/upstream/git2mite
|
13
13
|
|
14
14
|
WELCOME
|
15
15
|
end
|
data/lib/git2mite/mite_client.rb
CHANGED
@@ -33,7 +33,7 @@ module Git2Mite
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def get(path)
|
36
|
-
JSON.parse(RestClient.get(@url + path, {'X-MiteApiKey' => @api_key, 'Content-Type' => 'application/json'}))
|
36
|
+
JSON.parse(RestClient.get(@url + path, {'User-Agent' => 'git2mite/0.0.1', 'X-MiteApiKey' => @api_key, 'Content-Type' => 'application/json'}).to_s)
|
37
37
|
end
|
38
38
|
|
39
39
|
private
|
data/spec/git_repo_spec.rb
CHANGED
data/spec/gui_spec.rb
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/spec_helper'
|
2
|
+
require 'git2mite/mite_client'
|
3
|
+
|
4
|
+
describe Git2Mite::MiteClient do
|
5
|
+
describe "get" do
|
6
|
+
before :each do
|
7
|
+
@mite_client = Git2Mite::MiteClient.new 'http://example.org', 'api_key'
|
8
|
+
end
|
9
|
+
|
10
|
+
it "should stringify the response for compatibility" do
|
11
|
+
response = stub
|
12
|
+
RestClient.stub :get => response
|
13
|
+
JSON.stub :parse
|
14
|
+
response.should_receive :to_s
|
15
|
+
|
16
|
+
@mite_client.get '/test'
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git2mite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 2
|
9
|
+
version: 0.0.2
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Alexander Lang
|
@@ -11,39 +16,45 @@ autorequire:
|
|
11
16
|
bindir: bin
|
12
17
|
cert_chain: []
|
13
18
|
|
14
|
-
date:
|
19
|
+
date: 2010-06-03 00:00:00 +02:00
|
15
20
|
default_executable: git2mite
|
16
21
|
dependencies:
|
17
22
|
- !ruby/object:Gem::Dependency
|
18
23
|
name: json
|
19
|
-
|
20
|
-
|
21
|
-
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
prerelease: false
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
22
26
|
requirements:
|
23
27
|
- - ">="
|
24
28
|
- !ruby/object:Gem::Version
|
29
|
+
segments:
|
30
|
+
- 0
|
25
31
|
version: "0"
|
26
|
-
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
27
34
|
- !ruby/object:Gem::Dependency
|
28
35
|
name: rest-client
|
29
|
-
|
30
|
-
|
31
|
-
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
32
38
|
requirements:
|
33
39
|
- - ">="
|
34
40
|
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 0
|
35
43
|
version: "0"
|
36
|
-
|
44
|
+
type: :runtime
|
45
|
+
version_requirements: *id002
|
37
46
|
- !ruby/object:Gem::Dependency
|
38
47
|
name: builder
|
39
|
-
|
40
|
-
|
41
|
-
version_requirements: !ruby/object:Gem::Requirement
|
48
|
+
prerelease: false
|
49
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
42
50
|
requirements:
|
43
51
|
- - ">="
|
44
52
|
- !ruby/object:Gem::Version
|
53
|
+
segments:
|
54
|
+
- 0
|
45
55
|
version: "0"
|
46
|
-
|
56
|
+
type: :runtime
|
57
|
+
version_requirements: *id003
|
47
58
|
description:
|
48
59
|
email: alex@upstre.am
|
49
60
|
executables:
|
@@ -76,18 +87,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
76
87
|
requirements:
|
77
88
|
- - ">="
|
78
89
|
- !ruby/object:Gem::Version
|
90
|
+
segments:
|
91
|
+
- 0
|
79
92
|
version: "0"
|
80
|
-
version:
|
81
93
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
94
|
requirements:
|
83
95
|
- - ">="
|
84
96
|
- !ruby/object:Gem::Version
|
97
|
+
segments:
|
98
|
+
- 0
|
85
99
|
version: "0"
|
86
|
-
version:
|
87
100
|
requirements: []
|
88
101
|
|
89
102
|
rubyforge_project:
|
90
|
-
rubygems_version: 1.3.
|
103
|
+
rubygems_version: 1.3.6
|
91
104
|
signing_key:
|
92
105
|
specification_version: 3
|
93
106
|
summary: writes your git commit messages to your mite account
|
@@ -95,4 +108,5 @@ test_files:
|
|
95
108
|
- spec/configuration_spec.rb
|
96
109
|
- spec/git_repo_spec.rb
|
97
110
|
- spec/gui_spec.rb
|
111
|
+
- spec/mite_client_spec.rb
|
98
112
|
- spec/spec_helper.rb
|