active-icalendar-events 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b212810d18b04c9d70bdfc4bdf9f23dc98ac30e0342ed7087807210080deaf15
4
- data.tar.gz: 31679287a660305ec7df1cc588c6abbf1a53c90becca8f1154a5388e6731eae7
3
+ metadata.gz: 66faac211abc46fa695ee95745004e6223cd07be003036c26d7fcbf91c2b0818
4
+ data.tar.gz: c526790a49ab6a346eafe16592775e9d04afc5084fa8eae1ba20ca4bc44a1522
5
5
  SHA512:
6
- metadata.gz: eda2bbc9424bf898d1aafe3f3085f11e7bb283a72c6d1b4e29d92d9790db8db3732bbae4058c77b92094d8ce2507a26a04f09ee8c64f4b6986c98a28318e3cbe
7
- data.tar.gz: 6c40b35406af38798b9acd4d5df6caec1b9daa31053571d7837cf7722ed26f77c2c835a8d58848006f5533b9400d3b6cfbeab8b0b4c05e59c359bae6b6d192f9
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.downcase,
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.2
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-26 00:00:00.000000000 Z
11
+ date: 2021-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport