Repository: adamgibbons/ics
Pull request #145 (2020-07-28 03:53:43)

Bump json from 1.8.1 to 2.3.1
Bumps [json](https://github.com/flori/json) from 1.8.1 to 2.3.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/flori/json/blob/master/CHANGES.md">json's changelog</a>.</em></p>
<blockquote>
<h2>2020-06-30 (2.3.1)</h2>
<ul>
<li>Spelling and grammar fixes for comments. Pull request <a href="https://github-redirect.dependabot.com/flori/json/issues/191">#191</a> by Josh
Kline.</li>
<li>Enhance generic JSON and #generate docs. Pull request <a href="https://github-redirect.dependabot.com/flori/json/issues/347">#347</a> by Victor
Shepelev.</li>
<li>Add :nodoc: for GeneratorMethods. Pull request <a href="https://github-redirect.dependabot.com/flori/json/issues/349">#349</a> by Victor Shepelev.</li>
<li>Baseline changes to help (JRuby) development. Pull request <a href="https://github-redirect.dependabot.com/flori/json/issues/371">#371</a> by Karol
Bucek.</li>
<li>Add metadata for rubygems.org. Pull request <a href="https://github-redirect.dependabot.com/flori/json/issues/379">#379</a> by Alexandre ZANNI.</li>
<li>Remove invalid JSON.generate description from JSON module rdoc. Pull
request <a href="https://github-redirect.dependabot.com/flori/json/issues/384">#384</a> by Jeremy Evans.</li>
<li>Test with TruffleRuby in CI. Pull request <a href="https://github-redirect.dependabot.com/flori/json/issues/402">#402</a> by Benoit Daloze.</li>
<li>Rdoc enhancements. Pull request <a href="https://github-redirect.dependabot.com/flori/json/issues/413">#413</a> by Burdette Lamar.</li>
<li>Fixtures/ are not being tested... Pull request <a href="https://github-redirect.dependabot.com/flori/json/issues/416">#416</a> by Marc-André
Lafortune.</li>
<li>Use frozen string for hash key. Pull request <a href="https://github-redirect.dependabot.com/flori/json/issues/420">#420</a> by Marc-André
Lafortune.</li>
<li>Added :call-seq: to RDoc for some methods. Pull request <a href="https://github-redirect.dependabot.com/flori/json/issues/422">#422</a> by Burdette
Lamar.</li>
<li>Small typo fix. Pull request <a href="https://github-redirect.dependabot.com/flori/json/issues/423">#423</a> by Marc-André Lafortune.</li>
</ul>
<h2>2019-12-11 (2.3.0)</h2>
<ul>
<li>Fix default of <code>create_additions</code> to always be <code>false</code> for <code>JSON(user_input)</code>
and <code>JSON.parse(user_input, nil)</code>.
Note that <code>JSON.load</code> remains with default <code>true</code> and is meant for internal
serialization of trusted data. [CVE-2020-10663]</li>
<li>Fix passing args all #to_json in json/add/*.</li>
<li>Fix encoding issues</li>
<li>Fix issues of keyword vs positional parameter</li>
<li>Fix JSON::Parser against bigdecimal updates</li>
<li>Bug fixes to JRuby port</li>
</ul>
<h2>2019-02-21 (2.2.0)</h2>
<ul>
<li>Adds support for 2.6 BigDecimal and ruby standard library Set datetype.</li>
</ul>
<h2>2017-04-18 (2.1.0)</h2>
<ul>
<li>Allow passing of <code>decimal_class</code> option to specify a class as which to parse
JSON float numbers.</li>
</ul>
<h2>2017-03-23 (2.0.4)</h2>
<ul>
<li>Raise exception for incomplete unicode surrogates/character escape
sequences. This problem was reported by Daniel Gollahon (dgollahon).</li>
<li>Fix arbitrary heap exposure problem. This problem was reported by Ahmad
Sherif (ahmadsherif).</li>
</ul>
<h2>2017-01-12 (2.0.3)</h2>
<ul>
<li>Set <code>required_ruby_version</code> to 1.9</li>
<li>Some small fixes</li>
</ul>
<h2>2016-07-26 (2.0.2)</h2>
<!-- raw HTML omitted -->
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/flori/json/commit/0951d7719c3ee7e35b4e1ae80613ce02fb6f20da"><code>0951d77</code></a> Bump version to 2.3.1</li>
<li><a href="https://github.com/flori/json/commit/ddc29e20c1c05bc96ede665ad066cbf0617a6c93"><code>ddc29e2</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/flori/json/issues/429">#429</a> from flori/remove-generate-task-for-gemspec</li>
<li><a href="https://github.com/flori/json/commit/cee8020dc8a3c33936149667ada3f017d396ade7"><code>cee8020</code></a> Removed gemspec task from default task on Rakefile</li>
<li><a href="https://github.com/flori/json/commit/9fd637107f1267726acee108e88e21dc773f137e"><code>9fd6371</code></a> Use VERSION file instead of hard-coded value</li>
<li><a href="https://github.com/flori/json/commit/dc90bcf240fe8059157e6e37cd52944e64523266"><code>dc90bcf</code></a> Removed explicitly date field in gemspec, it will assign by rubygems.org</li>
<li><a href="https://github.com/flori/json/commit/4c11a40c1f0de83b5c39877f40143fe8a5e512cd"><code>4c11a40</code></a> Removed task for json_pure.gemspec</li>
<li><a href="https://github.com/flori/json/commit/e794ec959121e868808e333fdeddd8261f1d5844"><code>e794ec9</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/flori/json/issues/426">#426</a> from marcandre/indent</li>
<li><a href="https://github.com/flori/json/commit/7cc9301acae27438b32b0cb21d7ff8c3cb07792c"><code>7cc9301</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/flori/json/issues/428">#428</a> from marcandre/change_fix</li>
<li><a href="https://github.com/flori/json/commit/9e2a1fb7d8193dfae67ed70a6f531dd4e4b5f0d5"><code>9e2a1fb</code></a> Make changes more precise <a href="https://github-redirect.dependabot.com/flori/json/issues/424">#424</a></li>
<li><a href="https://github.com/flori/json/commit/f8fa987de568b11cfea27d44486b0377d83d0e4b"><code>f8fa987</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/flori/json/issues/424">#424</a> from marcandre/update_changes</li>
<li>Additional commits viewable in <a href="https://github.com/flori/json/compare/v1.8.1...v2.3.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=json&package-manager=bundler&previous-version=1.8.1&new-version=2.3.1)](https://help.github.com/articles/configuring-automated-security-fixes)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/adamgibbons/ics/network/alerts).

</details>


Patch:
diff --git a/Gemfile.lock b/Gemfile.lock
index 64582fe..2cb50ac 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -4,13 +4,13 @@ GEM
     addressable (2.3.6)
     backports (3.6.3)
     coderay (1.1.0)
-    ethon (0.7.1)
-      ffi (>= 1.9.24)
+    ethon (0.12.0)
+      ffi (>= 1.3.0)
     faraday (0.9.0)
       multipart-post (>= 1.2, < 3)
     faraday_middleware (0.9.1)
       faraday (>= 0.7.4, < 0.10)
-    ffi (1.9.3)
+    ffi (1.13.1)
     gh (0.13.2)
       addressable
       backports
@@ -19,7 +19,7 @@ GEM
       net-http-persistent (>= 2.7)
       net-http-pipeline
     highline (1.6.21)
-    json (1.8.1)
+    json (2.3.1)
     launchy (2.4.2)
       addressable (~> 2.3)
     method_source (0.8.2)
@@ -46,8 +46,8 @@ GEM
       pry (~> 0.9, < 0.10)
       pusher-client (~> 0.4)
       typhoeus (~> 0.6, >= 0.6.8)
-    typhoeus (0.6.9)
-      ethon (>= 0.7.1)
+    typhoeus (0.8.0)
+      ethon (>= 0.8.0)
     websocket (1.2.1)
 
 PLATFORMS
diff --git a/src/pipeline/format.js b/src/pipeline/format.js
index 5497d51..65d30e8 100644
--- a/src/pipeline/format.js
+++ b/src/pipeline/format.js
@@ -4,6 +4,7 @@ import {
     setOrganizer,
     formatDate,
     setDescription,
+    setLocation,
     setSummary,
     setGeolocation,
     formatDuration,
@@ -70,7 +71,7 @@ export default function formatEvent(attributes = {}) {
   icsFormat += description ? (foldLine(`DESCRIPTION:${setDescription(description)}`) + '\r\n') : ''
   icsFormat += url ? (foldLine(`URL:${url}`) + '\r\n') : ''
   icsFormat += geo ? (foldLine(`GEO:${setGeolocation(geo)}`) + '\r\n') : ''
-  icsFormat += location ? (foldLine(`LOCATION:${location}`) + '\r\n') : ''
+  icsFormat += location ? (foldLine(`LOCATION:${setLocation(location)}`) + '\r\n') : ''
   icsFormat += status ? (foldLine(`STATUS:${status}`) + '\r\n') : ''
   icsFormat += categories ? (foldLine(`CATEGORIES:${categories}`) + '\r\n') : ''
   icsFormat += organizer ? (foldLine(`ORGANIZER;${setOrganizer(organizer)}`) + '\r\n') : ''
@@ -82,7 +83,7 @@ export default function formatEvent(attributes = {}) {
       icsFormat += foldLine(`ATTENDEE;${setContact(attendee)}`) + '\r\n'
     })
   }
-  
+
   if (alarms) {
     alarms.map(function (alarm) {
       icsFormat += setAlarm(alarm)
diff --git a/src/utils/index.js b/src/utils/index.js
index a466ffb..4b5663c 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -11,6 +11,7 @@ import setDescription from './set-description'
 import setSummary from './set-summary'
 import formatDuration from './format-duration'
 import foldLine from './fold-line'
+import setLocation from './set-location'
 
 export {
   formatDate,
@@ -25,5 +26,6 @@ export {
   formatDuration,
   setSummary,
   setDescription,
-  foldLine
+  foldLine,
+  setLocation
 }
diff --git a/src/utils/set-location.js b/src/utils/set-location.js
new file mode 100644
index 0000000..58e4fbe
--- /dev/null
+++ b/src/utils/set-location.js
@@ -0,0 +1,5 @@
+import formatText from "./format-text";
+
+export default function setLocation(location) {
+  return formatText(location);
+}


Test patch:
diff --git a/test/pipeline/format.spec.js b/test/pipeline/format.spec.js
index f6a91ed..289a267 100644
--- a/test/pipeline/format.spec.js
+++ b/test/pipeline/format.spec.js
@@ -138,7 +138,7 @@ describe('pipeline.formatEvent', () => {
   it('writes a location', () => {
     const event = buildEvent({ location: 'Folsom Field, University of Colorado at Boulder' })
     const formattedEvent = formatEvent(event)
-    expect(formattedEvent).to.contain('LOCATION:Folsom Field, University of Colorado at Boulder')
+    expect(formattedEvent).to.contain('LOCATION:Folsom Field\\, University of Colorado at Boulder')
   })
   it('writes a status', () => {
     const event = buildEvent({ status: 'tentative' })
@@ -233,7 +233,7 @@ describe('pipeline.formatEvent', () => {
   })
   it('writes a recurrence rule', () => {
     const formattedEvent = formatEvent({ recurrenceRule: 'FREQ=DAILY'})
-    
+
     expect(formattedEvent).to.contain('RRULE:FREQ=DAILY')
   })
 })