actionpack 1.11.1 → 1.11.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of actionpack might be problematic. Click here for more details.

@@ -1,4 +1,4 @@
1
- /* Prototype JavaScript framework, version 1.4.0_rc4
1
+ /* Prototype JavaScript framework, version 1.4.0
2
2
  * (c) 2005 Sam Stephenson <sam@conio.net>
3
3
  *
4
4
  * THIS FILE IS AUTOMATICALLY GENERATED. When sending patches, please diff
@@ -11,7 +11,7 @@
11
11
  /*--------------------------------------------------------------------------*/
12
12
 
13
13
  var Prototype = {
14
- Version: '1.4.0_rc4',
14
+ Version: '1.4.0',
15
15
  ScriptFragment: '(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)',
16
16
 
17
17
  emptyFunction: function() {},
@@ -46,10 +46,10 @@ Object.inspect = function(object) {
46
46
  }
47
47
  }
48
48
 
49
- Function.prototype.bind = function(object) {
50
- var __method = this;
49
+ Function.prototype.bind = function() {
50
+ var __method = this, args = $A(arguments), object = args.shift();
51
51
  return function() {
52
- return __method.apply(object, arguments);
52
+ return __method.apply(object, args.concat($A(arguments)));
53
53
  }
54
54
  }
55
55
 
@@ -393,6 +393,7 @@ Object.extend(Enumerable, {
393
393
  entries: Enumerable.toArray
394
394
  });
395
395
  var $A = Array.from = function(iterable) {
396
+ if (!iterable) return [];
396
397
  if (iterable.toArray) {
397
398
  return iterable.toArray();
398
399
  } else {
@@ -456,6 +457,14 @@ Object.extend(Array.prototype, {
456
457
  return (inline !== false ? this : this.toArray())._reverse();
457
458
  },
458
459
 
460
+ shift: function() {
461
+ var result = this[0];
462
+ for (var i = 0; i < this.length - 1; i++)
463
+ this[i] = this[i + 1];
464
+ this.length--;
465
+ return result;
466
+ },
467
+
459
468
  inspect: function() {
460
469
  return '[' + this.map(Object.inspect).join(', ') + ']';
461
470
  }
@@ -1253,9 +1262,17 @@ Form.Element = {
1253
1262
  var method = element.tagName.toLowerCase();
1254
1263
  var parameter = Form.Element.Serializers[method](element);
1255
1264
 
1256
- if (parameter)
1257
- return encodeURIComponent(parameter[0]) + '=' +
1258
- encodeURIComponent(parameter[1]);
1265
+ if (parameter) {
1266
+ var key = encodeURIComponent(parameter[0]);
1267
+ if (key.length == 0) return;
1268
+
1269
+ if (parameter[1].constructor != Array)
1270
+ parameter[1] = [parameter[1]];
1271
+
1272
+ return parameter[1].map(function(value) {
1273
+ return key + '=' + encodeURIComponent(value);
1274
+ }).join('&');
1275
+ }
1259
1276
  },
1260
1277
 
1261
1278
  getValue: function(element) {
data/rakefile CHANGED
@@ -62,7 +62,7 @@ spec = Gem::Specification.new do |s|
62
62
  s.has_rdoc = true
63
63
  s.requirements << 'none'
64
64
 
65
- s.add_dependency('activesupport', '= 1.2.4' + PKG_BUILD)
65
+ s.add_dependency('activesupport', '= 1.2.5' + PKG_BUILD)
66
66
 
67
67
  s.require_path = 'lib'
68
68
  s.autorequire = 'action_controller'
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: actionpack
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.11.1
7
- date: 2005-12-07 00:00:00 -06:00
6
+ version: 1.11.2
7
+ date: 2005-12-13 00:00:00 -06:00
8
8
  summary: Web-flow and rendering framework putting the VC in MVC.
9
9
  require_paths:
10
10
  - lib
@@ -271,5 +271,5 @@ dependencies:
271
271
  -
272
272
  - "="
273
273
  - !ruby/object:Gem::Version
274
- version: 1.2.4
274
+ version: 1.2.5
275
275
  version: