rtt 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -11,7 +11,7 @@ gem 'rake', '0.8.2'
11
11
  gem 'gemcutter', '0.7.1'
12
12
 
13
13
  group :development do
14
- gem 'debugger'
14
+ gem 'debugger', '1.2.0'
15
15
  gem 'rspec', '1.3.0'
16
16
  gem 'mocha'
17
17
  gem 'hanna'
@@ -62,7 +62,7 @@ PLATFORMS
62
62
  DEPENDENCIES
63
63
  activerecord (= 3.2.6)
64
64
  activesupport (= 3.2.6)
65
- debugger
65
+ debugger (= 1.2.0)
66
66
  echoe
67
67
  gemcutter (= 0.7.1)
68
68
  hanna
data/Manifest CHANGED
@@ -8,8 +8,8 @@ USAGE.txt
8
8
  bin/rtt
9
9
  db/config.yml
10
10
  db/production.sqlite3
11
+ db/rtt.sqlite3
11
12
  db/schema.rb
12
- db/test.sqlite3
13
13
  lib/extensions/array.rb
14
14
  lib/extensions/date.rb
15
15
  lib/extensions/hash.rb
@@ -110,4 +110,4 @@ Enjoy!
110
110
 
111
111
  h2. Questions/Comments
112
112
 
113
- Feel free to email {Marcelo Andrés Giorgi Martínez}[mailto:marklazz.uy@gmail.com] for any comment or question.
113
+ Feel free to email "Marcelo Andrés Giorgi Martínez":mailto:marklazz.uy@gmail.com for any comment or question.
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'echoe'
3
3
 
4
4
  # PACKAGING ============================================================
5
5
 
6
- Echoe.new('rtt', '0.0.3') do |p|
6
+ Echoe.new('rtt', '0.0.4') 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'
@@ -8,3 +8,4 @@ test:
8
8
  database: db/test.sqlite3
9
9
  pool: 5
10
10
  timeout: 5000
