vgcal 0.3.1 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a632e5cfab5b38c6448d2ec560cbe8b7f81bfa60eaa7926a1cc007946f6d1ab0
4
- data.tar.gz: b558eee546de6744e98dd62828d0708c98b6d1bba1b209d8e0885fdb1b05e571
3
+ metadata.gz: a094a0dff8c0b5b6718905988811abcc18a7f2218166992a187a60305714dbff
4
+ data.tar.gz: a784420508bec7292a539001cacb819b0a355e19bcf2e2f0f9e137401efa7921
5
5
  SHA512:
6
- metadata.gz: a5a8d0dd3424094faafd0c3f70a009f2ec95cdfbdb54773ca4da29dae27fcdaa942e3d31de0d5ebc9aa23c3b424dbf5bc8beb3847db8ecf3b41867c5e1d0a107
7
- data.tar.gz: 4151ee42551a148d35e6230c99e466ba000778ca60aa4871c1e932664519785fc5b8466febe7afa1709724ce96dcac9af41db4484b07822a1e3baff15ce836c6
6
+ metadata.gz: 1fb45ccd27ec15e7a4b2e3f4ec88cfc967b9187b54895740077c3d9716e434b79b98e0640432375230225cbe7c3b1d1c55af54d252ae4941ff7c2509db399df5
7
+ data.tar.gz: 43a5785852131ef658b79e4409d0cf58f4c4b09cea501d0f54d5917b2b43636d32838e5f546539210bdb3ec818d2f434673ee343d4560f3c174446cc2e4424fe
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.0.1
1
+ 3.0.4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vgcal (0.3.1)
4
+ vgcal (0.4.0)
5
5
  dotenv
6
6
  google-api-client
7
7
  thor (~> 1.1)
@@ -9,43 +9,27 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activesupport (6.1.4.1)
12
+ activesupport (7.0.3.1)
13
13
  concurrent-ruby (~> 1.0, >= 1.0.2)
14
14
  i18n (>= 1.6, < 2)
15
15
  minitest (>= 5.1)
16
16
  tzinfo (~> 2.0)
17
- zeitwerk (~> 2.3)
18
17
  addressable (2.8.0)
19
18
  public_suffix (>= 2.0.2, < 5.0)
20
19
  ast (2.4.2)
21
- concurrent-ruby (1.1.9)
20
+ concurrent-ruby (1.1.10)
22
21
  declarative (0.0.20)
23
22
  diff-lcs (1.4.4)
24
- dotenv (2.7.6)
25
- faraday (1.7.1)
26
- faraday-em_http (~> 1.0)
27
- faraday-em_synchrony (~> 1.0)
28
- faraday-excon (~> 1.1)
29
- faraday-httpclient (~> 1.0.1)
30
- faraday-net_http (~> 1.0)
31
- faraday-net_http_persistent (~> 1.1)
32
- faraday-patron (~> 1.0)
33
- faraday-rack (~> 1.0)
34
- multipart-post (>= 1.2, < 3)
23
+ dotenv (2.8.1)
24
+ faraday (2.4.0)
25
+ faraday-net_http (~> 2.0)
35
26
  ruby2_keywords (>= 0.0.4)
36
- faraday-em_http (1.0.0)
37
- faraday-em_synchrony (1.0.0)
38
- faraday-excon (1.1.0)
39
- faraday-httpclient (1.0.1)
40
- faraday-net_http (1.0.1)
41
- faraday-net_http_persistent (1.2.0)
42
- faraday-patron (1.0.0)
43
- faraday-rack (1.0.0)
27
+ faraday-net_http (2.1.0)
44
28
  gems (1.2.0)
45
29
  google-api-client (0.53.0)
46
30
  google-apis-core (~> 0.1)
47
31
  google-apis-generator (~> 0.1)
48
- google-apis-core (0.4.1)
32
+ google-apis-core (0.7.0)
49
33
  addressable (~> 2.5, >= 2.5.1)
50
34
  googleauth (>= 0.16.2, < 2.a)
