opal-connect 0.0.21 → 0.0.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/opal/connect.rb +4 -0
- data/lib/opal/connect/version.rb +1 -1
- data/opal-connect.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efd73efdfca60d9d3a65047146f1a3ee5a8df05c
|
4
|
+
data.tar.gz: 72f3dc1e92ddd08e2d418ea5ea99ba3d8d9b9158
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9fdcb301209d63c0263fd827c00f2a1a48f1621ab89b91562e23bea037e89c871bd6728af3ab6f061d596037c97c0343072744466f90d9306de2b1bf068f30e9
|
7
|
+
data.tar.gz: 73d039e2165fb3de70d718246f0ead104e0250414eaee1c087bb5a21d699de700c181271cfdae90911222d78dfa9f9b307e0ed11398b56d457203728b3ed9f31
|
data/lib/opal/connect.rb
CHANGED
@@ -250,8 +250,12 @@ module Opal
|
|
250
250
|
def javascript(klass, method, *opts)
|
251
251
|
return unless klass
|
252
252
|
|
253
|
+
js = []
|
254
|
+
options[:javascript].uniq.each { |block| js << klass.instance_exec(&block) }
|
255
|
+
|
253
256
|
%{
|
254
257
|
Document.ready? do
|
258
|
+
#{js.join(';')}
|
255
259
|
klass = #{klass.class.name}.new
|
256
260
|
klass.__send__(:#{method}, *JSON.parse(Base64.decode64('#{Base64.encode64 opts.to_json}'))) if klass.respond_to?(:#{method})
|
257
261
|
end
|
data/lib/opal/connect/version.rb
CHANGED
data/opal-connect.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_dependency "opal", "< 0.11.0"
|
22
|
-
spec.add_dependency "opal-jquery", ">= 0.4.
|
22
|
+
spec.add_dependency "opal-jquery", ">= 0.4.1"
|
23
23
|
spec.add_dependency "oga", ">= 2.2"
|
24
24
|
|
25
25
|
spec.add_development_dependency "bundler", "~> 1.7"
|
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.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cj
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opal
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.4.
|
33
|
+
version: 0.4.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.4.
|
40
|
+
version: 0.4.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: oga
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|