Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
lucas.parsy
jio
Commits
33df1bc6
Commit
33df1bc6
authored
Nov 21, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trivial jslint compliance changes
parent
f4aa93ab
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
32 additions
and
28 deletions
+32
-28
src/jio.storage/cryptstorage.js
src/jio.storage/cryptstorage.js
+2
-2
src/jio.storage/revisionstorage.js
src/jio.storage/revisionstorage.js
+1
-1
src/jio.storage/s3storage.js
src/jio.storage/s3storage.js
+2
-0
src/jio.storage/splitstorage.js
src/jio.storage/splitstorage.js
+1
-1
src/jio.storage/xwikistorage.js
src/jio.storage/xwikistorage.js
+6
-5
test/jio.storage/gidstorage.tests.js
test/jio.storage/gidstorage.tests.js
+2
-2
test/jio.storage/replicaterevisionstorage.tests.js
test/jio.storage/replicaterevisionstorage.tests.js
+2
-2
test/jio.storage/revisionstorage.tests.js
test/jio.storage/revisionstorage.tests.js
+12
-12
test/jio.storage/s3storage.tests.js
test/jio.storage/s3storage.tests.js
+2
-1
test/jio.storage/splitstorage.tests.js
test/jio.storage/splitstorage.tests.js
+1
-1
test/jio.storage/xwikistorage.tests.js
test/jio.storage/xwikistorage.tests.js
+1
-1
No files found.
src/jio.storage/cryptstorage.js
View file @
33df1bc6
...
@@ -80,7 +80,7 @@ jIO.addStorageType('crypt', function (spec, my) {
...
@@ -80,7 +80,7 @@ jIO.addStorageType('crypt', function (spec, my) {
obj
.
_wait
=
obj
.
_wait
||
{};
obj
.
_wait
=
obj
.
_wait
||
{};
if
(
obj
.
_wait
[
function_name
])
{
if
(
obj
.
_wait
[
function_name
])
{
obj
.
_wait
[
function_name
]
-=
1
;
obj
.
_wait
[
function_name
]
-=
1
;
return
function
()
{};
return
function
()
{
return
undefined
;
};
}
}
// ok if undef or 0
// ok if undef or 0
arglist
=
arglist
||
[];
arglist
=
arglist
||
[];
...
@@ -97,7 +97,7 @@ jIO.addStorageType('crypt', function (spec, my) {
...
@@ -97,7 +97,7 @@ jIO.addStorageType('crypt', function (spec, my) {
obj
.
_wait
[
function_name
]
=
times
;
obj
.
_wait
[
function_name
]
=
times
;
};
};
async
.
end
=
function
()
{
async
.
end
=
function
()
{
async
.
call
=
function
()
{};
async
.
call
=
function
()
{
return
undefined
;
};
};
};
return
async
;
return
async
;
};
};
...
...
src/jio.storage/revisionstorage.js
View file @
33df1bc6
...
@@ -961,7 +961,7 @@
...
@@ -961,7 +961,7 @@
};
};
priv
.
send
(
"
allDocs
"
,
null
,
command
.
cloneOption
(
priv
.
send
(
"
allDocs
"
,
null
,
command
.
cloneOption
(
),
function
(
err
,
response
)
{
),
function
(
err
,
response
)
{
var
i
,
j
,
row
,
selector
,
selected
;
var
i
,
row
,
selector
,
selected
;
if
(
err
)
{
if
(
err
)
{
return
that
.
error
(
err
);
return
that
.
error
(
err
);
}
}
...
...
src/jio.storage/s3storage.js
View file @
33df1bc6
...
@@ -772,6 +772,7 @@
...
@@ -772,6 +772,7 @@
}
}
function
myCallback
(
response
)
{
function
myCallback
(
response
)
{
return
undefined
;
}
}
that
.
XHRwrapper
(
command
,
docId
,
''
,
'
GET
'
,
mime
,
''
,
false
,
false
,
that
.
XHRwrapper
(
command
,
docId
,
''
,
'
GET
'
,
mime
,
''
,
false
,
false
,
...
@@ -823,6 +824,7 @@
...
@@ -823,6 +824,7 @@
function
removeAttachment
()
{
function
removeAttachment
()
{
that
.
XHRwrapper
(
command
,
docId
,
attachId
,
'
DELETE
'
,
mime
,
''
,
true
,
that
.
XHRwrapper
(
command
,
docId
,
attachId
,
'
DELETE
'
,
mime
,
''
,
true
,
true
,
function
(
reponse
)
{
true
,
function
(
reponse
)
{
return
undefined
;
}
}
);
);
}
}
...
...
src/jio.storage/splitstorage.js
View file @
33df1bc6
...
@@ -488,7 +488,7 @@
...
@@ -488,7 +488,7 @@
doc
=
command
.
cloneDoc
();
doc
=
command
.
cloneDoc
();
option
=
command
.
cloneOption
();
option
=
command
.
cloneOption
();
priv
.
send
(
'
getAttachment
'
,
doc
,
option
,
function
(
err
,
response
)
{
priv
.
send
(
'
getAttachment
'
,
doc
,
option
,
function
(
err
,
response
)
{
var
i
,
k
;
var
i
;
if
(
err
)
{
if
(
err
)
{
err
.
message
=
"
Unable to get attachment
"
;
err
.
message
=
"
Unable to get attachment
"
;
delete
err
.
index
;
delete
err
.
index
;
...
...
src/jio.storage/xwikistorage.js
View file @
33df1bc6
...
@@ -9,7 +9,8 @@
...
@@ -9,7 +9,8 @@
XMLHttpRequest: true,
XMLHttpRequest: true,
Blob: true,
Blob: true,
FormData: true,
FormData: true,
window: true
window: true,
setTimeout: true
*/
*/
/**
/**
* JIO XWiki Storage. Type = 'xwiki'.
* JIO XWiki Storage. Type = 'xwiki'.
...
@@ -86,7 +87,7 @@
...
@@ -86,7 +87,7 @@
priv
.
xwikiurl
+
"
]
"
,
priv
.
xwikiurl
+
"
]
"
,
"
reason
"
:
cause
"
reason
"
:
cause
});
});
}
,
}
});
});
};
};
...
@@ -125,7 +126,7 @@
...
@@ -125,7 +126,7 @@
};
};
priv
.
isBlob
=
function
(
potentialBlob
)
{
priv
.
isBlob
=
function
(
potentialBlob
)
{
return
typeof
(
potentialBlob
)
!==
'
undefined
'
&&
return
potentialBlob
!==
undefined
&&
potentialBlob
.
toString
()
===
"
[object Blob]
"
;
potentialBlob
.
toString
()
===
"
[object Blob]
"
;
};
};
...
@@ -490,7 +491,7 @@
...
@@ -490,7 +491,7 @@
return
{
return
{
"
username
"
:
priv
.
username
,
"
username
"
:
priv
.
username
,
"
language
"
:
priv
.
language
,
"
language
"
:
priv
.
language
,
"
xwikiurl
"
:
priv
.
xwikiurl
,
"
xwikiurl
"
:
priv
.
xwikiurl
};
};
};
};
...
@@ -718,7 +719,7 @@
...
@@ -718,7 +719,7 @@
return
that
;
return
that
;
};
};
if
(
typeof
(
define
)
===
'
function
'
&&
define
.
amd
)
{
if
(
(
typeof
define
)
===
'
function
'
&&
define
.
amd
)
{
define
([
'
jquery
'
,
'
jio
'
],
function
(
jquery
,
jIO
)
{
define
([
'
jquery
'
,
'
jio
'
],
function
(
jquery
,
jIO
)
{
$
=
jquery
;
$
=
jquery
;
jIO
.
addStorageType
(
'
xwiki
'
,
store
);
jIO
.
addStorageType
(
'
xwiki
'
,
store
);
...
...
test/jio.storage/gidstorage.tests.js
View file @
33df1bc6
/*jslint indent: 2, maxlen: 80, nomen: true */
/*jslint indent: 2, maxlen: 80, nomen: true */
/*global define, jIO, jio_tests, test, ok, deepEqual, sinon */
/*global define, jIO, jio_tests, test, ok, deepEqual, sinon
, module
*/
// define([module_name], [dependencies], module);
// define([module_name], [dependencies], module);
(
function
(
dependencies
,
module
)
{
(
function
(
dependencies
,
module
)
{
...
@@ -679,7 +679,7 @@
...
@@ -679,7 +679,7 @@
},
"
Get html metadata
"
);
},
"
Get html metadata
"
);
o
.
jio
.
get
({
o
.
jio
.
get
({
"
_id
"
:
"
{
\"
date
\"
:
\"
2012-12-12
\"
,
\"
language
\"
:
\"
fr
\"
,
"
+
"
_id
"
:
"
{
\"
date
\"
:
\"
2012-12-12
\"
,
\"
language
\"
:
\"
fr
\"
,
"
+
"
\"
title
\"
:
\"
Texte pour ce test
\"
,
\"
type
\"
:
\"
Text
\"
}
"
,
"
\"
title
\"
:
\"
Texte pour ce test
\"
,
\"
type
\"
:
\"
Text
\"
}
"
},
o
.
f
);
},
o
.
f
);
o
.
tick
(
o
);
o
.
tick
(
o
);
...
...
test/jio.storage/replicaterevisionstorage.tests.js
View file @
33df1bc6
/*jslint indent: 2, maxlen: 80, nomen: true */
/*jslint indent: 2, maxlen: 80, nomen: true */
/*global define, jIO, jio_tests, hex_sha256, test, ok, deepEqual, sinon,
/*global define, jIO, jio_tests, hex_sha256, test, ok, deepEqual, sinon,
expect */
expect
, module
*/
// define([module_name], [dependencies], module);
// define([module_name], [dependencies], module);
(
function
(
dependencies
,
module
)
{
(
function
(
dependencies
,
module
)
{
...
@@ -792,7 +792,7 @@
...
@@ -792,7 +792,7 @@
"
children
"
:
[{
"
children
"
:
[{
"
rev
"
:
"
1-111
"
,
"
rev
"
:
"
1-111
"
,
"
status
"
:
"
available
"
,
"
status
"
:
"
available
"
,
"
children
"
:
[]
,
"
children
"
:
[]
}]
}]
};
};
o
.
doc1_1
=
{
"
_id
"
:
"
doc1.1-111
"
,
"
title
"
:
"
A
"
};
o
.
doc1_1
=
{
"
_id
"
:
"
doc1.1-111
"
,
"
title
"
:
"
A
"
};
...
...
test/jio.storage/revisionstorage.tests.js
View file @
33df1bc6
/*jslint indent: 2, maxlen: 80, nomen: true */
/*jslint indent: 2, maxlen: 80, nomen: true */
/*global define, jIO, jio_tests, hex_sha256, window,
test, ok, deepEqual, sinon,
/*global define, jIO, jio_tests, hex_sha256, window,
expect
*/
test, ok, deepEqual, sinon, expect, module
*/
// define([module_name], [dependencies], module);
// define([module_name], [dependencies], module);
(
function
(
dependencies
,
module
)
{
(
function
(
dependencies
,
module
)
{
...
@@ -640,7 +640,7 @@
...
@@ -640,7 +640,7 @@
o
.
rev_hash
=
generateRevisionHash
({
o
.
rev_hash
=
generateRevisionHash
({
"
_id
"
:
"
doc1
"
,
"
_id
"
:
"
doc1
"
,
"
_data
"
:
"
abc
"
,
"
_data
"
:
"
abc
"
,
"
_attachment
"
:
"
attmt1
"
,
"
_attachment
"
:
"
attmt1
"
},
o
.
revisions
);
},
o
.
revisions
);
o
.
rev
=
"
2-
"
+
o
.
rev_hash
;
o
.
rev
=
"
2-
"
+
o
.
rev_hash
;
o
.
spy
(
o
,
"
value
"
,
o
.
spy
(
o
,
"
value
"
,
...
@@ -685,7 +685,7 @@
...
@@ -685,7 +685,7 @@
o
.
rev_hash
=
generateRevisionHash
({
o
.
rev_hash
=
generateRevisionHash
({
"
_id
"
:
"
doc1
"
,
"
_id
"
:
"
doc1
"
,
"
_data
"
:
"
def
"
,
"
_data
"
:
"
def
"
,
"
_attachment
"
:
"
attmt2
"
,
"
_attachment
"
:
"
attmt2
"
},
o
.
revisions
);
},
o
.
revisions
);
o
.
rev
=
"
3-
"
+
o
.
rev_hash
;
o
.
rev
=
"
3-
"
+
o
.
rev_hash
;
o
.
spy
(
o
,
"
value
"
,
o
.
spy
(
o
,
"
value
"
,
...
@@ -837,7 +837,7 @@
...
@@ -837,7 +837,7 @@
o
.
jio
.
get
({
"
_id
"
:
"
get1
"
,
"
_rev
"
:
"
1-rev0
"
},
{
o
.
jio
.
get
({
"
_id
"
:
"
get1
"
,
"
_rev
"
:
"
1-rev0
"
},
{
"
revs_info
"
:
true
,
"
revs_info
"
:
true
,
"
revs
"
:
true
,
"
revs
"
:
true
,
"
conflicts
"
:
true
,
"
conflicts
"
:
true
},
o
.
f
);
},
o
.
f
);
o
.
tick
(
o
);
o
.
tick
(
o
);
...
@@ -855,7 +855,7 @@
...
@@ -855,7 +855,7 @@
o
.
jio
.
get
({
"
_id
"
:
"
get1
"
,
"
_rev
"
:
"
1-rev2
"
},
{
o
.
jio
.
get
({
"
_id
"
:
"
get1
"
,
"
_rev
"
:
"
1-rev2
"
},
{
"
revs_info
"
:
true
,
"
revs_info
"
:
true
,
"
revs
"
:
true
,
"
revs
"
:
true
,
"
conflicts
"
:
true
,
"
conflicts
"
:
true
},
o
.
f
);
},
o
.
f
);
o
.
tick
(
o
);
o
.
tick
(
o
);
...
@@ -886,7 +886,7 @@
...
@@ -886,7 +886,7 @@
},
{
},
{
"
revs_info
"
:
true
,
"
revs_info
"
:
true
,
"
revs
"
:
true
,
"
revs
"
:
true
,
"
conflicts
"
:
true
,
"
conflicts
"
:
true
},
o
.
f
);
},
o
.
f
);
o
.
tick
(
o
);
o
.
tick
(
o
);
...
@@ -899,7 +899,7 @@
...
@@ -899,7 +899,7 @@
},
{
},
{
"
revs_info
"
:
true
,
"
revs_info
"
:
true
,
"
revs
"
:
true
,
"
revs
"
:
true
,
"
conflicts
"
:
true
,
"
conflicts
"
:
true
},
o
.
f
);
},
o
.
f
);
o
.
tick
(
o
);
o
.
tick
(
o
);
...
@@ -1016,7 +1016,7 @@
...
@@ -1016,7 +1016,7 @@
// 4. remove existing attachment
// 4. remove existing attachment
o
.
rev_hash
=
generateRevisionHash
({
o
.
rev_hash
=
generateRevisionHash
({
"
_id
"
:
"
remove1
"
,
"
_id
"
:
"
remove1
"
,
"
_attachment
"
:
"
remove2
"
,
"
_attachment
"
:
"
remove2
"
},
{
"
start
"
:
2
,
"
ids
"
:
[
"
oldrev
"
,
"
veryoldrev
"
]});
},
{
"
start
"
:
2
,
"
ids
"
:
[
"
oldrev
"
,
"
veryoldrev
"
]});
o
.
spy
(
o
,
"
value
"
,
{
o
.
spy
(
o
,
"
value
"
,
{
"
ok
"
:
true
,
"
ok
"
:
true
,
...
@@ -1204,7 +1204,7 @@
...
@@ -1204,7 +1204,7 @@
"
digest
"
:
"
md5-2686969b0bc0fd9bc186146a1ecb09a7
"
,
"
digest
"
:
"
md5-2686969b0bc0fd9bc186146a1ecb09a7
"
,
"
length
"
:
7
"
length
"
:
7
}
}
}
,
}
};
};
o
.
rows
.
rows
[
2
].
doc
=
{
o
.
rows
.
rows
[
2
].
doc
=
{
"
_id
"
:
"
yes
"
,
"
_id
"
:
"
yes
"
,
...
@@ -1215,7 +1215,7 @@
...
@@ -1215,7 +1215,7 @@
"
digest
"
:
"
md5-900bc885d7553375aec470198a9514f3
"
,
"
digest
"
:
"
md5-900bc885d7553375aec470198a9514f3
"
,
"
length
"
:
3
"
length
"
:
3
}
}
}
,
}
};
};
o
.
spy
(
o
,
"
value
"
,
o
.
rows
,
"
allDocs + include docs
"
);
o
.
spy
(
o
,
"
value
"
,
o
.
rows
,
"
allDocs + include docs
"
);
o
.
jio
.
allDocs
({
"
include_docs
"
:
true
},
function
(
err
,
response
)
{
o
.
jio
.
allDocs
({
"
include_docs
"
:
true
},
function
(
err
,
response
)
{
...
@@ -1284,7 +1284,7 @@
...
@@ -1284,7 +1284,7 @@
o
.
jio2
.
get
({
"
_id
"
:
"
sample1
"
,
"
_rev
"
:
o
.
rev
},
{
o
.
jio2
.
get
({
"
_id
"
:
"
sample1
"
,
"
_rev
"
:
o
.
rev
},
{
"
revs_info
"
:
true
,
"
revs_info
"
:
true
,
"
revs
"
:
true
,
"
revs
"
:
true
,
"
conflicts
"
:
true
,
"
conflicts
"
:
true
},
o
.
f
);
},
o
.
f
);
o
.
tick
(
o
);
o
.
tick
(
o
);
...
...
test/jio.storage/s3storage.tests.js
View file @
33df1bc6
/*jslint indent: 2, maxlen: 80, nomen: true */
/*jslint indent: 2, maxlen: 80, nomen: true */
/*global define, jIO, jio_tests, window, test, ok, deepEqual, sinon, expect */
/*global define, jIO, jio_tests, window, test,
ok, deepEqual, sinon, expect, module */
// define([module_name], [dependencies], module);
// define([module_name], [dependencies], module);
(
function
(
dependencies
,
module
)
{
(
function
(
dependencies
,
module
)
{
...
...
test/jio.storage/splitstorage.tests.js
View file @
33df1bc6
/*jslint indent: 2, maxlen: 80, nomen: true */
/*jslint indent: 2, maxlen: 80, nomen: true */
/*global define, jIO, jio_tests, test, ok, deepEqual, sinon */
/*global define, jIO, jio_tests, test, ok, deepEqual, sinon
, module
*/
// define([module_name], [dependencies], module);
// define([module_name], [dependencies], module);
(
function
(
dependencies
,
module
)
{
(
function
(
dependencies
,
module
)
{
...
...
test/jio.storage/xwikistorage.tests.js
View file @
33df1bc6
/*jslint indent: 2, maxlen: 80, nomen: true */
/*jslint indent: 2, maxlen: 80, nomen: true */
/*global define, jIO, jio_tests, test, ok, sinon */
/*global define, jIO, jio_tests, test, ok, sinon
, module
*/
// define([module_name], [dependencies], module);
// define([module_name], [dependencies], module);
(
function
(
dependencies
,
module
)
{
(
function
(
dependencies
,
module
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment