opal-connect 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/config/boot.rb +1 -1
- data/lib/opal/connect/plugins/dom.rb +5 -1
- data/lib/opal/connect/version.rb +1 -1
- data/lib/opal/connect.rb +1 -9
- data/package.json +0 -1
- data/webpack.config.js +0 -3
- metadata +2 -3
- data/lib/opal/connect/entry.rb.erb +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a4f723259bbc5caf0cf55ca0439762264fe2828
|
4
|
+
data.tar.gz: b572c93f4beeb56dbf818d10cdf0fa4abefed563
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b380aa3445e9c5e2beaa8f777fa73363eae33f1348f2f1fdb0d7fa5661e3e23c815dc1c59887955e3bc723d8701fd97fe190ffe82d6523e05354cc985241681
|
7
|
+
data.tar.gz: db0df05c4c75d3c7593eeb8bce395887458ebc1fe89f10b9d4a7b6fe731bc179919ffd288782f7082582f66412550f6bbf596f9d0212e2c4815d92fa42abfbde
|
data/app/config/boot.rb
CHANGED
@@ -15,4 +15,4 @@ Unreloader = Rack::Unreloader.new(subclasses: %w'Roda Roda::RodaPlugins Opal::Co
|
|
15
15
|
Unreloader.require './lib/opal/connect.rb'
|
16
16
|
Unreloader.require 'app/config/connect'
|
17
17
|
Unreloader.require 'app'
|
18
|
-
Unreloader.require 'app/components
|
18
|
+
Unreloader.require 'app/components/**/*.rb'
|
@@ -218,7 +218,11 @@ module Opal
|
|
218
218
|
content = HTML::DSL.scope!(content).html!(&block).to_html if block_given?
|
219
219
|
|
220
220
|
if RUBY_ENGINE == 'opal'
|
221
|
-
|
221
|
+
if content.is_a? Dom::Instance
|
222
|
+
node.append(content.node)
|
223
|
+
else
|
224
|
+
node.append(content)
|
225
|
+
end
|
222
226
|
else
|
223
227
|
if content.is_a? Dom::Instance
|
224
228
|
content = content.node.children
|
data/lib/opal/connect/version.rb
CHANGED
data/lib/opal/connect.rb
CHANGED
@@ -5,7 +5,6 @@ require "opal/connect/version"
|
|
5
5
|
if RUBY_ENGINE == 'opal'
|
6
6
|
require 'opal/connect/puts'
|
7
7
|
else
|
8
|
-
require 'erb'
|
9
8
|
Opal.append_path File.expand_path('../..', __FILE__).untaint
|
10
9
|
end
|
11
10
|
|
@@ -36,8 +35,6 @@ module Opal
|
|
36
35
|
|
37
36
|
# make sure we include the default plugins with connect
|
38
37
|
options[:plugins].each { |plug| Connect.plugin plug }
|
39
|
-
|
40
|
-
options[:setup_blocks].each { |b| Class.new { include Opal::Connect }.instance_exec(&b) }
|
41
38
|
end
|
42
39
|
|
43
40
|
def included(klass)
|
@@ -155,12 +152,7 @@ module Opal
|
|
155
152
|
end
|
156
153
|
|
157
154
|
def setup(&block)
|
158
|
-
if block_given?
|
159
|
-
@_setup_block = block
|
160
|
-
Connect.options[:setup_blocks] << @_setup_block
|
161
|
-
end
|
162
|
-
|
163
|
-
@_setup_block
|
155
|
+
Class.new { include Opal::Connect }.instance_exec(&block) if block_given?
|
164
156
|
end
|
165
157
|
|
166
158
|
# Load a new plugin into the current class. A plugin can be a module
|
data/package.json
CHANGED
data/webpack.config.js
CHANGED
@@ -1,10 +1,7 @@
|
|
1
|
-
const webpack = require('webpack');
|
2
1
|
const path = require("path");
|
3
2
|
const LiveReloadPlugin = require('webpack-livereload-plugin');
|
4
3
|
const stubs = process.env.CONNECT_STUBS.split(',');
|
5
4
|
|
6
|
-
console.log(process.env.OPAL_STUBS)
|
7
|
-
|
8
5
|
module.exports = {
|
9
6
|
entry: {
|
10
7
|
opal: './.connect/opal.js',
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opal-connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cj
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opal
|
@@ -114,7 +114,6 @@ files:
|
|
114
114
|
- config.ru
|
115
115
|
- lib/opal-connect.rb
|
116
116
|
- lib/opal/connect.rb
|
117
|
-
- lib/opal/connect/entry.rb.erb
|
118
117
|
- lib/opal/connect/plugins/abilities.rb
|
119
118
|
- lib/opal/connect/plugins/current_user.rb
|
120
119
|
- lib/opal/connect/plugins/dom.rb
|
@@ -1,16 +0,0 @@
|
|
1
|
-
require 'opal/connect'
|
2
|
-
|
3
|
-
<% plugins.each do |path| %>
|
4
|
-
require '<%= path %>'
|
5
|
-
<% end %>
|
6
|
-
|
7
|
-
options = JSON.parse(Base64.decode64('<%= client_options %>'))
|
8
|
-
options.each { |key, value| Opal::Connect.options[key] = value }
|
9
|
-
|
10
|
-
<%= entry %>
|
11
|
-
|
12
|
-
<% files.each do |file| %>
|
13
|
-
require '<%= file %>'
|
14
|
-
<% end %>
|
15
|
-
|
16
|
-
Opal::Connect.setup
|