roda-component 0.0.6 → 0.0.7

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: 7a0aee4b44c06ddda8a7f16cadc0ab4f36cb8bdf
4
- data.tar.gz: 3b43bcaccdcd4946f8e4cabcfabb9eae516c5d88
3
+ metadata.gz: b2560ddb0c7245a3dffa1213a056835210210ce0
4
+ data.tar.gz: e0258445c18e2bd5d0751cea9131e224cef4f607
5
5
  SHA512:
6
- metadata.gz: dd9fad6927044e7d4bf367ee524c68c4c600c93a3e93a26af8d5996d0669b7edecdf4d91f6c28ee47ba93b2160b8d63e7f9fc2eafb7d02ced7bd4e7b341a087f
7
- data.tar.gz: e7c055e597beccfd745f60a08b8cd56947e2d5613aa93d97427e2f033cd9fb95aef33a6b4aaa9c7e6ec6b39d886fa991065d207475fe982dcca64b6b127f5db5
6
+ metadata.gz: ea779987429e6497a73b8d59ba02a0f8105ce2fba1dbef3edd5f8f88ec7665941188431318d5ae4f6aac5d207f0b094a71e8932f994f5422b53f920effb79cb8
7
+ data.tar.gz: 97d25418936d3fbafab553a4c69ffe2bd86dc7417c6fb0f4e8fc4b5fa0734f044c431a732c0d96bd7249194c691ea55212b0fdb595bf1eded590cc30ad1aab86
@@ -1,10 +1,11 @@
1
+ require 'opal'
2
+ require 'opal-jquery'
3
+
1
4
  unless RUBY_ENGINE == 'opal'
2
5
  require 'tilt'
3
6
  require 'awesome_print'
4
7
  end
5
8
 
6
- require 'opal'
7
- require 'opal-jquery'
8
9
  require "base64"
9
10
  require 'roda/component/faye'
10
11
  require 'roda/component/instance'
@@ -19,23 +20,6 @@ if RUBY_ENGINE == 'opal'
19
20
  }
20
21
  end
21
22
 
22
- module Overrideable
23
- def self.included(c)
24
- c.instance_methods(false).each do |m|
25
- m = m.to_sym
26
- c.class_eval %Q{
27
- alias #{m}_original #{m}
28
- def #{m}(*args, &block)
29
- puts "Foo"
30
- result = #{m}_original(*args, &block)
31
- puts "Bar"
32
- result
33
- end
34
- }
35
- end
36
- end
37
- end
38
-
39
23
  class Roda
40
24
  class Component
41
25
  attr_accessor :scope
@@ -1,5 +1,5 @@
1
1
  class Roda
2
2
  class Component
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
@@ -79,16 +79,14 @@ class Roda
79
79
  comp_name = comp.class._name
80
80
 
81
81
  js = <<-EOF
82
- Document.ready? do
83
- unless $faye
84
- $faye = Roda::Component::Faye.new('/faye')
85
- end
86
-
87
- unless $component_opts[:comp][:"#{comp_name}"]
88
- c = $component_opts[:comp][:"#{comp_name}"] = #{comp.class}.new
89
- c.cache = JSON.parse Base64.decode64('#{cache}')
90
- c.#{action}(JSON.parse(Base64.decode64('#{options}')))
91
- end
82
+ unless $faye
83
+ $faye = Roda::Component::Faye.new(`document.location.origin` + '/faye')
84
+ end
85
+
86
+ unless $component_opts[:comp][:"#{comp_name}"]
87
+ c = $component_opts[:comp][:"#{comp_name}"] = #{comp.class}.new
88
+ c.cache = JSON.parse Base64.decode64('#{cache}')
89
+ c.#{action}(JSON.parse(Base64.decode64('#{options}')))
92
90
  end
93
91
  EOF
94
92
 
@@ -169,7 +167,9 @@ class Roda
169
167
  Opal::Processor.source_map_enabled = false
170
168
  env = Opal::Environment.new
171
169
  # Append the gems path
170
+ env.append_path Dir.pwd
172
171
  env.append_path Gem::Specification.find_by_name("roda-component").gem_dir + '/lib'
172
+ env.append_path Gem::Specification.find_by_name("scrivener-cj").gem_dir + '/lib'
173
173
  js = env['roda/component'].to_s
174
174
  # Append the path to the components folder
175
175
  env.append_path scope.component_opts[:path]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roda-component
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - cj
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-15 00:00:00.000000000 Z
11
+ date: 2014-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal