opal-rails 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile CHANGED
@@ -4,7 +4,7 @@ source :rubygems
4
4
  gemspec
5
5
 
6
6
 
7
- gem 'opal-jquery', :git => 'git://github.com/opal/opal-jquery.git', :require => false
7
+ gem 'opal-jquery', :require => false
8
8
  gem 'opal-spec', :git => 'git://github.com/opal/opal-spec.git', :require => false
9
9
 
10
10
 
data/README.md CHANGED
@@ -131,7 +131,7 @@ config.before_initialize do
131
131
  end
132
132
  ```
133
133
 
134
- **NOTE:** Rails does not do this on purpose, but the paths system (which states no eager loading for assets/views) is caught in a corner case here. I opened [an issue](rails/rails#???) on Rails already.
134
+ **NOTE:** Rails does not do this on purpose, but the paths system (which states no eager loading for assets/views) is caught in a corner case here. I opened [an issue](rails/rails#7587) on Rails already.
135
135
 
136
136
 
137
137
 
@@ -80,7 +80,7 @@
80
80
  // line 3, opal-jquery/element, class Element
81
81
  function Element() {};
82
82
  Element = __klass(__base, __super, "Element", Element);
83
- var Element_prototype = Element.prototype, __scope = Element._scope, TMP_1, TMP_2;
83
+ var Element_prototype = Element.prototype, __scope = Element._scope, TMP_1, TMP_2, TMP_3;
84
84
 
85
85
  // line 4, opal-jquery/element, Element.find
86
86
  Element.$find = function(selector) {
@@ -185,12 +185,46 @@
185
185
  return this;
186
186
  };
187
187
 
188
- Element_prototype.$css = Element_prototype.css;
188
+ // line 196, opal-jquery/element, Element#css
189
+ Element_prototype.$css = function(name, value) {
190
+ var __a, __b;if (value == null) {
191
+ value = nil
192
+ }
193
+ if ((__a = (__b = value['$nil?'](), __b !== false && __b !== nil ? name['$is_a?'](__scope.String) : __b)) !== false && __a !== nil) {
194
+ return $(this).css(name)
195
+ } else {
196
+ if ((__a = name['$is_a?'](__scope.Hash)) !== false && __a !== nil) {
197
+ $(this).css(name.$to_native());
198
+ } else {
199
+ $(this).css(name, value);
200
+ }
201
+ };
202
+ return this;
203
+ };
204
+
205
+ // line 220, opal-jquery/element, Element#animate
206
+ Element_prototype.$animate = TMP_1 = function(params) {
207
+ var speed = nil, __a, __context, block;
208
+ block = TMP_1._p || nil, __context = block._s, TMP_1._p = null;
209
+
210
+ speed = (function() { if ((__a = params['$has_key?']("speed")) !== false && __a !== nil) {
211
+ return params.$delete("speed")
212
+ } else {
213
+ return 400
214
+ }; return nil; }).call(this);
215
+
216
+ $(this).animate(params.$to_native(), speed, function() {
217
+ if ((block !== nil)) {
218
+ block.$call()
219
+ }
220
+ })
221
+ ;
222
+ };
189
223
 
190
- // line 203, opal-jquery/element, Element#each
191
- Element_prototype.$each = TMP_1 = function() {
224
+ // line 237, opal-jquery/element, Element#each
225
+ Element_prototype.$each = TMP_2 = function() {
192
226
  var __context, __yield;
193
- __yield = TMP_1._p || nil, __context = __yield._s, TMP_1._p = null;
227
+ __yield = TMP_2._p || nil, __context = __yield._s, TMP_2._p = null;
194
228
 
195
229
  for (var i = 0, length = this.length; i < length; i++) {
196
230
  if (__yield.call(__context, $(this[i])) === __breaker) return __breaker.$v;
@@ -200,7 +234,7 @@
200
234
 
201
235
  Element_prototype.$find = Element_prototype.find;
202
236
 
203
- // line 223, opal-jquery/element, Element#first
237
+ // line 257, opal-jquery/element, Element#first
204
238
  Element_prototype.$first = function() {
205
239
 
206
240
  return this.length ? this.first() : nil;
@@ -210,7 +244,7 @@
210
244
 
211
245
  Element_prototype['$has_class?'] = Element_prototype.hasClass;
212
246
 
213
- // line 231, opal-jquery/element, Element#html
247
+ // line 265, opal-jquery/element, Element#html
214
248
  Element_prototype.$html = function() {
215
249
 
216
250
  return this.html() || "";
@@ -218,7 +252,7 @@
218
252
 
219
253
  Element_prototype['$html='] = Element_prototype.html;
220
254
 
221
- // line 237, opal-jquery/element, Element#id
255
+ // line 271, opal-jquery/element, Element#id
222
256
  Element_prototype.$id = function() {
223
257
 
224
258
 
@@ -232,7 +266,7 @@
232
266
 
233
267
  };
234
268
 
235
- // line 249, opal-jquery/element, Element#id=
269
+ // line 283, opal-jquery/element, Element#id=
236
270
  Element_prototype['$id='] = function(id) {
237
271
 
238
272
 
@@ -246,7 +280,7 @@
246
280
 
247
281
  };
248
282
 
249
- // line 261, opal-jquery/element, Element#inspect
283
+ // line 295, opal-jquery/element, Element#inspect
250
284
  Element_prototype.$inspect = function() {
251
285
 
252
286
 
@@ -266,7 +300,7 @@
266
300
 
267
301
  };
268
302
 
269
- // line 279, opal-jquery/element, Element#length
303
+ // line 313, opal-jquery/element, Element#length
270
304
  Element_prototype.$length = function() {
271
305
 
272
306
  return this.length;
@@ -274,7 +308,7 @@
274
308
 
275
309
  Element_prototype.$next = Element_prototype.next;
276
310
 
277
- // line 285, opal-jquery/element, Element#off
311
+ // line 319, opal-jquery/element, Element#off
278
312
  Element_prototype.$off = function(event_name, selector, handler) {
279
313
  if (handler == null) {
280
314
  handler = nil
@@ -291,10 +325,10 @@
291
325
  return handler;
292
326
  };
293
327
 
294
- // line 299, opal-jquery/element, Element#on
295
- Element_prototype.$on = TMP_2 = function(event_name, selector) {
328
+ // line 333, opal-jquery/element, Element#on
329
+ Element_prototype.$on = TMP_3 = function(event_name, selector) {
296
330
  var __context, block;
297
- block = TMP_2._p || nil, __context = block._s, TMP_2._p = null;
331
+ block = TMP_3._p || nil, __context = block._s, TMP_3._p = null;
298
332
  if (selector == null) {
299
333
  selector = nil
300
334
  }
@@ -333,13 +367,19 @@
333
367
 
334
368
  Element_prototype.$trigger = Element_prototype.trigger;
335
369
 
336
- // line 335, opal-jquery/element, Element#value
370
+ // line 369, opal-jquery/element, Element#value
337
371
  Element_prototype.$value = function() {
338
372
 
339
373
  return this.val() || "";
340
374
  };
341
375
 
342
376
  Element_prototype['$value='] = Element_prototype.val;
377
+
378
+ Element_prototype.$hide = Element_prototype.hide;
379
+
380
+ Element_prototype.$show = Element_prototype.show;
381
+
382
+ Element_prototype.$toggle = Element_prototype.toggle;
343
383
  ;Element._sdonate(["$find", "$id", "$new", "$parse"]);
344
384
  })(self, jQuery)
345
385
  })();
@@ -1,6 +1,6 @@
1
1
  module Opal
2
2
  module Rails
3
- VERSION = '0.3.0'
3
+ VERSION = '0.3.1'
4
4
  OPAL_VERSION = '0.3.27'
5
5
  end
6
6
  end
@@ -1,6 +1,9 @@
1
1
  class ApplicationController < ActionController::Base
2
2
  protect_from_forgery
3
3
 
4
+ def index
5
+ end
6
+
4
7
  def with_assignments
5
8
  object = Object.new
6
9
  def object.as_json options = {}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opal-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,22 +9,27 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-25 00:00:00.000000000 Z
12
+ date: 2012-11-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: opal
16
- requirement: &70151146171360 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - =
19
+ - - '='
20
20
  - !ruby/object:Gem::Version
21
21
  version: 0.3.27
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70151146171360
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - '='
28
+ - !ruby/object:Gem::Version
29
+ version: 0.3.27
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: rails
27
- requirement: &70151146169380 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ~>
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: 3.2.0
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *70151146169380
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 3.2.0
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: rspec
38
- requirement: &70151146168520 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ~>
@@ -43,10 +53,15 @@ dependencies:
43
53
  version: '2.4'
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *70151146168520
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '2.4'
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: rspec-rails
49
- requirement: &70151146167720 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ~>
@@ -54,7 +69,12 @@ dependencies:
54
69
  version: '2.4'
55
70
  type: :development
56
71
  prerelease: false
57
- version_requirements: *70151146167720
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: '2.4'
58
78
  description: Rails bindings for opal JS engine
59
79
  email:
60
80
  - elia@schito.me
@@ -140,7 +160,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
140
160
  version: '0'
141
161
  segments:
142
162
  - 0
143
- hash: 3705257751103436212
163
+ hash: 2601995669754769511
144
164
  required_rubygems_version: !ruby/object:Gem::Requirement
145
165
  none: false
146
166
  requirements:
@@ -149,10 +169,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
169
  version: '0'
150
170
  segments:
151
171
  - 0
152
- hash: 3705257751103436212
172
+ hash: 2601995669754769511
153
173
  requirements: []
154
174
  rubyforge_project: opal-rails
155
- rubygems_version: 1.8.17
175
+ rubygems_version: 1.8.24
156
176
  signing_key:
157
177
  specification_version: 3
158
178
  summary: Rails bindings for opal JS engine