Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
18
Merge Requests
18
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
jio
Commits
54d630e4
Commit
54d630e4
authored
Jan 24, 2014
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jslint fixes
parent
011ac6b4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
13 deletions
+12
-13
src/jio.storage/localstorage.js
src/jio.storage/localstorage.js
+6
-6
src/jio.storage/qiniustorage.js
src/jio.storage/qiniustorage.js
+1
-2
src/jio.storage/s3storage.js
src/jio.storage/s3storage.js
+3
-3
test/queries/key-schema.tests.js
test/queries/key-schema.tests.js
+2
-2
No files found.
src/jio.storage/localstorage.js
View file @
54d630e4
...
@@ -506,7 +506,7 @@
...
@@ -506,7 +506,7 @@
*/
*/
LocalStorage
.
prototype
.
genericRepair
=
function
(
command
,
param
,
repair
)
{
LocalStorage
.
prototype
.
genericRepair
=
function
(
command
,
param
,
repair
)
{
var
that
=
this
,
result
;
var
that
=
this
,
final_
result
;
function
referenceAttachment
(
param
,
attachment
)
{
function
referenceAttachment
(
param
,
attachment
)
{
if
(
param
.
referenced_attachments
.
indexOf
(
attachment
)
!==
-
1
)
{
if
(
param
.
referenced_attachments
.
indexOf
(
attachment
)
!==
-
1
)
{
...
@@ -660,14 +660,14 @@
...
@@ -660,14 +660,14 @@
param
.
referenced_attachments
=
[];
param
.
referenced_attachments
=
[];
param
.
unreferenced_attachments
=
[];
param
.
unreferenced_attachments
=
[];
if
(
typeof
param
.
_id
===
'
string
'
)
{
if
(
typeof
param
.
_id
===
'
string
'
)
{
result
=
repairOne
(
param
,
repair
)
||
{};
final_
result
=
repairOne
(
param
,
repair
)
||
{};
}
else
{
}
else
{
result
=
repairAll
(
param
,
repair
)
||
{};
final_
result
=
repairAll
(
param
,
repair
)
||
{};
}
}
if
(
result
.
error
)
{
if
(
final_
result
.
error
)
{
return
command
.
error
.
apply
(
command
,
result
.
answers
||
[]);
return
command
.
error
.
apply
(
command
,
final_
result
.
answers
||
[]);
}
}
command
.
success
.
apply
(
command
,
result
.
answers
||
[]);
command
.
success
.
apply
(
command
,
final_
result
.
answers
||
[]);
};
};
jIO
.
addStorage
(
'
local
'
,
LocalStorage
);
jIO
.
addStorage
(
'
local
'
,
LocalStorage
);
...
...
src/jio.storage/qiniustorage.js
View file @
54d630e4
...
@@ -333,8 +333,7 @@
...
@@ -333,8 +333,7 @@
var
LIST_HOST
=
"
http://rsf.qiniu.com
"
,
var
LIST_HOST
=
"
http://rsf.qiniu.com
"
,
LIST_PREFIX
=
"
/list?bucket=
"
+
this
.
_bucket
,
LIST_PREFIX
=
"
/list?bucket=
"
+
this
.
_bucket
,
list_url
=
LIST_HOST
+
LIST_PREFIX
,
list_url
=
LIST_HOST
+
LIST_PREFIX
,
data
=
LIST_PREFIX
+
'
\n
'
,
token
=
b64_hmac_sha1
(
this
.
_secret_key
,
LIST_PREFIX
+
'
\n
'
);
token
=
b64_hmac_sha1
(
this
.
_secret_key
,
data
);
jIO
.
util
.
ajax
({
jIO
.
util
.
ajax
({
"
type
"
:
"
POST
"
,
"
type
"
:
"
POST
"
,
...
...
src/jio.storage/s3storage.js
View file @
54d630e4
...
@@ -876,9 +876,9 @@
...
@@ -876,9 +876,9 @@
counter
=
0
;
counter
=
0
;
keys
.
each
(
function
()
{
keys
.
each
(
function
()
{
var
that
,
filename
,
docId
;
var
$this
,
filename
,
docId
;
that
=
$
(
this
);
$this
=
$
(
this
);
filename
=
that
.
context
.
textContent
;
filename
=
$this
.
context
.
textContent
;
docId
=
priv
.
idsToFileName
(
priv
.
fileNameToIds
(
filename
)[
0
]);
docId
=
priv
.
idsToFileName
(
priv
.
fileNameToIds
(
filename
)[
0
]);
if
(
counter
===
0
)
{
if
(
counter
===
0
)
{
counter
+=
1
;
counter
+=
1
;
...
...
test/queries/key-schema.tests.js
View file @
54d630e4
...
@@ -189,7 +189,7 @@
...
@@ -189,7 +189,7 @@
{
'
identifier
'
:
'
19
'
,
'
number
'
:
'
19
'
},
{
'
identifier
'
:
'
19
'
,
'
number
'
:
'
19
'
},
{
'
identifier
'
:
'
100
'
,
'
number
'
:
'
100
'
}
{
'
identifier
'
:
'
100
'
,
'
number
'
:
'
100
'
}
];
];
},
key_schema
=
{
},
test_
key_schema
=
{
cast_lookup
:
{
cast_lookup
:
{
intType
:
function
(
value
)
{
intType
:
function
(
value
)
{
if
(
typeof
value
===
'
string
'
)
{
if
(
typeof
value
===
'
string
'
)
{
...
@@ -223,7 +223,7 @@
...
@@ -223,7 +223,7 @@
operator
:
'
=
'
,
operator
:
'
=
'
,
value
:
'
19
'
value
:
'
19
'
}]
}]
},
key_schema
).
},
test_
key_schema
).
exec
(
docList
()).
exec
(
docList
()).
then
(
function
(
dl
)
{
then
(
function
(
dl
)
{
deepEqual
(
dl
,
[
deepEqual
(
dl
,
[
...
...
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