volt 0.8.27.beta1 → 0.8.27.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/volt/models/model.rb +1 -1
- data/lib/volt/models/persistors/cookies.rb +3 -1
- data/lib/volt/models/persistors/model_store.rb +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8216481df968b9b14ca2012121437a9a1c238ac2
|
4
|
+
data.tar.gz: 227dc9d5fd4540fb6870797ecb6d869fad1043ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d21c46f836fd782f9d950a05799bd09ea5d9f62949cb516c85647721d656b51b2a060d050825d0f0bcd978346aaaf1f96c943672619e38174af5feea3d2b9725
|
7
|
+
data.tar.gz: c7e55d8e6be62c7040ad98456a227779e6d8177dd453feaca9639883de0ad41479115c12e022e2e4aecc9962bd26569d5f4262cbe45905e29520f5fe1492088a
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.27.
|
1
|
+
0.8.27.beta2
|
data/lib/volt/models/model.rb
CHANGED
@@ -10,11 +10,13 @@ module Volt
|
|
10
10
|
def read_cookies
|
11
11
|
cookies = `document.cookie`
|
12
12
|
Hash[cookies.split(';').map do |v|
|
13
|
-
|
13
|
+
# Equals are valid as part of a cookie, so only parse the first equals.
|
14
|
+
parts = v.split('=', 2).map { |p| p = p.strip ; `decodeURIComponent(p)` }
|
14
15
|
|
15
16
|
# Default to empty if no value
|
16
17
|
parts << '' if parts.size == 1
|
17
18
|
|
19
|
+
# Equals are valid in
|
18
20
|
parts
|
19
21
|
end]
|
20
22
|
end
|
@@ -36,8 +36,9 @@ module Volt
|
|
36
36
|
|
37
37
|
# Called the first time a value is assigned into this model
|
38
38
|
def ensure_setup
|
39
|
-
if @model.attributes
|
40
|
-
|
39
|
+
if (attrs = @model.attributes)
|
40
|
+
# Do a nil check incase there is a nil model there
|
41
|
+
@model.__id = generate_id if attrs[:_id].nil?
|
41
42
|
|
42
43
|
add_to_identity_map
|
43
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: volt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.27.
|
4
|
+
version: 0.8.27.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Stout
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|