From a22bbb24119c7ac75b45709ba9572b3571a77a33 Mon Sep 17 00:00:00 2001
From: Alan Shaw <alan.shaw@protocol.ai>
Date: Mon, 10 Dec 2018 20:52:29 +0000
Subject: [PATCH] fix: case for addFromURL

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
---
 CHANGELOG.md               | 4 ++--
 README.md                  | 2 +-
 src/files-regular/index.js | 2 +-
 test/interface.spec.js     | 7 ++++++-
 test/sub-modules.spec.js   | 2 +-
 5 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index d30fae9f9..4cc9c9d62 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -96,10 +96,10 @@ Specifically, the following changes have been made:
 * `ipfs.files.getPullStream` => `ipfs.getPullStream`
 * `ipfs.files.getReadableStream` => `ipfs.getReadableStream`
 
-Additionally, `addFromFs`, `addFromUrl`, `addFromStream` have moved from `util` to the root namespace:
+Additionally, `addFromFs`, `addFromURL`, `addFromStream` have moved from `util` to the root namespace:
 
 * `ipfs.util.addFromFs` => `ipfs.addFromFs`
-* `ipfs.util.addFromUrl` => `ipfs.addFromUrl`
+* `ipfs.util.addFromURL` => `ipfs.addFromURL`
 * `ipfs.util.addFromStream` => `ipfs.addFromStream`
 
 License: MIT
diff --git a/README.md b/README.md
index ea7159850..40a1997e0 100644
--- a/README.md
+++ b/README.md
@@ -191,7 +191,7 @@ const ipfs = ipfsClient({
   - [`ipfs.addReadableStream([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#addreadablestream)
   - [`ipfs.addFromStream(stream, [callback])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#addfromstream)
   - [`ipfs.addFromFs(path, [options], [callback])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#addfromfs)
-  - [`ipfs.addFromUrl(url, [options], [callback])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#addfromurl)
+  - [`ipfs.addFromURL(url, [options], [callback])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#addfromurl)
   - [`ipfs.cat(ipfsPath, [options], [callback])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#cat)
   - [`ipfs.catPullStream(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#catpullstream)
   - [`ipfs.catReadableStream(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#catreadablestream)
diff --git a/src/files-regular/index.js b/src/files-regular/index.js
index 98effdeb1..a52e7505a 100644
--- a/src/files-regular/index.js
+++ b/src/files-regular/index.js
@@ -10,7 +10,7 @@ module.exports = (arg) => {
     addReadableStream: require('../files-regular/add-readable-stream')(send),
     addPullStream: require('../files-regular/add-pull-stream')(send),
     addFromFs: require('../files-regular/add-from-fs')(send),
-    addFromUrl: require('../files-regular/add-from-url')(send),
+    addFromURL: require('../files-regular/add-from-url')(send),
     addFromStream: require('../files-regular/add')(send),
     cat: require('../files-regular/cat')(send),
     catReadableStream: require('../files-regular/cat-readable-stream')(send),
diff --git a/test/interface.spec.js b/test/interface.spec.js
index b726f8cb0..ba648a932 100644
--- a/test/interface.spec.js
+++ b/test/interface.spec.js
@@ -122,7 +122,12 @@ describe('interface-ipfs-core tests', () => {
         name: 'addFromFs',
         reason: 'Not designed to run in the browser'
       },
-      // .addFromUrl
+      // .addFromURL
+      isNode ? null : {
+        name: 'addFromURL',
+        reason: 'Not designed to run in the browser'
+      },
+      // TODO: remove when interface-ipfs-core updated
       isNode ? null : {
         name: 'addFromUrl',
         reason: 'Not designed to run in the browser'
diff --git a/test/sub-modules.spec.js b/test/sub-modules.spec.js
index 0401eccfe..f96c4ab2a 100644
--- a/test/sub-modules.spec.js
+++ b/test/sub-modules.spec.js
@@ -173,7 +173,7 @@ describe('submodules', () => {
     expect(filesRegular.addPullStream).to.be.a('function')
     expect(filesRegular.addFromStream).to.be.a('function')
     expect(filesRegular.addFromFs).to.be.a('function')
-    expect(filesRegular.addFromUrl).to.be.a('function')
+    expect(filesRegular.addFromURL).to.be.a('function')
     expect(filesRegular.get).to.be.a('function')
     expect(filesRegular.getReadableStream).to.be.a('function')
     expect(filesRegular.getPullStream).to.be.a('function')