Hello community,

here is the log from the commit of package rubygem-js-routes for 
openSUSE:Factory checked in at 2017-03-21 22:50:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-js-routes (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-js-routes.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-js-routes"

Tue Mar 21 22:50:02 2017 rev:14 rq:479663 version:1.3.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-js-routes/rubygem-js-routes.changes      
2016-12-29 22:45:17.788359429 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-js-routes.new/rubygem-js-routes.changes 
2017-03-21 22:50:10.257507983 +0100
@@ -1,0 +2,6 @@
+Wed Mar  1 05:40:51 UTC 2017 - co...@suse.com
+
+- updated to version 1.3.3
+ see installed CHANGELOG.md
+
+-------------------------------------------------------------------

Old:
----
  js-routes-1.3.2.gem

New:
----
  js-routes-1.3.3.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-js-routes.spec ++++++
--- /var/tmp/diff_new_pack.yoGRgv/_old  2017-03-21 22:50:12.045255246 +0100
+++ /var/tmp/diff_new_pack.yoGRgv/_new  2017-03-21 22:50:12.053254115 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-js-routes
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-js-routes
-Version:        1.3.2
+Version:        1.3.3
 Release:        0
 %define mod_name js-routes
 %define mod_full_name %{mod_name}-%{version}

++++++ js-routes-1.3.2.gem -> js-routes-1.3.3.gem ++++++
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gemfiles/rails42.gemfile new/gemfiles/rails42.gemfile
--- old/gemfiles/rails42.gemfile        2016-12-01 14:29:31.000000000 +0100
+++ new/gemfiles/rails42.gemfile        2017-02-28 17:25:03.000000000 +0100
@@ -4,5 +4,6 @@
 
 gem "railties", "~> 4.2.1"
 gem "sprockets", "< 3"
+gem "nokogiri", "< 1.7"
 
 gemspec :path => "../"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gemfiles/rails42_sprockets3.gemfile 
new/gemfiles/rails42_sprockets3.gemfile
--- old/gemfiles/rails42_sprockets3.gemfile     2016-12-01 14:29:31.000000000 
+0100
+++ new/gemfiles/rails42_sprockets3.gemfile     2017-02-28 17:25:03.000000000 
+0100
@@ -4,5 +4,6 @@
 
 gem "railties", "~> 4.2.1"
 gem "sprockets", "~> 3.0"
+gem "nokogiri", "< 1.7"
 
 gemspec :path => "../"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/js-routes.gemspec new/js-routes.gemspec
--- old/js-routes.gemspec       2016-12-01 14:29:31.000000000 +0100
+++ new/js-routes.gemspec       2017-02-28 17:25:03.000000000 +0100
@@ -30,6 +30,7 @@
     s.add_development_dependency(%q<therubyrhino>, [">= 2.0.4"])
   else
     s.add_development_dependency(%q<byebug>)
+    s.add_development_dependency(%q<pry-byebug>)
     s.add_development_dependency(%q<therubyracer>, [">= 0.12.1"])
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/js_routes/version.rb new/lib/js_routes/version.rb
--- old/lib/js_routes/version.rb        2016-12-01 14:29:31.000000000 +0100
+++ new/lib/js_routes/version.rb        2017-02-28 17:25:03.000000000 +0100
@@ -1,3 +1,3 @@
 class JsRoutes
-  VERSION = "1.3.2"
+  VERSION = "1.3.3"
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/js_routes.rb new/lib/js_routes.rb
--- old/lib/js_routes.rb        2016-12-01 14:29:31.000000000 +0100
+++ new/lib/js_routes.rb        2017-02-28 17:25:03.000000000 +0100
@@ -110,9 +110,10 @@
       "NODE_TYPES"          => json(NODE_TYPES),
       "SERIALIZER"          => @options[:serializer] || json(nil),
       "ROUTES"              => js_routes,
-      "SPECIAL_OPTIONS_KEY" => @options[:special_options_key].to_s
+      "SPECIAL_OPTIONS_KEY" => @options[:special_options_key].to_s,
+      "DEPRECATED_BEHAVIOR" => Rails.version < "4",
     }.inject(File.read(File.dirname(__FILE__) + "/routes.js")) do |js, (key, 
value)|
-      js.gsub!(key, value)
+      js.gsub!(key, value.to_s)
     end
   end
 
@@ -216,13 +217,19 @@
   end
 
   def route_js_arguments(route, parent_spec)
