rtt 0.0.0.20 → 0.0.0.21
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/db/rtt.sqlite3 +0 -0
- data/lib/rtt.rb +0 -1
- data/lib/rtt/query_builder.rb +2 -0
- data/rtt.gemspec +1 -1
- metadata +3 -3
data/Rakefile
CHANGED
@@ -3,7 +3,7 @@ require 'echoe'
|
|
3
3
|
|
4
4
|
# PACKAGING ============================================================
|
5
5
|
|
6
|
-
Echoe.new('rtt', '0.0.0.
|
6
|
+
Echoe.new('rtt', '0.0.0.21') do |p|
|
7
7
|
p.description = 'RTT is a tool for tracking time'
|
8
8
|
p.url = 'http://github.com/marklazz/rtt'
|
9
9
|
p.author = 'Marcelo Giorgi'
|
data/db/rtt.sqlite3
CHANGED
Binary file
|
data/lib/rtt.rb
CHANGED
@@ -71,7 +71,6 @@ module Rtt
|
|
71
71
|
def list options = {}
|
72
72
|
say 'Task List'
|
73
73
|
say '========='
|
74
|
-
options[:date] = Date.today.strftime('%d-%m-%Y') if options[:to].blank? and options[:from].blank? and options[:date].blank?
|
75
74
|
query(options).each do |task|
|
76
75
|
say "Task: #{task.name} || Client: #{task.client.name} || Project: #{task.project.name} || User: #{task.user.nickname} || Elapsed time: #{task.duration} #{'[ACTIVE]' if task.active} \n"
|
77
76
|
end
|
data/lib/rtt/query_builder.rb
CHANGED
@@ -11,6 +11,8 @@ module Rtt
|
|
11
11
|
private
|
12
12
|
|
13
13
|
def rtt_build_conditions options
|
14
|
+
# default filter for today unless a date range is specified
|
15
|
+
options[:date] = Date.today.strftime('%d-%m-%Y') if options[:to].blank? and options[:from].blank? and options[:date].blank?
|
14
16
|
conditions = options
|
15
17
|
conditions[:date.gte] = Date.parse(options.delete(:from)) if options[:from]
|
16
18
|
conditions[:date.lte] = Date.parse(options.delete(:to)) if options[:to]
|
data/rtt.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rtt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 101
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
9
|
- 0
|
10
|
-
-
|
11
|
-
version: 0.0.0.
|
10
|
+
- 21
|
11
|
+
version: 0.0.0.21
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Marcelo Giorgi
|