README.md in grape-path-helpers-1.2.0 vs README.md in grape-path-helpers-1.3.0
- old
+ new
@@ -1,12 +1,12 @@
# grape-path-helpers
-[![Build status](https://gitlab.com/gitlab-org/grape-path-helpers/badges/master/build.svg)](https://gitlab.com/gitlab-org/grape-path-helpers/commits/master)
+[![Build status](https://gitlab.com/gitlab-org/grape-path-helpers/badges/master/pipeline.svg)](https://gitlab.com/gitlab-org/grape-path-helpers/commits/master)
Provides named route helpers for Grape APIs, similar to [Rails' route helpers](http://edgeguides.rubyonrails.org/routing.html#path-and-url-helpers).
-**This is a fork and rename of [group-route-helpers](https://github.com/reprah/grape-route-helpers). It [includes some fixes](CHANGELOG.md) needed for GitLab.**
+**This is a fork and rename of [grape-route-helpers](https://github.com/reprah/grape-route-helpers). It [includes some fixes](CHANGELOG.md) needed for GitLab.**
### Installation
#### Compatibility with Grape
@@ -74,11 +74,11 @@
#### Use Helpers in Your API
Use the methods inside your Grape API actions. Given this example API:
```ruby
-class ExampleAPI < Grape::API
+class ExampleAPI < Grape::API::Instance
version 'v1'
prefix 'api'
format 'json'
get 'ping' do
@@ -125,11 +125,11 @@
#### Custom Helper Names
If you want to assign a custom helper name to a route, pass the `:as` option when creating your route in your API:
```ruby
-class Base < Grape::API
+class Base < Grape::API::Instance
get 'ping', as: 'is_the_server_running'
'pong'
end
end
```
@@ -166,9 +166,17 @@
4.) Commit your changes `(git commit -am 'Add some feature')`
5.) Push to the branch `(git push origin my-new-feature)`
6.) Create a new pull request
+
+### Releasing
+
+1. Update the [CHANGELOG](CHANGELOG.md).
+2. Update the version in [lib/grape-path-helpers/version.rb](lib/grape-path-helpers/version.rb).
+3. [Tag](https://gitlab.com/gitlab-org/grape-path-helpers/-/tags) the commit with the version number prefixed by 'v'.
+4. Run `gem build grape-path-helpers` locally.
+5. Run `gem push $new_file.gem` locally, where `$new_file` is the file generated by the step above.
### License
See LICENSE