opal-jquery 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Opal
2
2
  module JQuery
3
- VERSION = '0.0.12'
3
+ VERSION = '0.0.13'
4
4
  end
5
5
  end
@@ -15,6 +15,6 @@ Gem::Specification.new do |s|
15
15
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
16
  s.require_paths = ['lib']
17
17
 
18
- s.add_runtime_dependency 'opal', '>= 0.4.3'
18
+ s.add_runtime_dependency 'opal', '>= 0.4.4'
19
19
  s.add_development_dependency 'opal-spec', '>= 0.3.0'
20
20
  end
@@ -1,6 +1,6 @@
1
1
  class Element
2
2
  %x{
3
- var root = __opal.global, dom_class;
3
+ var root = $opal.global, dom_class;
4
4
 
5
5
  if (root.jQuery) {
6
6
  dom_class = jQuery
@@ -89,18 +89,6 @@ class Element
89
89
  alias_native :slide_toggle, :slideToggle
90
90
  alias_native :fade_toggle, :fadeToggle
91
91
 
92
- # Missing methods are assumed to be jquery plugins. These are called by
93
- # the given symbol name.
94
- def method_missing(symbol, *args, &block)
95
- %x{
96
- if (#{self}[#{symbol}]) {
97
- return #{self}[#{symbol}].apply(#{self}, args);
98
- }
99
- }
100
-
101
- super
102
- end
103
-
104
92
  def to_n
105
93
  self
106
94
  end
@@ -11,8 +11,12 @@ require "spec_helper"
11
11
  };
12
12
  }
13
13
 
14
- describe "Element#method_missing" do
15
- it "calls jquery plugins by given name" do
14
+ class Element
15
+ expose :opal_specs_extension, :opal_specs_args
16
+ end
17
+
18
+ describe "Element#exposes" do
19
+ it "exposes jquery plugins by given name" do
16
20
  Element.new.opal_specs_extension.should eq("foo_bar_baz")
17
21
  end
18
22
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opal-jquery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-27 00:00:00.000000000 Z
12
+ date: 2013-08-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: opal
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.4.3
21
+ version: 0.4.4
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
- version: 0.4.3
29
+ version: 0.4.4
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: opal-spec
32
32
  requirement: !ruby/object:Gem::Requirement