add_to_calendar 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +5 -9
- data/add_to_calendar.gemspec +1 -1
- data/lib/add_to_calendar.rb +5 -1
- data/lib/add_to_calendar/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24986348b563ba6eee3ee7c510092434f8e24d76c1ddd402484e31951cbb94f0
|
4
|
+
data.tar.gz: eda31a7a266b15e4b82db84ed250a2da999b0f5efe6fc565b75c8e7ea3286a57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4da59f54a6a6099646425189a66481e0450e6ac9cd6ea56806c455e74fcddd1f0055150a9951db600821a7c854593f23a049879eb85c972b1677205463397af9
|
7
|
+
data.tar.gz: 3d3eef19ecd6bf9f56440253c2f1cbf9d3ea090ea16e83d067191ecc61ac2fdabd49a20398adc206498a451a36355287ff06e8a726b89b416cbe45888418b3dc
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# AddToCalendar
|
2
2
|
|
3
|
-
A ruby gem to generate 'Add To Calendar' URLs for Apple, Google, Office 365, Outlook, Outlook.com and Yahoo calendars.
|
3
|
+
A ruby gem to generate 'Add To Calendar' URLs for Android, Apple, Google, Office 365, Outlook, Outlook.com and Yahoo calendars.
|
4
4
|
|
5
5
|
If this gem brings you some value feel free to buy me a coffee :) [![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/P5P71PK9T)
|
6
6
|
|
@@ -52,12 +52,7 @@ Or install it yourself as:
|
|
52
52
|
@cal.ical_url
|
53
53
|
#=> "data:text/calendar;charset=utf8,BEGIN:VCALENDAR%0AVERSION:2.0%0ABEGIN:VEVENT%0ADTSTART:20201212T133000Z%0ADTEND:20201212T143000Z%0ASUMMARY:Christmas%20party%21%0AUID:-20201212T133000Z-Christmas%20party%21%0AEND:VEVENT%0AEND:VCALENDAR"
|
54
54
|
|
55
|
-
# apple_url and outlook_url are simply helper methods that call ical_url
|
56
|
-
@cal.apple_url
|
57
|
-
#=> "data:text/calendar;charset=utf8,BEGIN:VCALENDAR%0AVERSION:2.0%0ABEGIN:VEVENT%0ADTSTART:20201212T133000Z%0ADTEND:20201212T143000Z%0ASUMMARY:Christmas%20party%21%0AUID:-20201212T133000Z-Christmas%20party%21%0AEND:VEVENT%0AEND:VCALENDAR"
|
58
|
-
|
59
|
-
@cal.outlook_url
|
60
|
-
#=> "data:text/calendar;charset=utf8,BEGIN:VCALENDAR%0AVERSION:2.0%0ABEGIN:VEVENT%0ADTSTART:20201212T133000Z%0ADTEND:20201212T143000Z%0ASUMMARY:Christmas%20party%21%0AUID:-20201212T133000Z-Christmas%20party%21%0AEND:VEVENT%0AEND:VCALENDAR"
|
55
|
+
# android_url, apple_url and outlook_url are simply helper methods that call ical_url and return the same string.
|
61
56
|
```
|
62
57
|
|
63
58
|
### Creating HTML links
|
@@ -68,7 +63,7 @@ Or install it yourself as:
|
|
68
63
|
|
69
64
|
<a href="<%= @cal.yahoo_url %>">Add to Yahoo Calendar</a>
|
70
65
|
|
71
|
-
<!-- for ical_url, apple_url and outlook_url you can set the filename like so -->
|
66
|
+
<!-- for ical_url, android_url, apple_url and outlook_url you can set the filename like so -->
|
72
67
|
<a download="calendar-event.ics" href="<%= @cal.ical_url %>">Download iCal</a>
|
73
68
|
```
|
74
69
|
|
@@ -109,7 +104,8 @@ cal = AddToCalendar::URLs.new(event_attributes)
|
|
109
104
|
### Browser support
|
110
105
|
|
111
106
|
- IE11 and lower will not work for `ical_url`, `apple_url` and `outlook_url` (IE does not properly support [data-uri links](https://caniuse.com/#feat=datauri). See [#16](https://github.com/jaredlt/add_to_calendar/issues/16)).
|
112
|
-
- IE11 will also not work with `Yahoo`, but this is because Yahoo only offers a simplified interface
|
107
|
+
- IE11 will also not work with `Yahoo`, but this is because Yahoo is deprecating IE 11 support and only offers a simplified interface which does not work with the add event URL.
|
108
|
+
- `Office 365` and `Outlook.com` do not work on mobile. This seems to be an issue on Microsoft's side. Their mobile web interface does not support the 'create event' URLs and the links do not open the apps if you have them installed.
|
113
109
|
|
114
110
|
### More details
|
115
111
|
|
data/add_to_calendar.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ["Jared Turner"]
|
9
9
|
spec.email = ["jaredlt01@gmail.com"]
|
10
10
|
|
11
|
-
spec.summary = "Generate 'Add To Calendar' URLs for Apple, Google, Office 365, Outlook, Outlook.com and Yahoo calendars"
|
11
|
+
spec.summary = "Generate 'Add To Calendar' URLs for Android, Apple, Google, Office 365, Outlook, Outlook.com and Yahoo calendars"
|
12
12
|
# spec.description = %q{TODO: Write a longer description or delete this line.}
|
13
13
|
spec.homepage = "https://github.com/jaredlt/add_to_calendar"
|
14
14
|
spec.license = "MIT"
|
data/lib/add_to_calendar.rb
CHANGED
@@ -136,6 +136,10 @@ module AddToCalendar
|
|
136
136
|
def outlook_url
|
137
137
|
ical_url
|
138
138
|
end
|
139
|
+
|
140
|
+
def android_url
|
141
|
+
ical_url
|
142
|
+
end
|
139
143
|
|
140
144
|
private
|
141
145
|
def validate_attributes
|
@@ -169,7 +173,7 @@ module AddToCalendar
|
|
169
173
|
raise MicrosoftServiceError, ":service must be 'outlook.com' or 'office365'. '#{service}' given"
|
170
174
|
end
|
171
175
|
params = {}
|
172
|
-
params[:subject] = url_encode(title)
|
176
|
+
params[:subject] = url_encode(title.gsub(' & ', ' and '))
|
173
177
|
params[:startdt] = utc_datetime_microsoft(start_datetime)
|
174
178
|
if end_datetime
|
175
179
|
params[:enddt] = utc_datetime_microsoft(end_datetime)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: add_to_calendar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jared Turner
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tzinfo
|
@@ -145,6 +145,6 @@ requirements: []
|
|
145
145
|
rubygems_version: 3.0.6
|
146
146
|
signing_key:
|
147
147
|
specification_version: 4
|
148
|
-
summary: Generate 'Add To Calendar' URLs for Apple, Google, Office 365, Outlook,
|
149
|
-
and Yahoo calendars
|
148
|
+
summary: Generate 'Add To Calendar' URLs for Android, Apple, Google, Office 365, Outlook,
|
149
|
+
Outlook.com and Yahoo calendars
|
150
150
|
test_files: []
|