add_to_calendar_links 0.3.5 → 0.3.6

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: '09611f4133378a8707615e16cc296be9a6a80e72aa732c81cbb0365db77e9a96'
4
- data.tar.gz: 8bf823a2ed513266665d3e823fa547bfa59e27b3744affdde1ce3498a561992b
3
+ metadata.gz: 2ae61335ecbe43a1ab464e1d7dad0c62308aca608150ccad48e7ec07a25811d1
4
+ data.tar.gz: 7e23958684817312348d53b6bd78157e1779ef2c7fd4b3cc7e817bf60d60a8a7
5
5
  SHA512:
6
- metadata.gz: 286fe06c12701edfd41f105ab49223b416fb53ad0ef696aa99d278d9cbcc3ebb0fe0e5880998c4e5799b62fd572740272a38450d99ddabaf79a2d6eccdc39dc1
7
- data.tar.gz: debe4ada97a61847c6174db43d107f150e302f02ef5b555f1bc0c561b666859953eed4728e9def4eda023806947389fecfbd9554f6ef8c8e528eca7779aac2f0
6
+ metadata.gz: bd1b787b1f8f8fe6f8e248ea2e6dbef1121a15a8b9c3f5f5c5907a485e5ae3772b584e41080f37166b636a2cb82957b062f5fcd90f529109e3eb37c1289c7a1b
7
+ data.tar.gz: a467b4341c9a1a9cba5740be149ddc9a40d2d31703391e691d57aa316263dab5b1a29d7d88845b7de2041011fc7cbaf93a3019a65d550b7ee72d6961d7fa7546
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in add_to_calendar.gemspec
4
4
  gemspec
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- add_to_calendar_links (0.3.1)
4
+ add_to_calendar_links (0.3.5)
5
5
  tzinfo (>= 1.1, < 3)
6
6
  tzinfo-data (~> 1.2021)
7
7
 
@@ -253,11 +253,10 @@ module AddToCalendarLinks
253
253
  def url_encode_ical(s, strip_html: @strip_html)
254
254
  # per https://tools.ietf.org/html/rfc5545#section-3.3.11
255
255
  string = s.dup # don't modify original input
256
-
257
256
  if strip_html
258
257
  string.gsub!("<br>", "\n")
259
258
  string.gsub!("<p>", "\n")
260
- string.gsub!("</p>", "\n\n")
259
+ string.gsub!("</p>", "\n")
261
260
  string.gsub!("&amp;", "and")
262
261
  string.gsub!("&nbsp;", " ")
263
262
  string = strip_html_tags(string)
@@ -270,7 +269,7 @@ module AddToCalendarLinks
270
269
  else
271
270
  url_encode(e)
272
271
  end
273
- }.join("\n")
272
+ }.compact.join("\\n").gsub(/(\\n){2,}/, "\\n\\n").strip
274
273
  end
275
274
 
276
275
  def strip_html_tags(description)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AddToCalendarLinks
4
- VERSION = '0.3.5'
4
+ VERSION = '0.3.6'
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.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jared Turner
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2021-03-22 00:00:00.000000000 Z
12
+ date: 2021-03-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: tzinfo