volt 0.8.27.beta1 → 0.8.27.beta2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 08a98ec77118c297fad2019555eff70a6ca7188a
4
- data.tar.gz: 0f5a759ffa200b74a94357afee45e5d3a77fb1a4
3
+ metadata.gz: 8216481df968b9b14ca2012121437a9a1c238ac2
4
+ data.tar.gz: 227dc9d5fd4540fb6870797ecb6d869fad1043ec
5
5
  SHA512:
6
- metadata.gz: c82c7f945b9340c18dac757023c83cbd17d95d976b9aa2e7a5b97a7238e5b84466325aa01ad9ce765aa4f670955326cda3e6d59fb3a62f59749ae4d1c8812631
7
- data.tar.gz: 4d0b1c063021c6ff52f7ecbca60fb2ffad26352bdd4a674c83bf326d8556d58336a772598387de3423c57667b87285db23410f75409315529079424a5edda793
6
+ metadata.gz: d21c46f836fd782f9d950a05799bd09ea5d9f62949cb516c85647721d656b51b2a060d050825d0f0bcd978346aaaf1f96c943672619e38174af5feea3d2b9725
7
+ data.tar.gz: c7e55d8e6be62c7040ad98456a227779e6d8177dd453feaca9639883de0ad41479115c12e022e2e4aecc9962bd26569d5f4262cbe45905e29520f5fe1492088a
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.27.beta1
1
+ 0.8.27.beta2
@@ -40,7 +40,7 @@ module Volt
40
40
 
41
41
  # the id is stored in a field named _id, so we setup _id to proxy to this
42
42
  def _id
43
- @attributes && @attributes[:_id]
43
+ __id
44
44
  end
45
45
 
46
46
  def _id=(val)
@@ -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
- parts = v.split('=').map { |p| p = p.strip ; `decodeURIComponent(p)` }
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
- @model.attributes[:_id] ||= generate_id
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.beta1
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-19 00:00:00.000000000 Z
11
+ date: 2014-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor