jquery-historyjs 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,27 +3,21 @@ require 'rails'
3
3
  module Historyjs
4
4
  module Generators
5
5
  class InstallGenerator < ::Rails::Generators::Base
6
- desc "This generator installs HistoryJS #{Historyjs::Rails::HISTORYJS_VERSION}, JSON2, and Amplify Store #{Historyjs::Rails::AMPLIFY_STORE_VERSION}"
6
+ desc "This generator installs HistoryJS #{Historyjs::Rails::HISTORYJS_VERSION} and JSON2"
7
7
  source_root File.expand_path('../../../../../vendor/assets/javascripts', __FILE__)
8
8
 
9
9
  def copy_historyjs
10
10
  say_status("copying", "History.js (#{Historyjs::Rails::HISTORYJS_VERSION})", :green)
11
11
 
12
12
  copy_file "history_core.js", "public/javascripts/history.js"
13
- copy_file "history.html4.js", "public/javascripts/history.html4.js"
14
- copy_file "history.adapter.jquery.js", "public/javascripts/history.adapter.jquery.js"
13
+ copy_file "history_html4.js", "public/javascripts/history.html4.js"
14
+ copy_file "history_adapter_jquery.js", "public/javascripts/history.adapter.jquery.js"
15
15
  end
16
16
 
17
17
  def copy_json2
18
18
  say_status("copying", "JSON2 (#{Historyjs::Rails::JSON2_VERSION})", :green)
19
19
  copy_file "json2.js", "public/javascripts/json2.js"
20
20
  end
21
-
22
- def copy_amplify_store
23
- say_status("copying", "Amplify Store (#{Historyjs::Rails::AMPLIFY_STORE_VERSION[0..5]})", :green)
24
- copy_file "amplify_store.js", "public/javascripts/amplify.store.js"
25
- end
26
-
27
21
  end
28
22
  end
29
- end if ::Rails.version < "3.1"
23
+ end if ::Rails.version < "3.1" || !::Rails.application.config.assets.enabled
@@ -1,7 +1,7 @@
1
1
  module Historyjs
2
2
  module Rails
3
- VERSION = "0.2.2"
3
+ VERSION = "0.2.3"
4
4
  HISTORYJS_VERSION = "1.7.1-r2"
5
- JSON2_VERSION = "8e0b15cb492f63067a88"
5
+ JSON2_VERSION = "47a9882cdd"
6
6
  end
7
7
  end
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  http://www.JSON.org/json2.js
3
- 2011-02-23
3
+ 2011-10-19
4
4
 
5
5
  Public Domain.
6
6
 
@@ -146,7 +146,7 @@
146
146
  redistribute.
147
147
  */
148
148
 
149
- /*jslint evil: true, strict: false, regexp: false */
149
+ /*jslint evil: true, regexp: true */
150
150
 
151
151
  /*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
152
152
  call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
@@ -165,7 +165,7 @@ if (!JSON) {
165
165
  }
166
166
 
167
167
  (function () {
168
- "use strict";
168
+ 'use strict';
169
169
 
170
170
  function f(n) {
171
171
  // Format integers to have at least two digits.
@@ -176,13 +176,14 @@ if (!JSON) {
176
176
 
177
177
  Date.prototype.toJSON = function (key) {
178
178
 
179
- return isFinite(this.valueOf()) ?
180
- this.getUTCFullYear() + '-' +
181
- f(this.getUTCMonth() + 1) + '-' +
182
- f(this.getUTCDate()) + 'T' +
183
- f(this.getUTCHours()) + ':' +
184
- f(this.getUTCMinutes()) + ':' +
185
- f(this.getUTCSeconds()) + 'Z' : null;
179
+ return isFinite(this.valueOf())
180
+ ? this.getUTCFullYear() + '-' +
181
+ f(this.getUTCMonth() + 1) + '-' +
182
+ f(this.getUTCDate()) + 'T' +
183
+ f(this.getUTCHours()) + ':' +
184
+ f(this.getUTCMinutes()) + ':' +
185
+ f(this.getUTCSeconds()) + 'Z'
186
+ : null;
186
187
  };
187
188
 
188
189
  String.prototype.toJSON =
@@ -218,8 +219,9 @@ if (!JSON) {
218
219
  escapable.lastIndex = 0;
219
220
  return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
220
221
  var c = meta[a];
221
- return typeof c === 'string' ? c :
222
- '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
222
+ return typeof c === 'string'
223
+ ? c
224
+ : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
223
225
  }) + '"' : '"' + string + '"';
224
226
  }
225
227
 
@@ -303,9 +305,11 @@ if (!JSON) {
303
305
  // Join all of the elements together, separated with commas, and wrap them in
304
306
  // brackets.
305
307
 
306
- v = partial.length === 0 ? '[]' : gap ?
307
- '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' :
308
- '[' + partial.join(',') + ']';
308
+ v = partial.length === 0
309
+ ? '[]'
310
+ : gap
311
+ ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']'
312
+ : '[' + partial.join(',') + ']';
309
313
  gap = mind;
310
314
  return v;
311
315
  }
@@ -340,9 +344,11 @@ if (!JSON) {
340
344
  // Join all of the member texts together, separated with commas,
341
345
  // and wrap them in braces.
342
346
 
343
- v = partial.length === 0 ? '{}' : gap ?
344
- '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' :
345
- '{' + partial.join(',') + '}';
347
+ v = partial.length === 0
348
+ ? '{}'
349
+ : gap
350
+ ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}'
351
+ : '{' + partial.join(',') + '}';
346
352
  gap = mind;
347
353
  return v;
348
354
  }
@@ -468,8 +474,9 @@ if (!JSON) {
468
474
  // In the optional fourth stage, we recursively walk the new structure, passing
469
475
  // each name/value pair to a reviver function for possible transformation.
470
476
 
471
- return typeof reviver === 'function' ?
472
- walk({'': j}, '') : j;
477
+ return typeof reviver === 'function'
478
+ ? walk({'': j}, '')
479
+ : j;
473
480
  }
474
481
 
475
482
  // If the text is not JSON parseable, then a SyntaxError is thrown.
@@ -477,4 +484,4 @@ if (!JSON) {
477
484
  throw new SyntaxError('JSON.parse');
478
485
  };
479
486
  }
480
- }());
487
+ }());
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jquery-historyjs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-06 00:00:00.000000000 Z
12
+ date: 2012-03-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
16
- requirement: &70133267709340 !ruby/object:Gem::Requirement
16
+ requirement: &70137982107680 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70133267709340
24
+ version_requirements: *70137982107680
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: thor
27
- requirement: &70133267720160 !ruby/object:Gem::Requirement
27
+ requirement: &70137982117720 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0.14'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70133267720160
35
+ version_requirements: *70137982117720
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: bundler
38
- requirement: &70133267717140 !ruby/object:Gem::Requirement
38
+ requirement: &70137982114440 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: 1.0.0
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70133267717140
46
+ version_requirements: *70137982114440
47
47
  description: This gem provides History.js and the related HTML4 dependencies for using
48
48
  History.js with jQuery in your Rails 3+ application.
49
49
  email:
@@ -85,7 +85,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
85
85
  version: '0'
86
86
  segments:
87
87
  - 0
88
- hash: -3126758407894072590
88
+ hash: -3263187480763743088
89
89
  required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  none: false
91
91
  requirements: