git2mite 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -8,5 +8,4 @@ require 'git2mite/configuration'
8
8
  require 'git2mite/user'
9
9
  require 'git2mite/mite_client'
10
10
  require 'git2mite/gui'
11
- require 'git2mite/git_repo'
12
-
11
+ require 'git2mite/git_repo'
@@ -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://upstream-berlin.com
12
- Question, Problems, Source Code: http://github.com/upstream/git2mite
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
@@ -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
@@ -12,4 +12,4 @@ describe Git2Mite::GitRepo do
12
12
  Git2Mite::GitRepo.new.commits(@today, @today).first[2].should == "thilo@upstream-berlin.com"
13
13
  end
14
14
  end
15
- end
15
+ end
@@ -25,4 +25,4 @@ describe Git2Mite::Gui do
25
25
  result
26
26
  end
27
27
  end
28
- end
28
+ end
@@ -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
- version: 0.0.1
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: 2009-12-21 00:00:00 +01:00
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
- type: :runtime
20
- version_requirement:
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
- version:
32
+ type: :runtime
33
+ version_requirements: *id001
27
34
  - !ruby/object:Gem::Dependency
28
35
  name: rest-client
29
- type: :runtime
30
- version_requirement:
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
- version:
44
+ type: :runtime
45
+ version_requirements: *id002
37
46
  - !ruby/object:Gem::Dependency
38
47
  name: builder
39
- type: :runtime
40
- version_requirement:
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
- version:
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.5
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