rails-routes-js-utils 1.1.4 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@ module Rails
2
2
  module Routes
3
3
  module Js
4
4
  module Utils
5
- VERSION = "1.1.4"
5
+ VERSION = "1.2.0"
6
6
  end
7
7
  end
8
8
  end
@@ -46,8 +46,12 @@ module Rails
46
46
 
47
47
  js = [];
48
48
  dig(route.path.spec,js)
49
+ compiled_verb = route.verb.to_javascript
50
+ if compiled_verb == '//'
51
+ compiled_verb = '/.*/'
52
+ end
49
53
  if route.name
50
- "addRouteToEnv({name: '#{route.name}', path: #{compiled_regex}, subdomain: #{subdomain_regex} , reqs: #{reqs.to_json}, replace: function(opts) { return #{js.join('+')}; } });"
54
+ "addRouteToEnv({name: '#{route.name}', path: #{compiled_regex}, subdomain: #{subdomain_regex} , reqs: #{reqs.to_json}, replace: function(opts) { return #{js.join('+')}; }, verb: #{compiled_verb} });"
51
55
  end
52
56
  end.join("\n");
53
57
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-routes-js-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.2.0
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: 2012-12-21 00:00:00.000000000 Z
12
+ date: 2013-02-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails