• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ruby-grape / grape-swagger / 1811 / 14
100%
master: 100%

Build:
DEFAULT BRANCH: master
Ran 20 Apr 2020 09:02AM UTC
Files 22
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Apr 2020 08:58AM UTC coverage: 85.086% (-0.1%) from 85.193%
ruby-head

push

travis-ci

web-flow
<a href="https://github.com/ruby-grape/grape-swagger/commit/<a class=hub.com/ruby-grape/grape-swagger/commit/8f978dc8d23fe9255d4561238c528bddd48fa977">8f978dc8d<a href="https://github.com/ruby-grape/grape-swagger/commit/8f978dc8d23fe9255d4561238c528bddd48fa977">&quot;&gt;Use full entity name as a default (fixes #779) (#786)

* Use full entity name as a default (fixes #779)

I just wanted to resolve this:

```
- model.to_s.split(&amp;#39;::&amp;#39;).last
+ model.to_s
```

But I met a problem that it receives Class type in here
https://github.com/ruby-grape/grape-swagger/blob/</a><a class="double-link" href="https://github.com/ruby-grape/grape-swagger/commit/<a class="double-link" href="https://github.com/ruby-grape/grape-swagger/commit/8abddd5f2ce5fe29238990b136625f34371b0be0">8abddd5f2</a>">8abddd5f2</a><a href="https://github.com/ruby-grape/grape-swagger/commit/8f978dc8d23fe9255d4561238c528bddd48fa977">/lib/grape-swagger/endpoint.rb#L354
But String type in the another place, where the type is generated. So,
splitting and taking the last actually returns the same as `name`
method of the class. That is very strange I think.

Also, if we, for example, use such constructions, we end up with just
`V1` and `V2` fron the `A::B` module as they are parsed first:

```ruby
module A
  module B
    class V1 &lt; Grape::Entity
     ...

    class V2 &lt; Grape::Entity
     ...

module A
  module C
    class V1 &lt; Grape::Entity
      ...

    class V2 &lt; Grape::Entity
      ...
```

This PR fixes this issue.

* Update CHANGELOG

* Fix for old Ruby versions

* Skip Representable:: prefix just like Entity::

* Add upgrade entry and move changelog entry from fixes to features scope

793 of 932 relevant lines covered (85.09%)

39.21 hits per line

Source Files on job 1811.14 (ruby-head)
  • Tree
  • List 0
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1770
  • Travis Job 1811.14
  • 8f978dc8 on github
  • Prev Job for ruby-head on master (#1805.14)
  • Next Job for ruby-head on master (#1814.14)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc