volt 0.8.11 → 0.8.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -1
- data/Readme.md +1 -2
- data/VERSION +1 -1
- data/lib/volt/cli.rb +10 -0
- data/lib/volt/models/model.rb +1 -1
- data/lib/volt/models/persistors/model_store.rb +1 -1
- data/lib/volt/page/bindings/template_binding.rb +0 -2
- data/templates/component/assets/css/.empty_directory +0 -0
- data/templates/component/assets/js/.empty_directory +0 -0
- data/templates/component/config/dependencies.rb +8 -0
- data/templates/component/config/routes.rb +6 -0
- data/templates/component/controllers/main_controller.rb +17 -0
- data/templates/component/models/.empty_directory +0 -0
- data/templates/component/views/index/index.html.tt +5 -0
- metadata +9 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 585521e16cdbd729347af62203cacb7048b3e156
|
4
|
+
data.tar.gz: a74df5b4aecfd6d947aec1a4597778615b169d2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1004177eb3aa270849933ae22bc61545a976af9b7f3f48ce538c8227683a88918885be1f22fb30516d9a23391ceca5581af1e109e31398ea307019055ee1177
|
7
|
+
data.tar.gz: bbc37c59c6db0def60388e50c994c164c25543ff044b5317957ecd89835059f4c8c5b29add5dd3a3a6dc402b5e4ed4ddbc92b16db5bd857db4d7e75942d06d02
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# 0.8.10
|
1
|
+
# 0.8.10 - Oct 12, 2014
|
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
|
|
data/Readme.md
CHANGED
@@ -12,13 +12,12 @@ Volt is a Ruby web framework where your ruby code runs on both the server and th
|
|
12
12
|
|
13
13
|
Instead of syncing data between the client and server via HTTP, Volt uses a persistent connection between the client and server. When data is updated on one client, it is updated in the database and any other listening clients (with almost no setup code needed).
|
14
14
|
|
15
|
-
Pages HTML is written in a
|
15
|
+
Pages HTML is written in a template language where you can put ruby between ```{{``` and ```}}```. Volt uses data flow/reactive programming to automatically and intelligently propagate changes to the DOM (or any other code wanting to know when a value updates). When something in the DOM changes, Volt intelligently updates only the nodes that need to be changed.
|
16
16
|
|
17
17
|
See some demo videos here:
|
18
18
|
** Note: These videos are outdated, new videos coming tomorrow.
|
19
19
|
- [Volt Todos Example](https://www.youtube.com/watch?v=6ZIvs0oKnYs)
|
20
20
|
- [Build a Blog with Volt](https://www.youtube.com/watch?v=c478sMlhx1o)
|
21
|
-
- [Reactive Values in Volt](https://www.youtube.com/watch?v=yZIQ-2irY-Q)
|
22
21
|
|
23
22
|
Check out demo apps:
|
24
23
|
- https://github.com/voltrb/todos3
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.13
|
data/lib/volt/cli.rb
CHANGED
@@ -86,6 +86,16 @@ class CLI < Thor
|
|
86
86
|
template("model/model.rb.tt", output_file, {model_name: name.camelize.singularize})
|
87
87
|
end
|
88
88
|
|
89
|
+
desc "component NAME", "Creates a component named NAME in the app folder."
|
90
|
+
method_option :name, :type => :string, :banner => "The name of the component."
|
91
|
+
def component(name)
|
92
|
+
name = name.underscore
|
93
|
+
component_folder = Dir.pwd + "/app/#{name}"
|
94
|
+
@component_name = name
|
95
|
+
directory("component", component_folder, {component_name: name})
|
96
|
+
end
|
97
|
+
|
98
|
+
|
89
99
|
def self.source_root
|
90
100
|
File.expand_path(File.join(File.dirname(__FILE__), '../../templates'))
|
91
101
|
end
|
data/lib/volt/models/model.rb
CHANGED
File without changes
|
File without changes
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class MainController < ModelController
|
2
|
+
def index
|
3
|
+
# Add code for when the index view is loaded
|
4
|
+
end
|
5
|
+
|
6
|
+
def about
|
7
|
+
# Add code for when the about view is loaded
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
# the main template contains a #template binding that shows another
|
12
|
+
# template. This is the path to that template. It may change based
|
13
|
+
# on the params._controller and params._action values.
|
14
|
+
def main_path
|
15
|
+
params._controller.or('main') + "/" + params._action.or('index')
|
16
|
+
end
|
17
|
+
end
|
File without changes
|
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.
|
4
|
+
version: 0.8.13
|
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-10-
|
11
|
+
date: 2014-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -540,6 +540,13 @@ files:
|
|
540
540
|
- spec/utils/generic_counting_pool_spec.rb
|
541
541
|
- spec/utils/generic_pool_spec.rb
|
542
542
|
- templates/.gitignore
|
543
|
+
- templates/component/assets/css/.empty_directory
|
544
|
+
- templates/component/assets/js/.empty_directory
|
545
|
+
- templates/component/config/dependencies.rb
|
546
|
+
- templates/component/config/routes.rb
|
547
|
+
- templates/component/controllers/main_controller.rb
|
548
|
+
- templates/component/models/.empty_directory
|
549
|
+
- templates/component/views/index/index.html.tt
|
543
550
|
- templates/model/model.rb.tt
|
544
551
|
- templates/newgem/Gemfile.tt
|
545
552
|
- templates/newgem/LICENSE.txt.tt
|