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 +4 -4
- data/ext/extconf.rb +8 -23
- data/lib/ToICalPal.rb +1 -1
- data/lib/event.rb +1 -1
- data/lib/options.rb +1 -1
- data/lib/rdt.rb +13 -1
- data/lib/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: b48ee501e87dc1c4c597bc9e45b6fd977668f107f942c857186de23245d22a4d
|
|
4
|
+
data.tar.gz: a4010b5cd6e901fc3d4a6eaa850c4b3303c97e0ca1075d868598ed8ab428b243
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
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
|
|
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
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)
|
|
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
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:
|
|
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:
|
|
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: []
|