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

ruby-grape / grape-swagger / 1811
100%

Build:
DEFAULT BRANCH: master
Ran 20 Apr 2020 08:59AM UTC
Jobs 14
Files 22
Run time 2min
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

pending completion
1811

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

4 of 4 new or added lines in 1 file covered. (100.0%)

911 of 916 relevant lines covered (99.45%)

4190.78 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1811.1 (2.5.8, GRAPE_VERSION=1.3.0 MODEL_PARSER=grape-swagger-entity) 20 Apr 2020 08:59AM UTC 0
98.93
Travis Job 1811.1
2 1811.2 (2.5.8, GRAPE_VERSION=1.3.0 MODEL_PARSER=grape-swagger-representable) 20 Apr 2020 08:59AM UTC 0
98.93
Travis Job 1811.2
3 1811.3 (2.5.8, GRAPE_VERSION=1.3.0) 20 Apr 2020 08:59AM UTC 0
99.46
Travis Job 1811.3
4 1811.4 (2.5.8, GRAPE_VERSION=HEAD) 20 Apr 2020 08:59AM UTC 0
99.46
Travis Job 1811.4
5 1811.5 (2.6.6, GRAPE_VERSION=1.3.0 MODEL_PARSER=grape-swagger-entity) 20 Apr 2020 08:59AM UTC 0
98.93
Travis Job 1811.5
6 1811.6 (2.6.6, GRAPE_VERSION=1.3.0 MODEL_PARSER=grape-swagger-representable) 20 Apr 2020 09:01AM UTC 0
98.93
Travis Job 1811.6
7 1811.7 (2.6.6, GRAPE_VERSION=1.3.0) 20 Apr 2020 09:01AM UTC 0
99.46
Travis Job 1811.7
8 1811.8 (2.6.6, GRAPE_VERSION=HEAD) 20 Apr 2020 09:01AM UTC 0
99.46
Travis Job 1811.8
9 1811.9 (2.7.1, GRAPE_VERSION=1.3.0 MODEL_PARSER=grape-swagger-entity) 20 Apr 2020 09:01AM UTC 0
98.93
Travis Job 1811.9
10 1811.10 (2.7.1, GRAPE_VERSION=1.3.0 MODEL_PARSER=grape-swagger-representable) 20 Apr 2020 09:01AM UTC 0
98.93
Travis Job 1811.10
11 1811.11 (2.7.1, GRAPE_VERSION=1.3.0) 20 Apr 2020 09:02AM UTC 0
99.46
Travis Job 1811.11
12 1811.12 (2.7.1, GRAPE_VERSION=HEAD) 20 Apr 2020 09:02AM UTC 0
99.46
Travis Job 1811.12
13 1811.13 (2.4.10) 20 Apr 2020 09:02AM UTC 0
99.46
Travis Job 1811.13
14 1811.14 (ruby-head) 20 Apr 2020 09:02AM UTC 0
85.09
Travis Job 1811.14
Source Files on build 1811
  • Tree
  • List 22
  • Changed 10
  • Source Changed 10
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #1811
  • 8f978dc8 on github
  • Prev Build on master (#1805)
  • Next Build on master (#1814)
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

© 2025 Coveralls, Inc