js_cookie_rails 2.1.3 → 2.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/lib/js_cookie_rails/version.rb +1 -1
- data/vendor/assets/javascripts/js.cookie.js +17 -8
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6918f292607b303cd4893242fd43954b021177d8
|
4
|
+
data.tar.gz: 63bc53ce8bdc4b48bff5b1ac8cf8f7b113d8a5c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eca07c0043caa4375f5108cc8dcbff122244d486ff745f027eb59b99d686f3155a474326118e383e069c9c018fe136ed652e43a4cdb6c3a22cc9c731fcced395
|
7
|
+
data.tar.gz: a3fa688895845cc61e087a46ce933fca31408745d1d5cf379792a6df91c4a06346091a77031e6f5fd682088df9acdea53b84c5d7835fa72c5024a8431383a9d4
|
data/LICENSE.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* JavaScript Cookie v2.1.
|
2
|
+
* JavaScript Cookie v2.1.4
|
3
3
|
* https://github.com/js-cookie/js-cookie
|
4
4
|
*
|
5
5
|
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
|
@@ -56,6 +56,9 @@
|
|
56
56
|
attributes.expires = expires;
|
57
57
|
}
|
58
58
|
|
59
|
+
// We're using "expires" because "max-age" is not supported by IE
|
60
|
+
attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';
|
61
|
+
|
59
62
|
try {
|
60
63
|
result = JSON.stringify(value);
|
61
64
|
if (/^[\{\[]/.test(result)) {
|
@@ -74,13 +77,19 @@
|
|
74
77
|
key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);
|
75
78
|
key = key.replace(/[\(\)]/g, escape);
|
76
79
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
80
|
+
var stringifiedAttributes = '';
|
81
|
+
|
82
|
+
for (var attributeName in attributes) {
|
83
|
+
if (!attributes[attributeName]) {
|
84
|
+
continue;
|
85
|
+
}
|
86
|
+
stringifiedAttributes += '; ' + attributeName;
|
87
|
+
if (attributes[attributeName] === true) {
|
88
|
+
continue;
|
89
|
+
}
|
90
|
+
stringifiedAttributes += '=' + attributes[attributeName];
|
91
|
+
}
|
92
|
+
return (document.cookie = key + '=' + value + stringifiedAttributes);
|
84
93
|
}
|
85
94
|
|
86
95
|
// Read
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: js_cookie_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alessandro Lepore
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
94
|
version: '0'
|
95
95
|
requirements: []
|
96
96
|
rubyforge_project:
|
97
|
-
rubygems_version: 2.
|
97
|
+
rubygems_version: 2.5.1
|
98
98
|
signing_key:
|
99
99
|
specification_version: 4
|
100
100
|
summary: Adds js-cookie to the Rails asset pipeline.
|