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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cfab192f992f08976f93097a2281b3f25e1a74ca
4
- data.tar.gz: 81803fb1527d18adee2e69aecdb5f76d3003eaa5
3
+ metadata.gz: 585521e16cdbd729347af62203cacb7048b3e156
4
+ data.tar.gz: a74df5b4aecfd6d947aec1a4597778615b169d2c
5
5
  SHA512:
6
- metadata.gz: 11b9c3402d259b166876db5160b2fdacb59d12a8386b55f1d0718e04a6f0783996ef3d7a7e575cbc184c71e06ee4275937c3d93c3c8670f7056897ebb301af6d
7
- data.tar.gz: baef058f15caba26ca1c7f322a02ce66685ea6eabf3b823bb551001eafefd0a054548885e4b19f7d1e964900a85ed22e6c097e85c734e9f4cb8cb18da8952d49
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 handlebars-like template language. 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.
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.11
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
@@ -64,7 +64,7 @@ class Model
64
64
 
65
65
  # Assign each attribute using setters
66
66
  attrs.each_pair do |key, value|
67
- if self.respond_to?(key)
67
+ if self.respond_to?(:"#{key}=")
68
68
  # If a method without an underscore is defined, call that.
69
69
  self.send(:"#{key}=", value)
70
70
  else
@@ -96,7 +96,7 @@ module Persistors
96
96
  if model
97
97
  data.each_pair do |key, value|
98
98
  if key != :_id
99
- model.send(:"#{key}=", value)
99
+ model.send(:"_#{key}=", value)
100
100
  end
101
101
  end
102
102
  end
@@ -11,8 +11,6 @@ class TemplateBinding < BaseBinding
11
11
 
12
12
  @current_template = nil
13
13
 
14
- @getter = getter
15
-
16
14
  # Run the initial render
17
15
  @computation = -> do
18
16
  # Don't try to render if this has been removed
File without changes
File without changes
@@ -0,0 +1,8 @@
1
+ # Specify which components you wish to include when
2
+ # the "home" component loads.
3
+
4
+ # bootstrap css framework
5
+ component 'bootstrap'
6
+
7
+ # a default theme for the bootstrap framework
8
+ component 'bootstrap-jumbotron-theme'
@@ -0,0 +1,6 @@
1
+ # See https://github.com/voltrb/volt#routes for more info on routes
2
+
3
+ get "/about", _action: 'about'
4
+
5
+ # The main route, this should be last. It will match any params not previously matched.
6
+ get '/', {}
@@ -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
@@ -0,0 +1,5 @@
1
+ <:Title>
2
+ Component Index
3
+
4
+ <:Body>
5
+ <h1>Component Index</h1>
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.11
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-12 00:00:00.000000000 Z
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