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
Stefane Fermigier
jio
Commits
2985d31d
Commit
2985d31d
authored
Aug 07, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update some files to use the good amd hash library
parent
7c3c4818
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
16 deletions
+15
-16
src/jio.storage/revisionstorage.js
src/jio.storage/revisionstorage.js
+3
-3
src/jio/intro.js
src/jio/intro.js
+3
-3
test/jio.storage/replicaterevisionstorage.tests.js
test/jio.storage/replicaterevisionstorage.tests.js
+3
-3
test/jio.storage/revisionstorage.tests.js
test/jio.storage/revisionstorage.tests.js
+3
-3
test/tests.require.js
test/tests.require.js
+3
-4
No files found.
src/jio.storage/revisionstorage.js
View file @
2985d31d
...
...
@@ -16,8 +16,8 @@
if
(
typeof
define
===
'
function
'
&&
define
.
amd
)
{
return
define
(
dependencies
,
module
);
}
module
(
jIO
,
hex_sha256
);
}([
'
jio
'
,
'
sha256
'
],
function
(
jIO
,
hex_
sha256
)
{
module
(
jIO
,
{
hex_sha256
:
hex_sha256
}
);
}([
'
jio
'
,
'
sha256
'
],
function
(
jIO
,
sha256
)
{
"
use strict
"
;
jIO
.
addStorageType
(
"
revision
"
,
function
(
spec
,
my
)
{
...
...
@@ -88,7 +88,7 @@
* @return {string} The string hash code
*/
priv
.
hashCode
=
function
(
string
)
{
return
hex_sha256
(
string
);
return
sha256
.
hex_sha256
(
string
);
};
/**
...
...
src/jio/intro.js
View file @
2985d31d
...
...
@@ -10,11 +10,11 @@
if
(
typeof
define
===
'
function
'
&&
define
.
amd
)
{
return
define
(
dependencies
,
module
);
}
window
.
jIO
=
module
(
hex_md5
);
}([
'
md5
'
],
function
(
hex_
md5
)
{
window
.
jIO
=
module
(
{
hex_md5
:
hex_md5
}
);
}([
'
md5
'
],
function
(
md5
)
{
"
use strict
"
;
var
localstorage
;
var
localstorage
,
hex_md5
=
md5
.
hex_md5
;
if
(
typeof
localStorage
!==
"
undefined
"
)
{
localstorage
=
{
getItem
:
function
(
item
)
{
...
...
test/jio.storage/replicaterevisionstorage.tests.js
View file @
2985d31d
...
...
@@ -8,7 +8,7 @@
if
(
typeof
define
===
'
function
'
&&
define
.
amd
)
{
return
define
(
dependencies
,
module
);
}
module
(
jIO
,
jio_tests
,
hex_sha256
);
module
(
jIO
,
jio_tests
,
{
hex_sha256
:
hex_sha256
}
);
}([
'
jio
'
,
'
jio_tests
'
,
...
...
@@ -16,7 +16,7 @@
'
localstorage
'
,
'
revisionstorage
'
,
'
replicaterevisionstorage
'
],
function
(
jIO
,
util
,
hex_
sha256
)
{
],
function
(
jIO
,
util
,
sha256
)
{
"
use strict
"
;
//////////////////////////////////////////////////////////////////////////////
...
...
@@ -66,7 +66,7 @@
delete
doc
.
_revs_info
;
string
=
JSON
.
stringify
(
doc
)
+
JSON
.
stringify
(
revisions
)
+
JSON
.
stringify
(
deleted_flag
?
true
:
false
);
return
hex_sha256
(
string
);
return
sha256
.
hex_sha256
(
string
);
}
//////////////////////////////////////////////////////////////////////////////
...
...
test/jio.storage/revisionstorage.tests.js
View file @
2985d31d
...
...
@@ -8,11 +8,11 @@
if
(
typeof
define
===
'
function
'
&&
define
.
amd
)
{
return
define
(
dependencies
,
module
);
}
module
(
jIO
,
jio_tests
,
hex_sha256
);
module
(
jIO
,
jio_tests
,
{
hex_sha256
:
hex_sha256
}
);
}([
'
jio
'
,
'
jio_tests
'
,
'
sha256
'
,
'
localstorage
'
,
'
revisionstorage
'
],
function
(
jIO
,
util
,
hex_
sha256
sha256
)
{
"
use strict
"
;
...
...
@@ -63,7 +63,7 @@
delete
doc
.
_revs_info
;
string
=
JSON
.
stringify
(
doc
)
+
JSON
.
stringify
(
revisions
)
+
JSON
.
stringify
(
deleted_flag
?
true
:
false
);
return
hex_sha256
(
string
);
return
sha256
.
hex_sha256
(
string
);
}
//////////////////////////////////////////////////////////////////////////////
...
...
test/tests.require.js
View file @
2985d31d
...
...
@@ -6,8 +6,9 @@
require
.
config
({
"
paths
"
:
{
"
md5
"
:
"
../lib/md5/md5
"
,
"
sha256
"
:
"
../lib/jsSha2/sha256
"
,
"
md5
"
:
"
../lib/md5/md5.amd
"
,
"
sha1
"
:
"
../lib/jsSha1/sha1.amd
"
,
"
sha256
"
:
"
../lib/jsSha2/sha256.amd
"
,
"
jquery
"
:
"
../lib/jquery/jquery.min
"
,
"
complex_queries
"
:
"
../complex_queries
"
,
"
complex_queries_tests
"
:
"
queries/tests
"
,
...
...
@@ -36,8 +37,6 @@
"
sinon_qunit
"
:
"
../lib/sinon/sinon-qunit
"
},
"
shim
"
:
{
"
md5
"
:
{
"
exports
"
:
"
hex_md5
"
},
"
sha256
"
:
{
"
exports
"
:
"
hex_sha256
"
},
"
jquery
"
:
{
"
exports
"
:
"
jQuery
"
},
"
sinon
"
:
[
"
qunit
"
],
...
...
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