Skip to content

Commit

Permalink
Merge pull request #429 from tildeio/backport-grape-fix
Browse files Browse the repository at this point in the history
Backport grape fix
  • Loading branch information
zvkemp committed Nov 29, 2018
2 parents c922ba9 + 3d9a280 commit 5bb3c6c
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 5 deletions.
13 changes: 12 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,18 @@ matrix:
# Grape
- rvm: 2.5
env:
- GRAPE_VERSION=0.13.0
- GRAPE_VERSION="~> 0.13.0"
gemfile: gemfiles/Gemfile.grape
- stage: extra
rvm: 2.5
env:
- GRAPE_VERSION="~> 1.1.0"
gemfile: gemfiles/Gemfile.grape
- stage: extra
rvm: 2.5
env:
# there are significant architectural changes between 1.1 and 1.2
- GRAPE_VERSION="~> 1.2.0"
gemfile: gemfiles/Gemfile.grape
- rvm: 2.5
env:
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 3.1.2 (November 29, 2018)
* [BUGFIX] Fix derived endpoint names under Grape 1.2

## 3.1.1 (October 25, 2018)
* [IMPROVEMENT] Get AMS version from `Gem.loaded_specs` (thanks @mattias-lundell!)

Expand Down
2 changes: 1 addition & 1 deletion SKYLIGHT_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.1
3.1.2
2 changes: 1 addition & 1 deletion lib/skylight/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Skylight
VERSION = '3.1.1'
VERSION = '3.1.2'
end
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,16 @@ def get_endpoint_name(endpoint)
path = "#{namespace}#{path}"
end

"#{endpoint.options[:for]} [#{method}] #{path}"
"#{base_app_name(endpoint)} [#{method}] #{path}".strip
end

def base_app_name(endpoint)
ep = endpoint.options[:for]
return ep.name if ep.name

if ep.respond_to?(:base) && ep.base.respond_to?(:name)
ep.base.name
end
end

end
Expand Down
2 changes: 1 addition & 1 deletion skylight-core/lib/skylight/core/version.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Skylight
module Core
VERSION = '3.1.1'
VERSION = '3.1.2'
end
end

0 comments on commit 5bb3c6c

Please sign in to comment.