vgcal 0.1.1 → 0.2.3
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/Gemfile.lock +1 -1
- data/README.md +5 -4
- data/lib/vgcal/handlers/describer.rb +20 -3
- data/lib/vgcal/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e8dd7c78c6a1c70737ac7aa5f7d9e8e0d32060fb63adf0447db01acdaf5376c0
|
|
4
|
+
data.tar.gz: 5fbb39780a006902a4ec96105a0f773cb56d2b073ebd268e415a0789fd4f3039
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz: '
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0748ef604645d4c5bce2a495a1373455b9c88773a6b34b0abd27fd8ef40a2a17d168d61de096223524cc92a2f145b79553ebbc890bdff1fb5c90f55f8cbc69fd'
|
|
7
|
+
data.tar.gz: a7f7bd82e58d3f63706f7711bcce7215ea3c2803fa9df51e1e406a0c62204f3eaaecc45bb4a1bdb337d599c74197ce9dd17f28540c653280d0900d8aa333983f
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -41,10 +41,11 @@ Usage:
|
|
|
41
41
|
vgcal show
|
|
42
42
|
|
|
43
43
|
Options:
|
|
44
|
-
-d, [--date=DATE]
|
|
45
|
-
-c, [--current-week
|
|
46
|
-
-
|
|
47
|
-
-
|
|
44
|
+
-d, [--date=DATE] # Show relative date. ex.-1, +10
|
|
45
|
+
-c, [--current-week], [--no-current-week] # Show current week tasks
|
|
46
|
+
-n, [--next-week], [--no-next-week] # Show next week tasks
|
|
47
|
+
-s, [--start-date=N] # Start date. ex.20210701
|
|
48
|
+
-e, [--end-date=N] # End date. ex.20210728
|
|
48
49
|
|
|
49
50
|
Show google calendar
|
|
50
51
|
$
|
|
@@ -21,7 +21,8 @@ module Vgcal
|
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
option :date, type: :string, aliases: '-d', desc: 'Show relative date. ex.-1, +10'
|
|
24
|
-
option :'current-week', type: :
|
|
24
|
+
option :'current-week', type: :boolean, aliases: '-c', desc: 'Show current week tasks'
|
|
25
|
+
option :'next-week', type: :boolean, aliases: '-n', desc: 'Show next week tasks'
|
|
25
26
|
option :'start-date', type: :numeric, aliases: '-s', desc: 'Start date. ex.20210701'
|
|
26
27
|
option :'end-date', type: :numeric, aliases: '-e', desc: 'End date. ex.20210728'
|
|
27
28
|
|
|
@@ -62,7 +63,13 @@ module Vgcal
|
|
|
62
63
|
if Date.today.sunday?
|
|
63
64
|
Date.today.to_s
|
|
64
65
|
else
|
|
65
|
-
(Date.today - Date.today.wday
|
|
66
|
+
(Date.today - Date.today.wday).to_s
|
|
67
|
+
end
|
|
68
|
+
elsif options[:'next-week']
|
|
69
|
+
if Date.today.sunday?
|
|
70
|
+
(Date.today + 7).to_s
|
|
71
|
+
else
|
|
72
|
+
(Date.today + Date.today.wday - 1).to_s
|
|
66
73
|
end
|
|
67
74
|
elsif options[:date]
|
|
68
75
|
case options[:date][0]
|
|
@@ -88,6 +95,12 @@ module Vgcal
|
|
|
88
95
|
else
|
|
89
96
|
(Date.today + (6 - Date.today.wday)).to_s
|
|
90
97
|
end
|
|
98
|
+
elsif options[:'next-week']
|
|
99
|
+
if Date.today.sunday?
|
|
100
|
+
(Date.today + 7).to_s
|
|
101
|
+
else
|
|
102
|
+
(Date.today + 7 + (6 - Date.today.wday)).to_s
|
|
103
|
+
end
|
|
91
104
|
elsif options[:date]
|
|
92
105
|
case options[:date][0]
|
|
93
106
|
when '+'
|
|
@@ -100,7 +113,11 @@ module Vgcal
|
|
|
100
113
|
elsif options['start-date'] && options['end-date']
|
|
101
114
|
Date.parse(options['end-date'].to_s)
|
|
102
115
|
else
|
|
103
|
-
Date.today.
|
|
116
|
+
if Date.today.sunday?
|
|
117
|
+
(Date.today + 6).to_s
|
|
118
|
+
else
|
|
119
|
+
(Date.today + (6 - Date.today.wday)).to_s
|
|
120
|
+
end
|
|
104
121
|
end
|
|
105
122
|
"#{e_date}T23:59:59+09:00"
|
|
106
123
|
end
|
data/lib/vgcal/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vgcal
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shota Ito
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-09-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|