Skip to content

Commit 0ac75b6

Browse files
committed
Merge pull request #30 from lexich/hpaul-patch-1
Hpaul patch 1
2 parents 9ef50ef + dca5250 commit 0ac75b6

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "redux-api",
3-
"version": "0.7.0",
3+
"version": "0.7.1",
44
"main": "dist/redux-api.min.js",
55
"dependencies": {}
66
}

dist/redux-api.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/redux-api.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/redux-api.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/redux-api.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "redux-api",
3-
"version": "0.7.0",
3+
"version": "0.7.1",
44
"author": {
55
"name": "Efremov Alex",
66
"email": "[email protected]",

src/actionFn.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default function actionFn(url, name, options, ACTIONS={}, meta={}) {
5151
const rootUrl = meta.holder ? meta.holder.rootUrl : null;
5252
let urlT = resultUrlT;
5353
if (rootUrl) {
54-
const urlObject = libUrl.parse(url);
54+
const urlObject = libUrl.parse(urlT);
5555
if (!urlObject.host) {
5656
const urlPath = (rootUrl.path ? rootUrl.path.replace(/\/$/, "") : "") +
5757
"/" + (urlObject.path ? urlObject.path.replace(/^\//, "") : "");

test/index_spec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ describe("index", function() {
4040
test1: "/url1/",
4141
test2: "url2",
4242
test3: "",
43-
test4: "/"
43+
test4: "/(:id)"
4444
}).init(fetchUrl, false, "http://api.com/root");
4545

4646
const res2 = reduxApi({
4747
test1: "/url1/",
4848
test2: "url2",
4949
test3: "",
50-
test4: "/"
50+
test4: "/(:id)"
5151
}).init(fetchUrl, false, "http://api.ru/");
5252

5353
const act = res.actions;
@@ -56,21 +56,21 @@ describe("index", function() {
5656
act.test1.request(),
5757
act.test2.request(),
5858
act.test3.request(),
59-
act.test4.request(),
59+
act.test4.request({ id: 1 }),
6060
act2.test1.request(),
6161
act2.test2.request(),
6262
act2.test3.request(),
63-
act2.test4.request()
63+
act2.test4.request({ id: 2 })
6464
]).then(()=> {
6565
expect([
6666
"http://api.com/root/url1/",
6767
"http://api.com/root/url2",
6868
"http://api.com/root/",
69-
"http://api.com/root/",
69+
"http://api.com/root/1",
7070
"http://api.ru/url1/",
7171
"http://api.ru/url2",
7272
"http://api.ru/",
73-
"http://api.ru/"
73+
"http://api.ru/2"
7474
]).to.eql(urls);
7575
});
7676
});

0 commit comments

Comments
 (0)