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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5f6a264eab84427832bed8c104726b4fcdb2b975
4
- data.tar.gz: 5130179b9c32ff08574156e830faa7fb0c3b195b
3
+ metadata.gz: efd73efdfca60d9d3a65047146f1a3ee5a8df05c
4
+ data.tar.gz: 72f3dc1e92ddd08e2d418ea5ea99ba3d8d9b9158
5
5
  SHA512:
6
- metadata.gz: 4756bcd971dd01fa8a59ef01e11c5d4fcefbd093c68d86c04be50e406243ecf432bae6d9d0e2bcba5d17fdde9b1a88bd8ecb950db2631b6c48e16c2f704b4a59
7
- data.tar.gz: d010daba824cb98df27051264058208f582bf078e176d58a22129c10309c458884681ffebed253d32fef2d48e03b2bdd41ae21a91294452b08922a7d2cc0e130
6
+ metadata.gz: 9fdcb301209d63c0263fd827c00f2a1a48f1621ab89b91562e23bea037e89c871bd6728af3ab6f061d596037c97c0343072744466f90d9306de2b1bf068f30e9
7
+ data.tar.gz: 73d039e2165fb3de70d718246f0ead104e0250414eaee1c087bb5a21d699de700c181271cfdae90911222d78dfa9f9b307e0ed11398b56d457203728b3ed9f31
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Opal
2
2
  module Connect
3
- VERSION = "0.0.21"
3
+ VERSION = "0.0.22"
4
4
  end
5
5
  end
@@ -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.2"
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.21
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-07 00:00:00.000000000 Z
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.2
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.2
40
+ version: 0.4.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: oga
43
43
  requirement: !ruby/object:Gem::Requirement