rtt 0.0.0.9 → 0.0.0.10

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'echoe'
3
3
 
4
4
  # PACKAGING ============================================================
5
5
 
6
- Echoe.new('rtt', '0.0.0.9') do |p|
6
+ Echoe.new('rtt', '0.0.0.10') 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'
Binary file
data/lib/rtt.rb CHANGED
@@ -30,8 +30,6 @@ module Rtt
30
30
  if current_task && options.blank?
31
31
  current_task.destroy
32
32
  else
33
- require 'ruby-debug'; debugger;
34
-
35
33
  query(options).map(&:destroy)
36
34
  end
37
35
  end
@@ -134,7 +134,8 @@ module Rtt
134
134
  when SetUserCommand
135
135
  set_user(cmd.name)
136
136
  when DeleteCommand
137
- delete(env_filters)
137
+ options = env_filters.merge!(:name => cmd.next_optional)
138
+ delete(options)
138
139
  when ConfigureCommand
139
140
  case cmd.name.downcase
140
141
  when 'task'
@@ -103,11 +103,9 @@ module Rtt
103
103
  task.rate = rate.to_f
104
104
  task.name = name
105
105
  date= ask_or_default('Date', "Date [Format: DD-MM-YYYY]:", (task.date.strftime("%d-%m-%Y") if task.present? && task.date.present?), /^\d{2,2}-\d{2,2}-\d{4,4}$/)
106
- if date.present? && task.date != date
107
- task.date = Date.parse(date)
108
- task.start_at = date
109
- task.end_at = date
110
- end
106
+ task.date = Date.parse(date) if date.present? && task.date != date
107
+ task.start_at = date
108
+ task.end_at = date
111
109
  duration = ask_or_default('duration', "Duration:", (task.duration if task.present?), /^(\d{1,2})[hH]{1,2}(\d{1,2})[mM]{1,2}$/)
112
110
  task.duration=(duration) if duration.present?
113
111
  project_name = ask_or_default('project', 'Project name:', (task.project.name if task.present? && task.project.present?), /^\w+$/)
@@ -12,7 +12,7 @@ module Rtt
12
12
  'Client' => Proc.new { |task| (task.client.name) if task.client.present? },
13
13
  'Project' => Proc.new { |task| (task.project.name) if task.project.present? },
14
14
  'Name' => Proc.new { |task| task.name },
15
- 'Date' => Proc.new { |task| task.date.strftime('%m-%d-%y') },
15
+ 'Date' => Proc.new { |task| task.date.strftime('%m-%d-%y') if task.date.present? },
16
16
  'Rate' => Proc.new { |task| task.rate },
17
17
  'Duration' => Proc.new { |task| task.duration }
18
18
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{rtt}
5
- s.version = "0.0.0.9"
5
+ s.version = "0.0.0.10"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Marcelo Giorgi"]
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: 93
4
+ hash: 91
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
9
  - 0
10
- - 9
11
- version: 0.0.0.9
10
+ - 10
11
+ version: 0.0.0.10
12
12
  platform: ruby
13
13
  authors:
14
14
  - Marcelo Giorgi