-    required_parts = route.required_parts.clone
-    optional_parts = route.parts - required_parts
-    default_parts = route.defaults.select do |part, _|
-      FILTERED_DEFAULT_PARTS.exclude?(part) && URL_OPTIONS.include?(part) || 
required_parts.include?(part)
+    required_parts = route.required_parts
+    parts_table = route.parts.each_with_object({}) do |part, hash|
+      hash[part] = required_parts.include?(part)
+    end
+    default_options = route.defaults.select do |part, _|
+      FILTERED_DEFAULT_PARTS.exclude?(part) && URL_OPTIONS.include?(part) || 
parts_table[part]
     end
     [
-      required_parts, optional_parts, serialize(route.path.spec, parent_spec), 
default_parts
+      # JS objects don't preserve the order of properties which is crucial,
+      # so array is a better choice.
+      parts_table.to_a,
+      default_options,
+      serialize(route.path.spec, parent_spec)
     ].map do |argument|
       json(argument)
     end.join(", ")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/routes.js new/lib/routes.js
--- old/lib/routes.js   2016-12-01 14:29:31.000000000 +0100
+++ new/lib/routes.js   2017-02-28 17:25:03.000000000 +0100
@@ -4,7 +4,7 @@
  */
 
 (function() {
-  var NodeTypes, ParameterMissing, ReservedOptions, SpecialOptionsKey, Utils, 
createGlobalJsRoutesObject, defaults, root,
+  var DeprecatedBehavior, NodeTypes, ParameterMissing, ReservedOptions, 
SpecialOptionsKey, Utils, createGlobalJsRoutesObject, defaults, root,
     hasProp = {}.hasOwnProperty,
     slice = [].slice;
 
@@ -25,6 +25,8 @@
 
   SpecialOptionsKey = "SPECIAL_OPTIONS_KEY";
 
+  DeprecatedBehavior = DEPRECATED_BEHAVIOR;
+
   ReservedOptions = ['anchor', 'trailing_slash', 'host', 'port', 'protocol'];
 
   Utils = {
@@ -170,13 +172,22 @@
         });
       }
     },
