gitme_time 0.1.1 → 0.1.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 CHANGED
@@ -11,6 +11,15 @@ If you specify a number between square brackets in your commit message, it will
11
11
  git commit -am "small refactoring [2]" # => entry with description "small refactoring" and duration of 2 hours
12
12
  ```
13
13
 
14
+ ## Duration Format
15
+
16
+ Duration of a commit has to be specified at the end of the message inside the square brackets. It's published on basecamp using the basecamp format:
17
+
18
+ ```
19
+ 2 => 2 hours
20
+ 2.5 = 2:30 => 2 hours and 30 minutes
21
+ ```
22
+
14
23
  # Installation
15
24
 
16
25
  Require it inside your project Gemfile:
data/lib/gitme_time.rb CHANGED
@@ -9,8 +9,8 @@ module GitmeTime
9
9
  def self.create_entry_for_last_commit
10
10
  commit = last_commit
11
11
  hours = nil
12
- if commit.message =~ /\[\w+\]$/
13
- match = commit.message.match /(.*)\[(\w+)\]$/
12
+ match = commit.message.match /(.*)\[([\w\:\.]+)\]\s*$/
13
+ if match
14
14
  message, hours = match[1], match[2]
15
15
  elsif Config.track_empty_hours?
16
16
  message = commit.message
@@ -62,4 +62,4 @@ module GitmeTime
62
62
  password = args[:password] || Config.password
63
63
  Basecamp.establish_connection! domain, username, password, true
64
64
  end
65
- end
65
+ end
@@ -1,3 +1,3 @@
1
1
  module GitmeTime
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitme_time
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-11 00:00:00.000000000 Z
12
+ date: 2012-12-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: basecamp
@@ -163,7 +163,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
163
163
  version: '0'
164
164
  segments:
165
165
  - 0
166
- hash: -973034721650163537
166
+ hash: -738234552166660431
167
167
  required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  none: false
169
169
  requirements:
@@ -172,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
172
  version: '0'
173
173
  segments:
174
174
  - 0
175
- hash: -973034721650163537
175
+ hash: -738234552166660431
176
176
  requirements: []
177
177
  rubyforge_project:
178
178
  rubygems_version: 1.8.24