51
35
  httpclient (>= 2.8.1, < 3.a)
@@ -54,39 +38,38 @@ GEM
54
38
  retriable (>= 2.0, < 4.a)
55
39
  rexml
56
40
  webrick
57
- google-apis-discovery_v1 (0.6.0)
58
- google-apis-core (>= 0.4, < 2.a)
59
- google-apis-generator (0.4.0)
41
+ google-apis-discovery_v1 (0.11.0)
42
+ google-apis-core (>= 0.7, < 2.a)
43
+ google-apis-generator (0.9.0)
60
44
  activesupport (>= 5.0)
61
45
  gems (~> 1.2)
62
- google-apis-core (>= 0.4, < 2.a)
46
+ google-apis-core (>= 0.7, < 2.a)
63
47
  google-apis-discovery_v1 (~> 0.5)
64
48
  thor (>= 0.20, < 2.a)
65
- googleauth (0.17.1)
66
- faraday (>= 0.17.3, < 2.0)
49
+ googleauth (1.2.0)
50
+ faraday (>= 0.17.3, < 3.a)
67
51
  jwt (>= 1.4, < 3.0)
68
52
  memoist (~> 0.16)
69
53
  multi_json (~> 1.11)
70
54
  os (>= 0.9, < 2.0)
71
- signet (~> 0.15)
55
+ signet (>= 0.16, < 2.a)
72
56
  httpclient (2.8.3)
73
- i18n (1.8.10)
57
+ i18n (1.12.0)
74
58
  concurrent-ruby (~> 1.0)
75
- jwt (2.2.3)
59
+ jwt (2.4.1)
76
60
  memoist (0.16.2)
77
- mini_mime (1.1.1)
78
- minitest (5.14.4)
61
+ mini_mime (1.1.2)
62
+ minitest (5.16.2)
79
63
  multi_json (1.15.0)
80
- multipart-post (2.1.1)
81
- os (1.1.1)
64
+ os (1.1.4)
82
65
  parallel (1.20.1)
83
66
  parser (3.0.2.0)
84
67
  ast (~> 2.4.1)
85
- public_suffix (4.0.6)
68
+ public_suffix (4.0.7)
86
69
  rainbow (3.0.0)
87
70
  rake (13.0.3)
88
71
  regexp_parser (2.1.1)
89
- representable (3.1.1)
72
+ representable (3.2.0)
90
73
  declarative (< 0.1.0)
91
74
  trailblazer-option (>= 0.1.1, < 0.2.0)
92
75
  uber (< 0.2.0)
@@ -118,21 +101,21 @@ GEM
118
101
  parser (>= 3.0.1.1)
119
102
  ruby-progressbar (1.11.0)
120
103
  ruby2_keywords (0.0.5)
121
- signet (0.16.0)
104
+ signet (0.17.0)
122
105
  addressable (~> 2.8)
123
- faraday (>= 0.17.3, < 2.0)
106
+ faraday (>= 0.17.5, < 3.a)
124
107
  jwt (>= 1.5, < 3.0)
125
108
  multi_json (~> 1.10)
126
- thor (1.1.0)
127
- trailblazer-option (0.1.1)
128
- tzinfo (2.0.4)
109
+ thor (1.2.1)
110
+ trailblazer-option (0.1.2)
111
+ tzinfo (2.0.5)
129
112
  concurrent-ruby (~> 1.0)
130
113
  uber (0.1.0)
131
114
  unicode-display_width (2.0.0)
132
115
  webrick (1.7.0)
133
- zeitwerk (2.4.2)
134
116
 
135
117
  PLATFORMS
118
+ arm64-darwin-21
136
119
  x86_64-darwin-19
137
120
 
138
121
  DEPENDENCIES
@@ -143,4 +126,4 @@ DEPENDENCIES
143
126
  vgcal!
144
127
 
145
128
  BUNDLED WITH
146
- 2.2.15
129
+ 2.2.33
data/README.md CHANGED
@@ -46,6 +46,7 @@ Options:
46
46
  -n, [--next-week], [--no-next-week] # Show next week tasks
