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
Sven Franck
jio
Commits
3709ae64
Commit
3709ae64
authored
Dec 21, 2012
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated dummystorage
parent
79febcd5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
26 deletions
+16
-26
src/jio.dummystorages.js
src/jio.dummystorages.js
+15
-24
src/jio.storage/localstorage.js
src/jio.storage/localstorage.js
+1
-2
No files found.
src/jio.dummystorages.js
View file @
3709ae64
...
...
@@ -81,18 +81,17 @@
rev
:
generateRevision
(
command
,
"
putAttachment
"
,
true
)
});
},
100
);
// 100 ms, for jiotests simple job waiting
};
// end put
};
// end put
Attachment
that
.
get
=
function
(
command
)
{
setTimeout
(
function
()
{
that
.
success
({
_id
:
command
.
getDocId
(),
content
:
'
content
'
,
_creation_date
:
10000
,
_last_modified
:
15000
_rev
:
generateRevision
(
command
,
"
get
"
,
true
),
content
:
'
content
'
});
},
100
);
};
// end get
};
// end get
// 100 ms, for jiotests simple job waiting
that
.
allDocs
=
function
(
command
)
{
setTimeout
(
function
()
{
...
...
@@ -101,32 +100,24 @@
rows
:
[{
id
:
'
file
'
,
key
:
'
file
'
,
value
:
{
content
:
'
filecontent
'
,
_creation_date
:
10000
,
_last_modified
:
15000
}
},{
value
:
{
"
rev
"
:
generateRevision
(
command
,
"
allDocs
"
,
true
)}
},{
id
:
'
memo
'
,
key
:
'
memo
'
,
value
:
{
content
:
'
memocontent
'
,
_creation_date
:
20000
,
_last_modified
:
25000
}
}]
};
if
(
command
.
getOption
(
'
metadata_only
'
))
{
delete
o
.
rows
[
0
].
value
.
content
;
delete
o
.
rows
[
1
].
value
.
content
;
}
that
.
success
(
o
);
value
:
{
"
rev
"
:
generateRevision
(
command
,
"
allDocs
"
,
true
)}
}]
};
that
.
success
(
o
);
},
100
);
};
// end allDocs
that
.
remove
=
function
(
command
)
{
setTimeout
(
function
()
{
that
.
success
({
ok
:
true
,
id
:
command
.
getDocId
()});
that
.
success
({
ok
:
true
,
id
:
command
.
getDocId
(),
rev
:
generateRevision
(
command
,
"
get
"
,
true
)
});
},
100
);
};
// end remove
...
...
src/jio.storage/localstorage.js
View file @
3709ae64
...
...
@@ -218,8 +218,8 @@ var newLocalStorage = function (spec, my) {
return
priv
.
manageOptions
(
{
ok
:
true
,
id
:
document_id
,
rev
:
document_rev
},
command
,
doc
);
}
// ================== storage overrides =====================
// ===================== overrides ======================
that
.
serialized
=
function
()
{
return
{
"
applicationname
"
:
priv
.
applicationname
,
...
...
@@ -227,7 +227,6 @@ var newLocalStorage = function (spec, my) {
};
};
// Overrinding validateState()
that
.
validateState
=
function
()
{
if
(
priv
.
username
)
{
return
''
;
...
...
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