volt 0.8.10 → 0.8.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 171387afe92417b492fc991ba52ae6ff88a6e312
4
- data.tar.gz: 6a545ea0a9928b23ab882f70662736a3445464b1
3
+ metadata.gz: cfab192f992f08976f93097a2281b3f25e1a74ca
4
+ data.tar.gz: 81803fb1527d18adee2e69aecdb5f76d3003eaa5
5
5
  SHA512:
6
- metadata.gz: 4f59e0d2c6e90d778f8db48e910157b3c80322d4ec758c6839f8db5fd040e0b97fe28506f24629a520b7a65053f70fd9ff0c1e59de00276f85138bc3b3fb14b2
7
- data.tar.gz: a8d0b1bde364917a9cbcdcc73b34ea9f37b25271bd024ddfaaa7e92bedd3e24651f020a6bd09a0fbba5570aefb84933fdcbb14bf6f0a6e4ff9d3b37ad996b4c8
6
+ metadata.gz: 11b9c3402d259b166876db5160b2fdacb59d12a8386b55f1d0718e04a6f0783996ef3d7a7e575cbc184c71e06ee4275937c3d93c3c8670f7056897ebb301af6d
7
+ data.tar.gz: baef058f15caba26ca1c7f322a02ce66685ea6eabf3b823bb551001eafefd0a054548885e4b19f7d1e964900a85ed22e6c097e85c734e9f4cb8cb18da8952d49
data/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- #
1
+ # 0.8.10
2
2
  - url.query, url.fragment, url.path all update reactively now.
3
3
  - MAJOR CHANGE: Previously all tables and fields were created with _'s as their name prefixes. The underscores have been removed from everywhere. The only place you use underscores is when you want to access fields without creating setters and getters. Now when you do: ```model._name = 'Something'```, your setting the ```name``` attribute on the model. When you do: ```model._name```, your fetching the ```name``` attribute. If you insert a hash into a collection, you no longer use underscores:
4
4
 
@@ -6,7 +6,7 @@
6
6
  store._items << {name: 'Item 1'}
7
7
  ```
8
8
 
9
- For the moment, continue using underscores in routes.
9
+ Continue using underscores in routes.
10
10
 
11
11
 
12
12
  # 0.8.6 - Oct 5, 2014
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.10
1
+ 0.8.11
@@ -61,11 +61,12 @@ module Persistors
61
61
 
62
62
  if @query.is_a?(Proc)
63
63
  @query_computation = -> do
64
- puts "Run Query Again"
65
64
  stop_listening(false)
66
65
 
67
66
  change_state_to :loading
68
67
 
68
+ new_query = @query.call
69
+
69
70
  run_query(@model, @query.call)
70
71
  end.watch!
71
72
  else
@@ -142,10 +143,12 @@ module Persistors
142
143
  def add(index, data)
143
144
  $loading_models = true
144
145
 
146
+ data_id = data[:_id]
147
+
145
148
  # Don't add if the model is already in the ArrayModel
146
- if !@model.array.find {|v| v._id == data[:_id] }
149
+ if !@model.array.find {|v| v._id == data_id }
147
150
  # Find the existing model, or create one
148
- new_model = @@identity_map.find(data[:_id]) do
151
+ new_model = @@identity_map.find(data_id) do
149
152
  new_options = @model.options.merge(path: @model.path + [:[]], parent: @model)
150
153
  @model.new_model(data, new_options, :loaded)
151
154
  end
@@ -42,7 +42,7 @@ class QueryListener
42
42
  # copy the data from the existing model.
43
43
  store.model.clear
44
44
  @stores.first.model.each_with_index do |item, index|
45
- store.add(index, item)
45
+ store.add(index, item.to_h)
46
46
  end
47
47
  else
48
48
  # First time we've added a store, setup the listener and get
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: volt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.10
4
+ version: 0.8.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Stout