-    normalize_options: function(default_parts, required_parameters, 
optional_parts, actual_parameters) {
-      var i, j, key, len, options, result, url_parameters, value;
-      options = this.extract_options(required_parameters.length, 
actual_parameters);
-      if (actual_parameters.length > required_parameters.length) {
+    normalize_options: function(parts, required_parts, default_options, 
actual_parameters) {
+      var i, j, key, len, options, part, parts_options, result, route_parts, 
url_parameters, use_all_parts, value;
+      options = this.extract_options(parts.length, actual_parameters);
+      if (actual_parameters.length > parts.length) {
         throw new Error("Too many parameters provided for path");
       }
-      options = this.merge(defaults.default_url_options, default_parts, 
options);
+      use_all_parts = DeprecatedBehavior || actual_parameters.length > 
required_parts.length;
+      parts_options = {};
+      for (key in options) {
+        if (!hasProp.call(options, key)) continue;
+        use_all_parts = true;
+        if (this.indexOf(parts, key) >= 0) {
+          parts_options[key] = value;
+        }
+      }
+      options = this.merge(defaults.default_url_options, default_options, 
options);
       result = {};
       url_parameters = {};
       result['url_parameters'] = url_parameters;
@@ -189,18 +200,23 @@
           url_parameters[key] = value;
         }
       }
-      for (i = j = 0, len = required_parameters.length; j < len; i = ++j) {
-        value = required_parameters[i];
+      route_parts = use_all_parts ? parts : required_parts;
+      i = 0;
+      for (j = 0, len = route_parts.length; j < len; j++) {
+        part = route_parts[j];
         if (i < actual_parameters.length) {
-          url_parameters[value] = actual_parameters[i];
+          if (!parts_options.hasOwnProperty(part)) {
+            url_parameters[part] = actual_parameters[i];
+            ++i;
+          }
         }
       }
       return result;
     },
-    build_route: function(required_parameters, optional_parts, route, 
default_parts, full_url, args) {
+    build_route: function(parts, required_parts, default_options, route, 
full_url, args) {
       var options, parameters, result, url, url_params;
       args = Array.prototype.slice.call(args);
-      options = this.normalize_options(default_parts, required_parameters, 
optional_parts, args);
+      options = this.normalize_options(parts, required_parts, default_options, 
args);
       parameters = options['url_parameters'];
       result = "" + (this.get_prefix()) + (this.visit(route, parameters));
       url = Utils.clean_path(result);
@@ -313,10 +329,19 @@
       }
       return prefix;
     },
-    route: function(required_parts, optional_parts, route_spec, default_parts, 
full_url) {
-      var path_fn;
+    route: function(parts_table, default_options, route_spec, full_url) {
+      var j, len, part, parts, path_fn, ref, required, required_parts;
+      required_parts = [];
+      parts = [];
+      for (j = 0, len = parts_table.length; j < len; j++) {
+        ref = parts_table[j], part = ref[0], required = ref[1];
+        parts.push(part);
+        if (required) {
+          required_parts.push(part);
+        }
+      }
       path_fn = function() {
-        return Utils.build_route(required_parts, optional_parts, route_spec, 
default_parts, full_url, arguments);
+        return Utils.build_route(parts, required_parts, default_options, 
route_spec, full_url, arguments);
       };
       path_fn.required_params = required_parts;
       path_fn.toString = function() {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/routes.js.coffee new/lib/routes.js.coffee
--- old/lib/routes.js.coffee    2016-12-01 14:29:31.000000000 +0100
+++ new/lib/routes.js.coffee    2017-02-28 17:25:03.000000000 +0100
@@ -13,6 +13,7 @@
 
 NodeTypes = NODE_TYPES
 SpecialOptionsKey = "SPECIAL_OPTIONS_KEY"
+DeprecatedBehavior = DEPRECATED_BEHAVIOR
 
 ReservedOptions = [
   'anchor'
@@ -104,11 +105,21 @@
     if xs?.length > 0
       tap {}, (m) -> m[k] = v for k, v of x for x in xs
 
-  normalize_options: (default_parts, required_parameters, optional_parts, 
actual_parameters) ->
-    options = @extract_options(required_parameters.length, actual_parameters)
-    if actual_parameters.length > required_parameters.length
+  normalize_options: (parts, required_parts, default_options, 
actual_parameters) ->
+    options = @extract_options(parts.length, actual_parameters)
+
+    if actual_parameters.length > parts.length
       throw new Error("Too many parameters provided for path")
-    options = @merge(defaults.default_url_options, default_parts, options)
+
+    use_all_parts = DeprecatedBehavior or actual_parameters.length > 
required_parts.length
+    parts_options = {}
+
+    for own key of options
+      use_all_parts = true
+      if @indexOf(parts, key) >= 0
+        parts_options[key] = value
+
+    options = @merge(defaults.default_url_options, default_options, options)
     result = {}
     url_parameters = {}
     result['url_parameters'] = url_parameters
@@ -118,14 +129,19 @@
       else
         url_parameters[key] = value
 
-    for value, i in required_parameters when i < actual_parameters.length
-      url_parameters[value] = actual_parameters[i]
+    route_parts = if use_all_parts then parts else required_parts
+    i = 0
+    for part in route_parts when i < actual_parameters.length
+      unless parts_options.hasOwnProperty(part)
+        url_parameters[part] = actual_parameters[i]
+        ++i
+
     result
 
-  build_route: (required_parameters, optional_parts, route, default_parts, 
full_url, args) ->
+  build_route: (parts, required_parts, default_options, route, full_url, args) 
->
     args = Array::slice.call(args)
 
-    options = @normalize_options(default_parts, required_parameters, 
optional_parts, args)
+    options = @normalize_options(parts, required_parts, default_options, args)
     parameters = options['url_parameters']
 
     # path
@@ -239,9 +255,15 @@
   #
   # route function: create route path function and add spec to it
   #
-  route: (required_parts, optional_parts, route_spec, default_parts, full_url) 
->
+  route: (parts_table, default_options, route_spec, full_url) ->
+    required_parts = []
+    parts = []
+    for [part, required] in parts_table
+      parts.push(part)
+      required_parts.push(part) if required
+
     path_fn = -> Utils.build_route(
-      required_parts, optional_parts, route_spec, default_parts, full_url, 
arguments
+      parts, required_parts, default_options, route_spec, full_url, arguments
     )
     path_fn.required_params = required_parts
     path_fn.toString = -> Utils.build_path_spec(route_spec)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2016-12-01 14:29:31.000000000 +0100
+++ new/metadata        2017-02-28 17:25:03.000000000 +0100
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: js-routes
 version: !ruby/object:Gem::Version
-  version: 1.3.2
+  version: 1.3.3
 platform: ruby
 authors:
 - Bogdan Gusiev
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2016-12-01 00:00:00.000000000 Z
+date: 2017-02-28 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: railties
@@ -109,6 +109,20 @@
       - !ruby/object:Gem::Version
         version: '0'
 - !ruby/object:Gem::Dependency
+  name: pry-byebug
+  requirement: !ruby/object:Gem::Requirement
+    requirements:
+    - - ">="
+      - !ruby/object:Gem::Version
+        version: '0'
+  type: :development
+  prerelease: false
+  version_requirements: !ruby/object:Gem::Requirement
+    requirements:
+    - - ">="
+      - !ruby/object:Gem::Version
+        version: '0'
+- !ruby/object:Gem::Dependency
   name: therubyracer
   requirement: !ruby/object:Gem::Requirement
     requirements:
@@ -188,7 +202,7 @@
       version: '0'
 requirements: []
 rubyforge_project: 
-rubygems_version: 2.6.7
+rubygems_version: 2.5.1
 signing_key: 
 specification_version: 4
 summary: Brings Rails named routes to javascript
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/js_routes/generated_javascript_spec.rb 
new/spec/js_routes/generated_javascript_spec.rb
--- old/spec/js_routes/generated_javascript_spec.rb     2016-12-01 
14:29:31.000000000 +0100
+++ new/spec/js_routes/generated_javascript_spec.rb     2017-02-28 
17:25:03.000000000 +0100
@@ -25,13 +25,13 @@
       is_expected.to include("inboxes_path: Utils.route(")
     end
     it "should have correct function without arguments signature" do
-      is_expected.to include("inboxes_path: Utils.route([]")
+      is_expected.to include("inboxes_path: Utils.route([[\"format\",false]]")
     end
     it "should have correct function with arguments signature" do
-      is_expected.to include("inbox_message_path: 
Utils.route([\"inbox_id\",\"id\"]")
+      is_expected.to include("inbox_message_path: 
Utils.route([[\"inbox_id\",true],[\"id\",true],[\"format\",false]]")
     end
     it "should have correct function signature with unordered hash" do
-      is_expected.to include("inbox_message_attachment_path: 
Utils.route([\"inbox_id\",\"message_id\",\"id\"]")
+      is_expected.to include("inbox_message_attachment_path: 
Utils.route([[\"inbox_id\",true],[\"message_id\",true],[\"id\",true],[\"format\",false]]")
     end
 
     it "should have correct function comment with options argument" do
@@ -77,7 +77,7 @@
   describe "compiled javascript asset" do
     subject { 
ERB.new(File.read("app/assets/javascripts/js-routes.js.erb")).result(binding) }
     it "should have js routes code" do
-      is_expected.to include("inbox_message_path: 
Utils.route([\"inbox_id\",\"id\"]")
+      is_expected.to include("inbox_message_path: 
Utils.route([[\"inbox_id\",true],[\"id\",true],[\"format\",false]]")
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/js_routes/rails_routes_compatibility_spec.rb 
new/spec/js_routes/rails_routes_compatibility_spec.rb
--- old/spec/js_routes/rails_routes_compatibility_spec.rb       2016-12-01 
14:29:31.000000000 +0100
+++ new/spec/js_routes/rails_routes_compatibility_spec.rb       2017-02-28 
17:25:03.000000000 +0100
@@ -14,6 +14,17 @@
     expect(evaljs("Routes.inbox_path(1)")).to eq(routes.inbox_path(1))
   end
 
+  it "should raise error if required argument is not passed" do
+    expect { evaljs("Routes.thing_path()") }
+      .to raise_error('Route parameter missing: id')
+    expect { evaljs("Routes.search_path()") }
+      .to raise_error('Route parameter missing: q')
+    expect { evaljs("Routes.book_path()") }
+      .to raise_error('Route parameter missing: title')
+    expect { evaljs("Routes.book_title_path()") }
+      .to raise_error('Route parameter missing: title')
+  end
+
   it "should support 0 as a member parameter" do
     expect(evaljs("Routes.inbox_path(0)")).to eq(routes.inbox_path(0))
   end
@@ -59,9 +70,6 @@
     end
 
     it 'should support route default subdomain' do
-      # root inside namespace is broken
-      # https://github.com/rails/rails/pull/23235
-      pending if Rails.version >= '5.0.0' && Rails.version <= "5.0.1"
       expect(evaljs("Routes.backend_root_path()")).to 
eq(routes.backend_root_path)
     end
 
@@ -69,6 +77,10 @@
       expect(evaljs("Routes.api_purchases_path({format: 'xml'})")).to 
eq(routes.api_purchases_path(format: 'xml'))
     end
 
+    it "should support default format override by passing it in args" do
+      expect(evaljs("Routes.api_purchases_path('xml')")).to 
eq(routes.api_purchases_path('xml'))
+    end
+
     it "doesn't apply defaults to path" do
       expect(evaljs("Routes.with_defaults_path()")).to 
eq(routes.with_defaults_path)
     end
@@ -184,11 +196,10 @@
     context "but not including them" do
       it "should not include the optional parts" do
         expect(evaljs("Routes.things_path()")).to eq(routes.things_path)
+        expect(evaljs("Routes.things_path({ q: 'hello' })")).to 
eq(routes.things_path(q: 'hello'))
       end
 
       it "should not require the optional parts as arguments" do
-        #TODO: fix this inconsistence
-        pending
         expect(evaljs("Routes.thing_path(null, 5)")).to 
eq(routes.thing_path(nil, 5))
       end
 
@@ -196,14 +207,60 @@
         expect(evaljs("Routes.thing_path(5, {optional_id: undefined})")).to 
eq(routes.thing_path(5, :optional_id => nil))
       end
 
+      it "should raise error when passing non-full list of arguments and some 
query params" do
+        expect { evaljs("Routes.thing_path(5, {q: 'hello'})") }
+          .to raise_error('Route parameter missing: id')
+      end
+
       it "should treat null as non-given optional part" do
         expect(evaljs("Routes.thing_path(5, {optional_id: null})")).to 
eq(routes.thing_path(5, :optional_id => nil))
       end
+
+      it "should work when passing required params in options" do
+        expect(evaljs("Routes.thing_deep_path({second_required: 1, 
third_required: 2})")).to eq(routes.thing_deep_path(second_required: 1, 
third_required: 2))
+      end
+
+      it "should skip leading and trailing optional parts" do
+        skip if Rails.version < '4'
+        expect(evaljs("Routes.thing_deep_path(1, 2)")).to 
eq(routes.thing_deep_path(1, 2))
+      end
     end
 
     context "and including them" do
+      if Rails.version < '4'
+        it "should fail when insufficient arguments are given" do
+          expect { evaljs("Routes.thing_deep_path(1)")}
+            .to raise_error('Route parameter missing: second_required')
+          expect { evaljs("Routes.thing_deep_path(1,2)")}
+            .to raise_error('Route parameter missing: third_required')
+        end
+      end
+
       it "should include the optional parts" do
         expect(evaljs("Routes.things_path({optional_id: 5})")).to 
eq(routes.things_path(:optional_id => 5))
+        expect(evaljs("Routes.things_path(5)")).to eq(routes.things_path(5))
+        expect(evaljs("Routes.thing_deep_path(1, { third_required: 3, 
second_required: 2 })")).to eq(routes.thing_deep_path(1, third_required: 3, 
second_required: 2))
+        expect(evaljs("Routes.thing_deep_path(1, { third_required: 3, 
second_required: 2, forth_optional: 4 })")).to eq(routes.thing_deep_path(1, 
third_required: 3, second_required: 2, forth_optional: 4))
+        expect(evaljs("Routes.thing_deep_path(2, { third_required: 3, 
first_optional: 1 })")).to eq(routes.thing_deep_path(2, third_required: 3, 
first_optional: 1))
+        expect(evaljs("Routes.thing_deep_path(3, { first_optional: 1, 
second_required: 2 })")).to eq(routes.thing_deep_path(3, first_optional: 1, 
second_required: 2))
+        expect(evaljs("Routes.thing_deep_path(3, { first_optional: 1, 
second_required: 2, forth_optional: 4 })")).to eq(routes.thing_deep_path(3, 
first_optional: 1, second_required: 2, forth_optional: 4))
+        expect(evaljs("Routes.thing_deep_path(4, { first_optional: 1, 
second_required: 2, third_required: 3 })")).to eq(routes.thing_deep_path(4, 
first_optional: 1, second_required: 2, third_required: 3))
+        expect(evaljs("Routes.thing_deep_path(1, 2, { third_required: 3 
})")).to eq(routes.thing_deep_path(1, 2, third_required: 3))
+        expect(evaljs("Routes.thing_deep_path(1,2, {third_required: 3, q: 
'bogdan'})")).to eq(routes.thing_deep_path(1,2, {third_required: 3, q: 
'bogdan'}))
+        expect(evaljs("Routes.thing_deep_path(1, 2, { forth_optional: 4, 
third_required: 3 })")).to eq(routes.thing_deep_path(1, 2, forth_optional: 4, 
third_required: 3))
+        expect(evaljs("Routes.thing_deep_path(1, 3, { second_required: 2 
})")).to eq(routes.thing_deep_path(1, 3, second_required: 2))
+        expect(evaljs("Routes.thing_deep_path(1, 4, { second_required: 2, 
third_required: 3 })")).to eq(routes.thing_deep_path(1, 4, second_required: 2, 
third_required: 3))
+        expect(evaljs("Routes.thing_deep_path(2, 3, { first_optional: 1 
})")).to eq(routes.thing_deep_path(2, 3, first_optional: 1))
+        expect(evaljs("Routes.thing_deep_path(2, 3, { first_optional: 1, 
forth_optional: 4 })")).to eq(routes.thing_deep_path(2, 3, first_optional: 1, 
forth_optional: 4))
+        expect(evaljs("Routes.thing_deep_path(2, 4, { first_optional: 1, 
third_required: 3 })")).to eq(routes.thing_deep_path(2, 4, first_optional: 1, 
third_required: 3))
+        expect(evaljs("Routes.thing_deep_path(3, 4, { first_optional: 1, 
second_required: 2 })")).to eq(routes.thing_deep_path(3, 4, first_optional: 1, 
second_required: 2))
+        expect(evaljs("Routes.thing_deep_path(1, 2, 3)")).to 
eq(routes.thing_deep_path(1, 2, 3))
+        expect(evaljs("Routes.thing_deep_path(1, 2, 3, { forth_optional: 4 
})")).to eq(routes.thing_deep_path(1, 2, 3, forth_optional: 4))
+        expect(evaljs("Routes.thing_deep_path(1, 2, 4, { third_required: 3 
})")).to eq(routes.thing_deep_path(1, 2, 4, third_required: 3))
+        expect(evaljs("Routes.thing_deep_path(1, 3, 4, { second_required: 2 
})")).to eq(routes.thing_deep_path(1, 3, 4, second_required: 2))
+        expect(evaljs("Routes.thing_deep_path(2, 3, 4, { first_optional: 1 
})")).to eq(routes.thing_deep_path(2, 3, 4, first_optional: 1))
+        expect(evaljs("Routes.thing_deep_path(1, 2, 3, 4)")).to 
eq(routes.thing_deep_path(1, 2, 3, 4))
+
       end
 
       context "on nested optional parts" do
