timetrap 1.7.6 → 1.7.7

Sign up to get free protection for your applications and to get access to all the features.
data/CONTRIBUTORS CHANGED
@@ -5,3 +5,4 @@
5
5
  * Thorben Schröder
6
6
  * Ryan Funduk
7
7
  * Christopher Peplin
8
+ * Johan Venant
data/README.md CHANGED
@@ -261,8 +261,9 @@ Commands
261
261
 
262
262
  **display**
263
263
  Display a given timesheet. If no timesheet is specified, show the current
264
- timesheet. If ``all`` is passed as SHEET display all timesheets. Accepts
265
- an optional ``--ids`` flag which will include the entries' ids in the output.
264
+ timesheet. If ``all`` is passed as SHEET display all timesheets. If ``full``
265
+ is passed as SHEET archived timesheets are displayed as well. Accepts an
266
+ optional ``--ids`` flag which will include the entries' ids in the output.
266
267
  This is useful when editing an non running entry with ``edit``.
267
268
 
268
269
  Display is designed to support a variety of export formats that can be
@@ -272,7 +273,7 @@ Commands
272
273
  Display also allows the use of a ``--round`` or ``-r`` flag which will round
273
274
  all times in the output. See global options below.
274
275
 
275
- usage: ``t display [--ids] [--round] [--start DATE] [--end DATE] [--format FMT] [SHEET | all]``
276
+ usage: ``t display [--ids] [--round] [--start DATE] [--end DATE] [--format FMT] [SHEET | all | full]``
276
277
 
277
278
  **edit**
278
279
  Inserts a note associated with the an entry in the timesheet, or edits the
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 1
3
3
  :minor: 7
4
- :patch: 6
4
+ :patch: 7
data/lib/timetrap/cli.rb CHANGED
@@ -33,9 +33,10 @@ COMMAND is one of:
33
33
  append_notes_delimiter: delimiter used when appending notes via
34
34
  t edit --append
35
35
 
36
- * display - Display the current timesheet or a specific. Pass `all' as
37
- SHEET to display all sheets.
38
- usage: t display [--ids] [--start DATE] [--end DATE] [--format FMT] [SHEET | all]
36
+ * display - Display the current timesheet or a specific. Pass `all' as SHEET
37
+ to display all unarchived sheets or `full' to display archived and
38
+ unarchived sheets.
39
+ usage: t display [--ids] [--start DATE] [--end DATE] [--format FMT] [SHEET | all | full]
39
40
  -v, --ids Print database ids (for use with edit)
40
41
  -s, --start <date:qs> Include entries that start on this date or later
41
42
  -e, --end <date:qs> Include entries that start on this date or earlier
@@ -31,6 +31,8 @@ module Timetrap
31
31
  def selected_entries
32
32
  ee = if (sheet = sheet_name_from_string(unused_args)) == 'all'
33
33
  Timetrap::Entry.filter('sheet not like ? escape "!"', '!_%')
34
+ elsif (sheet = sheet_name_from_string(unused_args)) == 'full'
35
+ Timetrap::Entry.filter()
34
36
  elsif sheet =~ /.+/
35
37
  Timetrap::Entry.filter('sheet = ?', sheet)
36
38
  else
@@ -76,6 +78,7 @@ module Timetrap
76
78
  string = string.strip
77
79
  case string
78
80
  when /^\W*all\W*$/ then "all"
81
+ when /^\W*full\W*$/ then "full"
79
82
  when /^$/ then Timer.current_sheet
80
83
  else
81
84
  entry = DB[:entries].filter(:sheet.like("#{string}")).first ||
data/timetrap.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{timetrap}
8
- s.version = "1.7.6"
8
+ s.version = "1.7.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Sam Goldstein"]
12
- s.date = %q{2011-09-30}
12
+ s.date = %q{2011-11-27}
13
13
  s.default_executable = %q{t}
14
14
  s.description = %q{Command line time tracker}
15
15
  s.email = %q{sgrock@gmail.com}
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timetrap
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 7
9
- - 6
10
- version: 1.7.6
9
+ - 7
10
+ version: 1.7.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sam Goldstein
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-30 00:00:00 -07:00
18
+ date: 2011-11-27 00:00:00 -08:00
19
19
  default_executable: t
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency