volt 0.8.21 → 0.8.22.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +15 -10
- data/CHANGELOG.md +8 -0
- data/Gemfile +7 -33
- data/Readme.md +2 -0
- data/VERSION +1 -1
- data/app/volt/assets/js/{setImmediate.js → volt_js_polyfills.js} +14 -0
- data/app/volt/models/user.rb +21 -26
- data/app/volt/tasks/live_query/data_store.rb +4 -0
- data/app/volt/tasks/store_tasks.rb +8 -11
- data/app/volt/tasks/user_tasks.rb +18 -17
- data/lib/volt.rb +7 -1
- data/lib/volt/cli.rb +2 -0
- data/lib/volt/config.rb +69 -29
- data/lib/volt/extra_core/object.rb +8 -0
- data/lib/volt/models/model_hash_behaviour.rb +26 -6
- data/lib/volt/models/persistors/model_store.rb +1 -2
- data/lib/volt/models/validations.rb +18 -9
- data/lib/volt/models/validators/length_validator.rb +1 -1
- data/lib/volt/models/validators/presence_validator.rb +1 -1
- data/lib/volt/models/validators/unique_validator.rb +1 -1
- data/lib/volt/page/bindings/template_binding.rb +2 -1
- data/lib/volt/page/page.rb +7 -2
- data/lib/volt/page/sub_context.rb +8 -4
- data/lib/volt/page/targets/base_section.rb +1 -1
- data/lib/volt/page/targets/dom_template.rb +1 -1
- data/lib/volt/server.rb +3 -2
- data/lib/volt/server/html_parser/view_scope.rb +1 -0
- data/lib/volt/server/rack/component_code.rb +8 -1
- data/lib/volt/server/rack/component_paths.rb +2 -1
- data/lib/volt/server/rack/quiet_common_logger.rb +34 -0
- data/lib/volt/spec/setup.rb +30 -1
- data/lib/volt/utils/generic_pool.rb +4 -0
- data/lib/volt/volt/users.rb +18 -0
- data/spec/apps/kitchen_sink/Gemfile +3 -0
- data/spec/apps/kitchen_sink/app/main/config/dependencies.rb +6 -0
- data/spec/apps/kitchen_sink/app/main/config/routes.rb +5 -1
- data/spec/apps/kitchen_sink/app/main/models/user.rb +2 -0
- data/spec/apps/kitchen_sink/app/main/views/main/main.html +1 -1
- data/spec/apps/kitchen_sink/{public → config/base}/index.html +0 -0
- data/spec/integration/bindings_spec.rb +1 -1
- data/spec/integration/cookies_spec.rb +1 -1
- data/spec/integration/flash_spec.rb +3 -2
- data/spec/integration/list_spec.rb +1 -1
- data/spec/integration/templates_spec.rb +1 -1
- data/spec/integration/url_spec.rb +1 -1
- data/spec/integration/user_spec.rb +60 -0
- data/spec/models/model_spec.rb +0 -1
- data/spec/page/bindings/template_binding_spec.rb +0 -4
- data/spec/server/rack/asset_files_spec.rb +1 -1
- data/spec/spec_helper.rb +5 -0
- data/templates/component/tasks/.empty_directory +0 -0
- data/templates/newgem/app/newgem/views/main/{main.html → index.html} +0 -0
- data/templates/project/Gemfile.tt +0 -11
- data/templates/project/app/main/config/routes.rb +5 -0
- data/templates/project/app/main/tasks/.empty_directory +0 -0
- data/templates/project/app/main/views/main/main.html.tt +1 -0
- data/templates/project/config/app.rb.tt +8 -3
- data/volt.gemspec +4 -6
- metadata +58 -12
- data/spec/apps/kitchen_sink/app/main/controllers/users_test_controller.rb +0 -27
- data/spec/apps/kitchen_sink/app/main/views/users_test/index.html +0 -22
@@ -1,27 +0,0 @@
|
|
1
|
-
class UsersTestController < Volt::ModelController
|
2
|
-
def index
|
3
|
-
self.model = store._users.buffer
|
4
|
-
end
|
5
|
-
|
6
|
-
def signup
|
7
|
-
puts "Signup"
|
8
|
-
model.save!.then do |a|
|
9
|
-
puts "Saved"
|
10
|
-
end.fail do |err|
|
11
|
-
puts "Fail with: #{err.inspect}"
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
def login
|
16
|
-
puts "USER LOGIN"
|
17
|
-
User.login('ryanstout@gmail.com', 'temppass').then do |result|
|
18
|
-
puts "Login Success"
|
19
|
-
end.fail do |err|
|
20
|
-
puts "ERR: #{err.inspect}"
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
def logout
|
25
|
-
User.logout
|
26
|
-
end
|
27
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
<:Title>
|
2
|
-
Users Test
|
3
|
-
|
4
|
-
<:Body>
|
5
|
-
<h1>Users Test</h1>
|
6
|
-
|
7
|
-
<form e-submit="signup">
|
8
|
-
{{ errors.html_inspect }}<br />
|
9
|
-
<input value="{{ _username }}" /><br />
|
10
|
-
<input type="password" value="{{ _password }}" /><br />
|
11
|
-
|
12
|
-
<button>Signup</button>
|
13
|
-
</form>
|
14
|
-
|
15
|
-
<hr />
|
16
|
-
|
17
|
-
<button e-click="login">Login</button><button e-click="logout">Logout</button>
|
18
|
-
|
19
|
-
{{ if Volt.user }}
|
20
|
-
{{ Volt.user._username }}<br />
|
21
|
-
{{ Volt.user._name }}
|
22
|
-
{{ end }}
|