volt 0.7.7 → 0.7.8

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: 80515a8750e7c9c5e63bcee1dce981b6186a5cbc
4
- data.tar.gz: 07701fe7e8d64f3e3470cf06bdc8041f8e10c39b
3
+ metadata.gz: 74ea3a341b93854eef0a8477634b7b21a88c289c
4
+ data.tar.gz: 92d8ffbdd68245f528c522528adc8e78d873ccbb
5
5
  SHA512:
6
- metadata.gz: 710093a00f010f5c2d9e78eff5f18597664a21bec914c2a046eefffe0ecaba5a0c7b1b16e2e5f44eb92a744e8f15a6a7d07d52c4aa030e1a84f46cc1c5ce2e8b
7
- data.tar.gz: 18597b4f1985b84a83f3d40cc82e6934cbeb9930648691b3ac4dc86b6478ff03eee6ea5066d7b3b5d008b7ae168fa71b2e1142bfffe8559cd97fec29ab51a0bc
6
+ metadata.gz: 562ad2af2497878707f9259d16fd2c5983e19aad385b9048e81d399467953e20ad0302d1404bd88fa7c5fbd8de29d872202f5854ae6a292a88fd329f9b4dc99d
7
+ data.tar.gz: 09d8dfcf71e4995e0983a52fb1169f0153dccbc21d0ce72cd5bdb73b5a25c0a702afab9d50ed72a8a53bdb5588f9a6e7536d9220bd329755cf5220dbef9886db
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.7
1
+ 0.7.8
@@ -266,7 +266,6 @@ class Model
266
266
 
267
267
  def save!
268
268
  if errors.size == 0
269
- puts "SAVING: #{self.errors.inspect} - #{self.inspect} - #{options[:save_to].inspect} on #{self.inspect}"
270
269
  save_to = options[:save_to]
271
270
  if save_to
272
271
  if save_to.is_a?(ArrayModel)
@@ -274,8 +273,9 @@ class Model
274
273
  new_model = save_to.append(self.attributes)
275
274
 
276
275
  options[:save_to] = new_model
276
+
277
+ # TODO: return a promise that resolves if the append works
277
278
  else
278
- puts "SAVE BUFFERED"
279
279
  # We have a saved model
280
280
  return save_to.assign_attributes(self.attributes)
281
281
  end
@@ -283,7 +283,7 @@ class Model
283
283
  raise "Model is not a buffer, can not be saved, modifications should be persisted as they are made."
284
284
  end
285
285
 
286
- return true
286
+ return Promise.new.resolve({})
287
287
  else
288
288
  # Some errors, mark all fields
289
289
  self.class.validations.keys.each do |key|
@@ -291,7 +291,7 @@ class Model
291
291
  end
292
292
  trigger_for_methods!('changed', :errors, :marked_errors)
293
293
 
294
- return false
294
+ return Promise.new.reject(errors)
295
295
  end
296
296
  end
297
297
 
@@ -52,10 +52,7 @@ class AttributeBinding < BaseBinding
52
52
  end
53
53
 
54
54
  def update
55
- # puts "UPDATE GET VAL"
56
55
  value = @value.cur
57
- # puts "UPDATE GOT"
58
- # puts "UPDATE1 to #{value.inspect}"
59
56
 
60
57
  if @attribute_name == 'checked'
61
58
  update_checked
@@ -21,7 +21,6 @@ class ContentBinding < BaseBinding
21
21
 
22
22
  # Exception values display the exception as a string
23
23
  value = value.to_s
24
- # puts "UPDATE C: #{value.inspect} on #{self.inspect}"
25
24
 
26
25
  # Update the html in this section
27
26
  # TODO: Move the formatter into another class.
@@ -72,12 +72,12 @@ describe TemplateBinding do
72
72
 
73
73
  it "should find a matching component" do
74
74
  @templates = {
75
- 'comments/new/main/body' => ''
75
+ 'comments/new/index/body' => ''
76
76
  }
77
77
 
78
78
  path, result = @template_binding.path_for_template('comments/new')
79
- expect(path).to eq('comments/new/main/body')
80
- expect(result).to eq(['comments', 'new_controller', 'main'])
79
+ expect(path).to eq('comments/new/index/body')
80
+ expect(result).to eq(['comments', 'new_controller', 'index'])
81
81
  end
82
82
 
83
83
  it "should lookup sub-templates within its own file" do
@@ -108,10 +108,10 @@ describe TemplateBinding do
108
108
 
109
109
  it "should lookup in a controller" do
110
110
  @templates = {
111
- 'main/nav/main/body' => ''
111
+ 'main/nav/index/body' => ''
112
112
  }
113
113
 
114
- expect(@template_binding.path_for_template('nav').first).to eq('main/nav/main/body')
114
+ expect(@template_binding.path_for_template('nav').first).to eq('main/nav/index/body')
115
115
  end
116
116
 
117
117
  it "should lookup in a controller/view" do
@@ -124,18 +124,18 @@ describe TemplateBinding do
124
124
 
125
125
  it "should lookup in a controller" do
126
126
  @templates = {
127
- 'main/nav/main/body' => ''
127
+ 'main/nav/index/body' => ''
128
128
  }
129
129
 
130
- expect(@template_binding.path_for_template('nav').first).to eq('main/nav/main/body')
130
+ expect(@template_binding.path_for_template('nav').first).to eq('main/nav/index/body')
131
131
  end
132
132
 
133
133
  it "should lookup in a component" do
134
134
  @templates = {
135
- 'nav/main/main/body' => ''
135
+ 'nav/main/index/body' => ''
136
136
  }
137
137
 
138
- expect(@template_binding.path_for_template('nav').first).to eq('nav/main/main/body')
138
+ expect(@template_binding.path_for_template('nav').first).to eq('nav/main/index/body')
139
139
  end
140
140
 
141
141
  it "should lookup in a component/controller/view" do
@@ -149,10 +149,10 @@ describe TemplateBinding do
149
149
 
150
150
  it "should let you force a sub template" do
151
151
  @templates = {
152
- 'nav/main/main/title' => '',
152
+ 'nav/main/index/title' => '',
153
153
  'auth/login/new/title' => ''
154
154
  }
155
155
 
156
- expect(@template_binding.path_for_template('nav', 'title').first).to eq('nav/main/main/title')
156
+ expect(@template_binding.path_for_template('nav', 'title').first).to eq('nav/main/index/title')
157
157
  end
158
158
  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.7
4
+ version: 0.7.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Stout