icalPal 4.1.1 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b7a08f7d5c62bc27062ea6cde8bf800b6631c58b428991b994e285a86469b07
4
- data.tar.gz: 14051dfef891767a810a0d4d1a55d1da9417b946fb08ec8565b6247fcd909212
3
+ metadata.gz: 363dff45c52135dcb0a151539ff513cc92f6ad086daacf8b7df141e52ca1aa1c
4
+ data.tar.gz: 0677a50a89478e2986d2f9cb896b6e970d647e50be60f65ca6a7f02458ca882e
5
5
  SHA512:
6
- metadata.gz: a60997ef2b79dd0f8943a89fe0982242adcc7124c6d6ca93def4caaf359eb326fe42861a2ecdc30559ec217f7cb317a4ed411cafd146769614c4c0ac63c3102c
7
- data.tar.gz: b5d7e8448ddea760a62c022dc6b1e5e66a80055b798f39ebc7495ef0250a94e763b1ca28422c6cdf6fb715bb94fd8ff88daf662f7e0ef0a92ea4951c14a4ad49
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
@@ -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/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/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
@@ -1,4 +1,4 @@
1
1
  module ICalPal
2
2
  NAME = 'icalPal'.freeze
3
- VERSION = '4.1.1'.freeze
3
+ VERSION = '4.2.0'.freeze
4
4
  end
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.1.1
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: 1980-01-02 00:00:00.000000000 Z
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: 4.0.3
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: []