timetrackr 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +8 -0
- data/Gemfile.lock +20 -0
- data/LICENSE.txt +20 -0
- data/README.mkd +36 -0
- data/Rakefile +53 -0
- data/VERSION +1 -0
- data/bin/timetrackr +161 -0
- data/lib/timetrackr/period.rb +21 -0
- data/lib/timetrackr/yaml.rb +70 -0
- data/lib/timetrackr.rb +84 -0
- data/test/helper.rb +15 -0
- data/test/test_timetrackr.rb +53 -0
- data/timetrackr.gemspec +67 -0
- metadata +116 -0
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
git (1.2.5)
|
5
|
+
jeweler (1.5.2)
|
6
|
+
bundler (~> 1.0.0)
|
7
|
+
git (>= 1.2.5)
|
8
|
+
rake
|
9
|
+
rake (0.8.7)
|
10
|
+
rcov (0.9.9)
|
11
|
+
shoulda (2.11.3)
|
12
|
+
|
13
|
+
PLATFORMS
|
14
|
+
ruby
|
15
|
+
|
16
|
+
DEPENDENCIES
|
17
|
+
bundler (~> 1.0.0)
|
18
|
+
jeweler (~> 1.5.2)
|
19
|
+
rcov
|
20
|
+
shoulda
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2011 felix
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.mkd
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# timetrackr
|
2
|
+
|
3
|
+
A simple CLI time tracking utility.
|
4
|
+
|
5
|
+
## Example
|
6
|
+
|
7
|
+
>tt start work
|
8
|
+
|
9
|
+
>tt switch play
|
10
|
+
|
11
|
+
>tt
|
12
|
+
work 0h 0m 3s
|
13
|
+
play * 0h 0m 1s
|
14
|
+
|
15
|
+
>tt clear work
|
16
|
+
|
17
|
+
>tt time
|
18
|
+
play * 0h 0m 5s
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
## Contributing to timetrackr
|
23
|
+
|
24
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
25
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
26
|
+
* Fork the project
|
27
|
+
* Start a feature/bugfix branch
|
28
|
+
* Commit and push until you are happy with your contribution
|
29
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
30
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
31
|
+
|
32
|
+
|
33
|
+
## Copyright
|
34
|
+
|
35
|
+
Copyright (c) 2011 Felix Hanley. See LICENSE.txt for
|
36
|
+
further details.
|
data/Rakefile
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
begin
|
4
|
+
Bundler.setup(:default, :development)
|
5
|
+
rescue Bundler::BundlerError => e
|
6
|
+
$stderr.puts e.message
|
7
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
+
exit e.status_code
|
9
|
+
end
|
10
|
+
require 'rake'
|
11
|
+
|
12
|
+
require 'jeweler'
|
13
|
+
Jeweler::Tasks.new do |gem|
|
14
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
15
|
+
gem.name = "timetrackr"
|
16
|
+
gem.homepage = "http://github.com/felix/timetrackr"
|
17
|
+
gem.license = "MIT"
|
18
|
+
gem.summary = "A simple time tracking utility"
|
19
|
+
gem.description = "A simple time tracking utility"
|
20
|
+
gem.email = "felix@seconddrawer.com.au"
|
21
|
+
gem.authors = ["Felix Hanley"]
|
22
|
+
# Include your dependencies below. Runtime dependencies are required when using your gem,
|
23
|
+
# and development dependencies are only needed for development (ie running rake tasks, tests, etc)
|
24
|
+
# gem.add_runtime_dependency 'jabber4r', '> 0.1'
|
25
|
+
# gem.add_development_dependency 'rspec', '> 1.2.3'
|
26
|
+
end
|
27
|
+
Jeweler::RubygemsDotOrgTasks.new
|
28
|
+
|
29
|
+
require 'rake/testtask'
|
30
|
+
Rake::TestTask.new(:test) do |test|
|
31
|
+
test.libs << 'lib' << 'test'
|
32
|
+
test.pattern = 'test/**/test_*.rb'
|
33
|
+
test.verbose = true
|
34
|
+
end
|
35
|
+
|
36
|
+
require 'rcov/rcovtask'
|
37
|
+
Rcov::RcovTask.new do |test|
|
38
|
+
test.libs << 'test'
|
39
|
+
test.pattern = 'test/**/test_*.rb'
|
40
|
+
test.verbose = true
|
41
|
+
end
|
42
|
+
|
43
|
+
task :default => :test
|
44
|
+
|
45
|
+
require 'rake/rdoctask'
|
46
|
+
Rake::RDocTask.new do |rdoc|
|
47
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
48
|
+
|
49
|
+
rdoc.rdoc_dir = 'rdoc'
|
50
|
+
rdoc.title = "timetrackr #{version}"
|
51
|
+
rdoc.rdoc_files.include('README*')
|
52
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
53
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.1
|
data/bin/timetrackr
ADDED
@@ -0,0 +1,161 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
|
4
|
+
|
5
|
+
require 'timetrackr'
|
6
|
+
require 'timetrackr/period'
|
7
|
+
|
8
|
+
DEFAULTS = {
|
9
|
+
:backend => 'sqlite',
|
10
|
+
:verbose => false,
|
11
|
+
:single_task => false,
|
12
|
+
:path => File.join(ENV['HOME'],'.timetrackr.db'),
|
13
|
+
:relative_format => "%2<hours>dh %2<minutes>dm %2<seconds>ds",
|
14
|
+
:absolute_time => "%H:%m",
|
15
|
+
:absolute_day => "%Y-%m-%d"
|
16
|
+
}
|
17
|
+
|
18
|
+
def show_help
|
19
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
20
|
+
puts "timetrackr version #{version}"
|
21
|
+
puts <<HELP
|
22
|
+
|
23
|
+
timetrackr [command] [options]
|
24
|
+
|
25
|
+
Available commands:
|
26
|
+
|
27
|
+
start [task] start a task
|
28
|
+
stop [task] stop a task (or 'all')
|
29
|
+
switch TASK switch tasks
|
30
|
+
time [task] show time for a task (or 'all')
|
31
|
+
log [task] show time log for a task (or 'all')
|
32
|
+
|
33
|
+
Global options
|
34
|
+
-h --help show this help
|
35
|
+
-v --verbose be noisy
|
36
|
+
HELP
|
37
|
+
end
|
38
|
+
|
39
|
+
def format_time(time, fmt_str)
|
40
|
+
hours = time.to_i/3600.to_i
|
41
|
+
minutes = (time/60 - hours * 60).to_i
|
42
|
+
seconds = (time - (minutes * 60 + hours * 3600))
|
43
|
+
format(fmt_str,{
|
44
|
+
:hours => hours,
|
45
|
+
:minutes => minutes,
|
46
|
+
:seconds => seconds})
|
47
|
+
end
|
48
|
+
|
49
|
+
config = {}
|
50
|
+
config_file = File.join(ENV['HOME'],'.timetrackrrc')
|
51
|
+
if File.exist?(config_file)
|
52
|
+
require 'yaml'
|
53
|
+
config = YAML.load_file(config_file)
|
54
|
+
end
|
55
|
+
|
56
|
+
# global options
|
57
|
+
while (cmd = ARGV.shift) && cmd.start_with?('-')
|
58
|
+
if ['-v','--verbose'].include? cmd
|
59
|
+
config[:verbose] = true
|
60
|
+
end
|
61
|
+
if ['-h','--help'].include? cmd
|
62
|
+
show_help
|
63
|
+
exit 1
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
config = DEFAULTS.merge(config || {})
|
68
|
+
$verbose = config[:verbose]
|
69
|
+
trackr = TimeTrackr.create(config[:backend], config)
|
70
|
+
|
71
|
+
#
|
72
|
+
# commands
|
73
|
+
#
|
74
|
+
case cmd
|
75
|
+
when 'start','in','s'
|
76
|
+
task = ARGV.shift
|
77
|
+
notes = ARGV.join(' ')
|
78
|
+
# switch tasks if config says so
|
79
|
+
if config[:single_task] && trackr.current != task
|
80
|
+
trackr.current.each { |t|
|
81
|
+
trackr.stop(t) unless t == task
|
82
|
+
}
|
83
|
+
puts "Switched to task '#{task}'" if $verbose
|
84
|
+
else
|
85
|
+
puts "Started task '#{task}'" if $verbose
|
86
|
+
end
|
87
|
+
trackr.start(task, notes)
|
88
|
+
|
89
|
+
when 'stop','out','kill','k'
|
90
|
+
if ARGV[0] == 'all' || ARGV[0].nil?
|
91
|
+
tasks = trackr.tasks
|
92
|
+
else
|
93
|
+
tasks = ARGV
|
94
|
+
end
|
95
|
+
tasks.each do |task|
|
96
|
+
trackr.stop(task)
|
97
|
+
puts "Stopped task '#{task}'" if $verbose
|
98
|
+
end
|
99
|
+
|
100
|
+
when 'switch','sw'
|
101
|
+
task = ARGV.shift
|
102
|
+
notes = ARGV.join(' ')
|
103
|
+
trackr.current.each do |t|
|
104
|
+
trackr.stop(t) unless t == task
|
105
|
+
end
|
106
|
+
trackr.start(task, notes)
|
107
|
+
puts "Switched to task '#{task}'" if $verbose
|
108
|
+
|
109
|
+
when 'time','status',nil
|
110
|
+
task = ARGV.shift
|
111
|
+
if task && trackr.tasks.include?(task)
|
112
|
+
tasks = [*task]
|
113
|
+
else
|
114
|
+
tasks = trackr.tasks.each
|
115
|
+
end
|
116
|
+
tasks.each do |task|
|
117
|
+
total = trackr.history(task).reduce(0){ |t, period|
|
118
|
+
t = t + period.length
|
119
|
+
}
|
120
|
+
name = trackr.current.include?(task) ? task+' *' : task
|
121
|
+
puts name.ljust(15) << format_time(total,config[:relative_format])
|
122
|
+
end
|
123
|
+
|
124
|
+
when 'log'
|
125
|
+
if ARGV[0] == 'all' || ARGV[0].nil?
|
126
|
+
tasks = trackr.tasks
|
127
|
+
else
|
128
|
+
tasks = ARGV
|
129
|
+
end
|
130
|
+
table = []
|
131
|
+
periods = tasks.each.collect{ |t| trackr.history(t) }.flatten
|
132
|
+
lastday = nil
|
133
|
+
table << periods.sort{|x,y| x.start <=> y.start}.collect{ |period|
|
134
|
+
currday = period.start.strftime(config[:absolute_day])
|
135
|
+
day = (currday == lastday) ? ' ' : currday
|
136
|
+
lastday = currday
|
137
|
+
name = period.current? ? period.task+' *' : period.task
|
138
|
+
start = period.start.strftime(config[:absolute_time])
|
139
|
+
stop = period.current? ? ' ' : period.stop.strftime(config[:absolute_time])
|
140
|
+
length = format_time(period.length, config[:relative_format])
|
141
|
+
"#{day.ljust(12)} #{name.ljust(15)} #{start.ljust(7)} #{stop.ljust(7)} #{length}"
|
142
|
+
}
|
143
|
+
puts table.join("\n")
|
144
|
+
|
145
|
+
|
146
|
+
when 'clear','delete','del'
|
147
|
+
tasks = ARGV
|
148
|
+
tasks = trackr.tasks if task == 'all'
|
149
|
+
tasks.each do |task|
|
150
|
+
trackr.clear(task)
|
151
|
+
puts "Task '#{task}' cleared" if $verbose
|
152
|
+
end
|
153
|
+
|
154
|
+
else
|
155
|
+
puts "'#{cmd}' is not a valid command"
|
156
|
+
show_help
|
157
|
+
end
|
158
|
+
|
159
|
+
trackr.close
|
160
|
+
|
161
|
+
# vim: set ts=2 sw=2 tw=80 ft=ruby fdm=syntax et fen :
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class Period
|
2
|
+
|
3
|
+
attr_accessor :task, :start, :stop, :notes
|
4
|
+
|
5
|
+
def initialize(task, start, stop=nil, notes='')
|
6
|
+
@task = task
|
7
|
+
@start = start
|
8
|
+
@stop = stop
|
9
|
+
@notes = notes
|
10
|
+
end
|
11
|
+
|
12
|
+
def length
|
13
|
+
stop = @stop || DateTime.now
|
14
|
+
stop - @start
|
15
|
+
end
|
16
|
+
|
17
|
+
def current?
|
18
|
+
stop.nil?
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
#
|
2
|
+
# keeps the following format in a yaml file:
|
3
|
+
#
|
4
|
+
# :current: []
|
5
|
+
#
|
6
|
+
# :tasks:
|
7
|
+
# foo:
|
8
|
+
# - :start: 2011-05-16 14:26:26.263449 +07:00
|
9
|
+
# :stop: 2011-05-16 14:26:27 +07:00
|
10
|
+
# :notes: "blah blah blah"
|
11
|
+
#
|
12
|
+
|
13
|
+
class YamlTimeTrackr < TimeTrackr
|
14
|
+
|
15
|
+
def initialize(path)
|
16
|
+
@log_path = path
|
17
|
+
if !File.exist? @log_path
|
18
|
+
@db = {:current => [], :tasks => {}}
|
19
|
+
write_file
|
20
|
+
end
|
21
|
+
@db = YAML.load_file(@log_path)
|
22
|
+
puts "Using log file '#{@log_path}'" if $verbose
|
23
|
+
end
|
24
|
+
|
25
|
+
def current
|
26
|
+
@db[:current]
|
27
|
+
end
|
28
|
+
|
29
|
+
def tasks
|
30
|
+
@db[:tasks].keys.compact.uniq || []
|
31
|
+
end
|
32
|
+
|
33
|
+
def start(task, notes)
|
34
|
+
@db[:tasks][task] = Array[] unless @db[:tasks][task]
|
35
|
+
if !@db[:current].include?(task)
|
36
|
+
@db[:current].unshift(task)
|
37
|
+
@db[:tasks][task].push({:start => Time.now, :notes => notes})
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def stop(task)
|
42
|
+
if @db[:current].include?(task)
|
43
|
+
@db[:current].delete(task)
|
44
|
+
@db[:tasks][task].last[:stop] = Time.now
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def history(task, p_begin=nil, p_end=nil)
|
49
|
+
@db[:tasks][task].sort{|x,y| x[:start] <=> y[:start]}.collect {|p|
|
50
|
+
Period.new(task,p[:start],p[:stop],p[:notes])
|
51
|
+
} unless !@db[:tasks].include? task
|
52
|
+
end
|
53
|
+
|
54
|
+
def close
|
55
|
+
write_file
|
56
|
+
end
|
57
|
+
|
58
|
+
def clear(task)
|
59
|
+
@db[:current].delete(task)
|
60
|
+
@db[:tasks].delete(task)
|
61
|
+
end
|
62
|
+
|
63
|
+
private
|
64
|
+
|
65
|
+
def write_file
|
66
|
+
File.open(@log_path,'w') do |fh|
|
67
|
+
YAML.dump(@db,fh)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
data/lib/timetrackr.rb
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
autoload 'YamlTimeTrackr', 'timetrackr/yaml'
|
2
|
+
autoload 'SqliteTimeTrackr', 'timetrackr/sqlite'
|
3
|
+
|
4
|
+
class TimeTrackr
|
5
|
+
def self.create(type,options={})
|
6
|
+
case type.to_s
|
7
|
+
when 'yaml'
|
8
|
+
begin
|
9
|
+
require 'yaml'
|
10
|
+
log = YamlTimeTrackr.new(options[:path])
|
11
|
+
puts 'Loaded yaml tracker' if $verbose
|
12
|
+
rescue LoadError
|
13
|
+
puts 'Yaml not found'
|
14
|
+
end
|
15
|
+
when 'sqlite'
|
16
|
+
begin
|
17
|
+
require 'sqlite3'
|
18
|
+
log = SqliteTimeTrackr.new(options[:path])
|
19
|
+
puts 'Loaded sqlite tracker' if $verbose
|
20
|
+
rescue LoadError
|
21
|
+
puts 'Sqlite not found'
|
22
|
+
end
|
23
|
+
else
|
24
|
+
raise "Bad log type: #{type}"
|
25
|
+
end
|
26
|
+
log
|
27
|
+
end
|
28
|
+
|
29
|
+
#
|
30
|
+
# return an array of current tasks
|
31
|
+
#
|
32
|
+
def current
|
33
|
+
raise 'Not Implemented'
|
34
|
+
end
|
35
|
+
|
36
|
+
#
|
37
|
+
# start a period
|
38
|
+
#
|
39
|
+
def start(task,notes)
|
40
|
+
raise 'Not implemented'
|
41
|
+
end
|
42
|
+
|
43
|
+
#
|
44
|
+
# stop a period
|
45
|
+
#
|
46
|
+
def stop(task)
|
47
|
+
raise 'Not implemented'
|
48
|
+
end
|
49
|
+
|
50
|
+
#
|
51
|
+
# return an array of all tasks
|
52
|
+
#
|
53
|
+
def tasks
|
54
|
+
raise 'Not Implemented'
|
55
|
+
end
|
56
|
+
|
57
|
+
#
|
58
|
+
# time in task in seconds
|
59
|
+
#
|
60
|
+
def time(task)
|
61
|
+
end
|
62
|
+
|
63
|
+
#
|
64
|
+
# get task history as an array of Periods
|
65
|
+
#
|
66
|
+
def history(task)
|
67
|
+
raise 'Not Implemented'
|
68
|
+
end
|
69
|
+
|
70
|
+
#
|
71
|
+
# clear an task
|
72
|
+
#
|
73
|
+
def clear(task)
|
74
|
+
raise 'Not Implemented'
|
75
|
+
end
|
76
|
+
|
77
|
+
#
|
78
|
+
# cleanup and close
|
79
|
+
#
|
80
|
+
def close
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
84
|
+
|
data/test/helper.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
begin
|
4
|
+
Bundler.setup(:default, :development)
|
5
|
+
rescue Bundler::BundlerError => e
|
6
|
+
$stderr.puts e.message
|
7
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
+
exit e.status_code
|
9
|
+
end
|
10
|
+
require 'test/unit'
|
11
|
+
require 'shoulda'
|
12
|
+
|
13
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
14
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
15
|
+
require 'timetrackr'
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestTimetrackr < Test::Unit::TestCase
|
4
|
+
context 'a YAML based tracker' do
|
5
|
+
setup do
|
6
|
+
@config = {:path => '/tmp/timetracker.test'}
|
7
|
+
@t = TimeTrackr.create('yaml',@config)
|
8
|
+
end
|
9
|
+
|
10
|
+
def teardown
|
11
|
+
File.unlink(@config[:path]) rescue nil
|
12
|
+
end
|
13
|
+
|
14
|
+
should 'initialise a log file' do
|
15
|
+
assert File.exist?(@config[:path])
|
16
|
+
end
|
17
|
+
|
18
|
+
context 'with empty db' do
|
19
|
+
setup do
|
20
|
+
File.open(@config[:path]) do |fh|
|
21
|
+
@db = YAML.load(fh)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
should 'create basic structure' do
|
26
|
+
File.open(@config[:path]) do |fh|
|
27
|
+
@db = YAML.load(fh)
|
28
|
+
end
|
29
|
+
assert @db[:current].class == Array
|
30
|
+
assert @db[:tasks].class == Hash
|
31
|
+
end
|
32
|
+
|
33
|
+
should 'not fail on current command' do
|
34
|
+
assert_nothing_raised Exception do
|
35
|
+
@t.current
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
should 'not fail on tasks command' do
|
40
|
+
assert_nothing_raised Exception do
|
41
|
+
@t.tasks
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
should 'not fail on close command' do
|
46
|
+
assert_nothing_raised Exception do
|
47
|
+
@t.close
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
data/timetrackr.gemspec
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{timetrackr}
|
8
|
+
s.version = "0.1.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Felix Hanley"]
|
12
|
+
s.date = %q{2011-05-17}
|
13
|
+
s.default_executable = %q{timetrackr}
|
14
|
+
s.description = %q{A simple time tracking utility}
|
15
|
+
s.email = %q{felix@seconddrawer.com.au}
|
16
|
+
s.executables = ["timetrackr"]
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE.txt",
|
19
|
+
"README.mkd"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
"Gemfile",
|
23
|
+
"Gemfile.lock",
|
24
|
+
"LICENSE.txt",
|
25
|
+
"README.mkd",
|
26
|
+
"Rakefile",
|
27
|
+
"VERSION",
|
28
|
+
"bin/timetrackr",
|
29
|
+
"lib/timetrackr.rb",
|
30
|
+
"lib/timetrackr/period.rb",
|
31
|
+
"lib/timetrackr/yaml.rb",
|
32
|
+
"test/helper.rb",
|
33
|
+
"test/test_timetrackr.rb",
|
34
|
+
"timetrackr.gemspec"
|
35
|
+
]
|
36
|
+
s.homepage = %q{http://github.com/felix/timetrackr}
|
37
|
+
s.licenses = ["MIT"]
|
38
|
+
s.require_paths = ["lib"]
|
39
|
+
s.rubygems_version = %q{1.6.2}
|
40
|
+
s.summary = %q{A simple time tracking utility}
|
41
|
+
s.test_files = [
|
42
|
+
"test/helper.rb",
|
43
|
+
"test/test_timetrackr.rb"
|
44
|
+
]
|
45
|
+
|
46
|
+
if s.respond_to? :specification_version then
|
47
|
+
s.specification_version = 3
|
48
|
+
|
49
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
50
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
51
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
52
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
53
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
54
|
+
else
|
55
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
56
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
57
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
58
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
59
|
+
end
|
60
|
+
else
|
61
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
62
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
63
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
64
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
metadata
ADDED
@@ -0,0 +1,116 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: timetrackr
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.1.1
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Felix Hanley
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2011-05-17 00:00:00 +07:00
|
14
|
+
default_executable: timetrackr
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: shoulda
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
type: :development
|
25
|
+
prerelease: false
|
26
|
+
version_requirements: *id001
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
|
+
none: false
|
31
|
+
requirements:
|
32
|
+
- - ~>
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 1.0.0
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: *id002
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
name: jeweler
|
40
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 1.5.2
|
46
|
+
type: :development
|
47
|
+
prerelease: false
|
48
|
+
version_requirements: *id003
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: rcov
|
51
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: "0"
|
57
|
+
type: :development
|
58
|
+
prerelease: false
|
59
|
+
version_requirements: *id004
|
60
|
+
description: A simple time tracking utility
|
61
|
+
email: felix@seconddrawer.com.au
|
62
|
+
executables:
|
63
|
+
- timetrackr
|
64
|
+
extensions: []
|
65
|
+
|
66
|
+
extra_rdoc_files:
|
67
|
+
- LICENSE.txt
|
68
|
+
- README.mkd
|
69
|
+
files:
|
70
|
+
- Gemfile
|
71
|
+
- Gemfile.lock
|
72
|
+
- LICENSE.txt
|
73
|
+
- README.mkd
|
74
|
+
- Rakefile
|
75
|
+
- VERSION
|
76
|
+
- bin/timetrackr
|
77
|
+
- lib/timetrackr.rb
|
78
|
+
- lib/timetrackr/period.rb
|
79
|
+
- lib/timetrackr/yaml.rb
|
80
|
+
- test/helper.rb
|
81
|
+
- test/test_timetrackr.rb
|
82
|
+
- timetrackr.gemspec
|
83
|
+
has_rdoc: true
|
84
|
+
homepage: http://github.com/felix/timetrackr
|
85
|
+
licenses:
|
86
|
+
- MIT
|
87
|
+
post_install_message:
|
88
|
+
rdoc_options: []
|
89
|
+
|
90
|
+
require_paths:
|
91
|
+
- lib
|
92
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
93
|
+
none: false
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
hash: 2036167775305557846
|
98
|
+
segments:
|
99
|
+
- 0
|
100
|
+
version: "0"
|
101
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
|
+
none: false
|
103
|
+
requirements:
|
104
|
+
- - ">="
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: "0"
|
107
|
+
requirements: []
|
108
|
+
|
109
|
+
rubyforge_project:
|
110
|
+
rubygems_version: 1.6.2
|
111
|
+
signing_key:
|
112
|
+
specification_version: 3
|
113
|
+
summary: A simple time tracking utility
|
114
|
+
test_files:
|
115
|
+
- test/helper.rb
|
116
|
+
- test/test_timetrackr.rb
|