icalPal 4.1.0 → 4.2.0
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/bin/icalPal +5 -5
- data/ext/extconf.rb +8 -6
- data/lib/event.rb +6 -6
- data/lib/rdt.rb +1 -1
- data/lib/reminder.rb +5 -1
- data/lib/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 363dff45c52135dcb0a151539ff513cc92f6ad086daacf8b7df141e52ca1aa1c
|
|
4
|
+
data.tar.gz: 0677a50a89478e2986d2f9cb896b6e970d647e50be60f65ca6a7f02458ca882e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2562a1fd8f801c53efdc39a07b03a9506006e662732addb831070bfd0c02e56a3a5bd34aef940185f3878ea8af91295ac8d06e12822c3cc33fc06e61a1a71acb
|
|
7
|
+
data.tar.gz: 112c795e08d74e0a1b85506b14eef161b1c26682e6f1f77b1c2699f8f15d6cfb85d1a57f47b578c2561e90e99b984e3a8190d722486e19478b897f4e722b3169
|
data/bin/icalPal
CHANGED
|
@@ -72,7 +72,7 @@ $log.info("Options:\n#{$opts.to_json}")
|
|
|
72
72
|
# @param item[Object]
|
|
73
73
|
|
|
74
74
|
def add(item)
|
|
75
|
-
$log.debug("Adding #{item.dump} #{item['UUID']} (#{item['title']})") if item['UUID']
|
|
75
|
+
$log.debug("Adding #{item.dump} #{item['UUID']} (#{item['title']})") if item['UUID'] if $log.level <= Logger::DEBUG
|
|
76
76
|
|
|
77
77
|
$items.push(item)
|
|
78
78
|
end
|
|
@@ -137,7 +137,7 @@ unless success
|
|
|
137
137
|
# Use a real open to get a useful error
|
|
138
138
|
File.open(db).close
|
|
139
139
|
rescue Exception => e
|
|
140
|
-
$log.fatal("#{e
|
|
140
|
+
$log.fatal("#{e}: #{db}")
|
|
141
141
|
|
|
142
142
|
eperm = 1 if e.instance_of?(Errno::EPERM)
|
|
143
143
|
end
|
|
@@ -304,7 +304,7 @@ doc = RDoc::Markup::Document.new
|
|
|
304
304
|
section = nil
|
|
305
305
|
|
|
306
306
|
items.each_with_index do |i, j|
|
|
307
|
-
$log.debug("Print #{j}: #{i.inspect}")
|
|
307
|
+
$log.debug("Print #{j}: #{i.inspect}") if $log.level <= Logger::DEBUG
|
|
308
308
|
|
|
309
309
|
# --li
|
|
310
310
|
break if $opts[:li].positive? && j >= $opts[:li]
|
|
@@ -316,7 +316,7 @@ items.each_with_index do |i, j|
|
|
|
316
316
|
|
|
317
317
|
# Sections
|
|
318
318
|
if $opts[:sep] && section != i[$opts[:sep]]
|
|
319
|
-
$log.debug("New section '#{$opts[:sep]}': #{i[$opts[:sep]]}")
|
|
319
|
+
$log.debug("New section '#{$opts[:sep]}': #{i[$opts[:sep]]}") if $log.level <= Logger::DEBUG
|
|
320
320
|
|
|
321
321
|
doc << RDoc::Markup::Raw.new($opts[:sep])
|
|
322
322
|
|
|
@@ -340,7 +340,7 @@ items.each_with_index do |i, j|
|
|
|
340
340
|
next if value.is_a?(Array) && !value[0]
|
|
341
341
|
next if value.is_a?(String) && value.empty?
|
|
342
342
|
|
|
343
|
-
$log.debug("#{prop}: #{value}")
|
|
343
|
+
$log.debug("#{prop}: #{value}") if $log.level <= Logger::DEBUG
|
|
344
344
|
|
|
345
345
|
# Use Raw to save the property
|
|
346
346
|
props << RDoc::Markup::Raw.new(prop)
|
data/ext/extconf.rb
CHANGED
|
@@ -9,10 +9,11 @@ begin
|
|
|
9
9
|
# Dependencies common to all environments
|
|
10
10
|
dependencies = %w[ plist ]
|
|
11
11
|
|
|
12
|
-
# All dependencies are included with the installation of Ruby
|
|
13
|
-
# macOS. Adding these dependencies anyway will cause errors that
|
|
14
|
-
# prevent icalPal from being installed
|
|
15
|
-
|
|
12
|
+
# All other dependencies are included with the installation of Ruby
|
|
13
|
+
# in macOS. Adding these dependencies anyway will cause errors that
|
|
14
|
+
# prevent icalPal from being installed, so we need to be more
|
|
15
|
+
# granular.
|
|
16
|
+
if RUBY_VERSION >= '3.0'
|
|
16
17
|
dependencies.push('logger')
|
|
17
18
|
dependencies.push('csv')
|
|
18
19
|
dependencies.push('json')
|
|
@@ -23,8 +24,9 @@ begin
|
|
|
23
24
|
|
|
24
25
|
di = Gem::DependencyInstaller.new(install_dir: gemdir)
|
|
25
26
|
dependencies.each { |d| di.install(d) }
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
|
|
28
|
+
rescue Exception => e
|
|
29
|
+
abort(e)
|
|
28
30
|
end
|
|
29
31
|
|
|
30
32
|
File.write('Makefile', "clean:\n\ttrue\ninstall:\n\ttrue")
|
data/lib/event.rb
CHANGED
|
@@ -225,7 +225,7 @@ module ICalPal
|
|
|
225
225
|
when 'M' then dom = j[1].split(',')
|
|
226
226
|
when 'O' then moy = j[1].split(',')
|
|
227
227
|
when 'S' then nth = j[1].to_i
|
|
228
|
-
else $log.warn("Unknown specifier: #{k}")
|
|
228
|
+
else $log.warn("Unknown specifier: #{k}") if $log.level <= Logger::WARN
|
|
229
229
|
end
|
|
230
230
|
end
|
|
231
231
|
|
|
@@ -294,7 +294,7 @@ module ICalPal
|
|
|
294
294
|
when 'weekly' then nd = self[d] + (self['interval'] * 7)
|
|
295
295
|
when 'monthly' then nd = self[d] >> self['interval']
|
|
296
296
|
when 'yearly' then nd = self[d] >> (self['interval'] * 12)
|
|
297
|
-
else $log.error("Unknown frequency: #{self['frequency']}")
|
|
297
|
+
else $log.error("Unknown frequency: #{self['frequency']}") if $log.level <= Logger::ERROR
|
|
298
298
|
end
|
|
299
299
|
|
|
300
300
|
# Create a new Time object in case we crossed a daylight saving change
|
|
@@ -312,17 +312,17 @@ module ICalPal
|
|
|
312
312
|
def in_window?(s, e)
|
|
313
313
|
if $opts[:now]
|
|
314
314
|
if $nowto_i.between?(s.to_i, e.to_i)
|
|
315
|
-
$log.debug("now: #{s} to #{e} vs. #{$now}")
|
|
315
|
+
$log.debug("now: #{s} to #{e} vs. #{$now}") if $log.level <= Logger::DEBUG
|
|
316
316
|
true
|
|
317
317
|
else
|
|
318
|
-
$log.debug("not now: #{s} to #{e} vs. #{$now}")
|
|
318
|
+
$log.debug("not now: #{s} to #{e} vs. #{$now}") if $log.level <= Logger::DEBUG
|
|
319
319
|
false
|
|
320
320
|
end
|
|
321
321
|
elsif (s < $opts[:to] && [ s, e ].max >= $opts[:from])
|
|
322
|
-
$log.debug("#{@self['title']} in window: #{s} to #{e} vs. #{$opts[:from]} to #{$opts[:to]}")
|
|
322
|
+
$log.debug("#{@self['title']} in window: #{s} to #{e} vs. #{$opts[:from]} to #{$opts[:to]}") if $log.level <= Logger::DEBUG
|
|
323
323
|
true
|
|
324
324
|
else
|
|
325
|
-
$log.debug("not in window: #{s} to #{e} vs. #{$opts[:from]} to #{$opts[:to]}")
|
|
325
|
+
$log.debug("not in window: #{s} to #{e} vs. #{$opts[:from]} to #{$opts[:to]}") if $log.level <= Logger::DEBUG
|
|
326
326
|
false
|
|
327
327
|
end
|
|
328
328
|
end
|
data/lib/rdt.rb
CHANGED
|
@@ -66,7 +66,7 @@ module ICalPal
|
|
|
66
66
|
return strftime($opts[:df]) if $opts && $opts[:df] && $opts[:nrd]
|
|
67
67
|
return super unless $today && $opts
|
|
68
68
|
|
|
69
|
-
case (self - $today).
|
|
69
|
+
case (self - $today).floor
|
|
70
70
|
when -2 then 'day before yesterday'
|
|
71
71
|
when -1 then 'yesterday'
|
|
72
72
|
when 0 then 'today'
|
data/lib/reminder.rb
CHANGED
|
@@ -63,6 +63,9 @@ module ICalPal
|
|
|
63
63
|
when 'name', 'reminder', 'task' # Aliases
|
|
64
64
|
@self['title']
|
|
65
65
|
|
|
66
|
+
when 'UUID' # For consistency with other commands
|
|
67
|
+
@self['id']
|
|
68
|
+
|
|
66
69
|
else super
|
|
67
70
|
end
|
|
68
71
|
end
|
|
@@ -85,8 +88,9 @@ module ICalPal
|
|
|
85
88
|
s = $sections.select { |i| i['id'] == j[0]['groupID'] } if j[0]
|
|
86
89
|
@self['section'] = s[0]['name'] if s && s[0]
|
|
87
90
|
|
|
91
|
+
# Drop the internal membership scratch but keep `id` (zckIdentifier),
|
|
92
|
+
# which downstream consumers rely on for joins/dedup.
|
|
88
93
|
@self.delete('members')
|
|
89
|
-
@self.delete('id')
|
|
90
94
|
end
|
|
91
95
|
|
|
92
96
|
# Priority
|
data/lib/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: icalPal
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andy Rosen
|
|
8
|
+
autorequire:
|
|
8
9
|
bindir: bin
|
|
9
10
|
cert_chain: []
|
|
10
|
-
date:
|
|
11
|
+
date: 2026-04-26 00:00:00.000000000 Z
|
|
11
12
|
dependencies: []
|
|
12
13
|
description: |
|
|
13
14
|
Inspired by icalBuddy and maintains close compatability. Includes
|
|
@@ -61,7 +62,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
61
62
|
- !ruby/object:Gem::Version
|
|
62
63
|
version: '0'
|
|
63
64
|
requirements: []
|
|
64
|
-
rubygems_version:
|
|
65
|
+
rubygems_version: 3.0.3.1
|
|
66
|
+
signing_key:
|
|
65
67
|
specification_version: 4
|
|
66
68
|
summary: Command-line tool to query the macOS Calendar and Reminders
|
|
67
69
|
test_files: []
|