calendav 0.5.1 → 0.7.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/CHANGELOG.md +11 -0
- data/README.md +1 -1
- data/lib/calendav/calendar.rb +1 -1
- data/lib/calendav/clients/calendars_client.rb +1 -0
- data/lib/calendav/errors.rb +2 -2
- data/lib/calendav/event.rb +2 -2
- data/lib/calendav/parsers/calendar_xml.rb +11 -1
- data/lib/calendav/requests/list_calendars.rb +5 -0
- data/lib/calendav/todo.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 34d502fbdb651ebe05b7a94b1883c68b4bf2596c45120325afba8fefef3d6097
|
|
4
|
+
data.tar.gz: 10ce336e86721b9619f0e0bd7cfc07d82159e49d7ed24619f10fd41c1da8578b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 16133c0de06e2ebe64e351bff39117b908cb935b1cb970b23810373bc3d6012e557dcef41fc4f3b20fdf955014bdc0a8892248e4d7a0b5f4a12e8824cc1e25d0
|
|
7
|
+
data.tar.gz: d384ca0f4a93db9a10aac1e5e83a0280548b87c6b4bf3f8ae1c45ff4224ed2e8d39c98e48754652e4ed52d9c5132f90af68828d553112d4c7fbf5a96eb05c042
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
## Unreleased
|
|
2
2
|
|
|
3
|
+
## 0.7.0 - 2026-11-29
|
|
4
|
+
|
|
5
|
+
* Memoise expensive parsing logic for events and todos (François Ferrandis #17)
|
|
6
|
+
* Fix multi_json use in test suite (François Ferrandis #18)
|
|
7
|
+
* Drop support for Ruby versions prior to v3.2.
|
|
8
|
+
* Added a policy banning AI/LLM contributions.
|
|
9
|
+
|
|
10
|
+
## 0.6.0 - 2026-04-12
|
|
11
|
+
|
|
12
|
+
* Add `current-user-privilege-set` support (Antoine Girard #15)
|
|
13
|
+
|
|
3
14
|
## 0.5.1 - 2025-11-21
|
|
4
15
|
|
|
5
16
|
* Expose transp attribute on events (Antoine Girard #14)
|
data/README.md
CHANGED
|
@@ -309,7 +309,7 @@ With the CalDAV server running, you can now run `rake spec` to run the tests.
|
|
|
309
309
|
|
|
310
310
|
## Contributing
|
|
311
311
|
|
|
312
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/pat/calendav. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/pat/calendav/blob/main/CODE_OF_CONDUCT.md).
|
|
312
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/pat/calendav. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/pat/calendav/blob/main/CODE_OF_CONDUCT.md) and [AI/LLMs policy](https://github.com/pat/calendav/blob/main/AI_POLICY.md).
|
|
313
313
|
|
|
314
314
|
## License
|
|
315
315
|
|
data/lib/calendav/calendar.rb
CHANGED
data/lib/calendav/errors.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Calendav
|
|
4
|
-
Error
|
|
4
|
+
class Error < StandardError; end
|
|
5
5
|
|
|
6
6
|
class ParsingXMLError < Error
|
|
7
7
|
attr_reader :xml, :original
|
|
@@ -30,5 +30,5 @@ module Calendav
|
|
|
30
30
|
end
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
-
PreconditionError
|
|
33
|
+
class PreconditionError < RequestError; end
|
|
34
34
|
end
|
data/lib/calendav/event.rb
CHANGED
|
@@ -58,11 +58,11 @@ module Calendav
|
|
|
58
58
|
attr_reader :attributes
|
|
59
59
|
|
|
60
60
|
def inner_calendar
|
|
61
|
-
Icalendar::Calendar.parse(calendar_data).first
|
|
61
|
+
@inner_calendar ||= Icalendar::Calendar.parse(calendar_data).first
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
def inner_event
|
|
65
|
-
@inner_event
|
|
65
|
+
@inner_event ||= inner_calendar.events.first
|
|
66
66
|
end
|
|
67
67
|
end
|
|
68
68
|
end
|
|
@@ -24,7 +24,11 @@ module Calendav
|
|
|
24
24
|
def call
|
|
25
25
|
XPATHS
|
|
26
26
|
.transform_values { |xpath| value(xpath) }
|
|
27
|
-
.merge(
|
|
27
|
+
.merge(
|
|
28
|
+
components: components,
|
|
29
|
+
reports: reports,
|
|
30
|
+
current_user_privilege_set: privileges
|
|
31
|
+
)
|
|
28
32
|
end
|
|
29
33
|
|
|
30
34
|
private
|
|
@@ -43,6 +47,12 @@ module Calendav
|
|
|
43
47
|
).collect(&:name)
|
|
44
48
|
end
|
|
45
49
|
|
|
50
|
+
def privileges
|
|
51
|
+
element.xpath(
|
|
52
|
+
".//dav:current-user-privilege-set/dav:privilege/*"
|
|
53
|
+
).collect(&:name)
|
|
54
|
+
end
|
|
55
|
+
|
|
46
56
|
def value(xpath)
|
|
47
57
|
node = element.xpath(xpath)
|
|
48
58
|
return nil if node.children.empty?
|
data/lib/calendav/todo.rb
CHANGED
|
@@ -50,11 +50,11 @@ module Calendav
|
|
|
50
50
|
attr_reader :attributes
|
|
51
51
|
|
|
52
52
|
def inner_calendar
|
|
53
|
-
Icalendar::Calendar.parse(calendar_data).first
|
|
53
|
+
@inner_calendar ||= Icalendar::Calendar.parse(calendar_data).first
|
|
54
54
|
end
|
|
55
55
|
|
|
56
56
|
def inner_todo
|
|
57
|
-
@inner_todo
|
|
57
|
+
@inner_todo ||= inner_calendar.todos.first
|
|
58
58
|
end
|
|
59
59
|
end
|
|
60
60
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: calendav
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pat Allan
|
|
@@ -107,14 +107,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
107
107
|
requirements:
|
|
108
108
|
- - ">="
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: 2.
|
|
110
|
+
version: 3.2.0
|
|
111
111
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
112
|
requirements:
|
|
113
113
|
- - ">="
|
|
114
114
|
- !ruby/object:Gem::Version
|
|
115
115
|
version: '0'
|
|
116
116
|
requirements: []
|
|
117
|
-
rubygems_version:
|
|
117
|
+
rubygems_version: 4.0.20
|
|
118
118
|
specification_version: 4
|
|
119
119
|
summary: CalDAV client
|
|
120
120
|
test_files: []
|