icalPal 3.10.2 → 4.0.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: a19cb126e559cf9684d82d4d47eebfefe1a058dadc63ca642693d1ac488a97b0
4
- data.tar.gz: 562f98a62d93eda9a03de31a5d1a09a7ddf9841d97abe0ea7d335a0976625dc7
3
+ metadata.gz: b48ee501e87dc1c4c597bc9e45b6fd977668f107f942c857186de23245d22a4d
4
+ data.tar.gz: a4010b5cd6e901fc3d4a6eaa850c4b3303c97e0ca1075d868598ed8ab428b243
5
5
  SHA512:
6
- metadata.gz: 659550c0e455ff95a565dbc7d2af162872e14126b35f50f7c8cbaee43c154252d2ef45748421540ab2bc7bde89e50aba0135280a093d086a37e3df970adefd89
7
- data.tar.gz: 941c218eef0998cc5356dac3e23cd91ea00046f6463b01e0bf6ebb651f008ce00c615d3c787945ec707a9fda35cdb25e733f10058464234ccb93d092213d727e
6
+ metadata.gz: 3f74dc669bd9b5352d12a5a40859cf1d2cab3cbbe3ed185223c5f8ec449af3115f415832191f6184ab76fe9ac74f0211ca80143d660440463f6a79080297ba54
7
+ data.tar.gz: afef75a278aa28007182a40ac9c1ed37369a5a72e0c3e8be92102160034b3f1ad013b879af0676e721cc8b0179de6c2ae28db023de657fb998fb73e53f06a54c
data/ext/extconf.rb CHANGED
@@ -9,31 +9,16 @@ begin
9
9
  # Dependencies common to all environments
10
10
  dependencies = %w[ plist ]
11
11
 
12
- if RUBY_VERSION >= '3.4'
13
- # bigdecimal is not part of the default gems starting from Ruby 3.4.0.
14
- # csv is not part of the default gems starting from Ruby 3.4.0.
15
- dependencies.push('bigdecimal')
12
+ # All dependencies are included with the installation of Ruby in
13
+ # macOS. Adding these dependencies anyway will cause errors that
14
+ # prevent icalPal from being installed.
15
+ unless RUBY_VERSION >= '2.6'
16
+ dependencies.push('logger')
16
17
  dependencies.push('csv')
17
-
18
- # The macOS and Homebrew versions of rubygems have incompatible
19
- # requirements for sqlite3.
20
- #
21
- # macOS 15.5 (Sequoia) comes with version 1.3.13, so it does not
22
- # need to be added as a dependency, and it cannot install anything
23
- # newer:
24
- #
25
- # requires Ruby version >= 3.0, < 3.4.dev. The current ruby version is 2.6.10.
26
- #
27
- # Homebrew's Ruby formula does not come with sqlite3, so it does
28
- # need to be added as a dependency, but it cannot install version
29
- # 1.3.13:
30
- #
31
- # error: call to undeclared function
32
- #
33
- # So neither environment can install the other's sqlite3 gem. We
34
- # must install sqlite3, but iff we are not building with macOS'
35
- # Ruby installation.
18
+ dependencies.push('json')
19
+ dependencies.push('rdoc')
36
20
  dependencies.push('sqlite3')
21
+ dependencies.push('yaml')
37
22
  end
38
23
 
39
24
  di = Gem::DependencyInstaller.new(install_dir: gemdir)
data/lib/ToICalPal.rb CHANGED
@@ -109,7 +109,7 @@ class RDoc::Markup::ToICalPal < RDoc::Markup::Formatter
109
109
  # @option h [Integer] :level 2 for a property name
110
110
  # @option h [String] :text The header's text
111
111
  def accept_heading(h)
112
- h.text = colorize(@item['symbolic_color_name'], @item['color'], h.text) if (h.level == 2) || COLOR_LABEL.any?(@prop)
112
+ h = RDoc::Markup::Heading.new(h.level, colorize(@item['symbolic_color_name'], @item['color'], h.text)) if (h.level == 2) || COLOR_LABEL.any?(@prop)
113
113
  @res << h.text
114
114
 
115
115
  case h.level
data/lib/event.rb CHANGED
@@ -96,7 +96,7 @@ module ICalPal
96
96
  # Save as seconds, Time, RDT
97
97
  ctime = obj[k] + ITIME
98
98
  ctime -= Time.at(ctime).utc_offset if obj["#{k.split('_')[0]}_tz"] == '_float' && !zone
99
- ttime = Time.at(ctime, in: zone)
99
+ ttime = (zone)? Time.at(ctime, in: zone) : Time.at(ctime)
100
100
 
101
101
  @self["#{k[0]}seconds"] = ctime
102
102
  @self["#{k[0]}ctime"] = ttime
data/lib/options.rb CHANGED
@@ -304,7 +304,7 @@ module ICalPal
304
304
  $log.level = opts[:debug]
305
305
 
306
306
  # For posterity
307
- opts[:ruby] = RUBY_VERSION
307
+ opts[:ruby] = RUBY_DESCRIPTION
308
308
  opts[:version] = @op.version
309
309
 
310
310
  # From the Department of Redundancy Department
data/lib/rdt.rb CHANGED
@@ -3,16 +3,28 @@ module ICalPal
3
3
  class RDT < DateTime
4
4
 
5
5
  # Create a new RDT from a Time object
6
+ #
7
+ # @param t [Time] The Time object
8
+ #
9
+ # @return [RDT] a new RDT
6
10
  def self.from_time(t)
7
- new(*t.to_a[0..5].reverse, (t.gmt_offset / 3600).to_s)
11
+ new(*t.to_a[0..5].reverse, Rational((t.gmt_offset / 3600), 24))
8
12
  end
9
13
 
10
14
  # Create a new RDT from seconds since epoch
15
+ #
16
+ # @param s [Integer] Seconds since the Unix epoch (Thu Jan 1 00:00:00 UTC 1970)
17
+ #
18
+ # @return [RDT] a new RDT
11
19
  def self.from_epoch(s)
12
20
  from_time(Time.at(s))
13
21
  end
14
22
 
15
23
  # Create a new RDT from seconds since iCal epoch
24
+ #
25
+ # @param s [Integer] Seconds since the iCal epoch (Jan 1 00:00:00 UTC 2001)
26
+ #
27
+ # @return [RDT] a new RDT
16
28
  def self.from_itime(s)
17
29
  from_epoch(s + ITIME)
18
30
  end
data/lib/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module ICalPal
2
2
  NAME = 'icalPal'.freeze
3
- VERSION = '3.10.2'.freeze
3
+ VERSION = '4.0.0'.freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: icalPal
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.10.2
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Rosen
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  requirements: []
64
- rubygems_version: 3.6.9
64
+ rubygems_version: 4.0.3
65
65
  specification_version: 4
66
66
  summary: Command-line tool to query the macOS Calendar and Reminders
67
67
  test_files: []