add_to_calendar 0.2.3 → 0.2.4
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/Gemfile.lock +1 -1
- data/README.md +4 -0
- data/lib/add_to_calendar.rb +2 -1
- data/lib/add_to_calendar/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9ccdbe13aa98bd8e94caba7b5ab6b270a7d180f29d4b45229275c1d58a4da0c7
|
|
4
|
+
data.tar.gz: c75a18bf0b11590e57ecf129f5b5b4a9abbbc665e50ef8017ca2b66a2d81e872
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b15f499801d1d934d6903ac75f43122d60e38023600591b4a4e7d8286bee3a610c26f52b8b968bdc4a257216334c4bf300201ee3137f5cd8a0871ddafb31ce9f
|
|
7
|
+
data.tar.gz: 4a6fa0af927ff0676b0248ec869627c77c12e60feca22e884d62e83545e6f0d5e04ec4b3d69a05be5ae60f221c3cc537f50b342ad3d58d68dc166c367213dff6
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -119,6 +119,10 @@ cal = AddToCalendar::URLs.new(event_attributes)
|
|
|
119
119
|
|
|
120
120
|
I couldn't find an approriate gem or javascript library that did exactly what I wanted. So I decided to scratch my own itch to solve a problem for a startup I'm working on: https://www.littlefutures.org
|
|
121
121
|
|
|
122
|
+
## Releases
|
|
123
|
+
|
|
124
|
+
- https://rubygems.org/gems/add_to_calendar
|
|
125
|
+
|
|
122
126
|
## Development
|
|
123
127
|
|
|
124
128
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/lib/add_to_calendar.rb
CHANGED
|
@@ -239,8 +239,9 @@ module AddToCalendar
|
|
|
239
239
|
string.gsub(/(?:\n\r?|\r\n?)/, '<br>')
|
|
240
240
|
end
|
|
241
241
|
|
|
242
|
-
def url_encode_ical(
|
|
242
|
+
def url_encode_ical(s)
|
|
243
243
|
# per https://tools.ietf.org/html/rfc5545#section-3.3.11
|
|
244
|
+
string = s.dup # don't modify original input
|
|
244
245
|
string.gsub!("\\", "\\\\\\") # \ >> \\ --yes, really: https://stackoverflow.com/questions/6209480/how-to-replace-backslash-with-double-backslash
|
|
245
246
|
string.gsub!(",", "\\,")
|
|
246
247
|
string.gsub!(";", "\\;")
|