Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RAML 1.0 not supported by raml_ruby gem #35

Closed
danascheider opened this issue May 21, 2016 · 1 comment
Closed

RAML 1.0 not supported by raml_ruby gem #35

danascheider opened this issue May 21, 2016 · 1 comment

Comments

@danascheider
Copy link
Owner

Summary

I just removed Rambo's dependency on the raml-rb gem due to the gem's incomplete support for RAML properties and my inability to publish a new version of it that did support currently unsupported properties. I replaced the gem with raml_ruby.

Unfortunately, raml_ruby does not support RAML 1.0, and I was unable to find a complete RAML parser for Ruby that did support 1.0. Sounds like I'm going to be contributing to yet another open source project!

Expected Behavior

Rambo should be able to be run against any RAML and generate tests as expected.

Current Behavior

When I ran Rambo against Repaymnt Estimatr, I got the following error:

/Users/dscheider/.rvm/gems/ruby-2.1.7@repaymnt_estimatr/gems/raml_ruby-0.1.2/lib/raml.rb:77:in `parse_file': Raml::UnsupportedRamlVersion (Raml::UnsupportedRamlVersion)
    from /Users/dscheider/.rvm/gems/ruby-2.1.7@repaymnt_estimatr/gems/rambo-0.0.1/lib/document_generator.rb:13:in `initialize'
    from /Users/dscheider/.rvm/gems/ruby-2.1.7@repaymnt_estimatr/gems/rambo-0.0.1/lib/cli.rb:12:in `new'
    from /Users/dscheider/.rvm/gems/ruby-2.1.7@repaymnt_estimatr/gems/rambo-0.0.1/lib/cli.rb:12:in `initialize'
    from /Users/dscheider/.rvm/gems/ruby-2.1.7@repaymnt_estimatr/gems/rambo-0.0.1/bin/rambo:9:in `new'
    from /Users/dscheider/.rvm/gems/ruby-2.1.7@repaymnt_estimatr/gems/rambo-0.0.1/bin/rambo:9:in `<top (required)>'
    from /Users/dscheider/.rvm/gems/ruby-2.1.7@repaymnt_estimatr/bin/rambo:23:in `load'
    from /Users/dscheider/.rvm/gems/ruby-2.1.7@repaymnt_estimatr/bin/rambo:23:in `<main>'
    from /Users/dscheider/.rvm/gems/ruby-2.1.7@repaymnt_estimatr/bin/ruby_executable_hooks:15:in `eval'
    from /Users/dscheider/.rvm/gems/ruby-2.1.7@repaymnt_estimatr/bin/ruby_executable_hooks:15:in `<main>'

Possible Solution

The four possible solutions I see are:

  1. Officially support only RAML 0.8 for the indefinite future
  2. Switch back to the raml-rb gem and accept its deficiencies
  3. Write RAML 1.0 support into raml_ruby
  4. Write some sort of hack into Rambo that would enable it to handle RAML 1.0 (possibly by converting it into RAML 0.8? IDK)

Steps to Reproduce (for bugs)

  1. Install the Rambo gem
  2. Run rambo example.raml, where example.raml is a file in RAML 0.8
  3. Watch it fail

Context

This issue makes it impossible for us to use Rambo with Repaymnt Estimatr without rewriting the latter's docs in RAML 0.8. Since RAML 1.0 is the latest version, it is important that we support it, particularly since many of my own apps are documented in RAML 1.0 and Rambo currently won't run against them.

@danascheider
Copy link
Owner Author

So this issue is no longer immediately relevant after merging #23, but it sort of still is because of #36. Closing for now, I guess?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant