README.md in gitlab-3.7.0 vs README.md in gitlab-4.0.0
- old
+ new
@@ -8,11 +8,12 @@
[website](http://narkoz.github.io/gitlab) |
[documentation](http://rubydoc.info/gems/gitlab/frames) |
[gitlab-live](https://github.com/NARKOZ/gitlab-live)
-Gitlab is a Ruby wrapper and CLI for the [GitLab API](https://github.com/gitlabhq/gitlabhq/tree/master/doc/api#gitlab-api).
+Gitlab is a Ruby wrapper and CLI for the [GitLab API](https://docs.gitlab.com/ce/api/README.html).
+As of version `4.0.0` this gem will only support Ruby 2.0+ and Gitlab API v4.
## Installation
Install it from rubygems:
@@ -31,26 +32,26 @@
Configuration example:
```ruby
Gitlab.configure do |config|
- config.endpoint = 'https://example.net/api/v3' # API endpoint URL, default: ENV['GITLAB_API_ENDPOINT']
+ config.endpoint = 'https://example.net/api/v4' # API endpoint URL, default: ENV['GITLAB_API_ENDPOINT']
config.private_token = 'qEsq1pt6HJPaNciie3MG' # user's private token or OAuth2 access token, default: ENV['GITLAB_API_PRIVATE_TOKEN']
# Optional
# config.user_agent = 'Custom User Agent' # user agent, default: 'Gitlab Ruby Gem [version]'
# config.sudo = 'user' # username for sudo mode, default: nil
end
```
-(Note: If you are using Gitlab.com's hosted service, your endpoint will be `https://gitlab.com/api/v3`)
+(Note: If you are using GitLab.com's hosted service, your endpoint will be `https://gitlab.com/api/v4`)
Usage examples:
```ruby
# set an API endpoint
-Gitlab.endpoint = 'http://example.net/api/v3'
-# => "http://example.net/api/v3"
+Gitlab.endpoint = 'http://example.net/api/v4'
+# => "http://example.net/api/v4"
# set a user private token
Gitlab.private_token = 'qEsq1pt6HJPaNciie3MG'
# => "qEsq1pt6HJPaNciie3MG"
@@ -105,10 +106,10 @@
## CLI
It is possible to use this gem as a command line interface to gitlab. In order to make that work you need to set a few environment variables:
```sh
-export GITLAB_API_ENDPOINT=https://gitlab.yourcompany.com/api/v3
+export GITLAB_API_ENDPOINT=https://gitlab.yourcompany.com/api/v4
export GITLAB_API_PRIVATE_TOKEN=<your private token from /profile/account>
# This one is optional and can be used to set any HTTParty option you may need
# using YAML hash syntax. For example, this is how you would disable SSL
# verification (useful if using a self-signed cert).
export GITLAB_API_HTTPARTY_OPTIONS="{verify: false}"