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
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
Alain Takoudjou
jio
Commits
20e2156e
Commit
20e2156e
authored
Mar 03, 2014
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jslint s3 files
parent
59b36505
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
28 deletions
+21
-28
src/jio.storage/multisplitstorage.js
src/jio.storage/multisplitstorage.js
+1
-5
src/jio.storage/s3storage.js
src/jio.storage/s3storage.js
+1
-6
test/jio.storage/multi.split.s3storage.tests.js
test/jio.storage/multi.split.s3storage.tests.js
+17
-14
test/jio.storage/s3storage.tests.js
test/jio.storage/s3storage.tests.js
+2
-2
test/jio.storage/split.s3storage.tests.js
test/jio.storage/split.s3storage.tests.js
+0
-1
No files found.
src/jio.storage/multisplitstorage.js
View file @
20e2156e
...
...
@@ -206,7 +206,6 @@
* @class MultiSplitStorage
*/
function
MultiSplitStorage
(
spec
)
{
console
.
info
(
'
mutli creation
'
);
var
that
=
this
,
priv
=
{};
/**
...
...
@@ -310,7 +309,7 @@
//re-init
i
=
0
;
}
;
}
/**
* Split document metadata then store them to the sub storages.
...
...
@@ -322,7 +321,6 @@
* @param {String} method The command method ('post' or 'put')
*/
priv
.
postOrPut
=
function
(
command
,
doc
,
option
,
method
)
{
console
.
log
(
"
multi post or put
"
);
var
i
,
data
,
doc_list
=
[],
doc_underscores
=
{};
for
(
i
in
doc
)
{
if
(
doc
.
hasOwnProperty
(
i
))
{
...
...
@@ -359,7 +357,6 @@
delete
err
.
index
;
return
command
.
error
(
err
);
}
console
.
log
(
"
post or put succes
"
,
doc_underscores
.
_id
);
command
.
success
({
"
id
"
:
doc_underscores
.
_id
});
});
};
...
...
@@ -579,7 +576,6 @@
}
);
};
console
.
info
(
'
mutli created
'
);
}
// end of MultiplitStorage
jIO
.
addStorage
(
'
multisplit
'
,
MultiSplitStorage
);
...
...
src/jio.storage/s3storage.js
View file @
20e2156e
...
...
@@ -19,7 +19,6 @@
jIO
.
addStorage
(
"
s3
"
,
function
(
spec
)
{
console
.
info
(
'
S3 creation
'
);
var
that
,
priv
=
{},
lastDigest
,
isDelete
;
that
=
this
;
...
...
@@ -78,6 +77,7 @@
last
=
false
;
return
'
.
'
;
}
/*jslint ass: true */
while
((
el
=
split
.
shift
())
!==
undefined
)
{
last
=
true
;
el
=
el
.
replace
(
/__/g
,
'
%2595
'
);
...
...
@@ -510,7 +510,6 @@
function
postDocument
()
{
var
fd
,
Signature
,
xhr
;
doc_id
=
priv
.
idsToFileName
(
doc_id
);
console
.
log
(
doc_id
);
//Meant to deep-serialize in order to avoid
//conflicts due to the multipart enctype
doc
=
JSON
.
stringify
(
doc
);
...
...
@@ -660,7 +659,6 @@
};
that
.
putAttachment
=
function
(
command
,
param
)
{
console
.
info
(
'
S3 putAttachment
'
);
var
my_document
,
docId
,
attachId
,
...
...
@@ -871,7 +869,6 @@
var
_succ
,
my_document
,
mime
;
_succ
=
command
.
success
;
command
.
success
=
function
()
{
console
.
log
.
apply
(
console
,
arguments
);
_succ
.
apply
(
this
,
arguments
);
};
my_document
=
null
;
...
...
@@ -989,7 +986,6 @@
}
else
{
for
(
i
;
i
>=
0
;
i
-=
1
)
{
keyId
=
resultTable
[
i
];
console
.
log
(
keyId
);
allDocResponse
.
rows
[
i
]
=
{
"
id
"
:
priv
.
fileNameToIds
(
keyId
)[
0
],
"
value
"
:
{}
...
...
@@ -1014,6 +1010,5 @@
//fin alldocs
};
console
.
info
(
'
S3 created
'
);
});
}));
test/jio.storage/multi.split.s3storage.tests.js
View file @
20e2156e
...
...
@@ -16,7 +16,6 @@
'
gidstorage
'
,
'
s3storage
'
,
'
multisplitstorage
'
],
function
(
jIO
,
util
,
RSVP
)
{
"
use strict
"
;
...
...
@@ -58,25 +57,29 @@
"
password
"
:
"
/YHoa5r2X6EUHfvP31jdYx6t75h81pAjIZ4Mt94y
"
};
var
jio_gid_description
=
{},
jio_gid_description2
=
{};
jio_gid_description
.
type
=
jio_gid_description2
.
type
=
"
gid
"
;
jio_gid_description
.
constraints
=
jio_gid_description2
.
constraints
=
{
shared
.
jio_gid_description
=
{};
shared
.
jio_gid_description2
=
{};
shared
.
jio_gid_description
.
type
=
shared
.
jio_gid_description2
.
type
=
"
gid
"
;
shared
.
jio_gid_description
.
constraints
=
shared
.
jio_gid_description2
.
constraints
=
{
"
default
"
:
{
"
title
"
:
"
string
"
}
};
jio_gid_description
.
sub_storage
=
shared
.
s3_storage_description1
;
jio_gid_description2
.
sub_storage
=
shared
.
s3_storage_description2
;
shared
.
jio_gid_description
.
sub_storage
=
shared
.
s3_storage_description1
;
shared
.
jio_gid_description2
.
sub_storage
=
shared
.
s3_storage_description2
;
var
jio_multisplit_description
=
{
shared
.
jio_multisplit_description
=
{
"
type
"
:
"
multisplit
"
,
"
storage_list
"
:
[
jio_gid_description
,
jio_gid_description2
shared
.
jio_gid_description
,
shared
.
jio_gid_description2
]
};
jio
=
jIO
.
createJIO
(
jio_multisplit_description
,
{
"
workspace
"
:
shared
.
workspace
});
jio
=
jIO
.
createJIO
(
shared
.
jio_multisplit_description
,
{
"
workspace
"
:
shared
.
workspace
});
jio_s3_list
[
0
]
=
jIO
.
createJIO
(
shared
.
s3_storage_description1
,
{
"
workspace
"
:
shared
.
workspace
});
...
...
test/jio.storage/s3storage.tests.js
View file @
20e2156e
test/jio.storage/split.s3storage.tests.js
View file @
20e2156e
...
...
@@ -109,7 +109,6 @@
jio_s3_list
[
0
]
=
jIO
.
createJIO
(
shared
.
s3_storage_description1
,
{
"
workspace
"
:
shared
.
workspace
});
console
.
log
(
jio_s3_list
[
0
])
jio_s3_list
[
1
]
=
jIO
.
createJIO
(
shared
.
s3_storage_description2
,
{
"
workspace
"
:
shared
.
workspace
});
...
...
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