11
+
Binary file
data/lib/rtt.rb CHANGED
@@ -8,7 +8,7 @@ Dir[File.expand_path(File.join(File.dirname(__FILE__), 'rtt', '*'))].each { |lib
8
8
 
9
9
  module Rtt
10
10
 
11
- VERSION = '0.0.3'
11
+ VERSION = '0.0.4'
12
12
 
13
13
  extend self
14
14
 
@@ -6,8 +6,8 @@ module Rtt
6
6
  #
7
7
  def query options = {}
8
8
  relation = Task.where(rtt_build_conditions(options))
9
- relation = relation.where(table[:date].gt(Date.parse(options.delete(:from)))) if options[:from]
10
- relation = relation.where(table[:date].lt(Date.parse(options.delete(:to)))) if options[:to]
9
+ relation = relation.where(table[:date].gt(options.delete(:from))) if options[:from]
10
+ relation = relation.where(table[:date].lt(options.delete(:to))) if options[:to]
11
11
  relation
12
12
  end
13
13
 
@@ -19,9 +19,9 @@ module Rtt
19
19
 
20
20
  def rtt_build_conditions options
21
21
  # default filter for today unless a date range is specified
22
- options[:date] = Date.today.strftime('%d-%m-%Y') if options[:to].blank? and options[:from].blank? and options[:date].blank?
22
+ options[:date] = Date.today if options[:to].blank? and options[:from].blank? and options[:date].blank?
23
23
  conditions = options.reject { |k,_| k.to_s == 'from' || k.to_s == 'to' }
24
- conditions[:date] = Date.parse(options.delete(:date)) if options[:date]
24
+ conditions[:date] = options.delete(:date) if options[:date]
25
25
  conditions[:user] = { :nickname => options.delete(:nickname) } if options[:nickname]
26
26
  conditions[:project] = { :name => options.delete(:project) } if options[:project]
27
27
  conditions.deep_merge!({ :project => { :client => { :name => options.delete(:client) } }}) if options[:client]
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "rtt"
5
- s.version = "0.0.3"
5
+ s.version = "0.0.4"
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"]
@@ -11,12 +11,12 @@ Gem::Specification.new do |s|
11
11
  s.email = "marklazz.uy@gmail.com"
12
12
  s.executables = ["rtt"]
13
13
  s.extra_rdoc_files = ["LICENSE", "README.textile", "bin/rtt", "lib/extensions/array.rb", "lib/extensions/date.rb", "lib/extensions/hash.rb", "lib/extensions/kernel.rb", "lib/models/client.rb", "lib/models/project.rb", "lib/models/task.rb", "lib/models/user.rb", "lib/rtt.rb", "lib/rtt/boot.rb", "lib/rtt/cmd_line_parser.rb", "lib/rtt/interactive_configurator.rb", "lib/rtt/query_builder.rb", "lib/rtt/report_generator.rb", "lib/rtt/storage.rb", "tasks/rtt.rake"]
14
- s.files = ["Gemfile", "Gemfile.lock", "LICENSE", "README.textile", "Rakefile", "USAGE.txt", "bin/rtt", "db/config.yml", "db/production.sqlite3", "db/schema.rb", "db/test.sqlite3", "lib/extensions/array.rb", "lib/extensions/date.rb", "lib/extensions/hash.rb", "lib/extensions/kernel.rb", "lib/models/client.rb", "lib/models/project.rb", "lib/models/task.rb", "lib/models/user.rb", "lib/rtt.rb", "lib/rtt/boot.rb", "lib/rtt/cmd_line_parser.rb", "lib/rtt/interactive_configurator.rb", "lib/rtt/query_builder.rb", "lib/rtt/report_generator.rb", "lib/rtt/storage.rb", "rtt.gemspec", "spec/ar_spec_helper.rb", "spec/lib/models/task_spec.rb", "spec/lib/rtt_spec.rb", "tasks/rtt.rake", "Manifest"]
14
+ s.files = ["Gemfile", "Gemfile.lock", "LICENSE", "Manifest", "README.textile", "Rakefile", "USAGE.txt", "bin/rtt", "db/config.yml", "db/rtt.sqlite3", "lib/extensions/array.rb", "lib/extensions/date.rb", "lib/extensions/hash.rb", "lib/extensions/kernel.rb", "lib/models/client.rb", "lib/models/project.rb", "lib/models/task.rb", "lib/models/user.rb", "lib/rtt.rb", "lib/rtt/boot.rb", "lib/rtt/cmd_line_parser.rb", "lib/rtt/interactive_configurator.rb", "lib/rtt/query_builder.rb", "lib/rtt/report_generator.rb", "lib/rtt/storage.rb", "spec/ar_spec_helper.rb", "spec/lib/models/task_spec.rb", "spec/lib/rtt_spec.rb", "tasks/rtt.rake", "rtt.gemspec"]
15
15
  s.homepage = "http://github.com/marklazz/rtt"
16
16
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Rtt", "--main", "README.textile"]
17
17
  s.require_paths = ["lib"]
18
18
  s.rubyforge_project = "rtt"
19
- s.rubygems_version = "1.8.23"
19
+ s.rubygems_version = "1.8.11"
20
20
  s.summary = "RTT is a tool for tracking time"
21
21
 
22
22
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rtt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,324 +13,224 @@ date: 2012-07-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: highline
16
- requirement: !ruby/object:Gem::Requirement
16
+ requirement: &23495160 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - '='
19
+ - - =
20
20
  - !ruby/object:Gem::Version
21
21
  version: 1.5.2
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - '='
28
- - !ruby/object:Gem::Version
29
- version: 1.5.2
24
+ version_requirements: *23495160
30
25
  - !ruby/object:Gem::Dependency
31
26
  name: activerecord
32
- requirement: !ruby/object:Gem::Requirement
27
+ requirement: &23494500 !ruby/object:Gem::Requirement
33
28
  none: false
34
29
  requirements:
35
- - - '='
30
+ - - =
36
31
  - !ruby/object:Gem::Version
37
32
  version: 3.2.6
38
33
  type: :runtime
39
34
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - '='
44
- - !ruby/object:Gem::Version
45
- version: 3.2.6
35
+ version_requirements: *23494500
46
36
  - !ruby/object:Gem::Dependency
47
37
  name: activesupport
48
- requirement: !ruby/object:Gem::Requirement
38
+ requirement: &23493980 !ruby/object:Gem::Requirement
49
39
  none: false
50
40
  requirements:
51
- - - '='
41
+ - - =
52
42
  - !ruby/object:Gem::Version
53
43
  version: 3.2.6
54
44
  type: :runtime
55
45
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - '='
60
- - !ruby/object:Gem::Version
61
- version: 3.2.6
46
+ version_requirements: *23493980
62
47
  - !ruby/object:Gem::Dependency
63
48
  name: prawn
64
- requirement: !ruby/object:Gem::Requirement
49
+ requirement: &23493240 !ruby/object:Gem::Requirement
65
50
  none: false
66
51
  requirements:
67
- - - '='
52
+ - - =
68
53
  - !ruby/object:Gem::Version
69
54
  version: 0.8.4
70
55
  type: :runtime
71
56
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - '='
76
- - !ruby/object:Gem::Version
77
- version: 0.8.4
57
+ version_requirements: *23493240
78
58
  - !ruby/object:Gem::Dependency
79
59
  name: rake
80
- requirement: !ruby/object:Gem::Requirement
60
+ requirement: &23492400 !ruby/object:Gem::Requirement
81
61
  none: false
82
62
  requirements:
83
- - - '='
63
+ - - =
84
64
  - !ruby/object:Gem::Version
85
65
  version: 0.8.2
86
66
  type: :runtime
87
67
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - '='
92
- - !ruby/object:Gem::Version
93
- version: 0.8.2
68
+ version_requirements: *23492400
94
69
  - !ruby/object:Gem::Dependency
95
70
  name: allison
96
- requirement: !ruby/object:Gem::Requirement
71
+ requirement: &23489740 !ruby/object:Gem::Requirement
97
72
  none: false
98
73
  requirements:
99
- - - '='
74
+ - - =
100
75
  - !ruby/object:Gem::Version
101
76
  version: 2.0.3
102
77
  type: :runtime
103
78
  prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - '='
108
- - !ruby/object:Gem::Version
109
- version: 2.0.3
79
+ version_requirements: *23489740
110
80
  - !ruby/object:Gem::Dependency
111
81
  name: extlib
112
- requirement: !ruby/object:Gem::Requirement
82
+ requirement: &23526360 !ruby/object:Gem::Requirement
113
83
  none: false
114
84
  requirements:
115
- - - '='
85
+ - - =
116
86
  - !ruby/object:Gem::Version
117
87
  version: 0.9.15
118
88
  type: :runtime
119
89
  prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
123
- - - '='
124
- - !ruby/object:Gem::Version
125
- version: 0.9.15
90
+ version_requirements: *23526360
126
91
  - !ruby/object:Gem::Dependency
127
92
  name: json_pure
128
- requirement: !ruby/object:Gem::Requirement
93
+ requirement: &23525100 !ruby/object:Gem::Requirement
129
94
  none: false
130
95
  requirements:
131
- - - '='
96
+ - - =
132
97
  - !ruby/object:Gem::Version
133
98
  version: 1.6.5
134
99
  type: :runtime
135
100
  prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
- requirements:
139
- - - '='
140
- - !ruby/object:Gem::Version
141
- version: 1.6.5
101
+ version_requirements: *23525100
142
102
  - !ruby/object:Gem::Dependency
143
103
  name: prawn-core
144
- requirement: !ruby/object:Gem::Requirement
104
+ requirement: &23523600 !ruby/object:Gem::Requirement
145
105
  none: false
146
106
  requirements:
147
- - - '='
107
+ - - =
148
108
  - !ruby/object:Gem::Version
149
109
  version: 0.8.4
150
110
  type: :runtime
151
111
  prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
- requirements:
155
- - - '='
156
- - !ruby/object:Gem::Version
157
- version: 0.8.4
112
+ version_requirements: *23523600
158
113
  - !ruby/object:Gem::Dependency
159
114
  name: prawn-layout
160
- requirement: !ruby/object:Gem::Requirement
115
+ requirement: &23521960 !ruby/object:Gem::Requirement
161
116
  none: false
162
117
  requirements:
163
- - - '='
118
+ - - =
164
119
  - !ruby/object:Gem::Version
165
120
  version: 0.8.4
166
121
  type: :runtime
167
122
  prerelease: false
168
- version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
- requirements:
171
- - - '='
172
- - !ruby/object:Gem::Version
173
- version: 0.8.4
123
+ version_requirements: *23521960
174
124
  - !ruby/object:Gem::Dependency
175
125
  name: prawn-security
176
- requirement: !ruby/object:Gem::Requirement
126
+ requirement: &23520460 !ruby/object:Gem::Requirement
177
127
  none: false
178
128
  requirements:
179
- - - '='
129
+ - - =
180
130
  - !ruby/object:Gem::Version
181
131
  version: 0.8.4
182
132
  type: :runtime
183
133
  prerelease: false
184
- version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
- requirements:
187
- - - '='
188
- - !ruby/object:Gem::Version
189
- version: 0.8.4
134
+ version_requirements: *23520460
190
135
  - !ruby/object:Gem::Dependency
191
136
  name: haml
192
- requirement: !ruby/object:Gem::Requirement
137
+ requirement: &23544800 !ruby/object:Gem::Requirement
193
138
  none: false
194
139
  requirements:
195
- - - '='
140
+ - - =
196
141
  - !ruby/object:Gem::Version
197
142
  version: 2.2.24
198
143
  type: :runtime
199
144
  prerelease: false
200
- version_requirements: !ruby/object:Gem::Requirement
201
- none: false
202
- requirements:
203
- - - '='
204
- - !ruby/object:Gem::Version
205
- version: 2.2.24
145
+ version_requirements: *23544800
206
146
  - !ruby/object:Gem::Dependency
207
147
  name: hanna
208
- requirement: !ruby/object:Gem::Requirement
148
+ requirement: &23542760 !ruby/object:Gem::Requirement
209
149
  none: false
210
150
  requirements:
211
- - - '='
151
+ - - =
212
152
  - !ruby/object:Gem::Version
213
153
  version: 0.1.12
214
154
  type: :runtime
215
155
  prerelease: false
216
- version_requirements: !ruby/object:Gem::Requirement
217
- none: false
218
- requirements:
219
- - - '='
220
- - !ruby/object:Gem::Version
221
- version: 0.1.12
156
+ version_requirements: *23542760
222
157
  - !ruby/object:Gem::Dependency
223
158
  name: metaclass
224
- requirement: !ruby/object:Gem::Requirement
159
+ requirement: &23541580 !ruby/object:Gem::Requirement
225
160
  none: false
226
161
  requirements:
227
- - - '='
162
+ - - =
228
163
  - !ruby/object:Gem::Version
229
164
  version: 0.0.1
230
165
  type: :runtime
231
166
  prerelease: false
232
- version_requirements: !ruby/object:Gem::Requirement
233
- none: false
234
- requirements:
235
- - - '='
236
- - !ruby/object:Gem::Version
237
- version: 0.0.1
167
+ version_requirements: *23541580
238
168
  - !ruby/object:Gem::Dependency
239
169
  name: rspec
240
- requirement: !ruby/object:Gem::Requirement
170
+ requirement: &23540900 !ruby/object:Gem::Requirement
241
171
  none: false
242
172
  requirements:
243
- - - '='
173
+ - - =
244
174
  - !ruby/object:Gem::Version
245
175
  version: 1.3.0
246
176
  type: :runtime
247
177
  prerelease: false
248
- version_requirements: !ruby/object:Gem::Requirement
249
- none: false
250
- requirements:
251
- - - '='
252
- - !ruby/object:Gem::Version
253
- version: 1.3.0
178
+ version_requirements: *23540900
254
179
  - !ruby/object:Gem::Dependency
255
180
  name: mocha
256
- requirement: !ruby/object:Gem::Requirement
181
+ requirement: &23539940 !ruby/object:Gem::Requirement
257
182
  none: false
258
183
  requirements:
259
- - - '='
184
+ - - =
260
185
  - !ruby/object:Gem::Version
261
186
  version: 0.10.4
262
187
  type: :runtime
263
188
  prerelease: false
264
- version_requirements: !ruby/object:Gem::Requirement
265
- none: false
266
- requirements:
267
- - - '='
268
- - !ruby/object:Gem::Version
269
- version: 0.10.4
189
+ version_requirements: *23539940
270
190
  - !ruby/object:Gem::Dependency
271
191
  name: rubyforge
272
- requirement: !ruby/object:Gem::Requirement
192
+ requirement: &23538740 !ruby/object:Gem::Requirement
273
193
  none: false
274
194
  requirements:
275
- - - '='
195
+ - - =
276
196
  - !ruby/object:Gem::Version
277
197
  version: 2.0.4
278
198
  type: :runtime
279
199
  prerelease: false
280
- version_requirements: !ruby/object:Gem::Requirement
281
- none: false
282
- requirements:
283
- - - '='
284
- - !ruby/object:Gem::Version
285
- version: 2.0.4
200
+ version_requirements: *23538740
286
201
  - !ruby/object:Gem::Dependency
287
202
  name: rdoc
288
- requirement: !ruby/object:Gem::Requirement
203
+ requirement: &23537420 !ruby/object:Gem::Requirement
289
204
  none: false
290
205
  requirements:
291
- - - '='
206
+ - - =
292
207
  - !ruby/object:Gem::Version
293
208
  version: 2.3.0
294
209
  type: :runtime
295
210
  prerelease: false
296
- version_requirements: !ruby/object:Gem::Requirement
297
- none: false
298
- requirements:
299
- - - '='
300
- - !ruby/object:Gem::Version
301
- version: 2.3.0
211
+ version_requirements: *23537420
302
212
  - !ruby/object:Gem::Dependency
303
213
  name: gemcutter
304
- requirement: !ruby/object:Gem::Requirement
214
+ requirement: &23552760 !ruby/object:Gem::Requirement
305
215
  none: false
306
216
  requirements:
307
- - - '='
217
+ - - =
308
218
  - !ruby/object:Gem::Version
309
219
  version: 0.7.1
310
220
  type: :runtime
311
221
  prerelease: false
312
- version_requirements: !ruby/object:Gem::Requirement
313
- none: false
314
- requirements:
315
- - - '='
316
- - !ruby/object:Gem::Version
317
- version: 0.7.1
222
+ version_requirements: *23552760
318
223
  - !ruby/object:Gem::Dependency
319
224
  name: echoe
320
- requirement: !ruby/object:Gem::Requirement
225
+ requirement: &23551380 !ruby/object:Gem::Requirement
321
226
  none: false
322
227
  requirements:
323
- - - '='
228
+ - - =
324
229
  - !ruby/object:Gem::Version
325
230
  version: 4.5.6
326
231
  type: :runtime
327
232
  prerelease: false
328
- version_requirements: !ruby/object:Gem::Requirement
329
- none: false
330
- requirements:
331
- - - '='
332
- - !ruby/object:Gem::Version
333
- version: 4.5.6
233
+ version_requirements: *23551380
334
234
  description: RTT is a tool for tracking time
335
235
  email: marklazz.uy@gmail.com
336
236
  executables:
@@ -360,14 +260,13 @@ files:
360
260
  - Gemfile
361
261
  - Gemfile.lock
362
262
  - LICENSE
263
+ - Manifest
363
264
  - README.textile
364
265
  - Rakefile
365
266
  - USAGE.txt
366
267
  - bin/rtt
367
268
  - db/config.yml
368
- - db/production.sqlite3
369
- - db/schema.rb
370
- - db/test.sqlite3
269
+ - db/rtt.sqlite3
371
270
  - lib/extensions/array.rb
372
271
  - lib/extensions/date.rb
373
272
  - lib/extensions/hash.rb
@@ -383,12 +282,11 @@ files:
383
282
  - lib/rtt/query_builder.rb
384
283
  - lib/rtt/report_generator.rb
385
284
  - lib/rtt/storage.rb
386
- - rtt.gemspec
387
285
  - spec/ar_spec_helper.rb
388
286
  - spec/lib/models/task_spec.rb
389
287
  - spec/lib/rtt_spec.rb
390
288
  - tasks/rtt.rake
391
- - Manifest
289
+ - rtt.gemspec
392
290
  homepage: http://github.com/marklazz/rtt
393
291
  licenses: []
394
292
  post_install_message:
@@ -415,7 +313,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
415
313
  version: '1.2'
416
314
  requirements: []
417
315
  rubyforge_project: rtt
418
- rubygems_version: 1.8.23
316
+ rubygems_version: 1.8.11
419
317
  signing_key:
420
318
  specification_version: 3
421
319
  summary: RTT is a tool for tracking time
Binary file
@@ -1,43 +0,0 @@
1
- ActiveRecord::Schema.define :version => 0 do
2
-
3
- create_table :clients, :force => true do |t|
4
- t.string :name, :default => Client::DEFAULT_NAME
5
- t.string :description, :default => Client::DEFAULT_DESCRIPTION
6
- t.boolean :active, :default => false
7
- end
8
-
9
- create_table :projects, :force => true do |t|
10
- t.string :name, :default => Project::DEFAULT_NAME
11
- t.string :description, :default => Project::DEFAULT_DESCRIPTION
12
- t.boolean :active, :default => false
13
- t.float :rate
14
- t.integer :client_id
15
- end
16
-
17
- create_table :tasks, :force => true do |t|
18
- t.string :name
19
- t.date :date
20
- t.boolean :active, :default => false
21
- t.datetime :start_at
22
- t.datetime :end_at
23
- t.float :accumulated_spent_time, :default => 0
24
- t.float :rate, :default => 0
25
- t.integer :user_id
26
- t.integer :project_id
27
- end
28
-
29
- create_table :users, :force => true do |t|
30
- t.string :nickname
31
- t.string :first_name
32
- t.string :last_name
33
- t.string :company
34
- t.string :address
35
- t.string :city
36
- t.string :country
37
- t.string :email
38
- t.string :phone
39
- t.string :zip
40
- t.string :site
41
- t.boolean :active, :default => false
42
- end
43
- end
Binary file