active-icalendar-events 0.0.2 → 0.1.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/lib/active-icalendar-events.rb +4 -6
- 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: 66faac211abc46fa695ee95745004e6223cd07be003036c26d7fcbf91c2b0818
|
4
|
+
data.tar.gz: c526790a49ab6a346eafe16592775e9d04afc5084fa8eae1ba20ca4bc44a1522
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b075bbe5774a836656ebb7849d052f26a03ec321a335b181424fedecb4929e32e1f41eb11cb39d56f5922cb3fad2a986eb0fc938f074c34ca1f9b95fecc590a6
|
7
|
+
data.tar.gz: 5b8fa60c24e61314eee6e8d829ae02988ae9a57940d152de5ded2f6e62d96f6442df7a0c6d7c0a7e567735224668d50909d99121e7389430a8b392152b88884f
|
@@ -87,13 +87,13 @@ module ActiveIcalendarEvents
|
|
87
87
|
# Remove 'nil' if it has been put in the set
|
88
88
|
active_events.delete nil
|
89
89
|
|
90
|
-
active_events
|
90
|
+
active_events.to_a
|
91
91
|
end
|
92
92
|
|
93
93
|
def format_icalendar_data(icalendar_data)
|
94
94
|
icalendar_data.first.events.map { |e|
|
95
95
|
{
|
96
|
-
name: e.summary
|
96
|
+
name: e.summary,
|
97
97
|
event_start: e.dtstart,
|
98
98
|
event_end: e.dtend,
|
99
99
|
recurrence_rule: e.rrule,
|
@@ -181,8 +181,7 @@ module ActiveIcalendarEvents
|
|
181
181
|
week_event_start_considered =
|
182
182
|
event_start_considered.monday? ? event_start_considered :
|
183
183
|
event_start_considered.prev_occurring(:monday)
|
184
|
-
week_event_end_considered =
|
185
|
-
(week_event_start_considered.to_time + (event_end.to_time - event_start.to_time)).to_datetime
|
184
|
+
week_event_end_considered = week_event_start_considered + (event_end.to_time - event_start.to_time).seconds
|
186
185
|
|
187
186
|
(1..7).each { |_|
|
188
187
|
if week_event_start_considered >= event_start
|
@@ -296,8 +295,7 @@ module ActiveIcalendarEvents
|
|
296
295
|
event_start_considered =
|
297
296
|
get_nth_day_in_month(event_start_considered.beginning_of_month + interval.month,
|
298
297
|
by_day.first)
|
299
|
-
event_end_considered =
|
300
|
-
(event_start_considered.to_time + (event_end.to_time - event_start.to_time)).to_datetime
|
298
|
+
event_end_considered = event_start_considered + (event_end.to_time - event_start.to_time).seconds
|
301
299
|
end
|
302
300
|
end
|
303
301
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active-icalendar-events
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Starling
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-12-
|
11
|
+
date: 2021-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|