Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio-main
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
Hardik Juneja
jio-main
Commits
8569c867
Commit
8569c867
authored
Jan 08, 2013
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename applicationname to application_name
parent
d7efabc2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
43 deletions
+43
-43
src/jio.dummystorages.js
src/jio.dummystorages.js
+1
-1
src/jio.storage/davstorage.js
src/jio.storage/davstorage.js
+9
-9
src/jio.storage/localstorage.js
src/jio.storage/localstorage.js
+3
-3
src/jio/jioNamespace.js
src/jio/jioNamespace.js
+1
-1
test/jiotests.js
test/jiotests.js
+29
-29
No files found.
src/jio.dummystorages.js
View file @
8569c867
...
...
@@ -224,7 +224,7 @@
// so {type:'dummyall3tries',a:'b'} differs from
// {type:'dummyall3tries',c:'d'}.
that
.
specToStore
=
function
()
{
return
{
"
application
name
"
:
spec
.
application
name
};
return
{
"
application
_name
"
:
spec
.
application_
name
};
};
priv
.
doJob
=
function
(
command
,
if_ok_return
)
{
...
...
src/jio.storage/davstorage.js
View file @
8569c867
...
...
@@ -23,8 +23,8 @@ var newDAVStorage = function ( spec, my ) {
priv
.
username
=
spec
.
username
||
''
;
priv
.
secured_username
=
priv
.
convertSlashes
(
priv
.
username
);
priv
.
application
name
=
spec
.
application
name
||
'
untitled
'
;
priv
.
secured_application
name
=
priv
.
convertSlashes
(
priv
.
application
name
);
priv
.
application
_name
=
spec
.
application_
name
||
'
untitled
'
;
priv
.
secured_application
_name
=
priv
.
convertSlashes
(
priv
.
application_
name
);
priv
.
url
=
spec
.
url
||
''
;
priv
.
password
=
spec
.
password
||
''
;
// TODO : is it secured ?
...
...
@@ -32,7 +32,7 @@ var newDAVStorage = function ( spec, my ) {
that
.
serialized
=
function
()
{
var
o
=
super_serialized
();
o
.
username
=
priv
.
username
;
o
.
application
name
=
priv
.
application
name
;
o
.
application
_name
=
priv
.
application_
name
;
o
.
url
=
priv
.
url
;
o
.
password
=
priv
.
password
;
// TODO : not realy secured...
return
o
;
...
...
@@ -82,7 +82,7 @@ var newDAVStorage = function ( spec, my ) {
$
.
ajax
(
{
url
:
priv
.
url
+
'
/
'
+
priv
.
secured_username
+
'
/
'
+
priv
.
secured_applicationname
+
'
/
'
+
priv
.
secured_application
_
name
+
'
/
'
+
secured_docid
+
'
?_=
'
+
Date
.
now
(),
// to make url unique!
// and avoid chrome PUT on cache !
type
:
type
,
...
...
@@ -127,7 +127,7 @@ var newDAVStorage = function ( spec, my ) {
$
.
ajax
(
{
url
:
priv
.
url
+
'
/
'
+
priv
.
secured_username
+
'
/
'
+
priv
.
secured_applicationname
+
'
/
'
+
priv
.
secured_application
_
name
+
'
/
'
+
secured_docid
+
'
?_=
'
+
Date
.
now
(),
type
:
"
GET
"
,
async
:
true
,
...
...
@@ -163,7 +163,7 @@ var newDAVStorage = function ( spec, my ) {
$
.
ajax
(
{
url
:
priv
.
url
+
'
/
'
+
priv
.
secured_username
+
'
/
'
+
priv
.
secured_applicationname
+
'
/
'
+
priv
.
secured_application
_
name
+
'
/
'
+
secured_docid
+
'
?_=
'
+
Date
.
now
(),
type
:
"
PROPFIND
"
,
async
:
true
,
...
...
@@ -217,7 +217,7 @@ var newDAVStorage = function ( spec, my ) {
$
.
ajax
(
{
url
:
priv
.
url
+
'
/
'
+
priv
.
secured_username
+
'
/
'
+
priv
.
secured_applicationname
+
'
/
'
+
priv
.
secured_application
_
name
+
'
/
'
+
priv
.
secureDocId
(
file
.
id
)
+
'
?_=
'
+
Date
.
now
(),
type
:
"
GET
"
,
async
:
true
,
...
...
@@ -245,7 +245,7 @@ var newDAVStorage = function ( spec, my ) {
$
.
ajax
(
{
url
:
priv
.
url
+
'
/
'
+
priv
.
secured_username
+
'
/
'
+
priv
.
secured_applicationname
+
'
/
'
+
'
?_=
'
+
Date
.
now
(),
priv
.
secured_application
_
name
+
'
/
'
+
'
?_=
'
+
Date
.
now
(),
async
:
true
,
type
:
'
PROPFIND
'
,
dataType
:
'
xml
'
,
...
...
@@ -341,7 +341,7 @@ var newDAVStorage = function ( spec, my ) {
$
.
ajax
(
{
url
:
priv
.
url
+
'
/
'
+
priv
.
secured_username
+
'
/
'
+
priv
.
secured_applicationname
+
'
/
'
+
priv
.
secured_application
_
name
+
'
/
'
+
secured_docid
+
'
?_=
'
+
Date
.
now
(),
type
:
"
DELETE
"
,
async
:
true
,
...
...
src/jio.storage/localstorage.js
View file @
8569c867
...
...
@@ -28,10 +28,10 @@ var newLocalStorage = function (spec, my) {
// attributes
priv
.
username
=
spec
.
username
||
''
;
priv
.
application
name
=
spec
.
application
name
||
'
untitled
'
;
priv
.
application
_name
=
spec
.
application_
name
||
'
untitled
'
;
priv
.
localpath
=
'
jio/localstorage/
'
+
priv
.
username
+
'
/
'
+
priv
.
applicationname
;
priv
.
username
+
'
/
'
+
priv
.
application
_
name
;
// ==================== Tools ====================
/**
...
...
@@ -75,7 +75,7 @@ var newLocalStorage = function (spec, my) {
// ===================== overrides ======================
that
.
specToStore
=
function
()
{
return
{
"
application
name
"
:
priv
.
application
name
,
"
application
_name
"
:
priv
.
application_
name
,
"
username
"
:
priv
.
username
};
};
...
...
src/jio/jioNamespace.js
View file @
8569c867
...
...
@@ -15,7 +15,7 @@ var jioNamespace = (function(spec) {
* - {object} spec.storage: A storage description
* - {string} spec.storage.type: The storage type
* - {string} spec.storage.username: The user name
* - {string} spec.storage.applicationname: The application name
* - {string} spec.storage.application
_
name: The application name
* @return {object} The new Jio instance.
*/
Object
.
defineProperty
(
that
,
"
newJio
"
,{
...
...
test/jiotests.js
View file @
8569c867
...
...
@@ -725,7 +725,7 @@ test ("Restore old Jio", function() {
o
.
jio
=
JIO
.
newJio
({
"
type
"
:
"
dummyall3tries
"
,
"
applicationname
"
:
"
jiotests
"
"
application
_
name
"
:
"
jiotests
"
});
o
.
jio_id
=
o
.
jio
.
getId
();
...
...
@@ -737,7 +737,7 @@ test ("Restore old Jio", function() {
o
.
jio
=
JIO
.
newJio
({
"
type
"
:
"
dummyallok
"
,
"
applicationname
"
:
"
jiotests
"
"
application
_
name
"
:
"
jiotests
"
});
o
.
waitUntilAJobExists
(
30000
);
// timeout 30 sec
o
.
testLastJobLabel
(
"
put
"
,
"
Job restored
"
);
...
...
@@ -758,7 +758,7 @@ test ("Post", function(){
o
.
jio
=
JIO
.
newJio
({
"
type
"
:
"
local
"
,
"
username
"
:
"
upost
"
,
"
applicationname
"
:
"
apost
"
"
application
_
name
"
:
"
apost
"
});
// post without id
...
...
@@ -796,7 +796,7 @@ test ("Put", function(){
o
.
jio
=
JIO
.
newJio
({
"
type
"
:
"
local
"
,
"
username
"
:
"
uput
"
,
"
applicationname
"
:
"
aput
"
"
application
_
name
"
:
"
aput
"
});
// put without id
...
...
@@ -846,7 +846,7 @@ test ("PutAttachment", function(){
o
.
jio
=
JIO
.
newJio
({
"
type
"
:
"
local
"
,
"
username
"
:
"
uputattmt
"
,
"
applicationname
"
:
"
aputattmt
"
"
application
_
name
"
:
"
aputattmt
"
});
// putAttachment without doc id
...
...
@@ -943,7 +943,7 @@ test ("Get", function(){
o
.
jio
=
JIO
.
newJio
({
"
type
"
:
"
local
"
,
"
username
"
:
"
uget
"
,
"
applicationname
"
:
"
aget
"
"
application
_
name
"
:
"
aget
"
});
// get inexistent document
...
...
@@ -1000,7 +1000,7 @@ test ("Remove", function(){
o
.
jio
=
JIO
.
newJio
({
"
type
"
:
"
local
"
,
"
username
"
:
"
uremove
"
,
"
applicationname
"
:
"
aremove
"
"
application
_
name
"
:
"
aremove
"
});
// remove inexistent document
...
...
@@ -1063,7 +1063,7 @@ test ("AllDocs", function(){
o
.
jio
=
JIO
.
newJio
({
"
type
"
:
"
local
"
,
"
username
"
:
"
ualldocs
"
,
"
applicationname
"
:
"
aalldocs
"
"
application
_
name
"
:
"
aalldocs
"
});
// alldocs
...
...
@@ -1087,7 +1087,7 @@ test ("Post", function(){
"
sub_storage
"
:
{
"
type
"
:
"
local
"
,
"
username
"
:
"
urevpost
"
,
"
applicationname
"
:
"
arevpost
"
"
application
_
name
"
:
"
arevpost
"
}
});
...
...
@@ -1159,7 +1159,7 @@ test ("Put", function(){
"
sub_storage
"
:
{
"
type
"
:
"
local
"
,
"
username
"
:
"
urevput
"
,
"
applicationname
"
:
"
arevput
"
"
application
_
name
"
:
"
arevput
"
}
});
...
...
@@ -1218,7 +1218,7 @@ test ("Get", function(){
"
sub_storage
"
:
{
"
type
"
:
"
local
"
,
"
username
"
:
"
urevget
"
,
"
applicationname
"
:
"
arevget
"
"
application
_
name
"
:
"
arevget
"
}
});
o
.
localpath
=
"
jio/localstorage/urevget/arevget
"
;
...
...
@@ -1372,7 +1372,7 @@ test ("Remove", function(){
"
sub_storage
"
:
{
"
type
"
:
"
local
"
,
"
username
"
:
"
urevrem
"
,
"
applicationname
"
:
"
arevrem
"
"
application
_
name
"
:
"
arevrem
"
}
});
o
.
localpath
=
"
jio/localstorage/urevrem/arevrem
"
;
...
...
@@ -1575,7 +1575,7 @@ test ("Scenario", function(){
"
sub_storage
"
:
{
"
type
"
:
"
local
"
,
"
username
"
:
"
usam1
"
,
"
applicationname
"
:
"
asam1
"
"
application
_
name
"
:
"
asam1
"
}
});
o
.
localpath
=
"
jio/localstorage/usam1/asam1
"
;
...
...
@@ -1601,7 +1601,7 @@ test ("Scenario", function(){
"
sub_storage
"
:
{
"
type
"
:
"
local
"
,
"
username
"
:
"
usam1
"
,
"
applicationname
"
:
"
asam1
"
"
application
_
name
"
:
"
asam1
"
}
});
o
.
localpath
=
"
jio/localstorage/usam1/asam1
"
;
...
...
@@ -1658,7 +1658,7 @@ test ("Scenario", function(){
"
sub_storage
"
:
{
"
type
"
:
"
local
"
,
"
username
"
:
"
usam1
"
,
"
applicationname
"
:
"
asam1
"
"
application
_
name
"
:
"
asam1
"
}
});
o
.
localpath
=
"
jio/localstorage/usam1/asam1
"
;
...
...
@@ -1752,7 +1752,7 @@ test ('Document load', function () {
o.jio = JIO.newJio({type:'dav',username:'davload',
password:'checkpwd',
url:'https://ca-davstorage:8080',
applicationname:'jiotests'});
application
_
name:'jiotests'});
// note: http errno:
// 200 OK
// 201 Created
...
...
@@ -1817,7 +1817,7 @@ test ('Document save', function () {
o.jio = JIO.newJio({type:'dav',username:'davsave',
password:'checkpwd',
url:'https://ca-davstorage:8080',
applicationname:'jiotests'});
application
_
name:'jiotests'});
// note: http errno:
// 200 OK
// 201 Created
...
...
@@ -1884,7 +1884,7 @@ test ('Get Document List', function () {
o.jio = JIO.newJio({type:'dav',username:'davlist',
password:'checkpwd',
url:'https://ca-davstorage:8080',
applicationname:'jiotests'});
application
_
name:'jiotests'});
o.mytest('fail to get list',true,undefined,404);
o.mytest('getting list',true,[{
id:'file',key:'file',
...
...
@@ -1949,7 +1949,7 @@ test ('Remove document', function () {
o.jio = JIO.newJio({type:'dav',username:'davremove',
password:'checkpwd',
url:'https://ca-davstorage:8080',
applicationname:'jiotests'});
application
_
name:'jiotests'});
o.mytest('remove document',{ok:true,id:'file'},204);
o.mytest('remove an already removed document',404,404);
...
...
@@ -2247,7 +2247,7 @@ test ('Document save' , function () {
password:'mypwd',
storage:{type:'local',
username:'cryptsavelocal',
applicationname:'jiotests'}});
application
_
name:'jiotests'}});
o.f = function (err,val) {
if (err) {
err = err.status;
...
...
@@ -2282,7 +2282,7 @@ test ('Document load' , function () {
password:'mypwd',
storage:{type:'local',
username:'cryptloadlocal',
applicationname:'jiotests'}});
application
_
name:'jiotests'}});
o.f = function (err,val) {
deepEqual (err || val,{
_id:'testload',content:'contentoftest',
...
...
@@ -2312,7 +2312,7 @@ test ('Get Document List', function () {
password:'mypwd',
storage:{type:'local',
username:'cryptgetlistlocal',
applicationname:'jiotests'}});
application
_
name:'jiotests'}});
o.f = function (err,val) {
deepEqual (err || objectifyDocumentArray(val.rows),
objectifyDocumentArray(o.doc_list),'Getting list');
...
...
@@ -2367,7 +2367,7 @@ test ('Remove document', function () {
password:'mypwd',
storage:{type:'local',
username:'cryptremovelocal',
applicationname:'jiotests'}});
application
_
name:'jiotests'}});
o.f = function (err,val) {
deepEqual (err || val,{ok:true,id:'file'},'Document remove');
};
...
...
@@ -2413,7 +2413,7 @@ test ('Simple methods', function () {
username:'methods',
storage:{type:'local',
username:'conflictmethods',
applicationname:'jiotests'}});
application
_
name:'jiotests'}});
// PUT
o.spy({ok:true,id:'file.doc',rev:'1'},'saving "file.doc".');
o.jio.put({_id:'file.doc',content:'content1'},function (err,val) {
...
...
@@ -2588,7 +2588,7 @@ test ('Revision Conflict', function() {
};
o.sub_storage_spec = {type:'local',
username:'revisionconflict',
applicationname:'jiotests'}
application
_
name:'jiotests'}
//////////////////////////////////////////////////////////////////////
o.jio = JIO.newJio({type:'conflictmanager',
storage:o.sub_storage_spec});
...
...
@@ -2752,7 +2752,7 @@ test ('Conflict in a conflict solving', function () {
};
o.sub_storage_spec = {type:'local',
username:'conflictconflict',
applicationname:'jiotests'}
application
_
name:'jiotests'}
//////////////////////////////////////////////////////////////////////
o.jio = JIO.newJio({type:'conflictmanager',
storage:o.sub_storage_spec});
...
...
@@ -2939,7 +2939,7 @@ test ('Remove revision conflict', function () {
};
o.sub_storage_spec = {type:'local',
username:'removeconflict',
applicationname:'jiotests'}
application
_
name:'jiotests'}
//////////////////////////////////////////////////////////////////////
o.jio = JIO.newJio({type:'conflictmanager',
storage:o.sub_storage_spec});
...
...
@@ -3169,7 +3169,7 @@ test ('Load Revisions', function () {
o.tick = basic_tick_function;
o.sub_storage_spec = {type:'local',
username:'loadrevisions',
applicationname:'jiotests'}
application
_
name:'jiotests'}
//////////////////////////////////////////////////////////////////////
o.jio = JIO.newJio({type:'conflictmanager',
storage:o.sub_storage_spec});
...
...
@@ -3190,7 +3190,7 @@ test ('Get revision List', function () {
o.tick = basic_tick_function;
o.sub_storage_spec = {type:'local',
username:'getrevisionlist',
applicationname:'jiotests'}
application
_
name:'jiotests'}
o.rev = {};
//////////////////////////////////////////////////////////////////////
o.jio = JIO.newJio({type:'conflictmanager',
...
...
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