add_to_calendar_links 0.4.1 → 0.4.2

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: a9a4c131baf23b8be904a09cf58b75f186cca22862faad6900f08d15b8aedf72
4
- data.tar.gz: fbf5dc40b8998f67bed0793cbccb3a05cc88420e215793221d79803c29e743ed
3
+ metadata.gz: 2497b47a154707baecaf96e5a06c8bf247a3a4927bac368fe9102d64ab53c139
4
+ data.tar.gz: 03d063b6c2083d55d09e7ba710616d5de6337dbf8ba4f0e16c133147ea190607
5
5
  SHA512:
6
- metadata.gz: 5b2e00fa70513495dfe5dbdad955e9408c8d9c5ce40e2b8c2fe91da3c43e276072917e6d4e8c79807f3b9fdfb57799834cdb687f7985bbff379220b7a966ed75
7
- data.tar.gz: 7dbf4506eae2882e2a1b6bed72e9e18a3282c3e48e3d15d0427c8b21f4c9c622d00ca9f219c4255713444849774172f9cecac8255d543c025109efc540f1c4b3
6
+ metadata.gz: 045fb5416365467b8b557c981d27a754826750a0efce2d2dbc00ab348b5bdba7e4e37449611fdc828772be5c13bd639b8f78d045ac937f14981345c0d589d9e4
7
+ data.tar.gz: c64b76d1d4fa90e10c3e0227e413064330b9adbcf2d0e38a09360a110310fef2a85ae015ff0d723a1e79dae63fd8cb8374d43167db490fa783204e0941ee3386
@@ -100,7 +100,7 @@ module AddToCalendarLinks
100
100
  end
101
101
 
102
102
  def ical_file
103
- calendar_url = "BEGIN:VCALENDAR\nVERSION:2.0\nBEGIN:VEVENT"
103
+ calendar_url = "BEGIN:VCALENDAR\nVERSION:2.0\nMETHOD:REQUEST\nBEGIN:VEVENT"
104
104
 
105
105
  params = {}
106
106
  params[:DTSTART] = utc_datetime(start_datetime)
@@ -124,7 +124,7 @@ module AddToCalendarLinks
124
124
  params[:UID] = "-#{utc_datetime(start_datetime)}-#{title}" unless params[:UID] # set uid based on starttime and title only if url is unavailable
125
125
  params[:ORGANIZER] = organizer if organizer
126
126
  params[:SEQUENCE] = sequence if sequence
127
- params[:LASTMODIFIED] = format_date_google(last_modified) if last_modified
127
+ params["LAST-MODIFIED"] = format_date_google(last_modified) if last_modified
128
128
  params[:METHOD] = "REQUEST"
129
129
 
130
130
  params.each do |key, value|
@@ -139,7 +139,7 @@ module AddToCalendarLinks
139
139
  def ical_url
140
140
  # Downloads a *.ics file provided as a data-uri
141
141
  # Eg. "data:text/calendar;charset=utf8,BEGIN:VCALENDAR%0AVERSION:2.0%0ABEGIN:VEVENT%0ADTSTART:20200512T123000Z%0ADTEND:20200512T160000Z%0ASUMMARY:Holly%27s%208th%20Birthday%21%0AURL:https%3A%2F%2Fwww.example.com%2Fevent-details%0ADESCRIPTION:Come%20join%20us%20for%20lots%20of%20fun%20%26%20cake%21\\n\\nhttps%3A%2F%2Fwww.example.com%2Fevent-details%0ALOCATION:Flat%204%5C%2C%20The%20Edge%5C%2C%2038%20Smith-Dorrien%20St%5C%2C%20London%5C%2C%20N1%207GU%0AUID:-https%3A%2F%2Fwww.example.com%2Fevent-details%0AEND:VEVENT%0AEND:VCALENDAR"
142
- calendar_url = "data:text/calendar;charset=utf8,BEGIN:VCALENDAR%0AVERSION:2.0%0ABEGIN:VEVENT"
142
+ calendar_url = "data:text/calendar;charset=utf8,BEGIN:VCALENDAR%0AVERSION:2.0%0AMETHOD:REQUEST%0ABEGIN:VEVENT"
143
143
 
144
144
  params = {}
145
145
  params[:DTSTART] = utc_datetime(start_datetime)
@@ -163,8 +163,7 @@ module AddToCalendarLinks
163
163
  params[:UID] = "-#{utc_datetime(start_datetime)}-#{url_encode_ical(title)}" unless params[:UID] # set uid based on starttime and title only if url is unavailable
164
164
  params[:ORGANIZER] = organizer if organizer
165
165
  params[:SEQUENCE] = sequence if sequence
166
- params[:LASTMODIFIED] = format_date_google(last_modified) if last_modified
167
- params[:METHOD] = "REQUEST"
166
+ params["LAST-MODIFIED"] = format_date_google(last_modified) if last_modified
168
167
 
169
168
  new_line = "%0A"
170
169
  params.each do |key, value|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AddToCalendarLinks
4
- VERSION = '0.4.1'
4
+ VERSION = '0.4.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: add_to_calendar_links
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jared Turner