47
47
  -s, [--start-date=N] # Start date. ex.20210701
48
48
  -e, [--end-date=N] # End date. ex.20210728
49
+ -o, [--output=OUTPUT] # Output format. [text|json]
49
50
 
50
51
  Show google calendar
51
52
  $
@@ -61,8 +62,8 @@ $ vgcal show
61
62
  Period: 2021-07-24T00:00:00+09:00 - 2021-07-24T23:59:59+09:00
62
63
 
63
64
  My tasks: 5.25h(0.66day)
64
- ・all day task 1: all day
65
- ・all day task2: all day
65
+ ・all day task 1: 0h
66
+ ・all day task2: 0h
66
67
  ・meeting1: 2.0h
67
68
  ・meeting2: 0.25h
68
69
  ・meeting3: 3.0h
@@ -80,6 +81,30 @@ $ vgcal show -d +1
80
81
 
81
82
  # Schedule for 2021/07/01 - 2021/07/28
82
83
  $ vgcal show -s 20210701 -e 20210728
84
+
85
+ # Formatted json
86
+ $ vgcal show -o json | jq .
87
+ {
88
+ "start_date": "2021-09-05T00:00:00+09:00",
89
+ "end_date": "2021-09-05T23:59:59+09:00",
90
+ "tasks": [
91
+ {
92
+ "title": "all day task 1",
93
+ "time": 0,
94
+ "task_type": "my_task"
95
+ },
96
+ {
97
+ "title": "task a",
98
+ "time": 1,
99
+ "task_type": "my_task"
100
+ },
101
+ {
102
+ "title": "task b",
103
+ "time": 1,
104
+ "task_type": "my_task"
105
+ }
106
+ ]
107
+ }
83
108
  ```
84
109
 
85
110
  ## Development
@@ -15,9 +15,10 @@ module Vgcal
15
15
  vgcal_dir = "#{Dir.home}/.vgcal"
16
16
  cred_json = "#{vgcal_dir}/credentials.json"
17
17
  dot_env = "#{vgcal_dir}/.env"
18
+ gem_root = File.expand_path '../../../', __dir__
18
19
  Dir.mkdir(vgcal_dir, 0o755) unless Dir.exist?(vgcal_dir)
19
- FileUtils.cp('template-credentials.json', cred_json) unless File.exist?(cred_json)
20
- FileUtils.cp('template.env', dot_env) unless File.exist?(dot_env)
20
+ FileUtils.cp(File.join(gem_root,'template-credentials.json'), cred_json) unless File.exist?(cred_json)
21
+ FileUtils.cp(File.join(gem_root,'template.env'), dot_env) unless File.exist?(dot_env)
21
22
  puts "Fix the __FIX_ME__ in #{cred_json} and #{dot_env}"
22
23
  end
23
24
 
@@ -29,7 +29,7 @@ module Vgcal
29
29
  events.items.each do |e|
30
30
  if e.organizer.email.include?(my_email_address) && !e.summary.start_with?(*hide_words)
31
31
  if all_day_event?(e.start.date)
32
- tasks_hash[e.summary] = 'all day'
32
+ tasks_hash[e.summary] = 0
33
33
  else
34
34
  task_time = (e.end.date_time - e.start.date_time).to_f * 24
35
35
  # 1日の中で同じタスク名が複数あったら時間を集計する。例.午前と午後それぞれでAプロジェクトに1時間スケジュール
data/lib/vgcal/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Vgcal
4
- VERSION = '0.3.1'
4
+ VERSION = '0.4.1'
5
5
  end
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.3.1
4
+ version: 0.4.1
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-09-05 00:00:00.000000000 Z
11
+ date: 2022-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
155
  - !ruby/object:Gem::Version
156
156
  version: '0'
157
157
  requirements: []
158
- rubygems_version: 3.2.15
158
+ rubygems_version: 3.2.33
159
159
  signing_key:
160
160
  specification_version: 4
161
161
  summary: "%q{The vgcal command simplifies the display of Google Calendar events.}"