diff options
author | Sean McGivern <sean@gitlab.com> | 2017-01-13 13:02:46 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-01-13 13:04:25 +0300 |
commit | b0ae433ef361f62cd95c40035855c31d3dca784d (patch) | |
tree | 7f0b2b870be44c286cea0fe1718e24a3f6f1bfa5 | |
parent | 17c42cb8a283780b489826e9efe3f900011c2eac (diff) |
Fix milestone API specs in Ruby 2.1
Ruby 2.3:
```
URI.parse('http://foo/bar?baz quux')
=> #<URI::HTTP http://foo/bar?baz%20quux>
```
Ruby 2.1:
```
URI.parse('http://foo/bar?baz quux')
URI::InvalidURIError: bad URI(is not URI?): http://foo/bar?baz quux
```
-rw-r--r-- | .gitlab-ci.yml | 5 | ||||
-rw-r--r-- | spec/support/api_helpers.rb | 2 |
2 files changed, 1 insertions, 6 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 68690ff33da..2dced4a3351 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -166,11 +166,6 @@ spinach 9 10: *spinach-knapsack .ruby-21: &ruby-21 image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.1-git-2.7-phantomjs-2.1" <<: *use-db - only: - - master@gitlab-org/gitlab-ce - - master@gitlab-org/gitlab-ee - - master@gitlab/gitlabhq - - master@gitlab/gitlab-ee cache: key: "ruby21" paths: diff --git a/spec/support/api_helpers.rb b/spec/support/api_helpers.rb index 68b196d9033..e25cb9ecd89 100644 --- a/spec/support/api_helpers.rb +++ b/spec/support/api_helpers.rb @@ -18,7 +18,7 @@ module ApiHelpers # # Returns the relative path to the requested API resource def api(path, user = nil) - "/api/#{API::API.version}#{path}" + + "/api/#{API::API.version}#{URI.escape(path)}" + # Normalize query string (path.index('?') ? '' : '?') + |