wealthsimple / sinatra-rake-routes

`rake routes` command for Sinatra applications
MIT License
5 stars 1 forks source link

Broken `Mustermann::Sinatra` #6

Open cabello opened 6 years ago

cabello commented 6 years ago
ArgumentError: comparison of Mustermann::Sinatra with Mustermann::Sinatra failed
/usr/local/bundle/gems/sinatra-rake-routes-0.0.4/lib/sinatra-rake-routes.rb:24:in `sort'
/usr/local/bundle/gems/sinatra-rake-routes-0.0.4/lib/sinatra-rake-routes.rb:24:in `block in to_s'
/usr/local/bundle/gems/sinatra-rake-routes-0.0.4/lib/sinatra-rake-routes.rb:21:in `each'
/usr/local/bundle/gems/sinatra-rake-routes-0.0.4/lib/sinatra-rake-routes.rb:21:in `to_s'
/usr/local/bundle/gems/sinatra-rake-routes-0.0.4/lib/sinatra-rake-routes/tasks.rb:3:in `block in <top (required)>'
/usr/local/bundle/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/usr/local/bundle/bin/bundle:104:in `load'
/usr/local/bundle/bin/bundle:104:in `<main>'
Tasks: TOP => routes
(See full trace by running task with --trace)
TuxmAL commented 5 years ago

I got the same error! None is here to give a hand?

cabello commented 5 years ago

@TuxmAL which version of Sinatra and the gem are you using?

TuxmAL commented 5 years ago

Hi @cabello,

I'm using:

and I have to admit that I had not so much time to play around with this issue.

scicco commented 4 years ago

Hi @TuxmAL check if my changes will fix your issues.

try with this:

gem 'sinatra-rake-routes', github: 'scicco/sinatra-rake-routes', branch: 'sinatra2.0'

aliccardo commented 4 years ago

Sorry for the delay, @scicco. I made a test on a project of mine: it seems to work fine --at least the error message didn't appear ;-) -- and the output covers all the route of my app (as you can see):

GET
/Customer.json
/Dutycycle.json
/openapi.json
/openapi.yaml
/payments/v1/alive
/payments/v1/ping
/payments/v1/pong
/payments/v1/transaction

HEAD
/Customer.json
/Dutycycle.json
/openapi.json
/openapi.yaml
/payments/v1/alive
/payments/v1/ping
/payments/v1/pong
/resources.json

POST
/payments/v1/customer

OPTIONS
/payments/v1/transaction

Thank you for your patience and for your help.

cabello commented 4 years ago

@scicco Wanna propose a pull request? We can review and merge it :)