Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio_mebibou
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Alexandra Rogova
jio_mebibou
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 @@
...
@@ -81,18 +81,17 @@
rev
:
generateRevision
(
command
,
"
putAttachment
"
,
true
)
rev
:
generateRevision
(
command
,
"
putAttachment
"
,
true
)
});
});
},
100
);
// 100 ms, for jiotests simple job waiting
},
100
);
// 100 ms, for jiotests simple job waiting
};
// end put
};
// end put
Attachment
that
.
get
=
function
(
command
)
{
that
.
get
=
function
(
command
)
{
setTimeout
(
function
()
{
setTimeout
(
function
()
{
that
.
success
({
that
.
success
({
_id
:
command
.
getDocId
(),
_id
:
command
.
getDocId
(),
content
:
'
content
'
,
_rev
:
generateRevision
(
command
,
"
get
"
,
true
),
_creation_date
:
10000
,
content
:
'
content
'
_last_modified
:
15000
});
});
},
100
);
},
100
);
};
// end get
};
// end get
// 100 ms, for jiotests simple job waiting
that
.
allDocs
=
function
(
command
)
{
that
.
allDocs
=
function
(
command
)
{
setTimeout
(
function
()
{
setTimeout
(
function
()
{
...
@@ -101,32 +100,24 @@
...
@@ -101,32 +100,24 @@
rows
:
[{
rows
:
[{
id
:
'
file
'
,
id
:
'
file
'
,
key
:
'
file
'
,
key
:
'
file
'
,
value
:
{
value
:
{
"
rev
"
:
generateRevision
(
command
,
"
allDocs
"
,
true
)}
content
:
'
filecontent
'
,
},{
_creation_date
:
10000
,
_last_modified
:
15000
}
},{
id
:
'
memo
'
,
id
:
'
memo
'
,
key
:
'
memo
'
,
key
:
'
memo
'
,
value
:
{
value
:
{
"
rev
"
:
generateRevision
(
command
,
"
allDocs
"
,
true
)}
content
:
'
memocontent
'
,
}]
_creation_date
:
20000
,
};
_last_modified
:
25000
that
.
success
(
o
);
}
}]
};
if
(
command
.
getOption
(
'
metadata_only
'
))
{
delete
o
.
rows
[
0
].
value
.
content
;
delete
o
.
rows
[
1
].
value
.
content
;
}
that
.
success
(
o
);
},
100
);
},
100
);
};
// end allDocs
};
// end allDocs
that
.
remove
=
function
(
command
)
{
that
.
remove
=
function
(
command
)
{
setTimeout
(
function
()
{
setTimeout
(
function
()
{
that
.
success
({
ok
:
true
,
id
:
command
.
getDocId
()});
that
.
success
({
ok
:
true
,
id
:
command
.
getDocId
(),
rev
:
generateRevision
(
command
,
"
get
"
,
true
)
});
},
100
);
},
100
);
};
// end remove
};
// end remove
...
...
src/jio.storage/localstorage.js
View file @
3709ae64
...
@@ -218,8 +218,8 @@ var newLocalStorage = function (spec, my) {
...
@@ -218,8 +218,8 @@ var newLocalStorage = function (spec, my) {
return
priv
.
manageOptions
(
return
priv
.
manageOptions
(
{
ok
:
true
,
id
:
document_id
,
rev
:
document_rev
},
command
,
doc
);
{
ok
:
true
,
id
:
document_id
,
rev
:
document_rev
},
command
,
doc
);
}
}
// ================== storage overrides =====================
// ===================== overrides ======================
that
.
serialized
=
function
()
{
that
.
serialized
=
function
()
{
return
{
return
{
"
applicationname
"
:
priv
.
applicationname
,
"
applicationname
"
:
priv
.
applicationname
,
...
@@ -227,7 +227,6 @@ var newLocalStorage = function (spec, my) {
...
@@ -227,7 +227,6 @@ var newLocalStorage = function (spec, my) {
};
};
};
};
// Overrinding validateState()
that
.
validateState
=
function
()
{
that
.
validateState
=
function
()
{
if
(
priv
.
username
)
{
if
(
priv
.
username
)
{
return
''
;
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