ethereal 0.0.1 → 0.0.2

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: 285353e09738b1de4ca744c90c0ae9adf8946cbd
4
- data.tar.gz: ae0b4d6959fde680a366e03678c9e88ddffb20c3
3
+ metadata.gz: c42c99416c967e68ecbae780c286828dc77132f0
4
+ data.tar.gz: 34a89366675d5ac7cb08edd15e46234d14947ce2
5
5
  SHA512:
6
- metadata.gz: fc6149905f25a6d5c5313638300bb963c28d73b41e4dce11c39221cbcbad476716dc6e206cda5e2c8f7665352d3b1271c62787999735044b2371ade76ce9f142
7
- data.tar.gz: 632710b135f3a2ff699ab6f3aebb3451b39068e2775f74a43b7476cdc40ece04da7562a9603afbafade5be9c639776694c3cbe1773c32900c4f25f398e9991a6
6
+ metadata.gz: 4a08e7dae59c8b6286da5c18802d0bb308062ee033f151420584879290d13e091b31d3f96d65082982539a726e8de2844fc415fd935f47ceaefe83dda8d61d1b
7
+ data.tar.gz: d4cbad2a383d887de32f323b9d7e66603d8dad3cf977820a4469f13d9815aef2438eb9678c126b56d2b70d0a6106819ea48295cbb7a6f186619fdf8fa7097ccd
data/README.md CHANGED
@@ -20,12 +20,14 @@ Then add this line to application.js
20
20
  Ethereal is an event based framework that manages the life cycle of JavaScript objects. Here's a simple Todo where you can dynamically add/remove items on the list.
21
21
 
22
22
  ```erb
23
- <%= content_tag :ol, as: 'Todo.List, do %>
23
+ <!-- views/todos/index.html.erb -->
24
+ <%= content_tag :ol, as: 'Todo.List', do %>
24
25
  <%= render @todos %>
25
26
  <% end %>
26
27
  ```
27
28
 
28
29
  ```coffee
30
+ # assets/javascripts/todos/list.js.coffee
29
31
  class Todos
30
32
  # @element() always return the element to which your object is bound.
31
33
 
@@ -44,7 +46,7 @@ Ethereal.Models.add Todos, 'Todo.List'
44
46
 
45
47
  ```ruby
46
48
  #views/todos/create.js.erb
47
- e.html = "<%= j render @todo %>".toHTML()
49
+ e.html = "<%= j render(@todo) %>".toHTML()
48
50
  ```
49
51
 
50
52
  ```ruby
@@ -59,6 +61,6 @@ Some notes:
59
61
  - A callback (@loaded) is called right after Ethereal has instantiated an object.
60
62
  - In *.js.erb, an event is created. You can set HTML to the event object.
61
63
  - To ease the process, a toHTML() method has been added to the String object (JS).
62
- - You need to register any class you create through the ```Ethereal.Models.add Class, 'name'````. The name is the attribute you set in your DOM.
64
+ - You need to register any class you create through the ```Ethereal.Models.add Class, 'name'```. The name is the attribute you set in your DOM.
63
65
 
64
66
 
@@ -1,10 +1,7 @@
1
1
  module Ethereal
2
2
  class Railtie < Rails::Railtie
3
3
  initializer 'ethereal.assets.paths', before: :add_view_paths do |app|
4
- ethereal_assets_path = File.dirname(__FILE__) + '/app/assets/'
5
- app.paths['vendor/assets'] << ethereal_assets_path
6
- app.config.assets.precompile << ethereal_assets_path
7
-
4
+ app.paths['vendor/assets'] << File.dirname(__FILE__) + '/app/assets/'
8
5
  app.paths['app/views'] << File.dirname(__FILE__) + '/app/views/'
9
6
  end
10
7
  end
@@ -1,3 +1,3 @@
1
1
  module Ethereal
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ethereal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pier-Olivier Thibault