volt 0.7.17 → 0.7.18

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: 9239ba9984089cff5785b60306dc79864f71ff0e
4
- data.tar.gz: cf68443c2f05b2e18bc0e73f984955bb1c54b9d1
3
+ metadata.gz: d287b57490af57c686f9f3b8a45dda2d953a8a19
4
+ data.tar.gz: 97a0201eda5adc10704ea7c689e27d596fff315b
5
5
  SHA512:
6
- metadata.gz: 8efe0fb7ced6b42882aaf5ef287fdbb0517404892bbf9057c6beb2c3bb5fdb8dea330d308184313fc1e28f6b45d64c9c8550b3b040c09d9c8e357ff1dcfe3d0f
7
- data.tar.gz: f79c94e9a44b00f04decbc9c8c8913146581ef7a3a3782f62f77db13a39f492cef35000f4982faee831cebc3003d23e9563ee8884d63db9e6d4070f252c8db45
6
+ metadata.gz: 3d0c17a7964f2f2b3a1d63cb299bed4f3160f40ac595425b04788fffe88d3b7a67fc83fd418d45b53c27b449c6ba55d6a0ba5dbd058368c0ec6b0c7255baf607
7
+ data.tar.gz: 6d6c453d1192cba6e277326f368d885973b5ee603d1303001a2b3b8cded4c6f82014a5006a7ed1d1b44c41ceac4dd582ec966fcf099e7548605ca91da938421c
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.17
1
+ 0.7.18
@@ -12,7 +12,7 @@ class DataStore
12
12
  query = query.dup
13
13
  query.keys.each do |key|
14
14
  if key =~ /_id$/
15
- query[key] = BSON::ObjectId(query[key])
15
+ # query[key] = BSON::ObjectId(query[key])
16
16
  end
17
17
  end
18
18
 
@@ -37,11 +37,13 @@ class StoreTasks
37
37
  errors = model_errors(collection, data)
38
38
 
39
39
  if errors.size == 0
40
+ # id = BSON::ObjectId(data[:_id])
40
41
  id = data[:_id]
41
42
 
42
43
  # Try to create
43
44
  # TODO: Seems mongo is dumb and doesn't let you upsert with custom id's
44
45
  begin
46
+ # data['_id'] = BSON::ObjectId('_id') if data['_id']
45
47
  @@db[collection].insert(data)
46
48
  rescue Mongo::OperationFailure => error
47
49
  # Really mongo client?
@@ -5,7 +5,7 @@ module Persistors
5
5
  class ModelStore < Store
6
6
  include StoreState
7
7
 
8
- ID_CHARS = [('a'..'z'), ('A'..'Z'), ('0'..'9')].map {|v| v.to_a }.flatten
8
+ ID_CHARS = [('a'..'f'), ('0'..'9')].map {|v| v.to_a }.flatten
9
9
 
10
10
  attr_reader :model
11
11
  attr_accessor :in_identity_map
@@ -46,7 +46,7 @@ module Persistors
46
46
  # Create a random unique id that can be used as the mongo id as well
47
47
  def generate_id
48
48
  id = []
49
- 12.times { id << ID_CHARS.sample }
49
+ 24.times { id << ID_CHARS.sample }
50
50
 
51
51
  return id.join
52
52
  end
@@ -78,6 +78,7 @@ class EachBinding < BaseBinding
78
78
  def update_indexes_after(start_index)
79
79
  size = @templates.size
80
80
  if size > 0
81
+ puts @templates.inspect
81
82
  start_index.upto(size-1) do |index|
82
83
  @templates[index].context.locals[:index].cur = index
83
84
  end
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.7.17
4
+ version: 0.7.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Stout