js-routes 0.9.7 → 0.9.8

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: 0679713957b418ac64b8142276b2bb2cf48a900e
4
- data.tar.gz: c2bd638c7208846f489be27cc1e693c10a62d7d8
3
+ metadata.gz: b27e547dc710d8afdc60c2196335c9bfafa2e279
4
+ data.tar.gz: 6dd7e82d07ba8f7326637e9ff37e6db477eea728
5
5
  SHA512:
6
- metadata.gz: 90c22e0cd0bbde579a3357f420debc30c6c945e8de1d75b172e3cdd36e501c495f24c9069979fa6ef0cde11955903cb7f8bbe55a4977304e608ae07fb8b53002
7
- data.tar.gz: 6febf43c926e12c4a61e3bfa4fea545a6cab98ee7da29fb0a74fbaa04821412e981b4f19013677e9156d91702832debcb815b7d7086e4c3ce1e32c9b85b2fb58
6
+ metadata.gz: a886ba634317aba0a1319ea2ba180c5428772d35a7011a03a1b26215d127151fd6253a5935bd685670eab3cb6844d5eef9d1c110d0be2a3d482f14f18bdab9b5
7
+ data.tar.gz: 8624616cd6b8abf666e0a6b1e6e0669bf79f83453e3c2d268de308e75d18aa75a106aa3ba7b371686274b87fa867567c73021f018fe5c5ad3eefcb43f19bac28
data/.gitignore CHANGED
@@ -51,4 +51,6 @@ pkg
51
51
  .ruby-version
52
52
 
53
53
  Gemfile.lock
54
- gemfiles/*.lock
54
+ gemfiles/*.lock
55
+
56
+ .DS_Store
@@ -2,12 +2,14 @@ language: ruby
2
2
  rvm:
3
3
  - 1.9.3
4
4
  - 2.0.0
5
+ - 2.1.2
5
6
  - jruby-19mode
6
7
  - ruby-head
7
8
  - jruby-head
8
9
  gemfile:
9
10
  - gemfiles/rails32.gemfile
10
11
  - gemfiles/rails40.gemfile
12
+ - gemfiles/rails41.gemfile
11
13
  notifications:
12
14
  email:
13
15
  - agresso@gmail.com
data/Appraisals CHANGED
@@ -1,9 +1,14 @@
1
1
  appraise "rails32" do
2
- gem "railties", "~> 3.2.16"
2
+ gem "railties", "~> 3.2.18"
3
3
  gem 'tzinfo'
4
4
  end
5
5
 
6
6
  appraise "rails40" do
7
- gem "railties", "~> 4.0.2"
7
+ gem "railties", "~> 4.0.5"
8
8
  gem "minitest", "~> 4.0"
9
9
  end
10
+
11
+ appraise "rails41" do
12
+ gem "railties", "~> 4.1.1"
13
+ gem "minitest", ">= 4.0"
14
+ end
data/Readme.md CHANGED
@@ -44,8 +44,8 @@ end
44
44
  Available options:
45
45
 
46
46
  * `default_url_options` - default parameters to be used to generate url
47
- * Note that currently only optional parameters (like `:format`) can be defaulted.
48
- * Example: {:format => "json"}
47
+ * Note that currently only optional parameters (like `:format` or `:trailing_slash`) can be defaulted.
48
+ * Example: {:format => "json", :trailing_slash => true}
49
49
  * Default: {}
50
50
  * `exclude` - Array of regexps to exclude from js routes.
51
51
  * Default: []
@@ -67,9 +67,32 @@ Available options:
67
67
 
68
68
  ### Very Advanced Setup
69
69
 
70
- In case you need multiple route files for different parts of your application, you can not use asset pipeline.
70
+ In case you need multiple route files for different parts of your application, you have to create the files manually.
71
+ If your application has an `admin` and an `application` namespace for example:
71
72
 
72
- You need to generate routes files on the application side like this:
73
+ ```
74
+ # app/assets/javascripts/admin/routes.js.erb
75
+ <%= JsRoutes.generate(namespace: "AdminRoutes", include: /admin/) %>
76
+
77
+ # app/assets/javascripts/admin.js.coffee
78
+ #= require admin/routes
79
+ ```
80
+
81
+ ```
82
+ # app/assets/javascripts/application/routes.js.erb
83
+ <%= JsRoutes.generate(namespace: "AppRoutes", exclude: /admin/) %>
84
+
85
+ # app/assets/javascripts/application.js.coffee
86
+ #= require application/routes
87
+ ```
88
+
89
+ In order to generate the routes to a string:
90
+
91
+ ```ruby
92
+ routes_js = JsRoutes.generate(options)
93
+ ```
94
+
95
+ If you want to generate the routes files outside of the asset pipeline, you can use `JsRoutes.generate!`:
73
96
 
74
97
  ``` ruby
75
98
  path = "app/assets/javascripts"
@@ -78,13 +101,6 @@ JsRoutes.generate!("#{path}/adm_routes.js", :namespace => "AdmRoutes", :include
78
101
  JsRoutes.generate!("#{path}/api_routes.js", :namespace => "ApiRoutes", :include => /^api_/, :default_url_options => {:format => "json"})
79
102
  ```
80
103
 
81
- In order to generate javascript to string and manipulate them yourself use:
82
- Like:
83
-
84
- ``` ruby
85
- routes_js = JsRoutes.generate(options)
86
- ```
87
-
88
104
  ## Usage
89
105
 
90
106
  Configuration above will create a nice javascript file with `Routes` object that has all the rails routes available:
@@ -127,6 +143,18 @@ When using Spork and `Spork.trap_method(Rails::Application::RoutesReloader, :rel
127
143
  Spork.trap_method(JsRoutes, :generate!)
128
144
  ```
129
145
 
146
+ ## JS-Routes and heroku
147
+
148
+ Heroku environment has a specific problems with setup. It is impossible to use asset pipeline in this environtment. You should use "Very Advanced Setup" schema in this case.
149
+
150
+ For example create routes.js.erb in assets folder with needed content:
151
+
152
+ ``` erb
153
+ <%= JsRoutes.generate({ options }) %>
154
+ ```
155
+
156
+ This should just work.
157
+
130
158
  ## Advantages over alternatives
131
159
 
132
160
  There are some alternatives available. Most of them has only basic feature and don't reach the level of quality I accept.
@@ -2,7 +2,7 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "railties", "~> 3.2.16"
5
+ gem "railties", "~> 3.2.18"
6
6
  gem "tzinfo"
7
7
 
8
8
  gemspec :path=>"../"
@@ -2,8 +2,7 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "railties", "~> 4.0.2"
6
- gem "tzinfo"
5
+ gem "railties", "~> 4.0.5"
7
6
  gem "minitest", "~> 4.0"
8
7
 
9
8
  gemspec :path=>"../"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "railties", "~> 4.1.1"
6
+ gem "minitest", ">= 4.0"
7
+
8
+ gemspec :path=>"../"
@@ -201,7 +201,7 @@ class JsRoutes
201
201
  result = serialize_spec(spec, parent_spec)
202
202
  if parent_spec && result[1].is_a?(String)
203
203
  result = [
204
- # We encode node symbols as integer
204
+ # We encode node symbols as integer
205
205
  # to reduce the routes.js file size
206
206
  NODE_TYPES[:CAT],
207
207
  serialize_spec(parent_spec),
@@ -1,3 +1,3 @@
1
1
  class JsRoutes
2
- VERSION = "0.9.7"
2
+ VERSION = "0.9.8"
3
3
  end
@@ -1,7 +1,9 @@
1
1
  (function() {
2
- var NodeTypes, ParameterMissing, Utils, defaults,
2
+ var NodeTypes, ParameterMissing, Utils, createGlobalJsRoutesObject, defaults, root,
3
3
  __hasProp = {}.hasOwnProperty;
4
4
 
5
+ root = typeof exports !== "undefined" && exports !== null ? exports : this;
6
+
5
7
  ParameterMissing = function(message) {
6
8
  this.message = message;
7
9
  };
@@ -28,8 +30,8 @@
28
30
  if (!prefix && !(this.get_object_type(object) === "object")) {
29
31
  throw new Error("Url parameters should be a javascript hash");
30
32
  }
31
- if (window.jQuery) {
32
- result = window.jQuery.param(object);
33
+ if (root.jQuery) {
34
+ result = root.jQuery.param(object);
33
35
  return (!result ? "" : result);
34
36
  }
35
37
  s = [];
@@ -93,6 +95,19 @@
93
95
  }
94
96
  return anchor;
95
97
  },
98
+ extract_trailing_slash: function(options) {
99
+ var trailing_slash;
100
+
101
+ trailing_slash = false;
102
+ if (defaults.default_url_options.hasOwnProperty("trailing_slash")) {
103
+ trailing_slash = defaults.default_url_options.trailing_slash;
104
+ }
105
+ if (options.hasOwnProperty("trailing_slash")) {
106
+ trailing_slash = options.trailing_slash;
107
+ delete options.trailing_slash;
108
+ }
109
+ return trailing_slash;
110
+ },
96
111
  extract_options: function(number_of_params, args) {
97
112
  var last_el;
98
113
 
@@ -157,7 +172,7 @@
157
172
  return result;
158
173
  },
159
174
  build_path: function(required_parameters, optional_parts, route, args) {
160
- var anchor, opts, parameters, result, url, url_params;
175
+ var anchor, opts, parameters, result, trailing_slash, url, url_params;
161
176
 
162
177
  args = Array.prototype.slice.call(args);
163
178
  opts = this.extract_options(required_parameters.length, args);
@@ -167,8 +182,12 @@
167
182
  parameters = this.prepare_parameters(required_parameters, args, opts);
168
183
  this.set_default_url_options(optional_parts, parameters);
169
184
  anchor = this.extract_anchor(parameters);
185
+ trailing_slash = this.extract_trailing_slash(parameters);
170
186
  result = "" + (this.get_prefix()) + (this.visit(route, parameters));
171
187
  url = Utils.clean_path("" + result);
188
+ if (trailing_slash === true) {
189
+ url = url.replace(/(.*?)[\/]?$/, "$1/");
190
+ }
172
191
  if ((url_params = this.serialize(parameters)).length) {
173
192
  url += "?" + url_params;
174
193
  }
@@ -260,8 +279,8 @@
260
279
  return this._classToTypeCache;
261
280
  },
262
281
  get_object_type: function(obj) {
263
- if (window.jQuery && (window.jQuery.type != null)) {
264
- return window.jQuery.type(obj);
282
+ if (root.jQuery && (root.jQuery.type != null)) {
283
+ return root.jQuery.type(obj);
265
284
  }
266
285
  if (obj == null) {
267
286
  return "" + obj;
@@ -271,8 +290,13 @@
271
290
  } else {
272
291
  return typeof obj;
273
292
  }
274
- },
275
- namespace: function(root, namespaceString) {
293
+ }
294
+ };
295
+
296
+ createGlobalJsRoutesObject = function() {
297
+ var namespace;
298
+
299
+ namespace = function(mainRoot, namespaceString) {
276
300
  var current, parts;
277
301
 
278
302
  parts = (namespaceString ? namespaceString.split(".") : []);
@@ -280,15 +304,21 @@
280
304
  return;
281
305
  }
282
306
  current = parts.shift();
283
- root[current] = root[current] || {};
284
- return Utils.namespace(root[current], parts.join("."));
285
- }
307
+ mainRoot[current] = mainRoot[current] || {};
308
+ return namespace(mainRoot[current], parts.join("."));
309
+ };
310
+ namespace(root, "NAMESPACE");
311
+ root.NAMESPACE = ROUTES;
312
+ root.NAMESPACE.options = defaults;
313
+ return root.NAMESPACE;
286
314
  };
287
315
 
288
- Utils.namespace(window, "NAMESPACE");
289
-
290
- window.NAMESPACE = ROUTES;
291
-
292
- window.NAMESPACE.options = defaults;
316
+ if (typeof define === "function" && define.amd) {
317
+ define([], function() {
318
+ return createGlobalJsRoutesObject();
319
+ });
320
+ } else {
321
+ createGlobalJsRoutesObject();
322
+ }
293
323
 
294
324
  }).call(this);
@@ -1,3 +1,6 @@
1
+ # root is this
2
+ root = (exports ? this)
3
+
1
4
  ParameterMissing = (@message) -> #
2
5
  ParameterMissing:: = new Error()
3
6
  defaults =
@@ -13,8 +16,8 @@ Utils =
13
16
  if !prefix and !(@get_object_type(object) is "object")
14
17
  throw new Error("Url parameters should be a javascript hash")
15
18
 
16
- if window.jQuery
17
- result = window.jQuery.param(object)
19
+ if root.jQuery
20
+ result = root.jQuery.param(object)
18
21
  return (if not result then "" else result)
19
22
 
20
23
  s = []
@@ -50,6 +53,15 @@ Utils =
50
53
  delete options.anchor
51
54
  anchor
52
55
 
56
+ extract_trailing_slash: (options) ->
57
+ trailing_slash = false
58
+ if defaults.default_url_options.hasOwnProperty("trailing_slash")
59
+ trailing_slash = defaults.default_url_options.trailing_slash
60
+ if options.hasOwnProperty("trailing_slash")
61
+ trailing_slash = options.trailing_slash
62
+ delete options.trailing_slash
63
+ trailing_slash
64
+
53
65
  extract_options: (number_of_params, args) ->
54
66
  last_el = args[args.length - 1]
55
67
  if args.length > number_of_params or (last_el? and "object" is @get_object_type(last_el) and !@look_like_serialized_model(last_el))
@@ -98,11 +110,18 @@ Utils =
98
110
  throw new Error("Too many parameters provided for path")
99
111
  parameters = @prepare_parameters(required_parameters, args, opts)
100
112
  @set_default_url_options optional_parts, parameters
113
+ # options
101
114
  anchor = @extract_anchor(parameters)
115
+ trailing_slash = @extract_trailing_slash(parameters)
116
+ # path
102
117
  result = "#{@get_prefix()}#{@visit(route, parameters)}"
103
118
  url = Utils.clean_path("#{result}")
119
+ # set trailing_slash
120
+ url = url.replace(/(.*?)[\/]?$/, "$1/") if trailing_slash is true
121
+ # set additional url params
104
122
  if (url_params = @serialize(parameters)).length
105
123
  url += "?#{url_params}"
124
+ # set anchor
106
125
  url += anchor
107
126
  url
108
127
 
@@ -205,17 +224,28 @@ Utils =
205
224
  @_classToTypeCache["[object #{name}]"] = name.toLowerCase()
206
225
  @_classToTypeCache
207
226
  get_object_type: (obj) ->
208
- return window.jQuery.type(obj) if window.jQuery and window.jQuery.type?
227
+ return root.jQuery.type(obj) if root.jQuery and root.jQuery.type?
209
228
  return "#{obj}" unless obj?
210
229
  (if typeof obj is "object" or typeof obj is "function" then @_classToType()[Object::toString.call(obj)] or "object" else typeof obj)
211
230
 
212
- namespace: (root, namespaceString) ->
231
+ # globalJsObject
232
+ createGlobalJsRoutesObject = ->
233
+ # namespace function, private
234
+ namespace = (mainRoot, namespaceString) ->
213
235
  parts = (if namespaceString then namespaceString.split(".") else [])
214
236
  return unless parts.length
215
237
  current = parts.shift()
216
- root[current] = root[current] or {}
217
- Utils.namespace root[current], parts.join(".")
218
-
219
- Utils.namespace window, "NAMESPACE"
220
- window.NAMESPACE = ROUTES
221
- window.NAMESPACE.options = defaults
238
+ mainRoot[current] = mainRoot[current] or {}
239
+ namespace mainRoot[current], parts.join(".")
240
+ # object
241
+ namespace(root, "NAMESPACE")
242
+ root.NAMESPACE = ROUTES
243
+ root.NAMESPACE.options = defaults
244
+ root.NAMESPACE
245
+ # Set up Routes appropriately for the environment.
246
+ if typeof define is "function" and define.amd
247
+ # AMD
248
+ define [], -> createGlobalJsRoutesObject()
249
+ else
250
+ # Browser globals
251
+ createGlobalJsRoutesObject()
@@ -0,0 +1,42 @@
1
+ require "spec_helper"
2
+
3
+ describe JsRoutes, "compatibility with AMD/require.js" do
4
+
5
+ before(:each) do
6
+ evaljs("window.GlobalCheck = {};")
7
+ evaljs("window.define = function (requirs, callback) { window.GlobalCheck['js-routes'] = callback.call(this); return window.GlobalCheck['js-routes']; };")
8
+ evaljs("window.define.amd = { jQuery: true };")
9
+ strRequire =<<EOF
10
+ window.require = function (r, callback) {
11
+ var allArgs, i;
12
+
13
+ allArgs = (function() {
14
+ var _i, _len, _results;
15
+ _results = [];
16
+ for (_i = 0, _len = r.length; _i < _len; _i++) {
17
+ i = r[_i];
18
+ _results.push(window.GlobalCheck[i]);
19
+ }
20
+ return _results;
21
+ })();
22
+
23
+ return callback.apply(null, allArgs);
24
+ };
25
+ EOF
26
+ evaljs(strRequire)
27
+ evaljs(JsRoutes.generate({}))
28
+ end
29
+
30
+ it "should working from global scope" do
31
+ expect(evaljs("Routes.inboxes_path()")).to eq(routes.inboxes_path())
32
+ end
33
+
34
+ it "should working from define function" do
35
+ expect(evaljs("Routes.inboxes_path()")).to eq(evaljs("GlobalCheck['js-routes'].inboxes_path()"))
36
+ end
37
+
38
+ it "should working from require" do
39
+ expect(evaljs("require(['js-routes'], function(r){ return r.inboxes_path(); })")).to eq(routes.inboxes_path())
40
+ end
41
+
42
+ end
@@ -157,6 +157,41 @@ describe JsRoutes, "options" do
157
157
  end
158
158
  end
159
159
 
160
+ describe "trailing_slash" do
161
+ context "with default option" do
162
+ let(:_options) { Hash.new }
163
+ it "should working in params" do
164
+ expect(evaljs("Routes.inbox_path(1, {trailing_slash: true})")).to eq(routes.inbox_path(1, :trailing_slash => true))
165
+ end
166
+
167
+ it "should working with additional params" do
168
+ expect(evaljs("Routes.inbox_path(1, {trailing_slash: true, test: 'params'})")).to eq(routes.inbox_path(1, :trailing_slash => true, :test => 'params'))
169
+ end
170
+ end
171
+
172
+ context "with default_url_options option" do
173
+ let(:_options) { {:default_url_options => {:trailing_slash => true}} }
174
+ it "should working" do
175
+ expect(evaljs("Routes.inbox_path(1, {test: 'params'})")).to eq(routes.inbox_path(1, :trailing_slash => true, :test => 'params'))
176
+ end
177
+
178
+ it "should remove it by params" do
179
+ expect(evaljs("Routes.inbox_path(1, {trailing_slash: false})")).to eq(routes.inbox_path(1))
180
+ end
181
+ end
182
+
183
+ context "with disabled default_url_options option" do
184
+ let(:_options) { {:default_url_options => {:trailing_slash => false}} }
185
+ it "should not use trailing_slash" do
186
+ expect(evaljs("Routes.inbox_path(1, {test: 'params'})")).to eq(routes.inbox_path(1, :test => 'params'))
187
+ end
188
+
189
+ it "should use it by params" do
190
+ expect(evaljs("Routes.inbox_path(1, {trailing_slash: true})")).to eq(routes.inbox_path(1, :trailing_slash => true))
191
+ end
192
+ end
193
+ end
194
+
160
195
  describe "camel_case" do
161
196
  context "with default option" do
162
197
  let(:_options) { Hash.new }
@@ -42,6 +42,10 @@ describe JsRoutes, "compatibility with Rails" do
42
42
  expect(evaljs("Routes.object_path(1, 2)")).to eq(routes.object_path(1,2))
43
43
  end
44
44
 
45
+ it "should support routes with trailing_slash" do
46
+ expect(evaljs("Routes.inbox_path(1, {trailing_slash: true})")).to eq(routes.inbox_path(1, trailing_slash: true))
47
+ end
48
+
45
49
  it "should support url anchor given as parameter" do
46
50
  expect(evaljs("Routes.inbox_path(1, {anchor: 'hello'})")).to eq(routes.inbox_path(1, :anchor => "hello"))
47
51
  end
@@ -60,7 +60,7 @@ describe "after Rails initialization" do
60
60
  Rails.application.config.assets.initialize_on_precompile = true
61
61
  end
62
62
  it "should render some javascript" do
63
- expect(ctx.evaluate('js-routes.js')).to match(/window\.Routes/)
63
+ expect(ctx.evaluate('js-routes.js')).to match(/root\.Routes/)
64
64
  end
65
65
  end
66
66
  context "and not initialize on precompile" do
@@ -71,7 +71,7 @@ describe "after Rails initialization" do
71
71
  if 3 == Rails::VERSION::MAJOR
72
72
  expect { ctx.evaluate('js-routes.js') }.to raise_error(/Cannot precompile/)
73
73
  else
74
- expect(ctx.evaluate('js-routes.js')).to match(/window\.Routes/)
74
+ expect(ctx.evaluate('js-routes.js')).to match(/root\.Routes/)
75
75
  end
76
76
  end
77
77
  end
@@ -7,6 +7,9 @@ require 'rails/all'
7
7
  require 'js-routes'
8
8
  require "active_support/core_ext/hash/slice"
9
9
  require 'coffee-script'
10
+ # fix ends_with? error for rails 3.2
11
+ require 'active_support/core_ext/string/starts_ends_with' if 3 == Rails::VERSION::MAJOR
12
+
10
13
  if defined?(JRUBY_VERSION)
11
14
  require 'rhino'
12
15
  JS_LIB_CLASS = Rhino
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: js-routes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.7
4
+ version: 0.9.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bogdan Gusiev
@@ -14,126 +14,112 @@ dependencies:
14
14
  name: railties
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: sprockets-rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
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
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: 2.14.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 2.14.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: 1.1.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: 1.1.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: guard
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: guard-coffeescript
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: appraisal
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: 0.5.2
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: 0.5.2
111
- - !ruby/object:Gem::Dependency
112
- name: debugger
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - '>='
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - '>='
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
111
  - !ruby/object:Gem::Dependency
126
112
  name: therubyracer
127
113
  requirement: !ruby/object:Gem::Requirement
128
114
  requirements:
129
- - - '>='
115
+ - - ">="
130
116
  - !ruby/object:Gem::Version
131
117
  version: '0'
132
118
  type: :development
133
119
  prerelease: false
134
120
  version_requirements: !ruby/object:Gem::Requirement
135
121
  requirements:
136
- - - '>='
122
+ - - ">="
137
123
  - !ruby/object:Gem::Version
138
124
  version: '0'
139
125
  description: Generates javascript file that defines all Rails named routes as javascript
@@ -144,10 +130,10 @@ extensions: []
144
130
  extra_rdoc_files:
145
131
  - LICENSE.txt
146
132
  files:
147
- - .document
148
- - .gitignore
149
- - .rspec
150
- - .travis.yml
133
+ - ".document"
134
+ - ".gitignore"
135
+ - ".rspec"
136
+ - ".travis.yml"
151
137
  - Appraisals
152
138
  - Gemfile
153
139
  - Guardfile
@@ -157,6 +143,7 @@ files:
157
143
  - app/assets/javascripts/js-routes.js.erb
158
144
  - gemfiles/rails32.gemfile
159
145
  - gemfiles/rails40.gemfile
146
+ - gemfiles/rails41.gemfile
160
147
  - js-routes.gemspec
161
148
  - lib/js-routes.rb
162
149
  - lib/js_routes.rb
@@ -166,6 +153,7 @@ files:
166
153
  - lib/routes.js.coffee
167
154
  - lib/tasks/js_routes.rake
168
155
  - spec/config/routes.rb
156
+ - spec/js_routes/amd_compatibility_spec.rb
169
157
  - spec/js_routes/generated_javascript_spec.rb
170
158
  - spec/js_routes/options_spec.rb
171
159
  - spec/js_routes/rails_routes_compatibility_spec.rb
@@ -182,17 +170,17 @@ require_paths:
182
170
  - lib
183
171
  required_ruby_version: !ruby/object:Gem::Requirement
184
172
  requirements:
185
- - - '>='
173
+ - - ">="
186
174
  - !ruby/object:Gem::Version
187
175
  version: '0'
188
176
  required_rubygems_version: !ruby/object:Gem::Requirement
189
177
  requirements:
190
- - - '>='
178
+ - - ">="
191
179
  - !ruby/object:Gem::Version
192
180
  version: '0'
193
181
  requirements: []
194
182
  rubyforge_project:
195
- rubygems_version: 2.1.10
183
+ rubygems_version: 2.2.2
196
184
  signing_key:
197
185
  specification_version: 4
198
186
  summary: Brings Rails named routes to javascript