google_calendar 0.7.0 → 0.7.1
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/Gemfile.lock +3 -3
- data/VERSION +1 -1
- data/google_calendar.gemspec +2 -2
- data/test/test_google_calendar.rb +45 -0
- 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: 1d9c224b831f12d9cdad228672b013f79a44c2bb2f97709de7fcd3a47919e998
|
|
4
|
+
data.tar.gz: c7d603880f030d01d0af49a75ae5ca66686a574bb027bff50a6237370189f45e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3248645f5c4662353afb835c34d3f6dfb4cee9f292bb22e4f91731fc9de2f160c0da1aa74c63940b44c463861c77f738608f47d6a1fb2c843a48ab8657c51560
|
|
7
|
+
data.tar.gz: 78f74884c0c9cda3a8d63e669520ed8827d2bcb135e5d0c5f7eb438e8e3d59db657c019c7ff7a9ba2af25dd4aeb596ed7b833f823b19e4070f9b6bf81ed75d23
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
google_calendar (0.7.
|
|
4
|
+
google_calendar (0.7.1)
|
|
5
5
|
TimezoneParser (>= 0.3, < 1.1)
|
|
6
6
|
addressable (> 2.7.0)
|
|
7
7
|
json (>= 1.8.3)
|
|
@@ -15,7 +15,7 @@ GEM
|
|
|
15
15
|
insensitive_hash
|
|
16
16
|
sqlite3
|
|
17
17
|
tzinfo
|
|
18
|
-
addressable (2.9.
|
|
18
|
+
addressable (2.9.2)
|
|
19
19
|
public_suffix (>= 2.0.2, < 8.0)
|
|
20
20
|
ansi (1.5.0)
|
|
21
21
|
base64 (0.3.0)
|
|
@@ -75,7 +75,7 @@ GEM
|
|
|
75
75
|
simplecov_json_formatter (0.1.4)
|
|
76
76
|
sorted_set (1.1.0)
|
|
77
77
|
rbtree
|
|
78
|
-
sqlite3 (2.
|
|
78
|
+
sqlite3 (2.10.2)
|
|
79
79
|
mini_portile2 (~> 2.8.0)
|
|
80
80
|
terminal-notifier-guard (1.7.0)
|
|
81
81
|
tsort (0.2.0)
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.7.
|
|
1
|
+
0.7.1
|
data/google_calendar.gemspec
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = "google_calendar"
|
|
5
|
-
s.version = "0.7.
|
|
6
|
-
s.date = "2026-
|
|
5
|
+
s.version = "0.7.1"
|
|
6
|
+
s.date = "2026-11-17"
|
|
7
7
|
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
9
9
|
s.required_ruby_version = ">= 3.2"
|
|
@@ -493,6 +493,18 @@ class TestGoogleCalendar < Minitest::Test
|
|
|
493
493
|
assert !@event.all_day?
|
|
494
494
|
end
|
|
495
495
|
end
|
|
496
|
+
# Regression test for issue #38: all_day? used to raise when @start_time
|
|
497
|
+
# was a Time (not a String), e.g. after the start_time reader ran.
|
|
498
|
+
context "when start_time and end_time are Time objects" do
|
|
499
|
+
should "not raise and return the correct result" do
|
|
500
|
+
@event = Event.new(:start_time => Time.parse("2012-03-31"), :end_time => Time.parse("2012-04-01"))
|
|
501
|
+
@event.start_time # exercise the reader before calling all_day?
|
|
502
|
+
assert @event.all_day?
|
|
503
|
+
|
|
504
|
+
@event = Event.new(:start_time => Time.parse("2012-03-27T10:00:00"), :end_time => Time.parse("2012-03-27T10:30:00"))
|
|
505
|
+
assert !@event.all_day?
|
|
506
|
+
end
|
|
507
|
+
end
|
|
496
508
|
end
|
|
497
509
|
|
|
498
510
|
context "#all_day=" do
|
|
@@ -545,6 +557,32 @@ class TestGoogleCalendar < Minitest::Test
|
|
|
545
557
|
@event = Event.new(:transparency => 'transparent')
|
|
546
558
|
assert @event.transparent?
|
|
547
559
|
end
|
|
560
|
+
|
|
561
|
+
# Regression test for issue #298: the Google API omits the transparency
|
|
562
|
+
# field for opaque events, so events built from a feed arrive with it
|
|
563
|
+
# nil. Those must be treated as opaque, not transparent.
|
|
564
|
+
context "when built from a google feed" do
|
|
565
|
+
should "be opaque when the feed omits the transparency field" do
|
|
566
|
+
feed = { "items" => [
|
|
567
|
+
{ "id" => "aaaaa11111", "summary" => "Busy meeting",
|
|
568
|
+
"start" => { "dateTime" => "2023-01-01T10:00:00Z" },
|
|
569
|
+
"end" => { "dateTime" => "2023-01-01T11:00:00Z" } }
|
|
570
|
+
]}
|
|
571
|
+
event = Event.build_from_google_feed(feed, nil).first
|
|
572
|
+
assert event.opaque?
|
|
573
|
+
refute event.transparent?
|
|
574
|
+
end
|
|
575
|
+
|
|
576
|
+
should "be transparent when the feed marks the event transparent" do
|
|
577
|
+
feed = { "items" => [
|
|
578
|
+
{ "id" => "bbbbb22222", "summary" => "Free time", "transparency" => "transparent",
|
|
579
|
+
"start" => { "dateTime" => "2023-01-01T12:00:00Z" },
|
|
580
|
+
"end" => { "dateTime" => "2023-01-01T13:00:00Z" } }
|
|
581
|
+
]}
|
|
582
|
+
event = Event.build_from_google_feed(feed, nil).first
|
|
583
|
+
assert event.transparent?
|
|
584
|
+
end
|
|
585
|
+
end
|
|
548
586
|
end
|
|
549
587
|
|
|
550
588
|
context "event json" do
|
|
@@ -553,6 +591,13 @@ class TestGoogleCalendar < Minitest::Test
|
|
|
553
591
|
assert_equal JSON.parse(@event.to_json)["id"], "nfej9pqigzneknf8llso0iehlv"
|
|
554
592
|
end
|
|
555
593
|
|
|
594
|
+
# Regression test for issue #81: newlines in the description must be JSON
|
|
595
|
+
# escaped so they round-trip instead of producing a parse error.
|
|
596
|
+
should "preserve newlines in the description" do
|
|
597
|
+
@event = Event.new(description: "line one\nline two\nline three")
|
|
598
|
+
assert_equal JSON.parse(@event.to_json)["description"], "line one\nline two\nline three"
|
|
599
|
+
end
|
|
600
|
+
|
|
556
601
|
should "be correct format without ID specified" do
|
|
557
602
|
now = Time.now
|
|
558
603
|
@event = Event.new
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: google_calendar
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Steve Zich
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-
|
|
10
|
+
date: 2026-11-17 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: addressable
|