summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/srp/.gitlab-ci.yml12
-rw-r--r--app/assets/javascripts/srp/.gitrepo4
-rw-r--r--app/assets/javascripts/srp/.nvmrc2
-rw-r--r--app/assets/javascripts/srp/Version2
-rw-r--r--app/assets/javascripts/srp/package.json14
-rw-r--r--app/assets/javascripts/srp/src/jqueryRest.js15
6 files changed, 27 insertions, 22 deletions
diff --git a/app/assets/javascripts/srp/.gitlab-ci.yml b/app/assets/javascripts/srp/.gitlab-ci.yml
new file mode 100644
index 0000000..fc861e5
--- /dev/null
+++ b/app/assets/javascripts/srp/.gitlab-ci.yml
@@ -0,0 +1,12 @@
+image: ruby:latest
+
+# This folder is cached between builds
+# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
+cache:
+ paths:
+ - node_modules/
+
+test:
+ script:
+ - npm install
+ - npm test \ No newline at end of file
diff --git a/app/assets/javascripts/srp/.gitrepo b/app/assets/javascripts/srp/.gitrepo
index 89f521a..b935cad 100644
--- a/app/assets/javascripts/srp/.gitrepo
+++ b/app/assets/javascripts/srp/.gitrepo
@@ -6,6 +6,6 @@
[subrepo]
remote = https://leap.se/git/srp_js
branch = master
- commit = 9e1a41733468d4a3f5102b04277b9cd7b52d0a45
- parent = ac4cf4a1da4dcc697f1f5219f0073c5991a135e0
+ commit = 2088cbec310bb2c5768f4e8a1d424f8468e17c73
+ parent = 8370b62870a3100e126e6434a09eb518c26dfd71
cmdver = 0.3.1
diff --git a/app/assets/javascripts/srp/.nvmrc b/app/assets/javascripts/srp/.nvmrc
index 9212624..1416d7e 100644
--- a/app/assets/javascripts/srp/.nvmrc
+++ b/app/assets/javascripts/srp/.nvmrc
@@ -1 +1 @@
-v0.12.7
+v8.9
diff --git a/app/assets/javascripts/srp/Version b/app/assets/javascripts/srp/Version
index 1d0ba9e..8f0916f 100644
--- a/app/assets/javascripts/srp/Version
+++ b/app/assets/javascripts/srp/Version
@@ -1 +1 @@
-0.4.0
+0.5.0
diff --git a/app/assets/javascripts/srp/package.json b/app/assets/javascripts/srp/package.json
index 611c187..03b57b1 100644
--- a/app/assets/javascripts/srp/package.json
+++ b/app/assets/javascripts/srp/package.json
@@ -1,18 +1,18 @@
{
"name": "srp_js",
- "version": "0.4.0",
+ "version": "0.5.0",
"description": "A secure remote password implementation for JavaScript",
"homepage": "https://github.com/leapcode/srp_js#readme",
"main": "index.js",
"devDependencies": {
"jasmine-core": "^2.3.4",
"jasmine-jquery": "^2.1.0",
- "jquery": "^2.1.4",
- "karma": "^0.13.9",
- "karma-jasmine": "^0.3.6",
- "karma-phantomjs-launcher": "^0.2.1",
- "phantomjs": "^1.9.18",
- "sinon": "^1.16.1"
+ "jquery": "^3.3.1",
+ "karma": "^2.0.0",
+ "karma-jasmine": "^1.1.1",
+ "karma-phantomjs-launcher": "^1.0.4",
+ "phantomjs-prebuilt": "^2.1.16",
+ "sinon": "^4.2.1"
},
"scripts": {
"test": "node_modules/karma/bin/karma start --single-run"
diff --git a/app/assets/javascripts/srp/src/jqueryRest.js b/app/assets/javascripts/srp/src/jqueryRest.js
index 437bd65..0c58eb2 100644
--- a/app/assets/javascripts/srp/src/jqueryRest.js
+++ b/app/assets/javascripts/srp/src/jqueryRest.js
@@ -88,17 +88,10 @@ srp.remote = (function(){
// the http error response.
function error(xhr, text, thrown)
{
- var message;
- if (xhr.responseText && xhr.responseText != "") {
- try {
- message = $.parseJSON(xhr.responseText);
- } catch (err) {
- message = xhr.responseText;
- }
- } else {
- message = "Server did not respond.";
- }
- srp.error(message);
+ if (xhr.responseText && xhr.responseText != "")
+ srp.error($.parseJSON(xhr.responseText));
+ else
+ srp.error("Server did not respond.");
};
return {