timesheets 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/timesheets/cli.rb +8 -4
- data/lib/timesheets/commands/summary.rb +3 -2
- data/lib/timesheets/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e26670de1d7750daa13db2f3c7a83c9c5b5ea373
|
4
|
+
data.tar.gz: 98969ca139b02b992b2cd7c71c8798165d00d6a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68f05282f7e889a8125519568ead882ff1a6f325c73e85cdcac94140e599079b4b5bf160a64c7c6b676a471cf8c392f664ad87eee4005d247cd893d21f03dae6
|
7
|
+
data.tar.gz: 84bb452d5e65db1733dd63762d8d138cbebc228c47894802b898e0319a6e1586e60471e8aa9dd7efa842bd97e3d91598dadd3c78fbc28ce81cf1a85508f6dbd6
|
data/lib/timesheets/cli.rb
CHANGED
@@ -33,11 +33,15 @@ module Timesheets
|
|
33
33
|
Commands::Stop.run
|
34
34
|
end
|
35
35
|
|
36
|
+
option :format, type: :string,
|
37
|
+
desc: "ascii, csv, or html.", default: 'ascii'
|
38
|
+
option :'week-of', type: :string,
|
39
|
+
desc: "Limit summary to the week of YYYY-MM-DD"
|
40
|
+
option :rate, type: :numeric,
|
41
|
+
desc: "If provided, will be used as an hourly rate to calculate daily and weekly totals."
|
42
|
+
option :template, type: :string,
|
43
|
+
desc: "Filepath to a custom HTML template. Replaceable macros are: {{styles}}, {{table}}, {{today}}, {{firstDayNice}}, and {{invoiceID}}."
|
36
44
|
desc "summary", "See a summary table of time worked"
|
37
|
-
option :format
|
38
|
-
option :'week-of'
|
39
|
-
option :rate
|
40
|
-
option :template
|
41
45
|
def summary
|
42
46
|
Commands::Summary.run(options)
|
43
47
|
end
|
@@ -9,8 +9,9 @@ module Timesheets
|
|
9
9
|
|
10
10
|
def tableClass
|
11
11
|
{
|
12
|
-
'html'
|
13
|
-
'csv'
|
12
|
+
'html' => Timesheets::HTMLTable,
|
13
|
+
'csv' => Timesheets::CSVTable,
|
14
|
+
'ascii' => Terminal::Table
|
14
15
|
}[options[:format]] || Terminal::Table
|
15
16
|
end
|
16
17
|
|
data/lib/timesheets/version.rb
CHANGED