test failure with grape 0.19.2
Opened this issue · 0 comments
pravi commented
We'd like to use grape 0.19.2 in debian as gitlab needs it.
$ bundle exec rake
/usr/bin/ruby2.3 -I/home/pravi/forge/debian/git/pkg-ruby-extras/ruby-grape-route-helpers/vendor/bundle/gems/rspec-core-3.3.1/lib:/home/pravi/forge/debian/git/pkg-ruby-extras/ruby-grape-route-helpers/vendor/bundle/gems/rspec-support-3.3.0/lib /home/pravi/forge/debian/git/pkg-ruby-extras/ruby-grape-route-helpers/vendor/bundle/gems/rspec-core-3.3.1/exe/rspec --pattern spec/\*\*/\*_spec.rb
.......F.......F........F.FFFFFFFFFFF.FF
Failures:
1) GrapeRouteHelpers::DecoratedRoute#helper_names when an API has multiple versions returns the route's helper name for each version
Failure/Error: described_class.new(route)
NoMethodError:
undefined method `scan' for ["beta", "alpha", "v1"]:Array
# ./lib/grape-route-helpers/decorated_route.rb:69:in `route_versions'
# ./lib/grape-route-helpers/decorated_route.rb:33:in `define_path_helpers'
# ./lib/grape-route-helpers/decorated_route.rb:17:in `initialize'
# ./spec/grape_route_helpers/decorated_route_spec.rb:8:in `new'
# ./spec/grape_route_helpers/decorated_route_spec.rb:8:in `block (3 levels) in <top (required)>'
# ./spec/grape_route_helpers/decorated_route_spec.rb:7:in `map'
# ./spec/grape_route_helpers/decorated_route_spec.rb:7:in `block (2 levels) in <top (required)>'
# ./spec/grape_route_helpers/decorated_route_spec.rb:29:in `block (2 levels) in <top (required)>'
# ./spec/grape_route_helpers/decorated_route_spec.rb:75:in `block (4 levels) in <top (required)>'
2) GrapeRouteHelpers::DecoratedRoute#path_helper_name when the path is a catch-all path returns a name without the glob star
Failure/Error: expect(result).to eq('api_v1_path_path')
expected: "api_v1_path_path"
got: "api_v1___path_path"
(compared using ==)
# ./spec/grape_route_helpers/decorated_route_spec.rb:147:in `block (4 levels) in <top (required)>'
3) GrapeRouteHelpers::DecoratedRoute path helper method when a route's API has multiple versions returns a path for each version
Failure/Error: described_class.new(route)
NoMethodError:
undefined method `scan' for ["beta", "alpha", "v1"]:Array
# ./lib/grape-route-helpers/decorated_route.rb:69:in `route_versions'
# ./lib/grape-route-helpers/decorated_route.rb:33:in `define_path_helpers'
# ./lib/grape-route-helpers/decorated_route.rb:17:in `initialize'
# ./spec/grape_route_helpers/decorated_route_spec.rb:8:in `new'
# ./spec/grape_route_helpers/decorated_route_spec.rb:8:in `block (3 levels) in <top (required)>'
# ./spec/grape_route_helpers/decorated_route_spec.rb:7:in `map'
# ./spec/grape_route_helpers/decorated_route_spec.rb:7:in `block (2 levels) in <top (required)>'
# ./spec/grape_route_helpers/decorated_route_spec.rb:29:in `block (2 levels) in <top (required)>'
# ./spec/grape_route_helpers/decorated_route_spec.rb:222:in `block (4 levels) in <top (required)>'
4) GrapeRouteHelpers::NamedRouteMatcher#route_match? when route responds to a method name returns true
Failure/Error: Grape::API.decorated_routes
NoMethodError:
undefined method `scan' for ["beta", "alpha", "v1"]:Array
# ./lib/grape-route-helpers/decorated_route.rb:69:in `route_versions'
# ./lib/grape-route-helpers/decorated_route.rb:33:in `define_path_helpers'
# ./lib/grape-route-helpers/decorated_route.rb:17:in `initialize'
# ./lib/grape-route-helpers/all_routes.rb:8:in `new'
# ./lib/grape-route-helpers/all_routes.rb:8:in `block in decorated_routes'
# ./lib/grape-route-helpers/all_routes.rb:8:in `map'
# ./lib/grape-route-helpers/all_routes.rb:8:in `decorated_routes'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:7:in `block (2 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:11:in `block (2 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:30:in `block (4 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:43:in `block (4 levels) in <top (required)>'
5) GrapeRouteHelpers::NamedRouteMatcher#route_match? when route responds to a method name when segments is not a hash raises an ArgumentError
Failure/Error: expect do
expected ArgumentError, got #<NoMethodError: undefined method `scan' for ["beta", "alpha", "v1"]:Array> with backtrace:
# ./lib/grape-route-helpers/decorated_route.rb:69:in `route_versions'
# ./lib/grape-route-helpers/decorated_route.rb:33:in `define_path_helpers'
# ./lib/grape-route-helpers/decorated_route.rb:17:in `initialize'
# ./lib/grape-route-helpers/all_routes.rb:8:in `new'
# ./lib/grape-route-helpers/all_routes.rb:8:in `block in decorated_routes'
# ./lib/grape-route-helpers/all_routes.rb:8:in `map'
# ./lib/grape-route-helpers/all_routes.rb:8:in `decorated_routes'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:7:in `block (2 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:11:in `block (2 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:30:in `block (4 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:37:in `block (6 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:36:in `block (5 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:36:in `block (5 levels) in <top (required)>'
6) GrapeRouteHelpers::NamedRouteMatcher#route_match? when route responds to a method name when requested segments contains expected options returns true
Failure/Error: Grape::API.decorated_routes
NoMethodError:
undefined method `scan' for ["beta", "alpha", "v1"]:Array
# ./lib/grape-route-helpers/decorated_route.rb:69:in `route_versions'
# ./lib/grape-route-helpers/decorated_route.rb:33:in `define_path_helpers'
# ./lib/grape-route-helpers/decorated_route.rb:17:in `initialize'
# ./lib/grape-route-helpers/all_routes.rb:8:in `new'
# ./lib/grape-route-helpers/all_routes.rb:8:in `block in decorated_routes'
# ./lib/grape-route-helpers/all_routes.rb:8:in `map'
# ./lib/grape-route-helpers/all_routes.rb:8:in `decorated_routes'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:7:in `block (2 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:11:in `block (2 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:30:in `block (4 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:51:in `block (5 levels) in <top (required)>'
7) GrapeRouteHelpers::NamedRouteMatcher#route_match? when route responds to a method name when requested segments contains expected options when no dynamic segments are requested when the route requires dynamic segments returns false
Failure/Error: Grape::API.decorated_routes
NoMethodError:
undefined method `scan' for ["beta", "alpha", "v1"]:Array
# ./lib/grape-route-helpers/decorated_route.rb:69:in `route_versions'
# ./lib/grape-route-helpers/decorated_route.rb:33:in `define_path_helpers'
# ./lib/grape-route-helpers/decorated_route.rb:17:in `initialize'
# ./lib/grape-route-helpers/all_routes.rb:8:in `new'
# ./lib/grape-route-helpers/all_routes.rb:8:in `block in decorated_routes'
# ./lib/grape-route-helpers/all_routes.rb:8:in `map'
# ./lib/grape-route-helpers/all_routes.rb:8:in `decorated_routes'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:7:in `block (2 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:23:in `block (2 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:57:in `block (7 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:61:in `block (7 levels) in <top (required)>'
8) GrapeRouteHelpers::NamedRouteMatcher#route_match? when route responds to a method name when requested segments contains expected options when no dynamic segments are requested when the route does not require dynamic segments returns true
Failure/Error: Grape::API.decorated_routes
NoMethodError:
undefined method `scan' for ["beta", "alpha", "v1"]:Array
# ./lib/grape-route-helpers/decorated_route.rb:69:in `route_versions'
# ./lib/grape-route-helpers/decorated_route.rb:33:in `define_path_helpers'
# ./lib/grape-route-helpers/decorated_route.rb:17:in `initialize'
# ./lib/grape-route-helpers/all_routes.rb:8:in `new'
# ./lib/grape-route-helpers/all_routes.rb:8:in `block in decorated_routes'
# ./lib/grape-route-helpers/all_routes.rb:8:in `map'
# ./lib/grape-route-helpers/all_routes.rb:8:in `decorated_routes'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:7:in `block (2 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:11:in `block (2 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:30:in `block (4 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:68:in `block (7 levels) in <top (required)>'
9) GrapeRouteHelpers::NamedRouteMatcher#route_match? when route responds to a method name when requested segments contains expected options when route requires the requested segments returns true
Failure/Error: Grape::API.decorated_routes
NoMethodError:
undefined method `scan' for ["beta", "alpha", "v1"]:Array
# ./lib/grape-route-helpers/decorated_route.rb:69:in `route_versions'
# ./lib/grape-route-helpers/decorated_route.rb:33:in `define_path_helpers'
# ./lib/grape-route-helpers/decorated_route.rb:17:in `initialize'
# ./lib/grape-route-helpers/all_routes.rb:8:in `new'
# ./lib/grape-route-helpers/all_routes.rb:8:in `block in decorated_routes'
# ./lib/grape-route-helpers/all_routes.rb:8:in `map'
# ./lib/grape-route-helpers/all_routes.rb:8:in `decorated_routes'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:7:in `block (2 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:23:in `block (2 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:75:in `block (6 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:80:in `block (6 levels) in <top (required)>'
10) GrapeRouteHelpers::NamedRouteMatcher#route_match? when route responds to a method name when requested segments contains expected options when route does not require the requested segments returns false
Failure/Error: Grape::API.decorated_routes
NoMethodError:
undefined method `scan' for ["beta", "alpha", "v1"]:Array
# ./lib/grape-route-helpers/decorated_route.rb:69:in `route_versions'
# ./lib/grape-route-helpers/decorated_route.rb:33:in `define_path_helpers'
# ./lib/grape-route-helpers/decorated_route.rb:17:in `initialize'
# ./lib/grape-route-helpers/all_routes.rb:8:in `new'
# ./lib/grape-route-helpers/all_routes.rb:8:in `block in decorated_routes'
# ./lib/grape-route-helpers/all_routes.rb:8:in `map'
# ./lib/grape-route-helpers/all_routes.rb:8:in `decorated_routes'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:7:in `block (2 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:11:in `block (2 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:30:in `block (4 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:89:in `block (6 levels) in <top (required)>'
11) GrapeRouteHelpers::NamedRouteMatcher#route_match? when route responds to a method name when segments contains unexpected options returns false
Failure/Error: Grape::API.decorated_routes
NoMethodError:
undefined method `scan' for ["beta", "alpha", "v1"]:Array
# ./lib/grape-route-helpers/decorated_route.rb:69:in `route_versions'
# ./lib/grape-route-helpers/decorated_route.rb:33:in `define_path_helpers'
# ./lib/grape-route-helpers/decorated_route.rb:17:in `initialize'
# ./lib/grape-route-helpers/all_routes.rb:8:in `new'
# ./lib/grape-route-helpers/all_routes.rb:8:in `block in decorated_routes'
# ./lib/grape-route-helpers/all_routes.rb:8:in `map'
# ./lib/grape-route-helpers/all_routes.rb:8:in `decorated_routes'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:7:in `block (2 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:11:in `block (2 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:30:in `block (4 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:99:in `block (5 levels) in <top (required)>'
12) GrapeRouteHelpers::NamedRouteMatcher#route_match? when route does not respond to a method name returns false
Failure/Error: Grape::API.decorated_routes
NoMethodError:
undefined method `scan' for ["beta", "alpha", "v1"]:Array
# ./lib/grape-route-helpers/decorated_route.rb:69:in `route_versions'
# ./lib/grape-route-helpers/decorated_route.rb:33:in `define_path_helpers'
# ./lib/grape-route-helpers/decorated_route.rb:17:in `initialize'
# ./lib/grape-route-helpers/all_routes.rb:8:in `new'
# ./lib/grape-route-helpers/all_routes.rb:8:in `block in decorated_routes'
# ./lib/grape-route-helpers/all_routes.rb:8:in `map'
# ./lib/grape-route-helpers/all_routes.rb:8:in `decorated_routes'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:7:in `block (2 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:11:in `block (2 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:107:in `block (4 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:111:in `block (4 levels) in <top (required)>'
13) GrapeRouteHelpers::NamedRouteMatcher#method_missing when method name matches a Grape::Route path helper name returns the path for that route object
Failure/Error: path = api_v1_ping_path
NoMethodError:
undefined method `scan' for ["beta", "alpha", "v1"]:Array
# ./lib/grape-route-helpers/decorated_route.rb:69:in `route_versions'
# ./lib/grape-route-helpers/decorated_route.rb:33:in `define_path_helpers'
# ./lib/grape-route-helpers/decorated_route.rb:17:in `initialize'
# ./lib/grape-route-helpers/all_routes.rb:8:in `new'
# ./lib/grape-route-helpers/all_routes.rb:8:in `block in decorated_routes'
# ./lib/grape-route-helpers/all_routes.rb:8:in `map'
# ./lib/grape-route-helpers/all_routes.rb:8:in `decorated_routes'
# ./lib/grape-route-helpers/named_route_matcher.rb:10:in `method_missing'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:120:in `block (4 levels) in <top (required)>'
14) GrapeRouteHelpers::NamedRouteMatcher#method_missing when method name matches a Grape::Route path helper name when argument to the helper is not a hash raises an ArgumentError
Failure/Error: expect do
expected ArgumentError, got #<NoMethodError: undefined method `scan' for ["beta", "alpha", "v1"]:Array> with backtrace:
# ./lib/grape-route-helpers/decorated_route.rb:69:in `route_versions'
# ./lib/grape-route-helpers/decorated_route.rb:33:in `define_path_helpers'
# ./lib/grape-route-helpers/decorated_route.rb:17:in `initialize'
# ./lib/grape-route-helpers/all_routes.rb:8:in `new'
# ./lib/grape-route-helpers/all_routes.rb:8:in `block in decorated_routes'
# ./lib/grape-route-helpers/all_routes.rb:8:in `map'
# ./lib/grape-route-helpers/all_routes.rb:8:in `decorated_routes'
# ./lib/grape-route-helpers/named_route_matcher.rb:10:in `method_missing'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:127:in `block (6 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:126:in `block (5 levels) in <top (required)>'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:126:in `block (5 levels) in <top (required)>'
15) GrapeRouteHelpers::NamedRouteMatcher when Grape::Route objects share the same helper name when helpers require different segments to generate their path uses arguments to infer which route to use
Failure/Error: show_path = api_v1_cats_path('id' => 1)
NoMethodError:
undefined method `scan' for ["beta", "alpha", "v1"]:Array
# ./lib/grape-route-helpers/decorated_route.rb:69:in `route_versions'
# ./lib/grape-route-helpers/decorated_route.rb:33:in `define_path_helpers'
# ./lib/grape-route-helpers/decorated_route.rb:17:in `initialize'
# ./lib/grape-route-helpers/all_routes.rb:8:in `new'
# ./lib/grape-route-helpers/all_routes.rb:8:in `block in decorated_routes'
# ./lib/grape-route-helpers/all_routes.rb:8:in `map'
# ./lib/grape-route-helpers/all_routes.rb:8:in `decorated_routes'
# ./lib/grape-route-helpers/named_route_matcher.rb:10:in `method_missing'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:145:in `block (4 levels) in <top (required)>'
16) GrapeRouteHelpers::NamedRouteMatcher when Grape::Route objects share the same helper name when query params are passed in uses arguments to infer which route to use
Failure/Error: show_path = api_v1_cats_path('id' => 1, params: { 'foo' => 'bar' })
NoMethodError:
undefined method `scan' for ["beta", "alpha", "v1"]:Array
# ./lib/grape-route-helpers/decorated_route.rb:69:in `route_versions'
# ./lib/grape-route-helpers/decorated_route.rb:33:in `define_path_helpers'
# ./lib/grape-route-helpers/decorated_route.rb:17:in `initialize'
# ./lib/grape-route-helpers/all_routes.rb:8:in `new'
# ./lib/grape-route-helpers/all_routes.rb:8:in `block in decorated_routes'
# ./lib/grape-route-helpers/all_routes.rb:8:in `map'
# ./lib/grape-route-helpers/all_routes.rb:8:in `decorated_routes'
# ./lib/grape-route-helpers/named_route_matcher.rb:10:in `method_missing'
# ./spec/grape_route_helpers/named_route_matcher_spec.rb:155:in `block (4 levels) in <top (required)>'
Finished in 0.16183 seconds (files took 0.51 seconds to load)
40 examples, 16 failures
Failed examples:
rspec ./spec/grape_route_helpers/decorated_route_spec.rb:74 # GrapeRouteHelpers::DecoratedRoute#helper_names when an API has multiple versions returns the route's helper name for each version
rspec ./spec/grape_route_helpers/decorated_route_spec.rb:145 # GrapeRouteHelpers::DecoratedRoute#path_helper_name when the path is a catch-all path returns a name without the glob star
rspec ./spec/grape_route_helpers/decorated_route_spec.rb:221 # GrapeRouteHelpers::DecoratedRoute path helper method when a route's API has multiple versions returns a path for each version
rspec ./spec/grape_route_helpers/named_route_matcher_spec.rb:42 # GrapeRouteHelpers::NamedRouteMatcher#route_match? when route responds to a method name returns true
rspec ./spec/grape_route_helpers/named_route_matcher_spec.rb:35 # GrapeRouteHelpers::NamedRouteMatcher#route_match? when route responds to a method name when segments is not a hash raises an ArgumentError
rspec ./spec/grape_route_helpers/named_route_matcher_spec.rb:50 # GrapeRouteHelpers::NamedRouteMatcher#route_match? when route responds to a method name when requested segments contains expected options returns true
rspec ./spec/grape_route_helpers/named_route_matcher_spec.rb:60 # GrapeRouteHelpers::NamedRouteMatcher#route_match? when route responds to a method name when requested segments contains expected options when no dynamic segments are requested when the route requires dynamic segments returns false
rspec ./spec/grape_route_helpers/named_route_matcher_spec.rb:67 # GrapeRouteHelpers::NamedRouteMatcher#route_match? when route responds to a method name when requested segments contains expected options when no dynamic segments are requested when the route does not require dynamic segments returns true
rspec ./spec/grape_route_helpers/named_route_matcher_spec.rb:79 # GrapeRouteHelpers::NamedRouteMatcher#route_match? when route responds to a method name when requested segments contains expected options when route requires the requested segments returns true
rspec ./spec/grape_route_helpers/named_route_matcher_spec.rb:88 # GrapeRouteHelpers::NamedRouteMatcher#route_match? when route responds to a method name when requested segments contains expected options when route does not require the requested segments returns false
rspec ./spec/grape_route_helpers/named_route_matcher_spec.rb:98 # GrapeRouteHelpers::NamedRouteMatcher#route_match? when route responds to a method name when segments contains unexpected options returns false
rspec ./spec/grape_route_helpers/named_route_matcher_spec.rb:110 # GrapeRouteHelpers::NamedRouteMatcher#route_match? when route does not respond to a method name returns false
rspec ./spec/grape_route_helpers/named_route_matcher_spec.rb:119 # GrapeRouteHelpers::NamedRouteMatcher#method_missing when method name matches a Grape::Route path helper name returns the path for that route object
rspec ./spec/grape_route_helpers/named_route_matcher_spec.rb:125 # GrapeRouteHelpers::NamedRouteMatcher#method_missing when method name matches a Grape::Route path helper name when argument to the helper is not a hash raises an ArgumentError
rspec ./spec/grape_route_helpers/named_route_matcher_spec.rb:144 # GrapeRouteHelpers::NamedRouteMatcher when Grape::Route objects share the same helper name when helpers require different segments to generate their path uses arguments to infer which route to use
rspec ./spec/grape_route_helpers/named_route_matcher_spec.rb:154 # GrapeRouteHelpers::NamedRouteMatcher when Grape::Route objects share the same helper name when query params are passed in uses arguments to infer which route to use
/usr/bin/ruby2.3 -I/home/pravi/forge/debian/git/pkg-ruby-extras/ruby-grape-route-helpers/vendor/bundle/gems/rspec-core-3.3.1/lib:/home/pravi/forge/debian/git/pkg-ruby-extras/ruby-grape-route-helpers/vendor/bundle/gems/rspec-support-3.3.0/lib /home/pravi/forge/debian/git/pkg-ruby-extras/ruby-grape-route-helpers/vendor/bundle/gems/rspec-core-3.3.1/exe/rspec --pattern spec/\*\*/\*_spec.rb failed