@@ -232,7 +289,7 @@
 
     it "should throw Exceptions if when there is too many parameters" do
       expect {
-        evaljs("Routes.inbox_path(1,2)")
+        evaljs("Routes.inbox_path(1,2,3)")
       }.to raise_error(js_error_class)
     end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/spec_helper.rb new/spec/spec_helper.rb
--- old/spec/spec_helper.rb     2016-12-01 14:29:31.000000000 +0100
+++ new/spec/spec_helper.rb     2017-02-28 17:25:03.000000000 +0100
@@ -104,7 +104,6 @@
           inspectify(v)
         end
       when V8::Object
-        require 'byebug'; byebug
         value.to_h.map do |k,v|
           [k, inspectify(v)]
         end.to_h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/support/routes.rb new/spec/support/routes.rb
--- old/spec/support/routes.rb  2016-12-01 14:29:31.000000000 +0100
+++ new/spec/support/routes.rb  2017-02-28 17:25:03.000000000 +0100
@@ -29,6 +29,9 @@
       resources :things
     end
 
+    get 
"(/sep1/:first_optional)/sep2/:second_required/sep3/:third_required(/:forth_optional)",
+      as: :thing_deep, controller: :things, action: :show
+
     if Rails.version < "5.0.0"
       get "/:controller(/:action(/:id))" => "classic#classic", :as => :classic
     end


Reply via email to