diff --git a/.codeclimate.yml b/.codeclimate.yml deleted file mode 100644 index d96d7de..0000000 --- a/.codeclimate.yml +++ /dev/null @@ -1,3 +0,0 @@ -plugins: - rubocop: - enabled: true diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 686f2fa..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,8 +0,0 @@ -# These are supported funding model platforms - -github: NARKOZ -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -custom: # Replace with a single custom sponsorship URL diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4bd109b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + ruby: + - 2.5 + - 2.6 + - 2.7 + name: Ruby ${{ matrix.ruby }} test + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby ${{ matrix.ruby }} + uses: actions/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + - name: Build and test with Rake + run: | + gem install bundler --no-document + bundle install --jobs 4 --retry 3 + bundle exec rake + + lint: + runs-on: ubuntu-latest + name: Rubocop lint + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby 2.5 + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.5 + - name: Lint with Rubocop + run: | + gem install bundler --no-document + bundle install --jobs 4 --retry 3 + bundle exec rake rubocop diff --git a/.github/workflows/gempush.yml b/.github/workflows/gempush.yml index 3f44256..981a311 100644 --- a/.github/workflows/gempush.yml +++ b/.github/workflows/gempush.yml @@ -14,7 +14,7 @@ - name: Set up Ruby 2.7 uses: actions/setup-ruby@v1 with: - version: 2.7 + ruby-version: 2.7 - name: Publish to RubyGems run: | mkdir -p $HOME/.gem diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml deleted file mode 100644 index b3e435c..0000000 --- a/.github/workflows/ruby.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Ruby - -on: - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - ruby: - - 2.5 - - 2.6 - - 2.7 - name: Ruby ${{ matrix.ruby }} test - steps: - - uses: actions/checkout@v2 - - name: Set up Ruby ${{ matrix.ruby }} - uses: actions/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby }} - - name: Build and test with Rake - run: | - gem install bundler --no-document - bundle install --jobs 4 --retry 3 - bundle exec rake - - lint: - runs-on: ubuntu-latest - name: Rubocop lint - steps: - - uses: actions/checkout@v2 - - name: Set up Ruby 2.5 - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.5 - - name: Lint with Rubocop - run: | - gem install bundler --no-document - bundle install --jobs 4 --retry 3 - bundle exec rake rubocop diff --git a/.rubocop.yml b/.rubocop.yml index ef4cfde..6cde10a 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -5,6 +5,7 @@ AllCops: TargetRubyVersion: 2.5 + NewCops: enable Layout/LineLength: Max: 123 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index f788dda..d9e1a9a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,20 +1,22 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2020-03-12 13:38:06 +0400 using RuboCop version 0.80.1. +# on 2020-06-28 04:00:53 UTC using RuboCop version 0.86.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. # Offense count: 4 +# Configuration parameters: IgnoredMethods. Metrics/AbcSize: Max: 34 # Offense count: 3 +# Configuration parameters: IgnoredMethods. Metrics/CyclomaticComplexity: - Max: 12 + Max: 13 -# Offense count: 10 +# Offense count: 8 # Configuration parameters: CountComments, ExcludedMethods. Metrics/MethodLength: Max: 34 @@ -30,6 +32,7 @@ Max: 6 # Offense count: 1 +# Configuration parameters: IgnoredMethods. Metrics/PerceivedComplexity: Max: 10 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0ebf9ab..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -language: ruby -rvm: - - 2.5 - - 2.6 - - 2.7 - -jobs: - include: - - stage: lint - rvm: 2.5 - script: bundle exec rake rubocop diff --git a/Dockerfile b/Dockerfile index ade517b..db9b515 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.6 +FROM ruby:2.7 WORKDIR /app diff --git a/README.md b/README.md index 538fbd6..a625f72 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Gitlab -[![Build Status](https://img.shields.io/github/workflow/status/NARKOZ/gitlab/Ruby/master)](https://github.com/NARKOZ/gitlab/actions?query=workflow%3ARuby) -[![Maintainability](https://api.codeclimate.com/v1/badges/2e310b334b1b5db4a7e1/maintainability)](https://codeclimate.com/github/NARKOZ/gitlab) +[![Build Status](https://img.shields.io/github/workflow/status/NARKOZ/gitlab/CI/master)](https://github.com/NARKOZ/gitlab/actions?query=workflow%3ARuby) [![Inline docs](https://inch-ci.org/github/NARKOZ/gitlab.svg)](https://inch-ci.org/github/NARKOZ/gitlab) [![Gem version](https://img.shields.io/gem/v/gitlab.svg)](https://rubygems.org/gems/gitlab) [![License](https://img.shields.io/badge/license-BSD-red.svg)](https://github.com/NARKOZ/gitlab/blob/master/LICENSE.txt) diff --git a/bin/console b/bin/console index 282a073..85b359e 100755 --- a/bin/console +++ b/bin/console @@ -5,7 +5,7 @@ # ENV['GITLAB_API_PRIVATE_TOKEN'] = '' require 'bundler/setup' -require 'gitlab' require 'pry' +require_relative '../lib/gitlab' Pry.start diff --git a/lib/gitlab/client/epic_issues.rb b/lib/gitlab/client/epic_issues.rb new file mode 100644 index 0000000..b3e5791 --- /dev/null +++ b/lib/gitlab/client/epic_issues.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +class Gitlab::Client + # Defines methods related to issues. + # @see https://docs.gitlab.com/ee/api/epic_issues.html + module EpicIssues + # List issues for an epic. + # Gets all issues that are assigned to an epic and the authenticated user has access to.. + # @example + # Gitlab.epic_issues(5, 7) + # Gitlab.epic_issues(5, 7, { per_page: 40 }) + # + # @param [Integer, String] group The ID or name of a group. + # @param [Integer] epic The iid of an epic. + # @param [Hash] options A customizable set of options. + # @option options [Integer] :page The page number. + # @option options [Integer] :per_page The number of results per page. + # @return [Array] + def epic_issues(group, epic, options = {}) + get("/groups/#{url_encode group}/epics/#{epic}/issues", query: options) + end + end +end diff --git a/lib/gitlab/client/merge_request_approvals.rb b/lib/gitlab/client/merge_request_approvals.rb index d4376b7..949aefc 100644 --- a/lib/gitlab/client/merge_request_approvals.rb +++ b/lib/gitlab/client/merge_request_approvals.rb @@ -29,6 +29,62 @@ # @return [Gitlab::ObjectifiedHash] MR approval configuration information about the project def edit_project_merge_request_approvals(project, options = {}) post("/projects/#{url_encode project}/approvals", body: options) + end + + # Gets MR Approval Rules for a project + # + # @example + # Gitlab.project_merge_request_approval_rules(1) + # + # @param [Integer] project The ID of a project. + # @return [Gitlab::ObjectifiedHash] MR approval rules for the project + def project_merge_request_approval_rules(project) + get("/projects/#{url_encode project}/approval_rules") + end + + # Create MR Approval Rule for a project + # + # @example + # Gitlab.create_project_merge_request_approval_rule(1, {name: "security", approvals_required: 1}) + # + # @param [Integer] project(required) The ID of a project. + # @option options [String] :name(required) The name of the approval rule + # @option options [Integer] :approvals_required(required) The number of required approvals for this rule + # @option options [Array] :user_ids(optional) The ids of users as approvers + # @option options [Array] :group_ids(optional) The ids of groups as approvers + # @option options [Array] :protected_branch_ids(optional) The ids of protected branches to scope the rule by + # @return [Gitlab::ObjectifiedHash] New MR approval rule + def create_project_merge_request_approval_rule(project, options = {}) + post("/projects/#{url_encode project}/approval_rules", body: options) + end + + # Update MR Approval Rule for a project + # + # @example + # Gitlab.update_project_merge_request_approval_rule(1, {name: "security", approvals_required: 2}) + # + # @param [Integer] project(required) The ID of a project. + # @param [Integer] approval_rule_id(required) The ID of a project Approval Rule + # @option options [String] :name(required) The name of the approval rule + # @option options [Integer] :approvals_required(required) The number of required approvals for this rule + # @option options [Array] :user_ids(optional) The ids of users as approvers + # @option options [Array] :group_ids(optional) The ids of groups as approvers + # @option options [Array] :protected_branch_ids(optional) The ids of protected branches to scope the rule by + # @return [Gitlab::ObjectifiedHash] Updated MR approval rule + def update_project_merge_request_approval_rule(project, approval_rule_id, options = {}) + put("/projects/#{url_encode project}/approval_rules/#{approval_rule_id}", body: options) + end + + # Delete MR Approval Rule for a project + # + # @example + # Gitlab.delete_project_merge_request_approval_rule(1, 1) + # + # @param [Integer] project(required) The ID of a project. + # @param [Integer] approval_rule_id(required) The ID of a approval rule + # @return [void] This API call returns an empty response body + def delete_project_merge_request_approval_rule(project, approval_rule_id) + delete("/projects/#{url_encode project}/approval_rules/#{approval_rule_id}") end # Change allowed approvers and approver groups for a project @@ -109,5 +165,17 @@ def unapprove_merge_request(project, merge_request, options = {}) post("/projects/#{url_encode project}/merge_requests/#{merge_request}/unapprove", body: options) end + + # Get the approval state of merge requests + # + # @example + # Gitlab.merge_request_approval_state(5, 36) + # + # @param [Integer, String] project The ID or name of a project. + # @param [Integer] id The ID of a merge request. + # @return [Array] + def merge_request_approval_state(project, id) + get("/projects/#{url_encode project}/merge_requests/#{id}/approval_state") + end end end diff --git a/lib/gitlab/client/merge_requests.rb b/lib/gitlab/client/merge_requests.rb index 30e843c..7173dca 100644 --- a/lib/gitlab/client/merge_requests.rb +++ b/lib/gitlab/client/merge_requests.rb @@ -35,12 +35,16 @@ # # @example # Gitlab.merge_request(5, 36) - # - # @param [Integer, String] project The ID or name of a project. - # @param [Integer] id The ID of a merge request. + # Gitlab.merge_request(5, 36, { include_diverged_commits_count: true }) + # + # @param [Integer, String] project The ID or name of a project. + # @param [Integer] id The ID of a merge request. + # @option options [Boolean] :render_html If true response includes rendered HTML for title and description. + # @option options [Boolean] :include_diverged_commits_count If true response includes the commits behind the target branch. + # @option options [Boolean] :include_rebase_in_progress If true response includes whether a rebase operation is in progress. # @return ] :assignee_ids (optional) The ID of the user(s) to assign the MR to. Set to 0 or provide an empty value to unassign all assignees. + # @option options [String] :description (optional) Description of MR. Limited to 1,048,576 characters. # @option options [Integer] :target_project_id (optional) The target project ID. # @option options [String] :labels (optional) Labels as a comma-separated list. + # @option options [Integer] :milestone_id (optional) The global ID of a milestone + # @option options [Boolean] :remove_source_branch (optional) Flag indicating if a merge request should remove the source branch when merging + # @option options [Boolean] :allow_collaboration (optional) Allow commits from members who can merge to the target branch + # @option options [Boolean] :squash (optional) Squash commits into a single commit when merging # @return [Gitlab::ObjectifiedHash] Information about created merge request. def create_merge_request(project, title, options = {}) body = { title: title }.merge(options) @@ -115,7 +125,12 @@ # @param [Integer, String] project The ID or name of a project. # @param [Integer] id The ID of a merge request. # @param [Hash] options A customizable set of options. - # @option options [String] :merge_commit_message Custom merge commit message + # @option options [String] :merge_commit_message(optional) Custom merge commit message + # @option options [String] :squash_commit_message(optional) Custom squash commit message + # @option options [Boolean] :squash(optional) if true the commits will be squashed into a single commit on merge + # @option options [Boolean] :should_remove_source_branch(optional) if true removes the source branch + # @option options [Boolean] :merge_when_pipeline_succeeds(optional) if true the MR is merged when the pipeline succeeds + # @option options [String] :sha(optional) if present, then this SHA must match the HEAD of the source branch, otherwise the merge will fail # @return [Gitlab::ObjectifiedHash] Information about updated merge request. def accept_merge_request(project, id, options = {}) put("/projects/#{url_encode project}/merge_requests/#{id}/merge", body: options) diff --git a/lib/gitlab/client/notes.rb b/lib/gitlab/client/notes.rb index 21d8702..2d29088 100644 --- a/lib/gitlab/client/notes.rb +++ b/lib/gitlab/client/notes.rb @@ -59,6 +59,20 @@ get("/projects/#{url_encode project}/merge_requests/#{merge_request}/notes", query: options) end alias merge_request_comments merge_request_notes + + # Gets a list of notes for an epic. + # + # @example + # Gitlab.epic_notes(5, 10) + # + # @param [Integer] project The ID of a group. + # @param [Integer] epic The ID of an epic. + # @option options [Integer] :page The page number. + # @option options [Integer] :per_page The number of results per page. + # @return [Array] + def epic_notes(group, epic, options = {}) + get("/groups/#{url_encode group}/epics/#{epic}/notes", query: options) + end # Gets a single wall note. # @@ -161,6 +175,19 @@ post("/projects/#{url_encode project}/merge_requests/#{merge_request}/notes", body: { body: body }) end alias create_merge_request_comment create_merge_request_note + + # Creates a new epic note. + # + # @example + # Gitlab.create_epic_note(6, 1, 'Adding a note to my epic.') + # + # @param [Integer, String] group The ID or name of a group. + # @param [Integer] epic The ID of an epic. + # @param [String] body The body of a note. + # @return [Gitlab::ObjectifiedHash] Information about created note. + def create_epic_note(group, epic, body) + post("/groups/#{url_encode group}/epics/#{epic}/notes", body: { body: body }) + end # Deletes a wall note. # diff --git a/lib/gitlab/client/user_snippets.rb b/lib/gitlab/client/user_snippets.rb new file mode 100644 index 0000000..5b68c5e --- /dev/null +++ b/lib/gitlab/client/user_snippets.rb @@ -0,0 +1,114 @@ +# frozen_string_literal: true + +class Gitlab::Client + # Defines methods related to user snippets. + # @see https://docs.gitlab.com/ce/api/snippets.html + module UserSnippets + # Get a list of the snippets of the current user. + # + # @example + # Gitlab.user_snippets + # + # @return [Array] List of snippets of current user + def user_snippets + get('/snippets') + end + + # Get a single snippet. + # + # @example + # Gitlab.user_snippet(1) + # + # @param [Integer] id ID of snippet to retrieve. + # @return [Gitlab::ObjectifiedHash] Information about the user snippet + def user_snippet(id) + get("/snippets/#{id}") + end + + # Get raw contents of a single snippet. + # + # @example + # Gitlab.user_snippet_raw(1) + # + # @param [Integer] id ID of snippet to retrieve. + # @return [String] User snippet text + def user_snippet_raw(id) + get("/snippets/#{id}/raw", + format: nil, + headers: { Accept: 'text/plain' }, + parser: ::Gitlab::Request::Parser) + end + + # Create a new snippet. + # + # @example + # Gitlab.create_user_snippet({ title: 'REST', file_name: 'api.rb', content: 'some code', description: 'Hello World snippet', visibility: 'public'}) + # + # @param [Hash] options A customizable set of options. + # @option options [String] :title (required) Title of a snippet. + # @option options [String] :file_name (required) Name of a snippet file. + # @option options [String] :content (required) Content of a snippet. + # @option options [String] :description (optional) Description of a snippet. + # @option options [String] :visibility (optional) visibility of a snippet. + # @return [Gitlab::ObjectifiedHash] Information about created snippet. + def create_user_snippet(options = {}) + post('/snippets', body: options) + end + + # Update an existing snippet. + # + # @example + # Gitlab.edit_user_snippet(34, { file_name: 'README.txt' }) + # Gitlab.edit_user_snippet(34, { file_name: 'README.txt', title: 'New title' }) + # + # @param [Integer] id ID of snippet to update. + # @param [Hash] options A customizable set of options. + # @option options [String] :title (optional) Title of a snippet. + # @option options [String] :file_name (optional) Name of a snippet file. + # @option options [String] :content (optional) Content of a snippet. + # @option options [String] :description (optional) Description of a snippet. + # @option options [String] :visibility (optional) visibility of a snippet. + # @return [Gitlab::ObjectifiedHash] Information about updated snippet. + def edit_user_snippet(id, options = {}) + put("/snippets/#{id}", body: options) + end + + # Delete an existing snippet. + # + # @example + # Gitlab.delete_user_snippet(14) + # + # @param [Integer] id ID of snippet to delete. + # @return [void] This API call returns an empty response body. + def delete_user_snippet(id) + delete("/snippets/#{id}") + end + + # List all public snippets. + # + # @example + # Gitlab.public_snippets + # Gitlab.public_snippets(per_page: 2, page: 1) + # + # @param [Hash] options A customizable set of options. + # @option options [String] :per_page (optional) Number of snippets to return per page. + # @option options [String] :page (optional) Page to retrieve. + # + # @return [Array] List of all public snippets + def public_snippets(options = {}) + get('/snippets/public', query: options) + end + + # Get user agent details for a snippet. + # + # @example + # Gitlab.snippet_user_agent_details(1) + # + # @param [Integer] id ID of snippet to delete. + # + # @return [Array] Details of the user agent + def snippet_user_agent_details(id) + get("/snippets/#{id}/user_agent_detail") + end + end +end diff --git a/lib/gitlab/client/users.rb b/lib/gitlab/client/users.rb index 32cd140..696aaa9 100644 --- a/lib/gitlab/client/users.rb +++ b/lib/gitlab/client/users.rb @@ -123,6 +123,20 @@ post('/session', body: { email: email, password: password }, unauthenticated: true) end + # Gets a list of user activities (for admin access only). + # + # @example + # Gitlab.activities + # + # @param [Hash] options A customizable set of options. + # @option options [Integer] :page The page number. + # @option options [Integer] :per_page The number of results per page. + # @option options [String] :from The start date for paginated results. + # @return [Array] + def activities(options = {}) + get('/user/activities', query: options) + end + # Gets a list of user's SSH keys. # # @example @@ -225,10 +239,15 @@ # # @param [String] email Email address # @param [Integer] user_id The ID of a user. - # @return [Gitlab::ObjectifiedHash] - def add_email(email, user_id = nil) + # @param [Boolean] skip_confirmation Skip confirmation and assume e-mail is verified + # @return [Gitlab::ObjectifiedHash] + def add_email(email, user_id = nil, skip_confirmation = nil) url = user_id.to_i.zero? ? '/user/emails' : "/users/#{user_id}/emails" - post(url, body: { email: email }) + if skip_confirmation.nil? + post(url, body: { email: email }) + else + post(url, body: { email: email, skip_confirmation: skip_confirmation }) + end end # Delete email diff --git a/lib/gitlab/client.rb b/lib/gitlab/client.rb index a323d27..18023ca 100644 --- a/lib/gitlab/client.rb +++ b/lib/gitlab/client.rb @@ -19,6 +19,7 @@ include ContainerRegistry include Deployments include Environments + include EpicIssues include Epics include Events include Features @@ -61,6 +62,7 @@ include Templates include Todos include Users + include UserSnippets include Versions include Wikis diff --git a/lib/gitlab/error.rb b/lib/gitlab/error.rb index df463d6..a37ccbe 100644 --- a/lib/gitlab/error.rb +++ b/lib/gitlab/error.rb @@ -63,6 +63,14 @@ else @response.parsed_response end + rescue Gitlab::Error::Parsing + # Return stringified response when receiving a + # parsing error to avoid obfuscation of the + # api error. + # + # note: The Gitlab API does not always return valid + # JSON when there are errors. + @response.to_s end # Handle error response message in case of nested hashes diff --git a/lib/gitlab/help.rb b/lib/gitlab/help.rb index ba51370..23edef7 100644 --- a/lib/gitlab/help.rb +++ b/lib/gitlab/help.rb @@ -82,13 +82,13 @@ def change_help_output!(cmd, output_str) output_str = +output_str output_str.gsub!(/#{cmd}\((.*?)\)/m, cmd + ' \1') - output_str.gsub!(/\,[\s]*/, ' ') + output_str.gsub!(/,\s*/, ' ') # Ensure @option descriptions are on a single line output_str.gsub!(/\n\[/, " \[") output_str.gsub!(/\s(@)/, "\n@") - output_str.gsub!(/(\])\n(\:)/, '\1 \2') - output_str.gsub!(/(\:.*)(\n)(.*\.)/, '\1 \3') + output_str.gsub!(/(\])\n(:)/, '\1 \2') + output_str.gsub!(/(:.*)(\n)(.*\.)/, '\1 \3') output_str.gsub!(/\{(.+)\}/, '"{\1}"') end end diff --git a/lib/gitlab/objectified_hash.rb b/lib/gitlab/objectified_hash.rb index 55d214a..e2f12c5 100644 --- a/lib/gitlab/objectified_hash.rb +++ b/lib/gitlab/objectified_hash.rb @@ -7,29 +7,45 @@ def initialize(hash) @hash = hash @data = hash.each_with_object({}) do |(key, value), data| - value = ObjectifiedHash.new(value) if value.is_a? Hash + value = self.class.new(value) if value.is_a? Hash + value = value.map { |v| v.is_a?(Hash) ? self.class.new(v) : v } if value.is_a? Array data[key.to_s] = value end end # @return [Hash] The original hash. def to_hash - @hash + hash end alias to_h to_hash # @return [String] Formatted string with the class name, object id and original hash. def inspect - "#<#{self.class}:#{object_id} {hash: #{@hash.inspect}}" + "#<#{self.class}:#{object_id} {hash: #{hash.inspect}}" end - # Delegate to ObjectifiedHash. - def method_missing(key) - @data.key?(key.to_s) ? @data[key.to_s] : super + def [](key) + data[key] + end + + private + + attr_reader :hash, :data + + # Respond to messages for which `self.data` has a key + def method_missing(method_name, *args, &block) + if data.key?(method_name.to_s) + data[method_name.to_s] + elsif data.respond_to?(method_name) + warn 'WARNING: Please convert ObjectifiedHash object to hash before calling Hash methods on it.' + data.send(method_name, *args, &block) + else + super + end end def respond_to_missing?(method_name, include_private = false) - @hash.keys.map(&:to_sym).include?(method_name.to_sym) || super + hash.keys.map(&:to_sym).include?(method_name.to_sym) || super end end end diff --git a/lib/gitlab/page_links.rb b/lib/gitlab/page_links.rb index 3c3c46b..034983c 100644 --- a/lib/gitlab/page_links.rb +++ b/lib/gitlab/page_links.rb @@ -7,7 +7,7 @@ class PageLinks HEADER_LINK = 'Link' DELIM_LINKS = ',' - LINK_REGEX = /<([^>]+)>; rel=\"([^\"]+)\"/.freeze + LINK_REGEX = /<([^>]+)>; rel="([^"]+)"/.freeze METAS = %w[last next first prev].freeze attr_accessor(*METAS) diff --git a/lib/gitlab/paginated_response.rb b/lib/gitlab/paginated_response.rb index 01ca4d1..07b7e91 100644 --- a/lib/gitlab/paginated_response.rb +++ b/lib/gitlab/paginated_response.rb @@ -42,37 +42,20 @@ end end - def auto_paginate - response = block_given? ? nil : [] - each_page do |page| - if block_given? - page.each do |item| - yield item - end - else - response += page - end - end - response + def lazy_paginate + to_enum(:each_page).lazy.flat_map(&:to_ary) end - def paginate_with_limit(limit) - response = block_given? ? nil : [] - count = 0 - each_page do |page| - if block_given? - page.each do |item| - yield item - count += 1 - break if count >= limit - end - else - response += page[0, limit - count] - count = response.length - end - break if count >= limit - end - response + def auto_paginate(&block) + return lazy_paginate.to_a unless block_given? + + lazy_paginate.each(&block) + end + + def paginate_with_limit(limit, &block) + return lazy_paginate.take(limit).to_a unless block_given? + + lazy_paginate.take(limit).each(&block) end def last_page? @@ -83,8 +66,7 @@ def last_page return nil if @client.nil? || !has_last_page? - path = @links.last.sub(/#{@client.endpoint}/, '') - @client.get(path) + @client.get(client_relative_path(@links.last)) end def first_page? @@ -95,8 +77,7 @@ def first_page return nil if @client.nil? || !has_first_page? - path = @links.first.sub(/#{@client.endpoint}/, '') - @client.get(path) + @client.get(client_relative_path(@links.first)) end def next_page? @@ -107,8 +88,7 @@ def next_page return nil if @client.nil? || !has_next_page? - path = @links.next.sub(/#{@client.endpoint}/, '') - @client.get(path) + @client.get(client_relative_path(@links.next)) end def prev_page? @@ -119,8 +99,12 @@ def prev_page return nil if @client.nil? || !has_prev_page? - path = @links.prev.sub(/#{@client.endpoint}/, '') - @client.get(path) + @client.get(client_relative_path(@links.prev)) + end + + def client_relative_path(link) + client_endpoint_path = URI.parse(@client.endpoint).request_uri # api/v4 + URI.parse(link).request_uri.sub(client_endpoint_path, '') end end end diff --git a/lib/gitlab/version.rb b/lib/gitlab/version.rb index 60a5683..9891e3d 100644 --- a/lib/gitlab/version.rb +++ b/lib/gitlab/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Gitlab - VERSION = '4.14.1' + VERSION = '4.16.1' end diff --git a/lib/gitlab.rb b/lib/gitlab.rb index 678f8c9..0a875bb 100644 --- a/lib/gitlab.rb +++ b/lib/gitlab.rb @@ -42,7 +42,8 @@ # # @return [Array] def self.actions - hidden = /endpoint|private_token|auth_token|user_agent|sudo|get|post|put|\Adelete\z|validate|request_defaults|httparty/ + hidden = + /endpoint|private_token|auth_token|user_agent|sudo|get|post|put|\Adelete\z|validate\z|request_defaults|httparty/ (Gitlab::Client.instance_methods - Object.methods).reject { |e| e[hidden] } end end diff --git a/spec/fixtures/access_request.json b/spec/fixtures/access_request.json index ea6f20c..23993de 100644 --- a/spec/fixtures/access_request.json +++ b/spec/fixtures/access_request.json @@ -1,8 +1 @@ -{ - "id": 1, - "username": "raymond_smith", - "name": "Raymond Smith", - "state": "active", - "created_at": "2012-10-22T14:13:35Z", - "requested_at": "2012-10-22T14:13:35Z" -} +{"id":1,"username":"raymond_smith","name":"Raymond Smith","state":"active","created_at":"2012-10-22T14:13:35Z","requested_at":"2012-10-22T14:13:35Z"} \ No newline at end of file diff --git a/spec/fixtures/access_requests.json b/spec/fixtures/access_requests.json index 7353c82..9ce842b 100644 --- a/spec/fixtures/access_requests.json +++ b/spec/fixtures/access_requests.json @@ -1,18 +1 @@ -[ - { - "id": 1, - "username": "raymond_smith", - "name": "Raymond Smith", - "state": "active", - "created_at": "2012-10-22T14:13:35Z", - "requested_at": "2012-10-22T14:13:35Z" - }, - { - "id": 2, - "username": "john_doe", - "name": "John Doe", - "state": "active", - "created_at": "2012-10-22T14:13:35Z", - "requested_at": "2012-10-22T14:13:35Z" - } -] +[{"id":1,"username":"raymond_smith","name":"Raymond Smith","state":"active","created_at":"2012-10-22T14:13:35Z","requested_at":"2012-10-22T14:13:35Z"},{"id":2,"username":"john_doe","name":"John Doe","state":"active","created_at":"2012-10-22T14:13:35Z","requested_at":"2012-10-22T14:13:35Z"}] \ No newline at end of file diff --git a/spec/fixtures/activities.json b/spec/fixtures/activities.json new file mode 100644 index 0000000..18f15c1 --- /dev/null +++ b/spec/fixtures/activities.json @@ -0,0 +1 @@ +[{"username":"someuser","last_activity_on":"2020-03-16","last_activity_at":"2020-03-16"}] \ No newline at end of file diff --git a/spec/fixtures/application_settings.json b/spec/fixtures/application_settings.json index 7c4ae12..84db39b 100644 --- a/spec/fixtures/application_settings.json +++ b/spec/fixtures/application_settings.json @@ -1,44 +1 @@ -{ - "default_projects_limit": 100000, - "signup_enabled": true, - "id": 1, - "default_branch_protection": 2, - "restricted_visibility_levels": [], - "password_authentication_enabled_for_web": true, - "after_sign_out_path": null, - "max_attachment_size": 10, - "user_oauth_applications": true, - "updated_at": "2016-01-04T15:44:55.176Z", - "session_expire_delay": 10080, - "home_page_url": null, - "default_snippet_visibility": "private", - "domain_whitelist": [], - "domain_blacklist_enabled": false, - "domain_blacklist": [], - "created_at": "2016-01-04T15:44:55.176Z", - "default_project_visibility": "private", - "default_group_visibility": "private", - "gravatar_enabled": true, - "sign_in_text": null, - "container_registry_token_expire_delay": 5, - "repository_storages": [ - "default" - ], - "plantuml_enabled": false, - "plantuml_url": null, - "terminal_max_session_time": 0, - "polling_interval_multiplier": 1, - "rsa_key_restriction": 0, - "dsa_key_restriction": 0, - "ecdsa_key_restriction": 0, - "ed25519_key_restriction": 0, - "first_day_of_week": 0, - "enforce_terms": true, - "terms": "Hello world!", - "performance_bar_allowed_group_id": 42, - "instance_statistics_visibility_private": false, - "user_show_add_ssh_key_message": true, - "file_template_project_id": 1, - "local_markdown_version": 0, - "geo_node_allowed_ips": "0.0.0.0/0, ::/0" -} +{"default_projects_limit":100000,"signup_enabled":true,"id":1,"default_branch_protection":2,"restricted_visibility_levels":[],"password_authentication_enabled_for_web":true,"after_sign_out_path":null,"max_attachment_size":10,"user_oauth_applications":true,"updated_at":"2016-01-04T15:44:55.176Z","session_expire_delay":10080,"home_page_url":null,"default_snippet_visibility":"private","domain_whitelist":[],"domain_blacklist_enabled":false,"domain_blacklist":[],"created_at":"2016-01-04T15:44:55.176Z","default_project_visibility":"private","default_group_visibility":"private","gravatar_enabled":true,"sign_in_text":null,"container_registry_token_expire_delay":5,"repository_storages":["default"],"plantuml_enabled":false,"plantuml_url":null,"terminal_max_session_time":0,"polling_interval_multiplier":1,"rsa_key_restriction":0,"dsa_key_restriction":0,"ecdsa_key_restriction":0,"ed25519_key_restriction":0,"first_day_of_week":0,"enforce_terms":true,"terms":"Hello world!","performance_bar_allowed_group_id":42,"instance_statistics_visibility_private":false,"user_show_add_ssh_key_message":true,"file_template_project_id":1,"local_markdown_version":0,"geo_node_allowed_ips":"0.0.0.0/0, ::/0"} \ No newline at end of file diff --git a/spec/fixtures/approved_access_request.json b/spec/fixtures/approved_access_request.json index 68c2339..c3c80c7 100644 --- a/spec/fixtures/approved_access_request.json +++ b/spec/fixtures/approved_access_request.json @@ -1,8 +1 @@ -{ - "id": 1, - "username": "raymond_smith", - "name": "Raymond Smith", - "state": "active", - "created_at": "2012-10-22T14:13:35Z", - "access_level": 20 -} +{"id":1,"username":"raymond_smith","name":"Raymond Smith","state":"active","created_at":"2012-10-22T14:13:35Z","access_level":20} \ No newline at end of file diff --git a/spec/fixtures/avatar.json b/spec/fixtures/avatar.json index e2ea57c..f15c802 100644 --- a/spec/fixtures/avatar.json +++ b/spec/fixtures/avatar.json @@ -1,3 +1 @@ -{ - "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=64&d=identicon" -} +{"avatar_url":"https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=64&d=identicon"} \ No newline at end of file diff --git a/spec/fixtures/board.json b/spec/fixtures/board.json index f30f9e2..b848a7a 100644 --- a/spec/fixtures/board.json +++ b/spec/fixtures/board.json @@ -1,46 +1 @@ - { - "id": 1, - "name": "project issue board", - "project": { - "id": 5, - "name": "Diaspora Project Site", - "name_with_namespace": "Diaspora / Diaspora Project Site", - "path": "diaspora-project-site", - "path_with_namespace": "diaspora/diaspora-project-site", - "http_url_to_repo": "http://example.com/diaspora/diaspora-project-site.git", - "web_url": "http://example.com/diaspora/diaspora-project-site" - }, - "milestone": { - "id": 12, - "title": "10.0" - }, - "lists" : [ - { - "id" : 1, - "label" : { - "name" : "Testing", - "color" : "#F0AD4E", - "description" : null - }, - "position" : 1 - }, - { - "id" : 2, - "label" : { - "name" : "Ready", - "color" : "#FF0000", - "description" : null - }, - "position" : 2 - }, - { - "id" : 3, - "label" : { - "name" : "Production", - "color" : "#FF5F00", - "description" : null - }, - "position" : 3 - } - ] - } +{"id":1,"name":"project issue board","project":{"id":5,"name":"Diaspora Project Site","name_with_namespace":"Diaspora / Diaspora Project Site","path":"diaspora-project-site","path_with_namespace":"diaspora/diaspora-project-site","http_url_to_repo":"http://example.com/diaspora/diaspora-project-site.git","web_url":"http://example.com/diaspora/diaspora-project-site"},"milestone":{"id":12,"title":"10.0"},"lists":[{"id":1,"label":{"name":"Testing","color":"#F0AD4E","description":null},"position":1},{"id":2,"label":{"name":"Ready","color":"#FF0000","description":null},"position":2},{"id":3,"label":{"name":"Production","color":"#FF5F00","description":null},"position":3}]} \ No newline at end of file diff --git a/spec/fixtures/board_list.json b/spec/fixtures/board_list.json index 8387063..e8cd3db 100644 --- a/spec/fixtures/board_list.json +++ b/spec/fixtures/board_list.json @@ -1 +1 @@ -{ "id" : 1, "label" : { "name" : "Testing", "color" : "#F0AD4E", "description" : null }, "position" : 1 } +{"id":1,"label":{"name":"Testing","color":"#F0AD4E","description":null},"position":1} \ No newline at end of file diff --git a/spec/fixtures/board_lists.json b/spec/fixtures/board_lists.json index baf7d86..94dc01a 100644 --- a/spec/fixtures/board_lists.json +++ b/spec/fixtures/board_lists.json @@ -1 +1 @@ -[ { "id" : 1, "label" : { "name" : "Testing", "color" : "#F0AD4E", "description" : null }, "position" : 1 }, { "id" : 2, "label" : { "name" : "Ready", "color" : "#FF0000", "description" : null }, "position" : 2 }, { "id" : 3, "label" : { "name" : "Production", "color" : "#FF5F00", "description" : null }, "position" : 3 } ] +[{"id":1,"label":{"name":"Testing","color":"#F0AD4E","description":null},"position":1},{"id":2,"label":{"name":"Ready","color":"#FF0000","description":null},"position":2},{"id":3,"label":{"name":"Production","color":"#FF5F00","description":null},"position":3}] \ No newline at end of file diff --git a/spec/fixtures/boards.json b/spec/fixtures/boards.json index beaac52..42e58dc 100644 --- a/spec/fixtures/boards.json +++ b/spec/fixtures/boards.json @@ -1 +1 @@ -[ { "id" : 1, "lists" : [ { "id" : 1, "label" : { "name" : "Testing", "color" : "#F0AD4E", "description" : null }, "position" : 1 }, { "id" : 2, "label" : { "name" : "Ready", "color" : "#FF0000", "description" : null }, "position" : 2 }, { "id" : 3, "label" : { "name" : "Production", "color" : "#FF5F00", "description" : null }, "position" : 3 } ] } ] +[{"id":1,"lists":[{"id":1,"label":{"name":"Testing","color":"#F0AD4E","description":null},"position":1},{"id":2,"label":{"name":"Ready","color":"#FF0000","description":null},"position":2},{"id":3,"label":{"name":"Production","color":"#FF5F00","description":null},"position":3}]}] \ No newline at end of file diff --git a/spec/fixtures/branch.json b/spec/fixtures/branch.json index 34a0208..e632285 100644 --- a/spec/fixtures/branch.json +++ b/spec/fixtures/branch.json @@ -1 +1 @@ -{"name":"api","commit":{"id":"f7dd067490fe57505f7226c3b54d3127d2f7fd46","parents":[{"id":"949b1df930bedace1dbd755aaa4a82e8c451a616"}],"tree":"f8c4b21c036339f92fcc5482aa28a41250553b27","message":"API: expose issues project id","author":{"name":"Nihad Abbasov","email":"narkoz.2008@gmail.com"},"committer":{"name":"Nihad Abbasov","email":"narkoz.2008@gmail.com"},"authored_date":"2012-07-25T04:22:21-07:00","committed_date":"2012-07-25T04:22:21-07:00"},"protected": true} +{"name":"api","commit":{"id":"f7dd067490fe57505f7226c3b54d3127d2f7fd46","parents":[{"id":"949b1df930bedace1dbd755aaa4a82e8c451a616"}],"tree":"f8c4b21c036339f92fcc5482aa28a41250553b27","message":"API: expose issues project id","author":{"name":"Nihad Abbasov","email":"narkoz.2008@gmail.com"},"committer":{"name":"Nihad Abbasov","email":"narkoz.2008@gmail.com"},"authored_date":"2012-07-25T04:22:21-07:00","committed_date":"2012-07-25T04:22:21-07:00"},"protected":true} \ No newline at end of file diff --git a/spec/fixtures/branch_delete.json b/spec/fixtures/branch_delete.json index 4ec8edb..1d2c466 100644 --- a/spec/fixtures/branch_delete.json +++ b/spec/fixtures/branch_delete.json @@ -1,3 +1 @@ -{ - "branch_name": "api" -} +{"branch_name":"api"} \ No newline at end of file diff --git a/spec/fixtures/branches.json b/spec/fixtures/branches.json index 05a3944..ca9bc98 100644 --- a/spec/fixtures/branches.json +++ b/spec/fixtures/branches.json @@ -1 +1 @@ -[{"name":"api","commit":{"id":"f7dd067490fe57505f7226c3b54d3127d2f7fd46","parents":[{"id":"949b1df930bedace1dbd755aaa4a82e8c451a616"}],"tree":"f8c4b21c036339f92fcc5482aa28a41250553b27","message":"API: expose issues project id","author":{"name":"Nihad Abbasov","email":"narkoz.2008@gmail.com"},"committer":{"name":"Nihad Abbasov","email":"narkoz.2008@gmail.com"},"authored_date":"2012-07-25T04:22:21-07:00","committed_date":"2012-07-25T04:22:21-07:00"}},{"name":"dashboard-feed","commit":{"id":"f8f6ff065eccc6ede4d35ed87a09bb962b84ca25","parents":[{"id":"2cf8010792c3075824ee27d0f037aeb178cbbf7e"}],"tree":"e17f2157143d550891d4669c10b7446e4739bc6d","message":"add projects atom feed","author":{"name":"Nihad Abbasov","email":"narkoz.2008@gmail.com"},"committer":{"name":"Nihad Abbasov","email":"narkoz.2008@gmail.com"},"authored_date":"2012-05-31T23:42:02-07:00","committed_date":"2012-05-31T23:42:02-07:00"}},{"name":"master","commit":{"id":"2cf8010792c3075824ee27d0f037aeb178cbbf7e","parents":[{"id":"af226ae9c9af406c8a0e0bbdf364563495c2f432"},{"id":"e851cb07762aa464aae10e8b4b28de87c1a6f925"}],"tree":"6c6845838039f01723d91f395a1d2fa1dcc82522","message":"Merge pull request #868 from SaitoWu/bugfix/encoding\n\nBugfix/encoding","author":{"name":"Dmitriy Zaporozhets","email":"dmitriy.zaporozhets@gmail.com"},"committer":{"name":"Dmitriy Zaporozhets","email":"dmitriy.zaporozhets@gmail.com"},"authored_date":"2012-05-30T00:24:43-07:00","committed_date":"2012-05-30T00:24:43-07:00"}},{"name":"preview_notes","commit":{"id":"3749e0d99ac6bfbc65889b1b7a5310e14e7fe89a","parents":[{"id":"2483181f2c3d4ea7d2c68147b19bc07fc3937b0c"}],"tree":"f8c56161b0d6561568f088df9961362eb1ece88b","message":"pass project_id to notes preview path","author":{"name":"Nihad Abbasov","email":"narkoz.2008@gmail.com"},"committer":{"name":"Nihad Abbasov","email":"narkoz.2008@gmail.com"},"authored_date":"2012-08-09T23:46:27-07:00","committed_date":"2012-08-09T23:46:27-07:00"}},{"name":"refactoring","commit":{"id":"7c7761099cae83f59fe5780340e100be890847b2","parents":[{"id":"058d80b3363dd4fc4417ca4f60f76119188a2470"}],"tree":"d7d4a94c700dc0e84ee943019213d2358a49c413","message":"fix deprecation warnings","author":{"name":"Nihad Abbasov","email":"narkoz.2008@gmail.com"},"committer":{"name":"Nihad Abbasov","email":"narkoz.2008@gmail.com"},"authored_date":"2012-05-29T07:16:28-07:00","committed_date":"2012-05-29T07:16:28-07:00"}}] +[{"name":"api","commit":{"id":"f7dd067490fe57505f7226c3b54d3127d2f7fd46","parents":[{"id":"949b1df930bedace1dbd755aaa4a82e8c451a616"}],"tree":"f8c4b21c036339f92fcc5482aa28a41250553b27","message":"API: expose issues project id","author":{"name":"Nihad Abbasov","email":"narkoz.2008@gmail.com"},"committer":{"name":"Nihad Abbasov","email":"narkoz.2008@gmail.com"},"authored_date":"2012-07-25T04:22:21-07:00","committed_date":"2012-07-25T04:22:21-07:00"}},{"name":"dashboard-feed","commit":{"id":"f8f6ff065eccc6ede4d35ed87a09bb962b84ca25","parents":[{"id":"2cf8010792c3075824ee27d0f037aeb178cbbf7e"}],"tree":"e17f2157143d550891d4669c10b7446e4739bc6d","message":"add projects atom feed","author":{"name":"Nihad Abbasov","email":"narkoz.2008@gmail.com"},"committer":{"name":"Nihad Abbasov","email":"narkoz.2008@gmail.com"},"authored_date":"2012-05-31T23:42:02-07:00","committed_date":"2012-05-31T23:42:02-07:00"}},{"name":"master","commit":{"id":"2cf8010792c3075824ee27d0f037aeb178cbbf7e","parents":[{"id":"af226ae9c9af406c8a0e0bbdf364563495c2f432"},{"id":"e851cb07762aa464aae10e8b4b28de87c1a6f925"}],"tree":"6c6845838039f01723d91f395a1d2fa1dcc82522","message":"Merge pull request #868 from SaitoWu/bugfix/encoding\n\nBugfix/encoding","author":{"name":"Dmitriy Zaporozhets","email":"dmitriy.zaporozhets@gmail.com"},"committer":{"name":"Dmitriy Zaporozhets","email":"dmitriy.zaporozhets@gmail.com"},"authored_date":"2012-05-30T00:24:43-07:00","committed_date":"2012-05-30T00:24:43-07:00"}},{"name":"preview_notes","commit":{"id":"3749e0d99ac6bfbc65889b1b7a5310e14e7fe89a","parents":[{"id":"2483181f2c3d4ea7d2c68147b19bc07fc3937b0c"}],"tree":"f8c56161b0d6561568f088df9961362eb1ece88b","message":"pass project_id to notes preview path","author":{"name":"Nihad Abbasov","email":"narkoz.2008@gmail.com"},"committer":{"name":"Nihad Abbasov","email":"narkoz.2008@gmail.com"},"authored_date":"2012-08-09T23:46:27-07:00","committed_date":"2012-08-09T23:46:27-07:00"}},{"name":"refactoring","commit":{"id":"7c7761099cae83f59fe5780340e100be890847b2","parents":[{"id":"058d80b3363dd4fc4417ca4f60f76119188a2470"}],"tree":"d7d4a94c700dc0e84ee943019213d2358a49c413","message":"fix deprecation warnings","author":{"name":"Nihad Abbasov","email":"narkoz.2008@gmail.com"},"committer":{"name":"Nihad Abbasov","email":"narkoz.2008@gmail.com"},"authored_date":"2012-05-29T07:16:28-07:00","committed_date":"2012-05-29T07:16:28-07:00"}}] \ No newline at end of file diff --git a/spec/fixtures/broadcast_message.json b/spec/fixtures/broadcast_message.json index 999892d..f66e6bc 100644 --- a/spec/fixtures/broadcast_message.json +++ b/spec/fixtures/broadcast_message.json @@ -1,9 +1 @@ -{ - "message":"Deploy in progress", - "starts_at":"2016-08-24T23:21:16.078Z", - "ends_at":"2016-08-26T23:21:16.080Z", - "color":"#cecece", - "font":"#FFFFFF", - "id":1, - "active":false -} +{"message":"Deploy in progress","starts_at":"2016-08-24T23:21:16.078Z","ends_at":"2016-08-26T23:21:16.080Z","color":"#cecece","font":"#FFFFFF","id":1,"active":false} \ No newline at end of file diff --git a/spec/fixtures/broadcast_messages.json b/spec/fixtures/broadcast_messages.json index 92e6acd..55933af 100644 --- a/spec/fixtures/broadcast_messages.json +++ b/spec/fixtures/broadcast_messages.json @@ -1,11 +1 @@ -[ - { - "message":"Example broadcast message", - "starts_at":"2016-08-24T23:21:16.078Z", - "ends_at":"2016-08-26T23:21:16.080Z", - "color":"#E75E40", - "font":"#FFFFFF", - "id":1, - "active": false - } -] +[{"message":"Example broadcast message","starts_at":"2016-08-24T23:21:16.078Z","ends_at":"2016-08-26T23:21:16.080Z","color":"#E75E40","font":"#FFFFFF","id":1,"active":false}] \ No newline at end of file diff --git a/spec/fixtures/build.json b/spec/fixtures/build.json index c0c9b2f..5007d06 100644 --- a/spec/fixtures/build.json +++ b/spec/fixtures/build.json @@ -1,38 +1 @@ -{ - "commit": { - "author_email": "admin@example.com", - "author_name": "Administrator", - "created_at": "2015-12-24T16:51:14.000+01:00", - "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", - "message": "Test the CI integration.", - "short_id": "0ff3ae19", - "title": "Test the CI integration." - }, - "coverage": null, - "created_at": "2015-12-24T15:51:21.880Z", - "download_url": null, - "finished_at": "2015-12-24T17:54:31.198Z", - "id": 8, - "name": "rubocop", - "ref": "master", - "runner": null, - "stage": "test", - "started_at": "2015-12-24T17:54:30.733Z", - "status": "failed", - "tag": false, - "user": { - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "bio": null, - "created_at": "2015-12-21T13:14:24.077Z", - "id": 1, - "is_admin": true, - "linkedin": "", - "name": "John Smith", - "skype": "", - "state": "active", - "twitter": "", - "username": "root", - "web_url": "http://gitlab.dev/u/root", - "website_url": "" - } -} \ No newline at end of file +{"commit":{"author_email":"admin@example.com","author_name":"Administrator","created_at":"2015-12-24T16:51:14.000+01:00","id":"0ff3ae198f8601a285adcf5c0fff204ee6fba5fd","message":"Test the CI integration.","short_id":"0ff3ae19","title":"Test the CI integration."},"coverage":null,"created_at":"2015-12-24T15:51:21.880Z","download_url":null,"finished_at":"2015-12-24T17:54:31.198Z","id":8,"name":"rubocop","ref":"master","runner":null,"stage":"test","started_at":"2015-12-24T17:54:30.733Z","status":"failed","tag":false,"user":{"avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","bio":null,"created_at":"2015-12-21T13:14:24.077Z","id":1,"is_admin":true,"linkedin":"","name":"John Smith","skype":"","state":"active","twitter":"","username":"root","web_url":"http://gitlab.dev/u/root","website_url":""}} \ No newline at end of file diff --git a/spec/fixtures/build_artifacts.json b/spec/fixtures/build_artifacts.json deleted file mode 100644 index 6851e34..0000000 Binary files a/spec/fixtures/build_artifacts.json and /dev/null differ diff --git a/spec/fixtures/build_artifacts.zip b/spec/fixtures/build_artifacts.zip new file mode 100644 index 0000000..6851e34 Binary files /dev/null and b/spec/fixtures/build_artifacts.zip differ diff --git a/spec/fixtures/build_cancel.json b/spec/fixtures/build_cancel.json index dd54823..f91d3e8 100644 --- a/spec/fixtures/build_cancel.json +++ b/spec/fixtures/build_cancel.json @@ -1,24 +1 @@ -{ - "commit": { - "author_email": "admin@example.com", - "author_name": "John Smith", - "created_at": "2015-12-24T16:51:14.000+01:00", - "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", - "message": "Test the CI integration.", - "short_id": "0ff3ae19", - "title": "Test the CI integration." - }, - "coverage": null, - "created_at": "2016-01-11T10:13:33.506Z", - "download_url": null, - "finished_at": "2016-01-11T10:14:09.526Z", - "id": 69, - "name": "rubocop", - "ref": "master", - "runner": null, - "stage": "test", - "started_at": null, - "status": "canceled", - "tag": false, - "user": null -} \ No newline at end of file +{"commit":{"author_email":"admin@example.com","author_name":"John Smith","created_at":"2015-12-24T16:51:14.000+01:00","id":"0ff3ae198f8601a285adcf5c0fff204ee6fba5fd","message":"Test the CI integration.","short_id":"0ff3ae19","title":"Test the CI integration."},"coverage":null,"created_at":"2016-01-11T10:13:33.506Z","download_url":null,"finished_at":"2016-01-11T10:14:09.526Z","id":69,"name":"rubocop","ref":"master","runner":null,"stage":"test","started_at":null,"status":"canceled","tag":false,"user":null} \ No newline at end of file diff --git a/spec/fixtures/build_erase.json b/spec/fixtures/build_erase.json index d745979..344b1f7 100644 --- a/spec/fixtures/build_erase.json +++ b/spec/fixtures/build_erase.json @@ -1,24 +1 @@ -{ - "commit": { - "author_email": "admin@example.com", - "author_name": "John Smith", - "created_at": "2015-12-24T16:51:14.000+01:00", - "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", - "message": "Test the CI integration.", - "short_id": "0ff3ae19", - "title": "Test the CI integration." - }, - "coverage": null, - "download_url": null, - "id": 69, - "name": "rubocop", - "ref": "master", - "runner": null, - "stage": "test", - "created_at": "2016-01-11T10:13:33.506Z", - "started_at": "2016-01-11T10:13:33.506Z", - "finished_at": "2016-01-11T10:15:10.506Z", - "status": "failed", - "tag": false, - "user": null -} +{"commit":{"author_email":"admin@example.com","author_name":"John Smith","created_at":"2015-12-24T16:51:14.000+01:00","id":"0ff3ae198f8601a285adcf5c0fff204ee6fba5fd","message":"Test the CI integration.","short_id":"0ff3ae19","title":"Test the CI integration."},"coverage":null,"download_url":null,"id":69,"name":"rubocop","ref":"master","runner":null,"stage":"test","created_at":"2016-01-11T10:13:33.506Z","started_at":"2016-01-11T10:13:33.506Z","finished_at":"2016-01-11T10:15:10.506Z","status":"failed","tag":false,"user":null} \ No newline at end of file diff --git a/spec/fixtures/build_retry.json b/spec/fixtures/build_retry.json index 04ddb26..5097488 100644 --- a/spec/fixtures/build_retry.json +++ b/spec/fixtures/build_retry.json @@ -1,24 +1 @@ -{ - "commit": { - "author_email": "admin@example.com", - "author_name": "John Smith", - "created_at": "2015-12-24T16:51:14.000+01:00", - "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", - "message": "Test the CI integration.", - "short_id": "0ff3ae19", - "title": "Test the CI integration." - }, - "coverage": null, - "created_at": "2016-01-11T10:13:33.506Z", - "download_url": null, - "finished_at": null, - "id": 69, - "name": "rubocop", - "ref": "master", - "runner": null, - "stage": "test", - "started_at": null, - "status": "pending", - "tag": false, - "user": null -} \ No newline at end of file +{"commit":{"author_email":"admin@example.com","author_name":"John Smith","created_at":"2015-12-24T16:51:14.000+01:00","id":"0ff3ae198f8601a285adcf5c0fff204ee6fba5fd","message":"Test the CI integration.","short_id":"0ff3ae19","title":"Test the CI integration."},"coverage":null,"created_at":"2016-01-11T10:13:33.506Z","download_url":null,"finished_at":null,"id":69,"name":"rubocop","ref":"master","runner":null,"stage":"test","started_at":null,"status":"pending","tag":false,"user":null} \ No newline at end of file diff --git a/spec/fixtures/builds.json b/spec/fixtures/builds.json index 1b93d75..bd47b8c 100644 --- a/spec/fixtures/builds.json +++ b/spec/fixtures/builds.json @@ -1,78 +1 @@ -[ - { - "commit": { - "author_email": "admin@example.com", - "author_name": "Administrator", - "created_at": "2015-12-24T16:51:14.000+01:00", - "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", - "message": "Test the CI integration.", - "short_id": "0ff3ae19", - "title": "Test the CI integration." - }, - "coverage": null, - "created_at": "2015-12-24T15:51:21.802Z", - "download_url": null, - "finished_at": "2015-12-24T17:54:27.895Z", - "id": 7, - "name": "teaspoon", - "ref": "master", - "runner": null, - "stage": "test", - "started_at": "2015-12-24T17:54:27.722Z", - "status": "failed", - "tag": false, - "user": { - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "bio": null, - "created_at": "2015-12-21T13:14:24.077Z", - "id": 1, - "is_admin": true, - "linkedin": "", - "name": "Administrator", - "skype": "", - "state": "active", - "twitter": "", - "username": "root", - "web_url": "http://gitlab.dev/u/root", - "website_url": "" - } - }, - { - "commit": { - "author_email": "admin@example.com", - "author_name": "Administrator", - "created_at": "2015-12-24T16:51:14.000+01:00", - "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", - "message": "Test the CI integration.", - "short_id": "0ff3ae19", - "title": "Test the CI integration." - }, - "coverage": null, - "created_at": "2015-12-24T15:51:21.727Z", - "download_url": null, - "finished_at": "2015-12-24T17:54:24.921Z", - "id": 6, - "name": "spinach:other", - "ref": "master", - "runner": null, - "stage": "test", - "started_at": "2015-12-24T17:54:24.729Z", - "status": "failed", - "tag": false, - "user": { - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "bio": null, - "created_at": "2015-12-21T13:14:24.077Z", - "id": 1, - "is_admin": true, - "linkedin": "", - "name": "Administrator", - "skype": "", - "state": "active", - "twitter": "", - "username": "root", - "web_url": "http://gitlab.dev/u/root", - "website_url": "" - } - } -] \ No newline at end of file +[{"commit":{"author_email":"admin@example.com","author_name":"Administrator","created_at":"2015-12-24T16:51:14.000+01:00","id":"0ff3ae198f8601a285adcf5c0fff204ee6fba5fd","message":"Test the CI integration.","short_id":"0ff3ae19","title":"Test the CI integration."},"coverage":null,"created_at":"2015-12-24T15:51:21.802Z","download_url":null,"finished_at":"2015-12-24T17:54:27.895Z","id":7,"name":"teaspoon","ref":"master","runner":null,"stage":"test","started_at":"2015-12-24T17:54:27.722Z","status":"failed","tag":false,"user":{"avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","bio":null,"created_at":"2015-12-21T13:14:24.077Z","id":1,"is_admin":true,"linkedin":"","name":"Administrator","skype":"","state":"active","twitter":"","username":"root","web_url":"http://gitlab.dev/u/root","website_url":""}},{"commit":{"author_email":"admin@example.com","author_name":"Administrator","created_at":"2015-12-24T16:51:14.000+01:00","id":"0ff3ae198f8601a285adcf5c0fff204ee6fba5fd","message":"Test the CI integration.","short_id":"0ff3ae19","title":"Test the CI integration."},"coverage":null,"created_at":"2015-12-24T15:51:21.727Z","download_url":null,"finished_at":"2015-12-24T17:54:24.921Z","id":6,"name":"spinach:other","ref":"master","runner":null,"stage":"test","started_at":"2015-12-24T17:54:24.729Z","status":"failed","tag":false,"user":{"avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","bio":null,"created_at":"2015-12-21T13:14:24.077Z","id":1,"is_admin":true,"linkedin":"","name":"Administrator","skype":"","state":"active","twitter":"","username":"root","web_url":"http://gitlab.dev/u/root","website_url":""}}] \ No newline at end of file diff --git a/spec/fixtures/builds_commits.json b/spec/fixtures/builds_commits.json index ba08b72..972b196 100644 --- a/spec/fixtures/builds_commits.json +++ b/spec/fixtures/builds_commits.json @@ -1,64 +1 @@ -[ - { - "commit": { - "author_email": "admin@example.com", - "author_name": "Administrator", - "created_at": "2015-12-24T16:51:14.000+01:00", - "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", - "message": "Test the CI integration.", - "short_id": "0ff3ae19", - "title": "Test the CI integration." - }, - "coverage": null, - "created_at": "2016-01-11T10:13:33.506Z", - "download_url": null, - "finished_at": "2016-01-11T10:14:09.526Z", - "id": 69, - "name": "rubocop", - "ref": "master", - "runner": null, - "stage": "test", - "started_at": null, - "status": "canceled", - "tag": false, - "user": null - }, - { - "commit": { - "author_email": "admin@example.com", - "author_name": "Administrator", - "created_at": "2015-12-24T16:51:14.000+01:00", - "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", - "message": "Test the CI integration.", - "short_id": "0ff3ae19", - "title": "Test the CI integration." - }, - "coverage": null, - "created_at": "2015-12-24T15:51:21.957Z", - "download_url": null, - "finished_at": "2015-12-24T17:54:33.913Z", - "id": 9, - "name": "brakeman", - "ref": "master", - "runner": null, - "stage": "test", - "started_at": "2015-12-24T17:54:33.727Z", - "status": "failed", - "tag": false, - "user": { - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "bio": null, - "created_at": "2015-12-21T13:14:24.077Z", - "id": 1, - "is_admin": true, - "linkedin": "", - "name": "Administrator", - "skype": "", - "state": "active", - "twitter": "", - "username": "root", - "web_url": "http://gitlab.dev/u/root", - "website_url": "" - } - } -] \ No newline at end of file +[{"commit":{"author_email":"admin@example.com","author_name":"Administrator","created_at":"2015-12-24T16:51:14.000+01:00","id":"0ff3ae198f8601a285adcf5c0fff204ee6fba5fd","message":"Test the CI integration.","short_id":"0ff3ae19","title":"Test the CI integration."},"coverage":null,"created_at":"2016-01-11T10:13:33.506Z","download_url":null,"finished_at":"2016-01-11T10:14:09.526Z","id":69,"name":"rubocop","ref":"master","runner":null,"stage":"test","started_at":null,"status":"canceled","tag":false,"user":null},{"commit":{"author_email":"admin@example.com","author_name":"Administrator","created_at":"2015-12-24T16:51:14.000+01:00","id":"0ff3ae198f8601a285adcf5c0fff204ee6fba5fd","message":"Test the CI integration.","short_id":"0ff3ae19","title":"Test the CI integration."},"coverage":null,"created_at":"2015-12-24T15:51:21.957Z","download_url":null,"finished_at":"2015-12-24T17:54:33.913Z","id":9,"name":"brakeman","ref":"master","runner":null,"stage":"test","started_at":"2015-12-24T17:54:33.727Z","status":"failed","tag":false,"user":{"avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","bio":null,"created_at":"2015-12-21T13:14:24.077Z","id":1,"is_admin":true,"linkedin":"","name":"Administrator","skype":"","state":"active","twitter":"","username":"root","web_url":"http://gitlab.dev/u/root","website_url":""}}] \ No newline at end of file diff --git a/spec/fixtures/compare_merge_request_diff.json b/spec/fixtures/compare_merge_request_diff.json index e4bc855..bac67d8 100644 --- a/spec/fixtures/compare_merge_request_diff.json +++ b/spec/fixtures/compare_merge_request_diff.json @@ -1,31 +1 @@ - -{ - "commit": { - "id": "12d65c8dd2b2676fa3ac47d955accc085a37a9c1", - "short_id": "12d65c8dd2b", - "title": "JS fix", - "author_name": "Dmitriy Zaporozhets", - "author_email": "dmitriy.zaporozhets@gmail.com", - "created_at": "2014-02-27T10:27:00+02:00" - }, - "commits": [{ - "id": "12d65c8dd2b2676fa3ac47d955accc085a37a9c1", - "short_id": "12d65c8dd2b", - "title": "JS fix", - "author_name": "Dmitriy Zaporozhets", - "author_email": "dmitriy.zaporozhets@gmail.com", - "created_at": "2014-02-27T10:27:00+02:00" - }], - "diffs": [{ - "old_path": "files/js/application.js", - "new_path": "files/js/application.js", - "a_mode": null, - "b_mode": "100644", - "diff": "--- a/files/js/application.js\n+++ b/files/js/application.js\n@@ -24,8 +24,10 @@\n //= require g.raphael-min\n //= require g.bar-min\n //= require branch-graph\n-//= require highlightjs.min\n-//= require ace/ace\n //= require_tree .\n //= require d3\n //= require underscore\n+\n+function fix() { \n+ alert(\"Fixed\")\n+}", - "new_file": false, - "renamed_file": false, - "deleted_file": false - }], - "compare_timeout": false, - "compare_same_ref": false -} +{"commit":{"id":"12d65c8dd2b2676fa3ac47d955accc085a37a9c1","short_id":"12d65c8dd2b","title":"JS fix","author_name":"Dmitriy Zaporozhets","author_email":"dmitriy.zaporozhets@gmail.com","created_at":"2014-02-27T10:27:00+02:00"},"commits":[{"id":"12d65c8dd2b2676fa3ac47d955accc085a37a9c1","short_id":"12d65c8dd2b","title":"JS fix","author_name":"Dmitriy Zaporozhets","author_email":"dmitriy.zaporozhets@gmail.com","created_at":"2014-02-27T10:27:00+02:00"}],"diffs":[{"old_path":"files/js/application.js","new_path":"files/js/application.js","a_mode":null,"b_mode":"100644","diff":"--- a/files/js/application.js\n+++ b/files/js/application.js\n@@ -24,8 +24,10 @@\n //= require g.raphael-min\n //= require g.bar-min\n //= require branch-graph\n-//= require highlightjs.min\n-//= require ace/ace\n //= require_tree .\n //= require d3\n //= require underscore\n+\n+function fix() { \n+ alert(\"Fixed\")\n+}","new_file":false,"renamed_file":false,"deleted_file":false}],"compare_timeout":false,"compare_same_ref":false} \ No newline at end of file diff --git a/spec/fixtures/contributors.json b/spec/fixtures/contributors.json index c4ab553..2ebc4fa 100644 --- a/spec/fixtures/contributors.json +++ b/spec/fixtures/contributors.json @@ -1,13 +1 @@ -[{ - "name": "Dmitriy Zaporozhets", - "email": "dmitriy.zaporozhets@gmail.com", - "commits": 117, - "additions": 2097, - "deletions": 517 - }, { - "name": "Jacob Vosmaer", - "email": "contact@jacobvosmaer.nl", - "commits": 33, - "additions": 338, - "deletions": 244 - }] +[{"name":"Dmitriy Zaporozhets","email":"dmitriy.zaporozhets@gmail.com","commits":117,"additions":2097,"deletions":517},{"name":"Jacob Vosmaer","email":"contact@jacobvosmaer.nl","commits":33,"additions":338,"deletions":244}] \ No newline at end of file diff --git a/spec/fixtures/create_issue_link.json b/spec/fixtures/create_issue_link.json index 807945d..e9cd50f 100644 --- a/spec/fixtures/create_issue_link.json +++ b/spec/fixtures/create_issue_link.json @@ -1,62 +1 @@ -{ - "source_issue": { - "id": 83, - "iid": 11, - "project_id": 4, - "created_at": "2016-01-07T12:44:33.959Z", - "title": "Issues with auth", - "state": "opened", - "assignees": [], - "assignee": null, - "labels": [ - "bug" - ], - "author": { - "name": "Alexandra Bashirian", - "avatar_url": null, - "state": "active", - "web_url": "https://gitlab.example.com/eileen.lowe", - "id": 18, - "username": "eileen.lowe" - }, - "description": null, - "updated_at": "2016-01-07T12:44:33.959Z", - "milestone": null, - "subscribed": true, - "user_notes_count": 0, - "due_date": null, - "web_url": "http://example.com/example/example/issues/11", - "confidential": false, - "weight": null - }, - "target_issue": { - "id": 84, - "iid": 14, - "project_id": 4, - "created_at": "2016-01-07T12:44:33.959Z", - "title": "Issues with auth", - "state": "opened", - "assignees": [], - "assignee": null, - "labels": [ - "bug" - ], - "author": { - "name": "Alexandra Bashirian", - "avatar_url": null, - "state": "active", - "web_url": "https://gitlab.example.com/eileen.lowe", - "id": 18, - "username": "eileen.lowe" - }, - "description": null, - "updated_at": "2016-01-07T12:44:33.959Z", - "milestone": null, - "subscribed": true, - "user_notes_count": 0, - "due_date": null, - "web_url": "http://example.com/example/example/issues/14", - "confidential": false, - "weight": null - } -} \ No newline at end of file +{"source_issue":{"id":83,"iid":11,"project_id":4,"created_at":"2016-01-07T12:44:33.959Z","title":"Issues with auth","state":"opened","assignees":[],"assignee":null,"labels":["bug"],"author":{"name":"Alexandra Bashirian","avatar_url":null,"state":"active","web_url":"https://gitlab.example.com/eileen.lowe","id":18,"username":"eileen.lowe"},"description":null,"updated_at":"2016-01-07T12:44:33.959Z","milestone":null,"subscribed":true,"user_notes_count":0,"due_date":null,"web_url":"http://example.com/example/example/issues/11","confidential":false,"weight":null},"target_issue":{"id":84,"iid":14,"project_id":4,"created_at":"2016-01-07T12:44:33.959Z","title":"Issues with auth","state":"opened","assignees":[],"assignee":null,"labels":["bug"],"author":{"name":"Alexandra Bashirian","avatar_url":null,"state":"active","web_url":"https://gitlab.example.com/eileen.lowe","id":18,"username":"eileen.lowe"},"description":null,"updated_at":"2016-01-07T12:44:33.959Z","milestone":null,"subscribed":true,"user_notes_count":0,"due_date":null,"web_url":"http://example.com/example/example/issues/14","confidential":false,"weight":null}} \ No newline at end of file diff --git a/spec/fixtures/created_user_snippet.json b/spec/fixtures/created_user_snippet.json new file mode 100644 index 0000000..df24e8e --- /dev/null +++ b/spec/fixtures/created_user_snippet.json @@ -0,0 +1 @@ +{"id":1,"title":"This is a snippet","file_name":"test.txt","description":"Hello World snippet","visibility":"internal","author":{"id":1,"username":"john_smith","email":"john@example.com","name":"John Smith","state":"active","created_at":"2012-05-23T08:00:58Z"},"expires_at":null,"updated_at":"2012-06-28T10:52:04Z","created_at":"2012-06-28T10:52:04Z","project_id":null,"web_url":"http://example.com/snippets/1","raw_url":"http://example.com/snippets/1/raw"} \ No newline at end of file diff --git a/spec/fixtures/default_approved_access_request.json b/spec/fixtures/default_approved_access_request.json index 57e652a..7d3b4ad 100644 --- a/spec/fixtures/default_approved_access_request.json +++ b/spec/fixtures/default_approved_access_request.json @@ -1,8 +1 @@ -{ - "id": 1, - "username": "raymond_smith", - "name": "Raymond Smith", - "state": "active", - "created_at": "2012-10-22T14:13:35Z", - "access_level": 30 -} +{"id":1,"username":"raymond_smith","name":"Raymond Smith","state":"active","created_at":"2012-10-22T14:13:35Z","access_level":30} \ No newline at end of file diff --git a/spec/fixtures/delete_issue_link.json b/spec/fixtures/delete_issue_link.json index 807945d..e9cd50f 100644 --- a/spec/fixtures/delete_issue_link.json +++ b/spec/fixtures/delete_issue_link.json @@ -1,62 +1 @@ -{ - "source_issue": { - "id": 83, - "iid": 11, - "project_id": 4, - "created_at": "2016-01-07T12:44:33.959Z", - "title": "Issues with auth", - "state": "opened", - "assignees": [], - "assignee": null, - "labels": [ - "bug" - ], - "author": { - "name": "Alexandra Bashirian", - "avatar_url": null, - "state": "active", - "web_url": "https://gitlab.example.com/eileen.lowe", - "id": 18, - "username": "eileen.lowe" - }, - "description": null, - "updated_at": "2016-01-07T12:44:33.959Z", - "milestone": null, - "subscribed": true, - "user_notes_count": 0, - "due_date": null, - "web_url": "http://example.com/example/example/issues/11", - "confidential": false, - "weight": null - }, - "target_issue": { - "id": 84, - "iid": 14, - "project_id": 4, - "created_at": "2016-01-07T12:44:33.959Z", - "title": "Issues with auth", - "state": "opened", - "assignees": [], - "assignee": null, - "labels": [ - "bug" - ], - "author": { - "name": "Alexandra Bashirian", - "avatar_url": null, - "state": "active", - "web_url": "https://gitlab.example.com/eileen.lowe", - "id": 18, - "username": "eileen.lowe" - }, - "description": null, - "updated_at": "2016-01-07T12:44:33.959Z", - "milestone": null, - "subscribed": true, - "user_notes_count": 0, - "due_date": null, - "web_url": "http://example.com/example/example/issues/14", - "confidential": false, - "weight": null - } -} \ No newline at end of file +{"source_issue":{"id":83,"iid":11,"project_id":4,"created_at":"2016-01-07T12:44:33.959Z","title":"Issues with auth","state":"opened","assignees":[],"assignee":null,"labels":["bug"],"author":{"name":"Alexandra Bashirian","avatar_url":null,"state":"active","web_url":"https://gitlab.example.com/eileen.lowe","id":18,"username":"eileen.lowe"},"description":null,"updated_at":"2016-01-07T12:44:33.959Z","milestone":null,"subscribed":true,"user_notes_count":0,"due_date":null,"web_url":"http://example.com/example/example/issues/11","confidential":false,"weight":null},"target_issue":{"id":84,"iid":14,"project_id":4,"created_at":"2016-01-07T12:44:33.959Z","title":"Issues with auth","state":"opened","assignees":[],"assignee":null,"labels":["bug"],"author":{"name":"Alexandra Bashirian","avatar_url":null,"state":"active","web_url":"https://gitlab.example.com/eileen.lowe","id":18,"username":"eileen.lowe"},"description":null,"updated_at":"2016-01-07T12:44:33.959Z","milestone":null,"subscribed":true,"user_notes_count":0,"due_date":null,"web_url":"http://example.com/example/example/issues/14","confidential":false,"weight":null}} \ No newline at end of file diff --git a/spec/fixtures/deployment.json b/spec/fixtures/deployment.json index f4fbed8..46d3496 100644 --- a/spec/fixtures/deployment.json +++ b/spec/fixtures/deployment.json @@ -1,57 +1 @@ -{ - "id": 42, - "iid": 2, - "ref": "master", - "sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a", - "created_at": "2016-08-11T11:32:35.444Z", - "user": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://localhost:3000/root" - }, - "environment": { - "id": 9, - "name": "production", - "external_url": "https://about.gitlab.com" - }, - "deployable": { - "id": 664, - "status": "success", - "stage": "deploy", - "name": "deploy", - "ref": "master", - "tag": false, - "coverage": null, - "created_at": "2016-08-11T11:32:24.456Z", - "started_at": null, - "finished_at": "2016-08-11T11:32:35.145Z", - "user": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://localhost:3000/root", - "created_at": "2016-08-11T07:09:20.351Z", - "bio": null, - "location": null, - "skype": "", - "linkedin": "", - "twitter": "", - "website_url": "" - }, - "commit": { - "id": "a91957a858320c0e17f3a0eca7cfacbff50ea29a", - "short_id": "a91957a8", - "title": "Merge branch 'rename-readme' into 'master'\r", - "author_name": "Administrator", - "author_email": "admin@example.com", - "created_at": "2016-08-11T13:28:26.000+02:00", - "message": "Merge branch 'rename-readme' into 'master'\r\n\r\nRename README\r\n\r\n\r\n\r\nSee merge request !2" - }, - "runner": null - } -} \ No newline at end of file +{"id":42,"iid":2,"ref":"master","sha":"a91957a858320c0e17f3a0eca7cfacbff50ea29a","created_at":"2016-08-11T11:32:35.444Z","user":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://localhost:3000/root"},"environment":{"id":9,"name":"production","external_url":"https://about.gitlab.com"},"deployable":{"id":664,"status":"success","stage":"deploy","name":"deploy","ref":"master","tag":false,"coverage":null,"created_at":"2016-08-11T11:32:24.456Z","started_at":null,"finished_at":"2016-08-11T11:32:35.145Z","user":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://localhost:3000/root","created_at":"2016-08-11T07:09:20.351Z","bio":null,"location":null,"skype":"","linkedin":"","twitter":"","website_url":""},"commit":{"id":"a91957a858320c0e17f3a0eca7cfacbff50ea29a","short_id":"a91957a8","title":"Merge branch 'rename-readme' into 'master'\r","author_name":"Administrator","author_email":"admin@example.com","created_at":"2016-08-11T13:28:26.000+02:00","message":"Merge branch 'rename-readme' into 'master'\r\n\r\nRename README\r\n\r\n\r\n\r\nSee merge request !2"},"runner":null}} \ No newline at end of file diff --git a/spec/fixtures/deployments.json b/spec/fixtures/deployments.json index 9927a46..eacb295 100644 --- a/spec/fixtures/deployments.json +++ b/spec/fixtures/deployments.json @@ -1,116 +1 @@ -[ - { - "created_at": "2016-08-11T07:36:40.222Z", - "deployable": { - "commit": { - "author_email": "admin@example.com", - "author_name": "Administrator", - "created_at": "2016-08-11T09:36:01.000+02:00", - "id": "99d03678b90d914dbb1b109132516d71a4a03ea8", - "message": "Merge branch 'new-title' into 'master'\r\n\r\nUpdate README\r\n\r\n\r\n\r\nSee merge request !1", - "short_id": "99d03678", - "title": "Merge branch 'new-title' into 'master'\r" - }, - "coverage": null, - "created_at": "2016-08-11T07:36:27.357Z", - "finished_at": "2016-08-11T07:36:39.851Z", - "id": 657, - "name": "deploy", - "ref": "master", - "runner": null, - "stage": "deploy", - "started_at": null, - "status": "success", - "tag": false, - "user": { - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "bio": null, - "created_at": "2016-08-11T07:09:20.351Z", - "id": 1, - "linkedin": "", - "location": null, - "name": "Administrator", - "skype": "", - "state": "active", - "twitter": "", - "username": "root", - "web_url": "http://localhost:3000/root", - "website_url": "" - } - }, - "environment": { - "external_url": "https://about.gitlab.com", - "id": 9, - "name": "production" - }, - "id": 41, - "iid": 1, - "ref": "master", - "sha": "99d03678b90d914dbb1b109132516d71a4a03ea8", - "user": { - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "id": 1, - "name": "Administrator", - "state": "active", - "username": "root", - "web_url": "http://localhost:3000/root" - } - }, - { - "created_at": "2016-08-11T11:32:35.444Z", - "deployable": { - "commit": { - "author_email": "admin@example.com", - "author_name": "Administrator", - "created_at": "2016-08-11T13:28:26.000+02:00", - "id": "a91957a858320c0e17f3a0eca7cfacbff50ea29a", - "message": "Merge branch 'rename-readme' into 'master'\r\n\r\nRename README\r\n\r\n\r\n\r\nSee merge request !2", - "short_id": "a91957a8", - "title": "Merge branch 'rename-readme' into 'master'\r" - }, - "coverage": null, - "created_at": "2016-08-11T11:32:24.456Z", - "finished_at": "2016-08-11T11:32:35.145Z", - "id": 664, - "name": "deploy", - "ref": "master", - "runner": null, - "stage": "deploy", - "started_at": null, - "status": "success", - "tag": false, - "user": { - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "bio": null, - "created_at": "2016-08-11T07:09:20.351Z", - "id": 1, - "linkedin": "", - "location": null, - "name": "Administrator", - "skype": "", - "state": "active", - "twitter": "", - "username": "root", - "web_url": "http://localhost:3000/root", - "website_url": "" - } - }, - "environment": { - "external_url": "https://about.gitlab.com", - "id": 9, - "name": "production" - }, - "id": 42, - "iid": 2, - "ref": "master", - "sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a", - "user": { - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "id": 1, - "name": "Administrator", - "state": "active", - "username": "root", - "web_url": "http://localhost:3000/root" - } - } -] \ No newline at end of file +[{"created_at":"2016-08-11T07:36:40.222Z","deployable":{"commit":{"author_email":"admin@example.com","author_name":"Administrator","created_at":"2016-08-11T09:36:01.000+02:00","id":"99d03678b90d914dbb1b109132516d71a4a03ea8","message":"Merge branch 'new-title' into 'master'\r\n\r\nUpdate README\r\n\r\n\r\n\r\nSee merge request !1","short_id":"99d03678","title":"Merge branch 'new-title' into 'master'\r"},"coverage":null,"created_at":"2016-08-11T07:36:27.357Z","finished_at":"2016-08-11T07:36:39.851Z","id":657,"name":"deploy","ref":"master","runner":null,"stage":"deploy","started_at":null,"status":"success","tag":false,"user":{"avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","bio":null,"created_at":"2016-08-11T07:09:20.351Z","id":1,"linkedin":"","location":null,"name":"Administrator","skype":"","state":"active","twitter":"","username":"root","web_url":"http://localhost:3000/root","website_url":""}},"environment":{"external_url":"https://about.gitlab.com","id":9,"name":"production"},"id":41,"iid":1,"ref":"master","sha":"99d03678b90d914dbb1b109132516d71a4a03ea8","user":{"avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","id":1,"name":"Administrator","state":"active","username":"root","web_url":"http://localhost:3000/root"}},{"created_at":"2016-08-11T11:32:35.444Z","deployable":{"commit":{"author_email":"admin@example.com","author_name":"Administrator","created_at":"2016-08-11T13:28:26.000+02:00","id":"a91957a858320c0e17f3a0eca7cfacbff50ea29a","message":"Merge branch 'rename-readme' into 'master'\r\n\r\nRename README\r\n\r\n\r\n\r\nSee merge request !2","short_id":"a91957a8","title":"Merge branch 'rename-readme' into 'master'\r"},"coverage":null,"created_at":"2016-08-11T11:32:24.456Z","finished_at":"2016-08-11T11:32:35.145Z","id":664,"name":"deploy","ref":"master","runner":null,"stage":"deploy","started_at":null,"status":"success","tag":false,"user":{"avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","bio":null,"created_at":"2016-08-11T07:09:20.351Z","id":1,"linkedin":"","location":null,"name":"Administrator","skype":"","state":"active","twitter":"","username":"root","web_url":"http://localhost:3000/root","website_url":""}},"environment":{"external_url":"https://about.gitlab.com","id":9,"name":"production"},"id":42,"iid":2,"ref":"master","sha":"a91957a858320c0e17f3a0eca7cfacbff50ea29a","user":{"avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","id":1,"name":"Administrator","state":"active","username":"root","web_url":"http://localhost:3000/root"}}] \ No newline at end of file diff --git a/spec/fixtures/dockerfile_project_template.json b/spec/fixtures/dockerfile_project_template.json index 52baf26..2d55503 100644 --- a/spec/fixtures/dockerfile_project_template.json +++ b/spec/fixtures/dockerfile_project_template.json @@ -1,5 +1 @@ -{ - "name": "Binary", - "content": "# This file is a template, and might need editing before it works on your project.\n# This Dockerfile installs a compiled binary into a bare system.\n# You must either commit your compiled binary into source control (not recommended)\n# or build the binary first as part of a CI/CD pipeline.\n\nFROM buildpack-deps:jessie\n\nWORKDIR /usr/local/bin\n\n# Change `app` to whatever your binary is called\nAdd app .\nCMD [\"./app\"]\n" -} - +{"name":"Binary","content":"# This file is a template, and might need editing before it works on your project.\n# This Dockerfile installs a compiled binary into a bare system.\n# You must either commit your compiled binary into source control (not recommended)\n# or build the binary first as part of a CI/CD pipeline.\n\nFROM buildpack-deps:jessie\n\nWORKDIR /usr/local/bin\n\n# Change `app` to whatever your binary is called\nAdd app .\nCMD [\"./app\"]\n"} \ No newline at end of file diff --git a/spec/fixtures/dockerfile_templates.json b/spec/fixtures/dockerfile_templates.json index 257f8d6..c395370 100644 --- a/spec/fixtures/dockerfile_templates.json +++ b/spec/fixtures/dockerfile_templates.json @@ -1,70 +1 @@ -[ - { - "key": "Binary", - "name": "Binary" - }, - { - "key": "Binary-alpine", - "name": "Binary-alpine" - }, - { - "key": "Binary-scratch", - "name": "Binary-scratch" - }, - { - "key": "Golang", - "name": "Golang" - }, - { - "key": "Golang-alpine", - "name": "Golang-alpine" - }, - { - "key": "Golang-scratch", - "name": "Golang-scratch" - }, - { - "key": "HTTPd", - "name": "HTTPd" - }, - { - "key": "Node", - "name": "Node" - }, - { - "key": "Node-alpine", - "name": "Node-alpine" - }, - { - "key": "OpenJDK", - "name": "OpenJDK" - }, - { - "key": "OpenJDK-alpine", - "name": "OpenJDK-alpine" - }, - { - "key": "PHP", - "name": "PHP" - }, - { - "key": "Python", - "name": "Python" - }, - { - "key": "Python-alpine", - "name": "Python-alpine" - }, - { - "key": "Python2", - "name": "Python2" - }, - { - "key": "Ruby", - "name": "Ruby" - }, - { - "key": "Ruby-alpine", - "name": "Ruby-alpine" - } -] +[{"key":"Binary","name":"Binary"},{"key":"Binary-alpine","name":"Binary-alpine"},{"key":"Binary-scratch","name":"Binary-scratch"},{"key":"Golang","name":"Golang"},{"key":"Golang-alpine","name":"Golang-alpine"},{"key":"Golang-scratch","name":"Golang-scratch"},{"key":"HTTPd","name":"HTTPd"},{"key":"Node","name":"Node"},{"key":"Node-alpine","name":"Node-alpine"},{"key":"OpenJDK","name":"OpenJDK"},{"key":"OpenJDK-alpine","name":"OpenJDK-alpine"},{"key":"PHP","name":"PHP"},{"key":"Python","name":"Python"},{"key":"Python-alpine","name":"Python-alpine"},{"key":"Python2","name":"Python2"},{"key":"Ruby","name":"Ruby"},{"key":"Ruby-alpine","name":"Ruby-alpine"}] \ No newline at end of file diff --git a/spec/fixtures/environment.json b/spec/fixtures/environment.json index d1c004b..1d967bd 100644 --- a/spec/fixtures/environment.json +++ b/spec/fixtures/environment.json @@ -1,6 +1 @@ -{ - "id": 12, - "name": "staging", - "slug": "staging-cb247rv", - "external_url": "https://staging.example.gitlab.com" -} \ No newline at end of file +{"id":12,"name":"staging","slug":"staging-cb247rv","external_url":"https://staging.example.gitlab.com"} \ No newline at end of file diff --git a/spec/fixtures/environments.json b/spec/fixtures/environments.json index e1feeb5..7ee926a 100644 --- a/spec/fixtures/environments.json +++ b/spec/fixtures/environments.json @@ -1,14 +1 @@ -[ - { - "id": 1, - "name": "review/fix-foo", - "slug": "review-fix-foo-dfjre3", - "external_url": "https://review-fix-foo-dfjre3.example.gitlab.com" - }, - { - "id": 12, - "name": "review/fix-bar", - "slug": "review-fix-bar-dbwr18", - "external_url": "https://review-fix-bar-dbwr18.example.gitlab.com" - } -] \ No newline at end of file +[{"id":1,"name":"review/fix-foo","slug":"review-fix-foo-dfjre3","external_url":"https://review-fix-foo-dfjre3.example.gitlab.com"},{"id":12,"name":"review/fix-bar","slug":"review-fix-bar-dbwr18","external_url":"https://review-fix-bar-dbwr18.example.gitlab.com"}] \ No newline at end of file diff --git a/spec/fixtures/epic.json b/spec/fixtures/epic.json index 04a655c..fe181e5 100644 --- a/spec/fixtures/epic.json +++ b/spec/fixtures/epic.json @@ -1,34 +1 @@ -{ - "id": 30, - "iid": 5, - "group_id": 7, - "title": "Ea cupiditate dolores ut vero consequatur quasi veniam voluptatem et non.", - "description": "Molestias dolorem eos vitae expedita impedit necessitatibus quo voluptatum.", - "state": "opened", - "web_url": "http://localhost:3001/groups/test/-/epics/5", - "reference": "&5", - "author":{ - "id": 7, - "name": "Pamella Huel", - "username": "arnita", - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/a2f5c6fcef64c9c69cb8779cb292be1b?s=80&d=identicon", - "web_url": "http://localhost:3001/arnita" - }, - "start_date": null, - "start_date_is_fixed": false, - "start_date_fixed": null, - "start_date_from_inherited_source": null, - "due_date": "2018-07-31", - "due_date_is_fixed": false, - "due_date_fixed": null, - "due_date_from_inherited_source": "2018-07-31", - "created_at": "2018-07-17T13:36:22.770Z", - "updated_at": "2018-07-18T12:22:05.239Z", - "closed_at": "2018-08-18T12:22:05.239Z", - "labels": [], - "upvotes": 4, - "downvotes": 0, - "subscribed": true -} - +{"id":30,"iid":5,"group_id":7,"title":"Ea cupiditate dolores ut vero consequatur quasi veniam voluptatem et non.","description":"Molestias dolorem eos vitae expedita impedit necessitatibus quo voluptatum.","state":"opened","web_url":"http://localhost:3001/groups/test/-/epics/5","reference":"&5","author":{"id":7,"name":"Pamella Huel","username":"arnita","state":"active","avatar_url":"http://www.gravatar.com/avatar/a2f5c6fcef64c9c69cb8779cb292be1b?s=80&d=identicon","web_url":"http://localhost:3001/arnita"},"start_date":null,"start_date_is_fixed":false,"start_date_fixed":null,"start_date_from_inherited_source":null,"due_date":"2018-07-31","due_date_is_fixed":false,"due_date_fixed":null,"due_date_from_inherited_source":"2018-07-31","created_at":"2018-07-17T13:36:22.770Z","updated_at":"2018-07-18T12:22:05.239Z","closed_at":"2018-08-18T12:22:05.239Z","labels":[],"upvotes":4,"downvotes":0,"subscribed":true} \ No newline at end of file diff --git a/spec/fixtures/epic_issues.json b/spec/fixtures/epic_issues.json new file mode 100644 index 0000000..5e87b81 --- /dev/null +++ b/spec/fixtures/epic_issues.json @@ -0,0 +1 @@ +[{"id":1,"project_id":1,"title":"Culpa eius recusandae suscipit autem distinctio dolorum.","description":null,"labels":[],"milestone":null,"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z","epic_iid":3,"epic":{"id":2,"iid":3,"title":"Culpa eius recusandae suscipit","group_id":7}},{"id":6,"project_id":2,"title":"Ut in dolorum omnis sed sit aliquam.","description":null,"labels":[],"milestone":null,"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z","epic_iid":3,"epic":{"id":2,"iid":3,"title":"Culpa eius recusandae suscipit","group_id":7}},{"id":12,"project_id":3,"title":"Veniam et tempore quidem eum reprehenderit cupiditate non aut velit eaque.","description":null,"labels":[],"milestone":null,"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z","epic_iid":3,"epic":{"id":2,"iid":3,"title":"Culpa eius recusandae suscipit","group_id":7}},{"id":21,"project_id":1,"title":"Vitae ea aliquam et quo eligendi sapiente voluptatum labore hic nihil culpa.","description":null,"labels":[],"milestone":null,"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z","epic_iid":3,"epic":{"id":2,"iid":3,"title":"Culpa eius recusandae suscipit","group_id":7}},{"id":26,"project_id":2,"title":"Quo enim est nihil atque placeat voluptas neque eos voluptas.","description":null,"labels":[],"milestone":null,"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z","epic_iid":3,"epic":{"id":2,"iid":3,"title":"Culpa eius recusandae suscipit","group_id":7}},{"id":32,"project_id":3,"title":"Deserunt tenetur impedit est beatae voluptas voluptas quaerat quisquam.","description":null,"labels":[],"milestone":null,"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z","epic_iid":3,"epic":{"id":2,"iid":3,"title":"Culpa eius recusandae suscipit","group_id":7}}] \ No newline at end of file diff --git a/spec/fixtures/epics.json b/spec/fixtures/epics.json index c49cf83..b0c7776 100644 --- a/spec/fixtures/epics.json +++ b/spec/fixtures/epics.json @@ -1,35 +1 @@ -[ - { - "id": 29, - "iid": 4, - "group_id": 7, - "title": "Accusamus iste et ullam ratione voluptatem omnis debitis dolor est.", - "description": "Molestias dolorem eos vitae expedita impedit necessitatibus quo voluptatum.", - "state": "opened", - "web_url": "http://localhost:3001/groups/test/-/epics/4", - "reference": "&4", - "author": { - "id": 10, - "name": "Lu Mayer", - "username": "kam", - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/018729e129a6f31c80a6327a30196823?s=80&d=identicon", - "web_url": "http://localhost:3001/kam" - }, - "start_date": null, - "start_date_is_fixed": false, - "start_date_fixed": null, - "start_date_from_inherited_source": null, - "due_date": "2018-07-31", - "due_date_is_fixed": false, - "due_date_fixed": null, - "due_date_from_inherited_source": "2018-07-31", - "created_at": "2018-07-17T13:36:22.770Z", - "updated_at": "2018-07-18T12:22:05.239Z", - "closed_at": "2018-08-18T12:22:05.239Z", - "labels": [], - "upvotes": 4, - "downvotes": 0 - } -] - +[{"id":29,"iid":4,"group_id":7,"title":"Accusamus iste et ullam ratione voluptatem omnis debitis dolor est.","description":"Molestias dolorem eos vitae expedita impedit necessitatibus quo voluptatum.","state":"opened","web_url":"http://localhost:3001/groups/test/-/epics/4","reference":"&4","author":{"id":10,"name":"Lu Mayer","username":"kam","state":"active","avatar_url":"http://www.gravatar.com/avatar/018729e129a6f31c80a6327a30196823?s=80&d=identicon","web_url":"http://localhost:3001/kam"},"start_date":null,"start_date_is_fixed":false,"start_date_fixed":null,"start_date_from_inherited_source":null,"due_date":"2018-07-31","due_date_is_fixed":false,"due_date_fixed":null,"due_date_from_inherited_source":"2018-07-31","created_at":"2018-07-17T13:36:22.770Z","updated_at":"2018-07-18T12:22:05.239Z","closed_at":"2018-08-18T12:22:05.239Z","labels":[],"upvotes":4,"downvotes":0}] \ No newline at end of file diff --git a/spec/fixtures/error_already_exists.json b/spec/fixtures/error_already_exists.json index d1070f5..1b2e7a8 100644 --- a/spec/fixtures/error_already_exists.json +++ b/spec/fixtures/error_already_exists.json @@ -1 +1 @@ -{"message": "409 Already exists"} \ No newline at end of file +{"message":"409 Already exists"} \ No newline at end of file diff --git a/spec/fixtures/error_project_not_found.json b/spec/fixtures/error_project_not_found.json index f0d4e3a..649861d 100644 --- a/spec/fixtures/error_project_not_found.json +++ b/spec/fixtures/error_project_not_found.json @@ -1 +1 @@ -{"message": "404 Project Not Found"} +{"message":"404 Project Not Found"} \ No newline at end of file diff --git a/spec/fixtures/feature.json b/spec/fixtures/feature.json index d9e5b13..ca0395f 100644 --- a/spec/fixtures/feature.json +++ b/spec/fixtures/feature.json @@ -1,14 +1 @@ -{ - "name": "new_library", - "state": "conditional", - "gates": [ - { - "key": "boolean", - "value": false - }, - { - "key": "percentage_of_time", - "value": 30 - } - ] -} +{"name":"new_library","state":"conditional","gates":[{"key":"boolean","value":false},{"key":"percentage_of_time","value":30}]} \ No newline at end of file diff --git a/spec/fixtures/features.json b/spec/fixtures/features.json index a1a88a0..a468974 100644 --- a/spec/fixtures/features.json +++ b/spec/fixtures/features.json @@ -1,22 +1 @@ -[ - { - "name": "experimental_feature", - "state": "off", - "gates": [ - { - "key": "boolean", - "value": false - } - ] - }, - { - "name": "new_library", - "state": "on", - "gates": [ - { - "key": "boolean", - "value": true - } - ] - } -] +[{"name":"experimental_feature","state":"off","gates":[{"key":"boolean","value":false}]},{"name":"new_library","state":"on","gates":[{"key":"boolean","value":true}]}] \ No newline at end of file diff --git a/spec/fixtures/get_file_blame.json b/spec/fixtures/get_file_blame.json index d77f0a0..1042a64 100644 --- a/spec/fixtures/get_file_blame.json +++ b/spec/fixtures/get_file_blame.json @@ -1,23 +1 @@ -[ - { - "commit": { - "id": "d42409d56517157c48bf3bd97d3f75974dde19fb", - "message": "Add feature\n\nalso fix bug\n", - "parent_ids": [ - "cc6e14f9328fa6d7b5a0d3c30dc2002a3f2a3822" - ], - "authored_date": "2015-12-18T08:12:22.000Z", - "author_name": "John Doe", - "author_email": "john.doe@example.com", - "committed_date": "2015-12-18T08:12:22.000Z", - "committer_name": "John Doe", - "committer_email": "john.doe@example.com" - }, - "lines": [ - "require 'fileutils'", - "require 'open3'" - ] - } -] - - +[{"commit":{"id":"d42409d56517157c48bf3bd97d3f75974dde19fb","message":"Add feature\n\nalso fix bug\n","parent_ids":["cc6e14f9328fa6d7b5a0d3c30dc2002a3f2a3822"],"authored_date":"2015-12-18T08:12:22.000Z","author_name":"John Doe","author_email":"john.doe@example.com","committed_date":"2015-12-18T08:12:22.000Z","committer_name":"John Doe","committer_email":"john.doe@example.com"},"lines":["require 'fileutils'","require 'open3'"]}] \ No newline at end of file diff --git a/spec/fixtures/get_repository_file.json b/spec/fixtures/get_repository_file.json index a5120eb..2796b47 100644 --- a/spec/fixtures/get_repository_file.json +++ b/spec/fixtures/get_repository_file.json @@ -1 +1 @@ -{"file_name":"README.md", "file_path":"README.md", "size":"19", "encoding":"base64", "content":"VGhpcyBpcyBhICpSRUFETUUqIQ==\n", "ref":"master", "blob_id":"0eba9dff767611060181e0423a1de2941d27efc8", "commit_id":"eb38397cb6ae669219e6bc18ad19981fff18ea29"} +{"file_name":"README.md","file_path":"README.md","size":"19","encoding":"base64","content":"VGhpcyBpcyBhICpSRUFETUUqIQ==\n","ref":"master","blob_id":"0eba9dff767611060181e0423a1de2941d27efc8","commit_id":"eb38397cb6ae669219e6bc18ad19981fff18ea29"} \ No newline at end of file diff --git a/spec/fixtures/gitignore_template.json b/spec/fixtures/gitignore_template.json index a19637a..b67c8f0 100644 --- a/spec/fixtures/gitignore_template.json +++ b/spec/fixtures/gitignore_template.json @@ -1,4 +1 @@ -{ - "name": "Ruby", - "content": "*.gem\n*.rbc\n/.config\n/coverage/\n/InstalledFiles\n/pkg/\n/spec/reports/\n/spec/examples.txt\n/test/tmp/\n/test/version_tmp/\n/tmp/\n\n# Used by dotenv library to load environment variables.\n# .env\n\n## Specific to RubyMotion:\n.dat*\n.repl_history\nbuild/\n*.bridgesupport\nbuild-iPhoneOS/\nbuild-iPhoneSimulator/\n\n## Specific to RubyMotion (use of CocoaPods):\n#\n# We recommend against adding the Pods directory to your .gitignore. However\n# you should judge for yourself, the pros and cons are mentioned at:\n# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control\n#\n# vendor/Pods/\n\n## Documentation cache and generated files:\n/.yardoc/\n/_yardoc/\n/doc/\n/rdoc/\n\n## Environment normalization:\n/.bundle/\n/vendor/bundle\n/lib/bundler/man/\n\n# for a library or gem, you might want to ignore these files since the code is\n# intended to run in multiple environments; otherwise, check them in:\n# Gemfile.lock\n# .ruby-version\n# .ruby-gemset\n\n# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:\n.rvmrc\n" -} +{"name":"Ruby","content":"*.gem\n*.rbc\n/.config\n/coverage/\n/InstalledFiles\n/pkg/\n/spec/reports/\n/spec/examples.txt\n/test/tmp/\n/test/version_tmp/\n/tmp/\n\n# Used by dotenv library to load environment variables.\n# .env\n\n## Specific to RubyMotion:\n.dat*\n.repl_history\nbuild/\n*.bridgesupport\nbuild-iPhoneOS/\nbuild-iPhoneSimulator/\n\n## Specific to RubyMotion (use of CocoaPods):\n#\n# We recommend against adding the Pods directory to your .gitignore. However\n# you should judge for yourself, the pros and cons are mentioned at:\n# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control\n#\n# vendor/Pods/\n\n## Documentation cache and generated files:\n/.yardoc/\n/_yardoc/\n/doc/\n/rdoc/\n\n## Environment normalization:\n/.bundle/\n/vendor/bundle\n/lib/bundler/man/\n\n# for a library or gem, you might want to ignore these files since the code is\n# intended to run in multiple environments; otherwise, check them in:\n# Gemfile.lock\n# .ruby-version\n# .ruby-gemset\n\n# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:\n.rvmrc\n"} \ No newline at end of file diff --git a/spec/fixtures/gitignore_templates.json b/spec/fixtures/gitignore_templates.json index 156b14c..bb576ff 100644 --- a/spec/fixtures/gitignore_templates.json +++ b/spec/fixtures/gitignore_templates.json @@ -1,82 +1 @@ -[ - { - "key": "Actionscript", - "name": "Actionscript" - }, - { - "key": "Ada", - "name": "Ada" - }, - { - "key": "Agda", - "name": "Agda" - }, - { - "key": "Android", - "name": "Android" - }, - { - "key": "AppEngine", - "name": "AppEngine" - }, - { - "key": "AppceleratorTitanium", - "name": "AppceleratorTitanium" - }, - { - "key": "ArchLinuxPackages", - "name": "ArchLinuxPackages" - }, - { - "key": "Autotools", - "name": "Autotools" - }, - { - "key": "C", - "name": "C" - }, - { - "key": "C++", - "name": "C++" - }, - { - "key": "CFWheels", - "name": "CFWheels" - }, - { - "key": "CMake", - "name": "CMake" - }, - { - "key": "CUDA", - "name": "CUDA" - }, - { - "key": "CakePHP", - "name": "CakePHP" - }, - { - "key": "ChefCookbook", - "name": "ChefCookbook" - }, - { - "key": "Clojure", - "name": "Clojure" - }, - { - "key": "CodeIgniter", - "name": "CodeIgniter" - }, - { - "key": "CommonLisp", - "name": "CommonLisp" - }, - { - "key": "Composer", - "name": "Composer" - }, - { - "key": "Concrete5", - "name": "Concrete5" - } -] +[{"key":"Actionscript","name":"Actionscript"},{"key":"Ada","name":"Ada"},{"key":"Agda","name":"Agda"},{"key":"Android","name":"Android"},{"key":"AppEngine","name":"AppEngine"},{"key":"AppceleratorTitanium","name":"AppceleratorTitanium"},{"key":"ArchLinuxPackages","name":"ArchLinuxPackages"},{"key":"Autotools","name":"Autotools"},{"key":"C","name":"C"},{"key":"C++","name":"C++"},{"key":"CFWheels","name":"CFWheels"},{"key":"CMake","name":"CMake"},{"key":"CUDA","name":"CUDA"},{"key":"CakePHP","name":"CakePHP"},{"key":"ChefCookbook","name":"ChefCookbook"},{"key":"Clojure","name":"Clojure"},{"key":"CodeIgniter","name":"CodeIgniter"},{"key":"CommonLisp","name":"CommonLisp"},{"key":"Composer","name":"Composer"},{"key":"Concrete5","name":"Concrete5"}] \ No newline at end of file diff --git a/spec/fixtures/gitlab_ci_yml_template.json b/spec/fixtures/gitlab_ci_yml_template.json index 8f26cf1..4be91f9 100644 --- a/spec/fixtures/gitlab_ci_yml_template.json +++ b/spec/fixtures/gitlab_ci_yml_template.json @@ -1,4 +1 @@ -{ - "name": "Ruby", - "content": "# This file is a template, and might need editing before it works on your project.\n# Official language image. Look for the different tagged releases at:\n# https://hub.docker.com/r/library/ruby/tags/\nimage: \"ruby:2.3\"\n\n# Pick zero or more services to be used on all builds.\n# Only needed when using a docker container to run your tests in.\n# Check out: http://docs.gitlab.com/ce/ci/docker/using_docker_images.html#what-is-service\nservices:\n - mysql:latest\n - redis:latest\n - postgres:latest\n\nvariables:\n POSTGRES_DB: database_name\n\n# Cache gems in between builds\ncache:\n paths:\n - vendor/ruby\n\n# This is a basic example for a gem or script which doesn't use\n# services such as redis or postgres\nbefore_script:\n - ruby -v # Print out ruby version for debugging\n # Uncomment next line if your rails app needs a JS runtime:\n # - apt-get update -q && apt-get install nodejs -yqq\n - gem install bundler --no-ri --no-rdoc # Bundler is not installed with the image\n - bundle install -j $(nproc) --path vendor # Install dependencies into ./vendor/ruby\n\n# Optional - Delete if not using `rubocop`\nrubocop:\n script:\n - rubocop\n\nrspec:\n script:\n - rspec spec\n\nrails:\n variables:\n DATABASE_URL: \"postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB\"\n script:\n - bundle exec rake db:migrate\n - bundle exec rake db:seed\n - bundle exec rake test\n" -} +{"name":"Ruby","content":"# This file is a template, and might need editing before it works on your project.\n# Official language image. Look for the different tagged releases at:\n# https://hub.docker.com/r/library/ruby/tags/\nimage: \"ruby:2.3\"\n\n# Pick zero or more services to be used on all builds.\n# Only needed when using a docker container to run your tests in.\n# Check out: http://docs.gitlab.com/ce/ci/docker/using_docker_images.html#what-is-service\nservices:\n - mysql:latest\n - redis:latest\n - postgres:latest\n\nvariables:\n POSTGRES_DB: database_name\n\n# Cache gems in between builds\ncache:\n paths:\n - vendor/ruby\n\n# This is a basic example for a gem or script which doesn't use\n# services such as redis or postgres\nbefore_script:\n - ruby -v # Print out ruby version for debugging\n # Uncomment next line if your rails app needs a JS runtime:\n # - apt-get update -q && apt-get install nodejs -yqq\n - gem install bundler --no-ri --no-rdoc # Bundler is not installed with the image\n - bundle install -j $(nproc) --path vendor # Install dependencies into ./vendor/ruby\n\n# Optional - Delete if not using `rubocop`\nrubocop:\n script:\n - rubocop\n\nrspec:\n script:\n - rspec spec\n\nrails:\n variables:\n DATABASE_URL: \"postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB\"\n script:\n - bundle exec rake db:migrate\n - bundle exec rake db:seed\n - bundle exec rake test\n"} \ No newline at end of file diff --git a/spec/fixtures/gitlab_ci_yml_templates.json b/spec/fixtures/gitlab_ci_yml_templates.json index dee9d5f..7a9753b 100644 --- a/spec/fixtures/gitlab_ci_yml_templates.json +++ b/spec/fixtures/gitlab_ci_yml_templates.json @@ -1,82 +1 @@ -[ - { - "key": "Android", - "name": "Android" - }, - { - "key": "Auto-DevOps", - "name": "Auto-DevOps" - }, - { - "key": "Bash", - "name": "Bash" - }, - { - "key": "C++", - "name": "C++" - }, - { - "key": "Chef", - "name": "Chef" - }, - { - "key": "Clojure", - "name": "Clojure" - }, - { - "key": "Crystal", - "name": "Crystal" - }, - { - "key": "Django", - "name": "Django" - }, - { - "key": "Docker", - "name": "Docker" - }, - { - "key": "Elixir", - "name": "Elixir" - }, - { - "key": "Go", - "name": "Go" - }, - { - "key": "Gradle", - "name": "Gradle" - }, - { - "key": "Grails", - "name": "Grails" - }, - { - "key": "Julia", - "name": "Julia" - }, - { - "key": "LaTeX", - "name": "LaTeX" - }, - { - "key": "Laravel", - "name": "Laravel" - }, - { - "key": "Maven", - "name": "Maven" - }, - { - "key": "Mono", - "name": "Mono" - }, - { - "key": "Nodejs", - "name": "Nodejs" - }, - { - "key": "OpenShift", - "name": "OpenShift" - } -] +[{"key":"Android","name":"Android"},{"key":"Auto-DevOps","name":"Auto-DevOps"},{"key":"Bash","name":"Bash"},{"key":"C++","name":"C++"},{"key":"Chef","name":"Chef"},{"key":"Clojure","name":"Clojure"},{"key":"Crystal","name":"Crystal"},{"key":"Django","name":"Django"},{"key":"Docker","name":"Docker"},{"key":"Elixir","name":"Elixir"},{"key":"Go","name":"Go"},{"key":"Gradle","name":"Gradle"},{"key":"Grails","name":"Grails"},{"key":"Julia","name":"Julia"},{"key":"LaTeX","name":"LaTeX"},{"key":"Laravel","name":"Laravel"},{"key":"Maven","name":"Maven"},{"key":"Mono","name":"Mono"},{"key":"Nodejs","name":"Nodejs"},{"key":"OpenShift","name":"OpenShift"}] \ No newline at end of file diff --git a/spec/fixtures/group.json b/spec/fixtures/group.json index bce3581..0da4470 100644 --- a/spec/fixtures/group.json +++ b/spec/fixtures/group.json @@ -1,60 +1 @@ -{"id": 10, "name": "GitLab-Group", "path": "gitlab-group", "owner_id": 6, "projects": [ - { - "id": 9, - "name": "mojito", - "description": null, - "default_branch": "master", - "owner": { - "id": 6, - "username": "jose", - "email": "jose@abc.com", - "name": "Jose Jose", - "blocked": false, - "created_at": "2013-02-06T06:54:06Z" - }, - "path": "mojito", - "path_with_namespace": "gitlab-group/mojito", - "issues_enabled": true, - "merge_requests_enabled": true, - "wall_enabled": true, - "wiki_enabled": true, - "created_at": "2013-02-06T16:59:15Z", - "namespace": { - "created_at": "2013-02-06T16:58:22Z", - "id": 10, - "name": "GitLab-Group", - "owner_id": 6, - "path": "gitlab-group", - "updated_at": "2013-02-06T16:58:22Z" - } - }, - { - "id": 10, - "name": "gitlabhq", - "description": null, - "default_branch": null, - "owner": { - "id": 6, - "username": "randx", - "email": "randx@github.com", - "name": "Dmitry Z", - "blocked": false, - "created_at": "2013-02-06T06:54:06Z" - }, - "path": "gitlabhq", - "path_with_namespace": "gitlab-group/gitlabhq", - "issues_enabled": true, - "merge_requests_enabled": true, - "wall_enabled": true, - "wiki_enabled": true, - "created_at": "2013-02-06T17:02:31Z", - "namespace": { - "created_at": "2013-02-06T16:58:22Z", - "id": 10, - "name": "GitLab-Group", - "owner_id": 6, - "path": "gitlab-group", - "updated_at": "2013-02-06T16:58:22Z" - } - } -]} \ No newline at end of file +{"id":10,"name":"GitLab-Group","path":"gitlab-group","owner_id":6,"projects":[{"id":9,"name":"mojito","description":null,"default_branch":"master","owner":{"id":6,"username":"jose","email":"jose@abc.com","name":"Jose Jose","blocked":false,"created_at":"2013-02-06T06:54:06Z"},"path":"mojito","path_with_namespace":"gitlab-group/mojito","issues_enabled":true,"merge_requests_enabled":true,"wall_enabled":true,"wiki_enabled":true,"created_at":"2013-02-06T16:59:15Z","namespace":{"created_at":"2013-02-06T16:58:22Z","id":10,"name":"GitLab-Group","owner_id":6,"path":"gitlab-group","updated_at":"2013-02-06T16:58:22Z"}},{"id":10,"name":"gitlabhq","description":null,"default_branch":null,"owner":{"id":6,"username":"randx","email":"randx@github.com","name":"Dmitry Z","blocked":false,"created_at":"2013-02-06T06:54:06Z"},"path":"gitlabhq","path_with_namespace":"gitlab-group/gitlabhq","issues_enabled":true,"merge_requests_enabled":true,"wall_enabled":true,"wiki_enabled":true,"created_at":"2013-02-06T17:02:31Z","namespace":{"created_at":"2013-02-06T16:58:22Z","id":10,"name":"GitLab-Group","owner_id":6,"path":"gitlab-group","updated_at":"2013-02-06T16:58:22Z"}}]} \ No newline at end of file diff --git a/spec/fixtures/group_add_ldap_links.json b/spec/fixtures/group_add_ldap_links.json index 749bba5..35631af 100644 --- a/spec/fixtures/group_add_ldap_links.json +++ b/spec/fixtures/group_add_ldap_links.json @@ -1 +1 @@ -{"cn":"all","group_access":50,"provider":"ldap"} +{"cn":"all","group_access":50,"provider":"ldap"} \ No newline at end of file diff --git a/spec/fixtures/group_board.json b/spec/fixtures/group_board.json index af97a6e..df6b26c 100644 --- a/spec/fixtures/group_board.json +++ b/spec/fixtures/group_board.json @@ -1,67 +1 @@ - { - "id": 1, - "name": "group issue board", - "group": { - "id": 5, - "name": "Documentcloud", - "path": "documentcloud", - "owner_id": null, - "created_at": "2018-05-07T06:52:45.788Z", - "updated_at": "2018-07-03T06:48:17.005Z", - "description": "Consequatur aut a aperiam ut.", - "avatar": { - "url": null - }, - "membership_lock": false, - "share_with_group_lock": false, - "visibility_level": 20, - "request_access_enabled": false, - "ldap_sync_status": "ready", - "ldap_sync_error": null, - "ldap_sync_last_update_at": null, - "ldap_sync_last_successful_update_at": null, - "ldap_sync_last_sync_at": null, - "lfs_enabled": null, - "parent_id": null, - "shared_runners_minutes_limit": null, - "repository_size_limit": null, - "require_two_factor_authentication": false, - "two_factor_grace_period": 48, - "plan_id": null, - "project_creation_level": 2, - "runners_token": "rgeeL-nv4wa9YdRvuMid" - }, - "milestone": { - "id": 12, - "title": "10.0" - }, - "lists" : [ - { - "id" : 1, - "label" : { - "name" : "Testing", - "color" : "#F0AD4E", - "description" : null - }, - "position" : 1 - }, - { - "id" : 2, - "label" : { - "name" : "Ready", - "color" : "#FF0000", - "description" : null - }, - "position" : 2 - }, - { - "id" : 3, - "label" : { - "name" : "Production", - "color" : "#FF5F00", - "description" : null - }, - "position" : 3 - } - ] - } +{"id":1,"name":"group issue board","group":{"id":5,"name":"Documentcloud","path":"documentcloud","owner_id":null,"created_at":"2018-05-07T06:52:45.788Z","updated_at":"2018-07-03T06:48:17.005Z","description":"Consequatur aut a aperiam ut.","avatar":{"url":null},"membership_lock":false,"share_with_group_lock":false,"visibility_level":20,"request_access_enabled":false,"ldap_sync_status":"ready","ldap_sync_error":null,"ldap_sync_last_update_at":null,"ldap_sync_last_successful_update_at":null,"ldap_sync_last_sync_at":null,"lfs_enabled":null,"parent_id":null,"shared_runners_minutes_limit":null,"repository_size_limit":null,"require_two_factor_authentication":false,"two_factor_grace_period":48,"plan_id":null,"project_creation_level":2,"runners_token":"rgeeL-nv4wa9YdRvuMid"},"milestone":{"id":12,"title":"10.0"},"lists":[{"id":1,"label":{"name":"Testing","color":"#F0AD4E","description":null},"position":1},{"id":2,"label":{"name":"Ready","color":"#FF0000","description":null},"position":2},{"id":3,"label":{"name":"Production","color":"#FF5F00","description":null},"position":3}]} \ No newline at end of file diff --git a/spec/fixtures/group_board_list.json b/spec/fixtures/group_board_list.json index bf518d2..e8cd3db 100644 --- a/spec/fixtures/group_board_list.json +++ b/spec/fixtures/group_board_list.json @@ -1,9 +1 @@ -{ - "id" : 1, - "label" : { - "name" : "Testing", - "color" : "#F0AD4E", - "description" : null - }, - "position" : 1 -} +{"id":1,"label":{"name":"Testing","color":"#F0AD4E","description":null},"position":1} \ No newline at end of file diff --git a/spec/fixtures/group_board_lists.json b/spec/fixtures/group_board_lists.json index c3a2c4b..94dc01a 100644 --- a/spec/fixtures/group_board_lists.json +++ b/spec/fixtures/group_board_lists.json @@ -1,29 +1 @@ -[ - { - "id" : 1, - "label" : { - "name" : "Testing", - "color" : "#F0AD4E", - "description" : null - }, - "position" : 1 - }, - { - "id" : 2, - "label" : { - "name" : "Ready", - "color" : "#FF0000", - "description" : null - }, - "position" : 2 - }, - { - "id" : 3, - "label" : { - "name" : "Production", - "color" : "#FF5F00", - "description" : null - }, - "position" : 3 - } -] +[{"id":1,"label":{"name":"Testing","color":"#F0AD4E","description":null},"position":1},{"id":2,"label":{"name":"Ready","color":"#FF0000","description":null},"position":2},{"id":3,"label":{"name":"Production","color":"#FF5F00","description":null},"position":3}] \ No newline at end of file diff --git a/spec/fixtures/group_boards.json b/spec/fixtures/group_boards.json index 891b2e8..0d2f381 100644 --- a/spec/fixtures/group_boards.json +++ b/spec/fixtures/group_boards.json @@ -1,69 +1 @@ -[ - { - "id": 1, - "name": "group issue board", - "group": { - "id": 5, - "name": "Documentcloud", - "path": "documentcloud", - "owner_id": null, - "created_at": "2018-05-07T06:52:45.788Z", - "updated_at": "2018-07-03T06:48:17.005Z", - "description": "Consequatur aut a aperiam ut.", - "avatar": { - "url": null - }, - "membership_lock": false, - "share_with_group_lock": false, - "visibility_level": 20, - "request_access_enabled": false, - "ldap_sync_status": "ready", - "ldap_sync_error": null, - "ldap_sync_last_update_at": null, - "ldap_sync_last_successful_update_at": null, - "ldap_sync_last_sync_at": null, - "lfs_enabled": null, - "parent_id": null, - "shared_runners_minutes_limit": null, - "repository_size_limit": null, - "require_two_factor_authentication": false, - "two_factor_grace_period": 48, - "plan_id": null, - "project_creation_level": 2, - "runners_token": "rgeeL-nv4wa9YdRvuMid" - }, - "milestone": { - "id": 12, - "title": "10.0" - }, - "lists" : [ - { - "id" : 1, - "label" : { - "name" : "Testing", - "color" : "#F0AD4E", - "description" : null - }, - "position" : 1 - }, - { - "id" : 2, - "label" : { - "name" : "Ready", - "color" : "#FF0000", - "description" : null - }, - "position" : 2 - }, - { - "id" : 3, - "label" : { - "name" : "Production", - "color" : "#FF5F00", - "description" : null - }, - "position" : 3 - } - ] - } -] +[{"id":1,"name":"group issue board","group":{"id":5,"name":"Documentcloud","path":"documentcloud","owner_id":null,"created_at":"2018-05-07T06:52:45.788Z","updated_at":"2018-07-03T06:48:17.005Z","description":"Consequatur aut a aperiam ut.","avatar":{"url":null},"membership_lock":false,"share_with_group_lock":false,"visibility_level":20,"request_access_enabled":false,"ldap_sync_status":"ready","ldap_sync_error":null,"ldap_sync_last_update_at":null,"ldap_sync_last_successful_update_at":null,"ldap_sync_last_sync_at":null,"lfs_enabled":null,"parent_id":null,"shared_runners_minutes_limit":null,"repository_size_limit":null,"require_two_factor_authentication":false,"two_factor_grace_period":48,"plan_id":null,"project_creation_level":2,"runners_token":"rgeeL-nv4wa9YdRvuMid"},"milestone":{"id":12,"title":"10.0"},"lists":[{"id":1,"label":{"name":"Testing","color":"#F0AD4E","description":null},"position":1},{"id":2,"label":{"name":"Ready","color":"#FF0000","description":null},"position":2},{"id":3,"label":{"name":"Production","color":"#FF5F00","description":null},"position":3}]}] \ No newline at end of file diff --git a/spec/fixtures/group_delete.json b/spec/fixtures/group_delete.json index a304bce..55a0bc9 100644 --- a/spec/fixtures/group_delete.json +++ b/spec/fixtures/group_delete.json @@ -1 +1 @@ -{"id":42,"name":"Gitlab-Group","path":"gitlab-group","created_at":"2016-02-24T20:16:42.906Z","updated_at":"2016-02-24T20:16:42.906Z"} +{"id":42,"name":"Gitlab-Group","path":"gitlab-group","created_at":"2016-02-24T20:16:42.906Z","updated_at":"2016-02-24T20:16:42.906Z"} \ No newline at end of file diff --git a/spec/fixtures/group_edit.json b/spec/fixtures/group_edit.json index c4eac36..ba5f3e0 100644 --- a/spec/fixtures/group_edit.json +++ b/spec/fixtures/group_edit.json @@ -1,14 +1 @@ -{ - "id": 1, - "name": "Foobar Group", - "path": "foo-bar", - "description": "An interesting group", - "visibility": "public", - "lfs_enabled": true, - "avatar_url": "http://gitlab.example.com/uploads/group/avatar/1/foo.jpg", - "web_url": "http://gitlab.example.com/groups/foo-bar", - "request_access_enabled": false, - "full_name": "Foobar Group", - "full_path": "foo-bar", - "parent_id": 123 -} +{"id":1,"name":"Foobar Group","path":"foo-bar","description":"An interesting group","visibility":"public","lfs_enabled":true,"avatar_url":"http://gitlab.example.com/uploads/group/avatar/1/foo.jpg","web_url":"http://gitlab.example.com/groups/foo-bar","request_access_enabled":false,"full_name":"Foobar Group","full_path":"foo-bar","parent_id":123} \ No newline at end of file diff --git a/spec/fixtures/group_issues.json b/spec/fixtures/group_issues.json index 61a0acf..01f9dc7 100644 --- a/spec/fixtures/group_issues.json +++ b/spec/fixtures/group_issues.json @@ -1,118 +1 @@ -[ - { - "project_id" : 4, - "milestone" : { - "due_date" : null, - "project_id" : 4, - "state" : "closed", - "description" : "Rerum est voluptatem provident consequuntur molestias similique ipsum dolor.", - "iid" : 3, - "id" : 11, - "title" : "v3.0", - "created_at" : "2016-01-04T15:31:39.788Z", - "updated_at" : "2016-01-04T15:31:39.788Z" - }, - "author" : { - "state" : "active", - "web_url" : "https://gitlab.example.com/root", - "avatar_url" : null, - "username" : "root", - "id" : 1, - "name" : "Administrator" - }, - "description" : "Omnis vero earum sunt corporis dolor et placeat.", - "state" : "closed", - "iid" : 1, - "assignees" : [{ - "avatar_url" : null, - "web_url" : "https://gitlab.example.com/lennie", - "state" : "active", - "username" : "lennie", - "id" : 9, - "name" : "Dr. Luella Kovacek" - }], - "assignee" : { - "avatar_url" : null, - "web_url" : "https://gitlab.example.com/lennie", - "state" : "active", - "username" : "lennie", - "id" : 9, - "name" : "Dr. Luella Kovacek" - }, - "labels" : [], - "id" : 41, - "title" : "Ut commodi ullam eos dolores perferendis nihil sunt.", - "updated_at" : "2016-01-04T15:31:46.176Z", - "created_at" : "2016-01-04T15:31:46.176Z", - "closed_at" : null, - "user_notes_count": 1, - "due_date": null, - "web_url": "http://example.com/example/example/issues/1", - "time_stats": { - "time_estimate": 0, - "total_time_spent": 0, - "human_time_estimate": null, - "human_total_time_spent": null - }, - "confidential": false, - "discussion_locked": false - }, - { - "project_id" : 4, - "milestone" : { - "due_date" : null, - "project_id" : 4, - "state" : "closed", - "description" : "Rerum est voluptatem provident consequuntur molestias similique ipsum dolor.", - "iid" : 3, - "id" : 11, - "title" : "v3.0", - "created_at" : "2016-01-04T15:31:39.788Z", - "updated_at" : "2016-01-04T15:31:39.788Z" - }, - "author" : { - "state" : "active", - "web_url" : "https://gitlab.example.com/root", - "avatar_url" : null, - "username" : "root", - "id" : 1, - "name" : "Administrator" - }, - "description" : "different", - "state" : "closed", - "iid" : 1, - "assignees" : [{ - "avatar_url" : null, - "web_url" : "https://gitlab.example.com/lennie", - "state" : "active", - "username" : "lennie", - "id" : 9, - "name" : "Dr. Luella Kovacek" - }], - "assignee" : { - "avatar_url" : null, - "web_url" : "https://gitlab.example.com/lennie", - "state" : "active", - "username" : "lennie", - "id" : 9, - "name" : "Dr. Luella Kovacek" - }, - "labels" : [], - "id" : 41, - "title" : "different", - "updated_at" : "2016-01-04T15:31:46.176Z", - "created_at" : "2016-01-04T15:31:46.176Z", - "closed_at" : null, - "user_notes_count": 1, - "due_date": null, - "web_url": "http://example.com/example/example/issues/1", - "time_stats": { - "time_estimate": 0, - "total_time_spent": 0, - "human_time_estimate": null, - "human_total_time_spent": null - }, - "confidential": false, - "discussion_locked": false - } -] \ No newline at end of file +[{"project_id":4,"milestone":{"due_date":null,"project_id":4,"state":"closed","description":"Rerum est voluptatem provident consequuntur molestias similique ipsum dolor.","iid":3,"id":11,"title":"v3.0","created_at":"2016-01-04T15:31:39.788Z","updated_at":"2016-01-04T15:31:39.788Z"},"author":{"state":"active","web_url":"https://gitlab.example.com/root","avatar_url":null,"username":"root","id":1,"name":"Administrator"},"description":"Omnis vero earum sunt corporis dolor et placeat.","state":"closed","iid":1,"assignees":[{"avatar_url":null,"web_url":"https://gitlab.example.com/lennie","state":"active","username":"lennie","id":9,"name":"Dr. Luella Kovacek"}],"assignee":{"avatar_url":null,"web_url":"https://gitlab.example.com/lennie","state":"active","username":"lennie","id":9,"name":"Dr. Luella Kovacek"},"labels":[],"id":41,"title":"Ut commodi ullam eos dolores perferendis nihil sunt.","updated_at":"2016-01-04T15:31:46.176Z","created_at":"2016-01-04T15:31:46.176Z","closed_at":null,"user_notes_count":1,"due_date":null,"web_url":"http://example.com/example/example/issues/1","time_stats":{"time_estimate":0,"total_time_spent":0,"human_time_estimate":null,"human_total_time_spent":null},"confidential":false,"discussion_locked":false},{"project_id":4,"milestone":{"due_date":null,"project_id":4,"state":"closed","description":"Rerum est voluptatem provident consequuntur molestias similique ipsum dolor.","iid":3,"id":11,"title":"v3.0","created_at":"2016-01-04T15:31:39.788Z","updated_at":"2016-01-04T15:31:39.788Z"},"author":{"state":"active","web_url":"https://gitlab.example.com/root","avatar_url":null,"username":"root","id":1,"name":"Administrator"},"description":"different","state":"closed","iid":1,"assignees":[{"avatar_url":null,"web_url":"https://gitlab.example.com/lennie","state":"active","username":"lennie","id":9,"name":"Dr. Luella Kovacek"}],"assignee":{"avatar_url":null,"web_url":"https://gitlab.example.com/lennie","state":"active","username":"lennie","id":9,"name":"Dr. Luella Kovacek"},"labels":[],"id":41,"title":"different","updated_at":"2016-01-04T15:31:46.176Z","created_at":"2016-01-04T15:31:46.176Z","closed_at":null,"user_notes_count":1,"due_date":null,"web_url":"http://example.com/example/example/issues/1","time_stats":{"time_estimate":0,"total_time_spent":0,"human_time_estimate":null,"human_total_time_spent":null},"confidential":false,"discussion_locked":false}] \ No newline at end of file diff --git a/spec/fixtures/group_label.json b/spec/fixtures/group_label.json index 0439f61..de9aa48 100644 --- a/spec/fixtures/group_label.json +++ b/spec/fixtures/group_label.json @@ -1,8 +1 @@ -{ - "name": "Backlog", - "color": "#DD10AA", - "open_issues_count": 72, - "closed_issues_count": 72, - "open_merge_requests_count": 4, - "subscribed": true -} +{"name":"Backlog","color":"#DD10AA","open_issues_count":72,"closed_issues_count":72,"open_merge_requests_count":4,"subscribed":true} \ No newline at end of file diff --git a/spec/fixtures/group_label_unsubscribe.json b/spec/fixtures/group_label_unsubscribe.json index 6e2dec4..229e9c9 100644 --- a/spec/fixtures/group_label_unsubscribe.json +++ b/spec/fixtures/group_label_unsubscribe.json @@ -1,8 +1 @@ -{ - "name": "Backlog", - "color": "#DD10AA", - "open_issues_count": 72, - "closed_issues_count": 72, - "open_merge_requests_count": 4, - "subscribed": false -} +{"name":"Backlog","color":"#DD10AA","open_issues_count":72,"closed_issues_count":72,"open_merge_requests_count":4,"subscribed":false} \ No newline at end of file diff --git a/spec/fixtures/group_labels.json b/spec/fixtures/group_labels.json index 1c62892..cdb32a2 100644 --- a/spec/fixtures/group_labels.json +++ b/spec/fixtures/group_labels.json @@ -1,18 +1 @@ -[ - { - "name": "Backlog", - "color": "#DD10AA", - "open_issues_count": 72, - "closed_issues_count": 72, - "open_merge_requests_count": 4, - "subscribed": true - }, - { - "name": "Documentation", - "color": "#1E80DD", - "open_issues_count": 42, - "closed_issues_count": 42, - "open_merge_requests_count": 6, - "subscribed": true - } -] +[{"name":"Backlog","color":"#DD10AA","open_issues_count":72,"closed_issues_count":72,"open_merge_requests_count":4,"subscribed":true},{"name":"Documentation","color":"#1E80DD","open_issues_count":42,"closed_issues_count":42,"open_merge_requests_count":6,"subscribed":true}] \ No newline at end of file diff --git a/spec/fixtures/group_merge_requests.json b/spec/fixtures/group_merge_requests.json index ea32ac4..ca9cfc7 100644 --- a/spec/fixtures/group_merge_requests.json +++ b/spec/fixtures/group_merge_requests.json @@ -1 +1 @@ -[{"id":1,"target_branch":"master","source_branch":"api","project_id":3,"title":"New feature","closed":false,"merged":false,"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-10-19T05:56:05Z"},"assignee":{"id":2,"email":"jack@example.com","name":"Jack Smith","blocked":false,"created_at":"2012-10-19T05:56:14Z"}}] +[{"id":1,"target_branch":"master","source_branch":"api","project_id":3,"title":"New feature","closed":false,"merged":false,"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-10-19T05:56:05Z"},"assignee":{"id":2,"email":"jack@example.com","name":"Jack Smith","blocked":false,"created_at":"2012-10-19T05:56:14Z"}}] \ No newline at end of file diff --git a/spec/fixtures/group_milestone.json b/spec/fixtures/group_milestone.json index db7df67..506162b 100644 --- a/spec/fixtures/group_milestone.json +++ b/spec/fixtures/group_milestone.json @@ -1 +1 @@ -{"id":1,"group_id":3,"title":"3.0","description":"","due_date":"2012-10-22","closed":false,"updated_at":"2012-09-17T10:15:31Z","created_at":"2012-09-17T10:15:31Z"} +{"id":1,"group_id":3,"title":"3.0","description":"","due_date":"2012-10-22","closed":false,"updated_at":"2012-09-17T10:15:31Z","created_at":"2012-09-17T10:15:31Z"} \ No newline at end of file diff --git a/spec/fixtures/group_milestone_issues.json b/spec/fixtures/group_milestone_issues.json index 32597d0..b2322d2 100644 --- a/spec/fixtures/group_milestone_issues.json +++ b/spec/fixtures/group_milestone_issues.json @@ -1 +1 @@ -[{"id":1,"project_id":3,"title":"Culpa eius recusandae suscipit autem distinctio dolorum.","description":null,"labels":[],"milestone":{"id": 1},"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z"},{"id":6,"project_id":3,"title":"Ut in dolorum omnis sed sit aliquam.","description":null,"labels":[],"milestone":{"id": 1},"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z"},{"id":12,"project_id":3,"title":"Veniam et tempore quidem eum reprehenderit cupiditate non aut velit eaque.","description":null,"labels":[],"milestone":{"id": 1},"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z"},{"id":21,"project_id":3,"title":"Vitae ea aliquam et quo eligendi sapiente voluptatum labore hic nihil culpa.","description":null,"labels":[],"milestone":{"id": 1},"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z"},{"id":26,"project_id":3,"title":"Quo enim est nihil atque placeat voluptas neque eos voluptas.","description":null,"labels":[],"milestone":{"id": 1},"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z"},{"id":32,"project_id":3,"title":"Deserunt tenetur impedit est beatae voluptas voluptas quaerat quisquam.","description":null,"labels":[],"milestone":{"id": 1},"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z"}] \ No newline at end of file +[{"id":1,"project_id":3,"title":"Culpa eius recusandae suscipit autem distinctio dolorum.","description":null,"labels":[],"milestone":{"id":1},"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z"},{"id":6,"project_id":3,"title":"Ut in dolorum omnis sed sit aliquam.","description":null,"labels":[],"milestone":{"id":1},"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z"},{"id":12,"project_id":3,"title":"Veniam et tempore quidem eum reprehenderit cupiditate non aut velit eaque.","description":null,"labels":[],"milestone":{"id":1},"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z"},{"id":21,"project_id":3,"title":"Vitae ea aliquam et quo eligendi sapiente voluptatum labore hic nihil culpa.","description":null,"labels":[],"milestone":{"id":1},"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z"},{"id":26,"project_id":3,"title":"Quo enim est nihil atque placeat voluptas neque eos voluptas.","description":null,"labels":[],"milestone":{"id":1},"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z"},{"id":32,"project_id":3,"title":"Deserunt tenetur impedit est beatae voluptas voluptas quaerat quisquam.","description":null,"labels":[],"milestone":{"id":1},"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z"}] \ No newline at end of file diff --git a/spec/fixtures/group_milestone_merge_requests.json b/spec/fixtures/group_milestone_merge_requests.json index aa01a29..1fe4308 100644 --- a/spec/fixtures/group_milestone_merge_requests.json +++ b/spec/fixtures/group_milestone_merge_requests.json @@ -1 +1 @@ -[{"id":1,"iid":1,"project_id":1,"title":"lorem ipsum","description":"","state":"opened","created_at":"2017-03-24T12:23:53.918Z","updated_at":"2017-03-24T12:23:53.918Z","target_branch":"master","source_branch":"def","upvotes":0,"downvotes":0,"author":{"name":"John Doe","username":"jdoe","id":1,"state":"active","avatar_url":"","web_url":"https://gitlab.com/jdoen"},"assignee":null,"source_project_id":1,"target_project_id":1,"labels":[],"work_in_progress":false,"milestone":{"id":1,"iid":1,"project_id":1,"title":"Test","description":"","state":"active","created_at":"2017-03-24T12:23:00.560Z","updated_at":"2017-03-24T12:23:00.560Z","due_date":null,"start_date":null},"merge_when_pipeline_succeeds":false,"merge_status":"can_be_merged","sha":"aec123d1775790b2347fdd684b5ba613fdeb994b","merge_commit_sha":null,"user_notes_count":0,"approvals_before_merge":null,"should_remove_source_branch":null,"force_remove_source_branch":false,"squash":false,"web_url":"https://gitlab.com/jdoe/milestone_merge_requests_test/merge_requests/2"},{"id":2,"iid":2,"project_id":1,"title":"ipsum lorem","description":"","state":"opened","created_at":"2017-03-24T12:23:24.662Z","updated_at":"2017-03-24T12:23:33.522Z","target_branch":"master","source_branch":"test1","upvotes":0,"downvotes":0,"author":{"name":"Joren","username":"jdoe","id":1,"state":"active","":"","web_url":"https://gitlab.com/jdoe"},"assignee":null,"source_project_id":1,"target_project_id":1,"labels":[],"work_in_progress":false,"milestone":{"id":1,"iid":1,"project_id":1,"title":"Test","description":"","state":"active","created_at":"2017-03-24T12:23:00.560Z","updated_at":"2017-03-24T12:23:00.560Z","due_date":null,"start_date":null},"merge_when_pipeline_succeeds":false,"merge_status":"can_be_merged","sha":"3ee44c9b40deddae596f838b97523c6f010fd80d","merge_commit_sha":null,"user_notes_count":0,"approvals_before_merge":null,"should_remove_source_branch":null,"force_remove_source_branch":true,"squash":false,"web_url":"https://gitlab.com/jdoe/milestone_merge_requests_test/merge_requests/1"}] +[{"id":1,"iid":1,"project_id":1,"title":"lorem ipsum","description":"","state":"opened","created_at":"2017-03-24T12:23:53.918Z","updated_at":"2017-03-24T12:23:53.918Z","target_branch":"master","source_branch":"def","upvotes":0,"downvotes":0,"author":{"name":"John Doe","username":"jdoe","id":1,"state":"active","avatar_url":"","web_url":"https://gitlab.com/jdoen"},"assignee":null,"source_project_id":1,"target_project_id":1,"labels":[],"work_in_progress":false,"milestone":{"id":1,"iid":1,"project_id":1,"title":"Test","description":"","state":"active","created_at":"2017-03-24T12:23:00.560Z","updated_at":"2017-03-24T12:23:00.560Z","due_date":null,"start_date":null},"merge_when_pipeline_succeeds":false,"merge_status":"can_be_merged","sha":"aec123d1775790b2347fdd684b5ba613fdeb994b","merge_commit_sha":null,"user_notes_count":0,"approvals_before_merge":null,"should_remove_source_branch":null,"force_remove_source_branch":false,"squash":false,"web_url":"https://gitlab.com/jdoe/milestone_merge_requests_test/merge_requests/2"},{"id":2,"iid":2,"project_id":1,"title":"ipsum lorem","description":"","state":"opened","created_at":"2017-03-24T12:23:24.662Z","updated_at":"2017-03-24T12:23:33.522Z","target_branch":"master","source_branch":"test1","upvotes":0,"downvotes":0,"author":{"name":"Joren","username":"jdoe","id":1,"state":"active","":"","web_url":"https://gitlab.com/jdoe"},"assignee":null,"source_project_id":1,"target_project_id":1,"labels":[],"work_in_progress":false,"milestone":{"id":1,"iid":1,"project_id":1,"title":"Test","description":"","state":"active","created_at":"2017-03-24T12:23:00.560Z","updated_at":"2017-03-24T12:23:00.560Z","due_date":null,"start_date":null},"merge_when_pipeline_succeeds":false,"merge_status":"can_be_merged","sha":"3ee44c9b40deddae596f838b97523c6f010fd80d","merge_commit_sha":null,"user_notes_count":0,"approvals_before_merge":null,"should_remove_source_branch":null,"force_remove_source_branch":true,"squash":false,"web_url":"https://gitlab.com/jdoe/milestone_merge_requests_test/merge_requests/1"}] \ No newline at end of file diff --git a/spec/fixtures/group_milestones.json b/spec/fixtures/group_milestones.json index a668e03..2e326fc 100644 --- a/spec/fixtures/group_milestones.json +++ b/spec/fixtures/group_milestones.json @@ -1 +1 @@ -[{"id":1,"group_id":3,"title":"3.0","description":"","due_date":"2012-10-22","closed":false,"updated_at":"2012-09-17T10:15:31Z","created_at":"2012-09-17T10:15:31Z"}] +[{"id":1,"group_id":3,"title":"3.0","description":"","due_date":"2012-10-22","closed":false,"updated_at":"2012-09-17T10:15:31Z","created_at":"2012-09-17T10:15:31Z"}] \ No newline at end of file diff --git a/spec/fixtures/group_projects.json b/spec/fixtures/group_projects.json index 23211e2..51a14ec 100644 --- a/spec/fixtures/group_projects.json +++ b/spec/fixtures/group_projects.json @@ -1,44 +1 @@ -[ - { - "id": 4, - "description": null, - "default_branch": "master", - "public": false, - "visibility_level": 0, - "ssh_url_to_repo": "git@example.com:diaspora/diaspora-client.git", - "http_url_to_repo": "http://example.com/diaspora/diaspora-client.git", - "web_url": "http://example.com/diaspora/diaspora-client", - "tag_list": [ - "example", - "disapora client" - ], - "owner": { - "id": 3, - "name": "Diaspora", - "created_at": "2013-09-30T13: 46: 02Z" - }, - "name": "Diaspora Client", - "name_with_namespace": "Diaspora / Diaspora Client", - "path": "diaspora-client", - "path_with_namespace": "diaspora/diaspora-client", - "issues_enabled": true, - "merge_requests_enabled": true, - "builds_enabled": true, - "wiki_enabled": true, - "snippets_enabled": false, - "created_at": "2013-09-30T13: 46: 02Z", - "last_activity_at": "2013-09-30T13: 46: 02Z", - "creator_id": 3, - "namespace": { - "created_at": "2013-09-30T13: 46: 02Z", - "description": "", - "id": 3, - "name": "Diaspora", - "owner_id": 1, - "path": "diaspora", - "updated_at": "2013-09-30T13: 46: 02Z" - }, - "archived": false, - "avatar_url": "http://example.com/uploads/project/avatar/4/uploads/avatar.png" - } -] +[{"id":4,"description":null,"default_branch":"master","public":false,"visibility_level":0,"ssh_url_to_repo":"git@example.com:diaspora/diaspora-client.git","http_url_to_repo":"http://example.com/diaspora/diaspora-client.git","web_url":"http://example.com/diaspora/diaspora-client","tag_list":["example","disapora client"],"owner":{"id":3,"name":"Diaspora","created_at":"2013-09-30T13: 46: 02Z"},"name":"Diaspora Client","name_with_namespace":"Diaspora / Diaspora Client","path":"diaspora-client","path_with_namespace":"diaspora/diaspora-client","issues_enabled":true,"merge_requests_enabled":true,"builds_enabled":true,"wiki_enabled":true,"snippets_enabled":false,"created_at":"2013-09-30T13: 46: 02Z","last_activity_at":"2013-09-30T13: 46: 02Z","creator_id":3,"namespace":{"created_at":"2013-09-30T13: 46: 02Z","description":"","id":3,"name":"Diaspora","owner_id":1,"path":"diaspora","updated_at":"2013-09-30T13: 46: 02Z"},"archived":false,"avatar_url":"http://example.com/uploads/project/avatar/4/uploads/avatar.png"}] \ No newline at end of file diff --git a/spec/fixtures/group_search.json b/spec/fixtures/group_search.json index e6b4daa..9574fc1 100644 --- a/spec/fixtures/group_search.json +++ b/spec/fixtures/group_search.json @@ -1,2 +1 @@ -[{"id": 5,"name": "Five-Group","path": "five-group","owner_id": 2},{"id": 8,"name": "Eight Group","path": "eight-group","owner_id": 6} -] +[{"id":5,"name":"Five-Group","path":"five-group","owner_id":2},{"id":8,"name":"Eight Group","path":"eight-group","owner_id":6}] \ No newline at end of file diff --git a/spec/fixtures/group_subgroups.json b/spec/fixtures/group_subgroups.json index 4777395..fbd7aa7 100644 --- a/spec/fixtures/group_subgroups.json +++ b/spec/fixtures/group_subgroups.json @@ -1,16 +1 @@ -[ - { - "id": 1, - "name": "Foobar Group", - "path": "foo-bar", - "description": "An interesting group", - "visibility": "public", - "lfs_enabled": true, - "avatar_url": "http://gitlab.example.com/uploads/group/avatar/1/foo.jpg", - "web_url": "http://gitlab.example.com/groups/foo-bar", - "request_access_enabled": false, - "full_name": "Foobar Group", - "full_path": "foo-bar", - "parent_id": 123 - } -] +[{"id":1,"name":"Foobar Group","path":"foo-bar","description":"An interesting group","visibility":"public","lfs_enabled":true,"avatar_url":"http://gitlab.example.com/uploads/group/avatar/1/foo.jpg","web_url":"http://gitlab.example.com/groups/foo-bar","request_access_enabled":false,"full_name":"Foobar Group","full_path":"foo-bar","parent_id":123}] \ No newline at end of file diff --git a/spec/fixtures/groups.json b/spec/fixtures/groups.json index 7d8b426..0d1a2a2 100644 --- a/spec/fixtures/groups.json +++ b/spec/fixtures/groups.json @@ -1,2 +1 @@ -[{"id": 3,"name": "ThreeGroup","path": "threegroup","owner_id": 1},{"id": 5,"name": "Five-Group","path": "five-group","owner_id": 2},{"id": 8,"name": "Eight Group","path": "eight-group","owner_id": 6} -] \ No newline at end of file +[{"id":3,"name":"ThreeGroup","path":"threegroup","owner_id":1},{"id":5,"name":"Five-Group","path":"five-group","owner_id":2},{"id":8,"name":"Eight Group","path":"eight-group","owner_id":6}] \ No newline at end of file diff --git a/spec/fixtures/invalid_content_gitlab_ci_yml.json b/spec/fixtures/invalid_content_gitlab_ci_yml.json index 697ed2b..9480e16 100644 --- a/spec/fixtures/invalid_content_gitlab_ci_yml.json +++ b/spec/fixtures/invalid_content_gitlab_ci_yml.json @@ -1,6 +1 @@ -{ - "status": "invalid", - "errors": [ - "variables config should be a hash of key value pairs" - ] -} +{"status":"invalid","errors":["variables config should be a hash of key value pairs"]} \ No newline at end of file diff --git a/spec/fixtures/issue_award_emoji.json b/spec/fixtures/issue_award_emoji.json index fefeaf1..b9f8cce 100644 --- a/spec/fixtures/issue_award_emoji.json +++ b/spec/fixtures/issue_award_emoji.json @@ -1,16 +1 @@ -{ - "id": 4, - "name": "blowfish", - "user": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://gitlab.example.com/root" - }, - "created_at": "2016-06-15T10:09:34.206Z", - "updated_at": "2016-06-15T10:09:34.206Z", - "awardable_id": 80, - "awardable_type": "Issue" -} \ No newline at end of file +{"id":4,"name":"blowfish","user":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://gitlab.example.com/root"},"created_at":"2016-06-15T10:09:34.206Z","updated_at":"2016-06-15T10:09:34.206Z","awardable_id":80,"awardable_type":"Issue"} \ No newline at end of file diff --git a/spec/fixtures/issue_award_emojis.json b/spec/fixtures/issue_award_emojis.json index 44338b8..fdcbab1 100644 --- a/spec/fixtures/issue_award_emojis.json +++ b/spec/fixtures/issue_award_emojis.json @@ -1,34 +1 @@ -[ - { - "id": 4, - "name": "1234", - "user": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://gitlab.example.com/root" - }, - "created_at": "2016-06-15T10:09:34.206Z", - "updated_at": "2016-06-15T10:09:34.206Z", - "awardable_id": 80, - "awardable_type": "Issue" - }, - { - "id": 1, - "name": "microphone", - "user": { - "name": "User 4", - "username": "user4", - "id": 26, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/7e65550957227bd38fe2d7fbc6fd2f7b?s=80&d=identicon", - "web_url": "http://gitlab.example.com/user4" - }, - "created_at": "2016-06-15T10:09:34.177Z", - "updated_at": "2016-06-15T10:09:34.177Z", - "awardable_id": 80, - "awardable_type": "Issue" - } -] \ No newline at end of file +[{"id":4,"name":"1234","user":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://gitlab.example.com/root"},"created_at":"2016-06-15T10:09:34.206Z","updated_at":"2016-06-15T10:09:34.206Z","awardable_id":80,"awardable_type":"Issue"},{"id":1,"name":"microphone","user":{"name":"User 4","username":"user4","id":26,"state":"active","avatar_url":"http://www.gravatar.com/avatar/7e65550957227bd38fe2d7fbc6fd2f7b?s=80&d=identicon","web_url":"http://gitlab.example.com/user4"},"created_at":"2016-06-15T10:09:34.177Z","updated_at":"2016-06-15T10:09:34.177Z","awardable_id":80,"awardable_type":"Issue"}] \ No newline at end of file diff --git a/spec/fixtures/job.json b/spec/fixtures/job.json index 0207e1f..3aae312 100644 --- a/spec/fixtures/job.json +++ b/spec/fixtures/job.json @@ -1,43 +1 @@ -{ - "commit": { - "author_email": "admin@example.com", - "author_name": "Administrator", - "created_at": "2015-12-24T16:51:14.000+01:00", - "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", - "message": "Test the CI integration.", - "short_id": "0ff3ae19", - "title": "Test the CI integration." - }, - "coverage": null, - "created_at": "2015-12-24T15:51:21.880Z", - "artifacts_file": null, - "finished_at": "2015-12-24T17:54:31.198Z", - "id": 8, - "name": "rubocop", - "pipeline": { - "id": 6, - "ref": "master", - "sha": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", - "status": "pending" - }, - "ref": "master", - "runner": null, - "stage": "test", - "started_at": "2015-12-24T17:54:30.733Z", - "status": "failed", - "tag": false, - "user": { - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "bio": null, - "created_at": "2015-12-21T13:14:24.077Z", - "id": 1, - "linkedin": "", - "name": "Administrator", - "skype": "", - "state": "active", - "twitter": "", - "username": "root", - "web_url": "http://gitlab.dev/root", - "website_url": "" - } -} +{"commit":{"author_email":"admin@example.com","author_name":"Administrator","created_at":"2015-12-24T16:51:14.000+01:00","id":"0ff3ae198f8601a285adcf5c0fff204ee6fba5fd","message":"Test the CI integration.","short_id":"0ff3ae19","title":"Test the CI integration."},"coverage":null,"created_at":"2015-12-24T15:51:21.880Z","artifacts_file":null,"finished_at":"2015-12-24T17:54:31.198Z","id":8,"name":"rubocop","pipeline":{"id":6,"ref":"master","sha":"0ff3ae198f8601a285adcf5c0fff204ee6fba5fd","status":"pending"},"ref":"master","runner":null,"stage":"test","started_at":"2015-12-24T17:54:30.733Z","status":"failed","tag":false,"user":{"avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","bio":null,"created_at":"2015-12-21T13:14:24.077Z","id":1,"linkedin":"","name":"Administrator","skype":"","state":"active","twitter":"","username":"root","web_url":"http://gitlab.dev/root","website_url":""}} \ No newline at end of file diff --git a/spec/fixtures/job_trace.json b/spec/fixtures/job_trace.json index bf7e899..9e26dfe 100644 --- a/spec/fixtures/job_trace.json +++ b/spec/fixtures/job_trace.json @@ -1 +1 @@ -asdasd +{} \ No newline at end of file diff --git a/spec/fixtures/jobs.json b/spec/fixtures/jobs.json index 5ea084b..e5f3ef8 100644 --- a/spec/fixtures/jobs.json +++ b/spec/fixtures/jobs.json @@ -1,91 +1 @@ -[ - { - "commit": { - "author_email": "admin@example.com", - "author_name": "Administrator", - "created_at": "2015-12-24T16:51:14.000+01:00", - "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", - "message": "Test the CI integration.", - "short_id": "0ff3ae19", - "title": "Test the CI integration." - }, - "coverage": null, - "created_at": "2015-12-24T15:51:21.802Z", - "artifacts_file": { - "filename": "artifacts.zip", - "size": 1000 - }, - "finished_at": "2015-12-24T17:54:27.895Z", - "id": 7, - "name": "teaspoon", - "pipeline": { - "id": 6, - "ref": "master", - "sha": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", - "status": "pending" - }, - "ref": "master", - "runner": null, - "stage": "test", - "started_at": "2015-12-24T17:54:27.722Z", - "status": "failed", - "tag": false, - "user": { - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "bio": null, - "created_at": "2015-12-21T13:14:24.077Z", - "id": 1, - "linkedin": "", - "name": "Administrator", - "skype": "", - "state": "active", - "twitter": "", - "username": "root", - "web_url": "http://gitlab.dev/root", - "website_url": "" - } - }, - { - "commit": { - "author_email": "admin@example.com", - "author_name": "Administrator", - "created_at": "2015-12-24T16:51:14.000+01:00", - "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", - "message": "Test the CI integration.", - "short_id": "0ff3ae19", - "title": "Test the CI integration." - }, - "coverage": null, - "created_at": "2015-12-24T15:51:21.727Z", - "artifacts_file": null, - "finished_at": "2015-12-24T17:54:24.921Z", - "id": 6, - "name": "spinach:other", - "pipeline": { - "id": 6, - "ref": "master", - "sha": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", - "status": "pending" - }, - "ref": "master", - "runner": null, - "stage": "test", - "started_at": "2015-12-24T17:54:24.729Z", - "status": "failed", - "tag": false, - "user": { - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "bio": null, - "created_at": "2015-12-21T13:14:24.077Z", - "id": 1, - "linkedin": "", - "name": "Administrator", - "skype": "", - "state": "active", - "twitter": "", - "username": "root", - "web_url": "http://gitlab.dev/root", - "website_url": "" - } - } -] +[{"commit":{"author_email":"admin@example.com","author_name":"Administrator","created_at":"2015-12-24T16:51:14.000+01:00","id":"0ff3ae198f8601a285adcf5c0fff204ee6fba5fd","message":"Test the CI integration.","short_id":"0ff3ae19","title":"Test the CI integration."},"coverage":null,"created_at":"2015-12-24T15:51:21.802Z","artifacts_file":{"filename":"artifacts.zip","size":1000},"finished_at":"2015-12-24T17:54:27.895Z","id":7,"name":"teaspoon","pipeline":{"id":6,"ref":"master","sha":"0ff3ae198f8601a285adcf5c0fff204ee6fba5fd","status":"pending"},"ref":"master","runner":null,"stage":"test","started_at":"2015-12-24T17:54:27.722Z","status":"failed","tag":false,"user":{"avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","bio":null,"created_at":"2015-12-21T13:14:24.077Z","id":1,"linkedin":"","name":"Administrator","skype":"","state":"active","twitter":"","username":"root","web_url":"http://gitlab.dev/root","website_url":""}},{"commit":{"author_email":"admin@example.com","author_name":"Administrator","created_at":"2015-12-24T16:51:14.000+01:00","id":"0ff3ae198f8601a285adcf5c0fff204ee6fba5fd","message":"Test the CI integration.","short_id":"0ff3ae19","title":"Test the CI integration."},"coverage":null,"created_at":"2015-12-24T15:51:21.727Z","artifacts_file":null,"finished_at":"2015-12-24T17:54:24.921Z","id":6,"name":"spinach:other","pipeline":{"id":6,"ref":"master","sha":"0ff3ae198f8601a285adcf5c0fff204ee6fba5fd","status":"pending"},"ref":"master","runner":null,"stage":"test","started_at":"2015-12-24T17:54:24.729Z","status":"failed","tag":false,"user":{"avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","bio":null,"created_at":"2015-12-21T13:14:24.077Z","id":1,"linkedin":"","name":"Administrator","skype":"","state":"active","twitter":"","username":"root","web_url":"http://gitlab.dev/root","website_url":""}}] \ No newline at end of file diff --git a/spec/fixtures/key.json b/spec/fixtures/key.json index 6595c8c..f3754b5 100644 --- a/spec/fixtures/key.json +++ b/spec/fixtures/key.json @@ -1 +1 @@ -{"id":1,"title":"narkoz@helium","key":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCkUsh42Nh1yefGd1jbSELn5XsY8p5Oxmau0/1HqHnjuYOaj5X+kHccFDwtmtg9Ox8ua/+WptNsiE8IUwsD3zKgEjajgwq3gMeeFdxfXwM+tEvHOOMV9meRrgRWGYCToPbT6sR7/YMAYa7cPqWSpx/oZhYfz4XtoMv3ZZT1fZMmx3MY3HwXwW8j+obJyN2K4LN0TFi9RPgWWYn0DCyb9OccmABimt3i74WoJ/OT8r6/7swce8+OSe0Q2wBhyTtvxg2vtUcoek8Af+EZaUMBwSEzEsocOCzwQvjF5XUk5o7dJ8nP8W3RE60JWX57t16eQm7lBmumLYfszpn2isd6W7a1 narkoz@helium"} +{"id":1,"title":"narkoz@helium","key":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCkUsh42Nh1yefGd1jbSELn5XsY8p5Oxmau0/1HqHnjuYOaj5X+kHccFDwtmtg9Ox8ua/+WptNsiE8IUwsD3zKgEjajgwq3gMeeFdxfXwM+tEvHOOMV9meRrgRWGYCToPbT6sR7/YMAYa7cPqWSpx/oZhYfz4XtoMv3ZZT1fZMmx3MY3HwXwW8j+obJyN2K4LN0TFi9RPgWWYn0DCyb9OccmABimt3i74WoJ/OT8r6/7swce8+OSe0Q2wBhyTtvxg2vtUcoek8Af+EZaUMBwSEzEsocOCzwQvjF5XUk5o7dJ8nP8W3RE60JWX57t16eQm7lBmumLYfszpn2isd6W7a1 narkoz@helium"} \ No newline at end of file diff --git a/spec/fixtures/keys.json b/spec/fixtures/keys.json index d81fca6..0a200a8 100644 --- a/spec/fixtures/keys.json +++ b/spec/fixtures/keys.json @@ -1 +1 @@ -[{"id":1,"title":"narkoz@helium","key":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCkUsh42Nh1yefGd1jbSELn5XsY8p5Oxmau0/1HqHnjuYOaj5X+kHccFDwtmtg9Ox8ua/+WptNsiE8IUwsD3zKgEjajgwq3gMeeFdxfXwM+tEvHOOMV9meRrgRWGYCToPbT6sR7/YMAYa7cPqWSpx/oZhYfz4XtoMv3ZZT1fZMmx3MY3HwXwW8j+obJyN2K4LN0TFi9RPgWWYn0DCyb9OccmABimt3i74WoJ/OT8r6/7swce8+OSe0Q2wBhyTtvxg2vtUcoek8Af+EZaUMBwSEzEsocOCzwQvjF5XUk5o7dJ8nP8W3RE60JWX57t16eQm7lBmumLYfszpn2isd6W7a1 narkoz@helium"}] +[{"id":1,"title":"narkoz@helium","key":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCkUsh42Nh1yefGd1jbSELn5XsY8p5Oxmau0/1HqHnjuYOaj5X+kHccFDwtmtg9Ox8ua/+WptNsiE8IUwsD3zKgEjajgwq3gMeeFdxfXwM+tEvHOOMV9meRrgRWGYCToPbT6sR7/YMAYa7cPqWSpx/oZhYfz4XtoMv3ZZT1fZMmx3MY3HwXwW8j+obJyN2K4LN0TFi9RPgWWYn0DCyb9OccmABimt3i74WoJ/OT8r6/7swce8+OSe0Q2wBhyTtvxg2vtUcoek8Af+EZaUMBwSEzEsocOCzwQvjF5XUk5o7dJ8nP8W3RE60JWX57t16eQm7lBmumLYfszpn2isd6W7a1 narkoz@helium"}] \ No newline at end of file diff --git a/spec/fixtures/label.json b/spec/fixtures/label.json index 8e8ef22..879f071 100644 --- a/spec/fixtures/label.json +++ b/spec/fixtures/label.json @@ -1 +1 @@ -{"name": "Backlog", "color": "#DD10AA", "subscribed": true} +{"name":"Backlog","color":"#DD10AA","subscribed":true} \ No newline at end of file diff --git a/spec/fixtures/label_unsubscribe.json b/spec/fixtures/label_unsubscribe.json index aebc94d..b08ed6b 100644 --- a/spec/fixtures/label_unsubscribe.json +++ b/spec/fixtures/label_unsubscribe.json @@ -1 +1 @@ -{"name": "Backlog", "color": "#DD10AA", "subscribed": false} +{"name":"Backlog","color":"#DD10AA","subscribed":false} \ No newline at end of file diff --git a/spec/fixtures/labels.json b/spec/fixtures/labels.json index fb995e3..47ae9b0 100644 --- a/spec/fixtures/labels.json +++ b/spec/fixtures/labels.json @@ -1 +1 @@ -[{"name": "Backlog", "color": "#DD10AA"},{"name": "Documentation", "color": "#1E80DD"}] +[{"name":"Backlog","color":"#DD10AA"},{"name":"Documentation","color":"#1E80DD"}] \ No newline at end of file diff --git a/spec/fixtures/license_project_template.json b/spec/fixtures/license_project_template.json index 7cf099d..98ed17d 100644 --- a/spec/fixtures/license_project_template.json +++ b/spec/fixtures/license_project_template.json @@ -1,23 +1 @@ -{ - "key": "mit", - "name": "MIT License", - "nickname": null, - "popular": true, - "html_url": "http://choosealicense.com/licenses/mit/", - "source_url": "https://opensource.org/licenses/MIT", - "description": "A short and simple permissive license with conditions only requiring preservation of copyright and license notices. Licensed works, modifications, and larger works may be distributed under different terms and without source code.", - "conditions": [ - "include-copyright" - ], - "permissions": [ - "commercial-use", - "modifications", - "distribution", - "private-use" - ], - "limitations": [ - "liability", - "warranty" - ], - "content": "MIT License\n\nCopyright (c) 2018 [fullname]\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" -} \ No newline at end of file +{"key":"mit","name":"MIT License","nickname":null,"popular":true,"html_url":"http://choosealicense.com/licenses/mit/","source_url":"https://opensource.org/licenses/MIT","description":"A short and simple permissive license with conditions only requiring preservation of copyright and license notices. Licensed works, modifications, and larger works may be distributed under different terms and without source code.","conditions":["include-copyright"],"permissions":["commercial-use","modifications","distribution","private-use"],"limitations":["liability","warranty"],"content":"MIT License\n\nCopyright (c) 2018 [fullname]\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"} \ No newline at end of file diff --git a/spec/fixtures/license_template.json b/spec/fixtures/license_template.json index 3c56b39..fc3aa4e 100644 --- a/spec/fixtures/license_template.json +++ b/spec/fixtures/license_template.json @@ -1,22 +1 @@ -{ - "key": "mit", - "name": "MIT License", - "nickname": null, - "featured": true, - "html_url": "http://choosealicense.com/licenses/mit/", - "source_url": "http://opensource.org/licenses/MIT", - "description": "A permissive license that is short and to the point. It lets people do anything with your code with proper attribution and without warranty.", - "conditions": [ - "include-copyright" - ], - "permissions": [ - "commercial-use", - "modifications", - "distribution", - "private-use" - ], - "limitations": [ - "no-liability" - ], - "content": "The MIT License (MIT)\n\nCopyright (c) 2016 John Doe\n [...]" -} +{"key":"mit","name":"MIT License","nickname":null,"featured":true,"html_url":"http://choosealicense.com/licenses/mit/","source_url":"http://opensource.org/licenses/MIT","description":"A permissive license that is short and to the point. It lets people do anything with your code with proper attribution and without warranty.","conditions":["include-copyright"],"permissions":["commercial-use","modifications","distribution","private-use"],"limitations":["no-liability"],"content":"The MIT License (MIT)\n\nCopyright (c) 2016 John Doe\n [...]"} \ No newline at end of file diff --git a/spec/fixtures/license_templates.json b/spec/fixtures/license_templates.json index b34d155..0365210 100644 --- a/spec/fixtures/license_templates.json +++ b/spec/fixtures/license_templates.json @@ -1,75 +1 @@ -[ - { - "key": "apache-2.0", - "name": "Apache License 2.0", - "nickname": null, - "featured": true, - "html_url": "http://choosealicense.com/licenses/apache-2.0/", - "source_url": "http://www.apache.org/licenses/LICENSE-2.0.html", - "description": "A permissive license that also provides an express grant of patent rights from contributors to users.", - "conditions": [ - "include-copyright", - "document-changes" - ], - "permissions": [ - "commercial-use", - "modifications", - "distribution", - "patent-use", - "private-use" - ], - "limitations": [ - "trademark-use", - "no-liability" - ], - "content": " Apache License\n Version 2.0, January 2004\n [...]" - }, - { - "key": "gpl-3.0", - "name": "GNU General Public License v3.0", - "nickname": "GNU GPLv3", - "featured": true, - "html_url": "http://choosealicense.com/licenses/gpl-3.0/", - "source_url": "http://www.gnu.org/licenses/gpl-3.0.txt", - "description": "The GNU GPL is the most widely used free software license and has a strong copyleft requirement. When distributing derived works, the source code of the work must be made available under the same license.", - "conditions": [ - "include-copyright", - "document-changes", - "disclose-source", - "same-license" - ], - "permissions": [ - "commercial-use", - "modifications", - "distribution", - "patent-use", - "private-use" - ], - "limitations": [ - "no-liability" - ], - "content": " GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n [...]" - }, - { - "key": "mit", - "name": "MIT License", - "nickname": null, - "featured": true, - "html_url": "http://choosealicense.com/licenses/mit/", - "source_url": "http://opensource.org/licenses/MIT", - "description": "A permissive license that is short and to the point. It lets people do anything with your code with proper attribution and without warranty.", - "conditions": [ - "include-copyright" - ], - "permissions": [ - "commercial-use", - "modifications", - "distribution", - "private-use" - ], - "limitations": [ - "no-liability" - ], - "content": "The MIT License (MIT)\n\nCopyright (c) [year] [fullname]\n [...]" - } -] +[{"key":"apache-2.0","name":"Apache License 2.0","nickname":null,"featured":true,"html_url":"http://choosealicense.com/licenses/apache-2.0/","source_url":"http://www.apache.org/licenses/LICENSE-2.0.html","description":"A permissive license that also provides an express grant of patent rights from contributors to users.","conditions":["include-copyright","document-changes"],"permissions":["commercial-use","modifications","distribution","patent-use","private-use"],"limitations":["trademark-use","no-liability"],"content":" Apache License\n Version 2.0, January 2004\n [...]"},{"key":"gpl-3.0","name":"GNU General Public License v3.0","nickname":"GNU GPLv3","featured":true,"html_url":"http://choosealicense.com/licenses/gpl-3.0/","source_url":"http://www.gnu.org/licenses/gpl-3.0.txt","description":"The GNU GPL is the most widely used free software license and has a strong copyleft requirement. When distributing derived works, the source code of the work must be made available under the same license.","conditions":["include-copyright","document-changes","disclose-source","same-license"],"permissions":["commercial-use","modifications","distribution","patent-use","private-use"],"limitations":["no-liability"],"content":" GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n [...]"},{"key":"mit","name":"MIT License","nickname":null,"featured":true,"html_url":"http://choosealicense.com/licenses/mit/","source_url":"http://opensource.org/licenses/MIT","description":"A permissive license that is short and to the point. It lets people do anything with your code with proper attribution and without warranty.","conditions":["include-copyright"],"permissions":["commercial-use","modifications","distribution","private-use"],"limitations":["no-liability"],"content":"The MIT License (MIT)\n\nCopyright (c) [year] [fullname]\n [...]"}] \ No newline at end of file diff --git a/spec/fixtures/markdown.json b/spec/fixtures/markdown.json index 66cd28d..0a2cdd5 100644 --- a/spec/fixtures/markdown.json +++ b/spec/fixtures/markdown.json @@ -1 +1 @@ -{ "html": "

Hello world! 🎉

" } +{"html":"

Hello world! 🎉

"} \ No newline at end of file diff --git a/spec/fixtures/merge_base.json b/spec/fixtures/merge_base.json index 09f5b3e..d695c3f 100644 --- a/spec/fixtures/merge_base.json +++ b/spec/fixtures/merge_base.json @@ -1,14 +1 @@ -{ - "id": "1a0b36b3cdad1d2ee32457c102a8c0b7056fa863", - "short_id": "1a0b36b3", - "title": "Initial commit", - "created_at": "2014-02-27T08:03:18.000Z", - "parent_ids": [], - "message": "Initial commit\n", - "author_name": "Dmitriy Zaporozhets", - "author_email": "dmitriy.zaporozhets@gmail.com", - "authored_date": "2014-02-27T08:03:18.000Z", - "committer_name": "Dmitriy Zaporozhets", - "committer_email": "dmitriy.zaporozhets@gmail.com", - "committed_date": "2014-02-27T08:03:18.000Z" -} +{"id":"1a0b36b3cdad1d2ee32457c102a8c0b7056fa863","short_id":"1a0b36b3","title":"Initial commit","created_at":"2014-02-27T08:03:18.000Z","parent_ids":[],"message":"Initial commit\n","author_name":"Dmitriy Zaporozhets","author_email":"dmitriy.zaporozhets@gmail.com","authored_date":"2014-02-27T08:03:18.000Z","committer_name":"Dmitriy Zaporozhets","committer_email":"dmitriy.zaporozhets@gmail.com","committed_date":"2014-02-27T08:03:18.000Z"} \ No newline at end of file diff --git a/spec/fixtures/merge_request_approval_state.json b/spec/fixtures/merge_request_approval_state.json new file mode 100644 index 0000000..1381f12 --- /dev/null +++ b/spec/fixtures/merge_request_approval_state.json @@ -0,0 +1 @@ +{"id":1,"iid":1,"project_id":3,"title":"Approvals API","description":"Test","state":"opened","created_at":"2016-06-08T00:19:52.638Z","updated_at":"2016-06-08T21:20:42.470Z","merge_status":"cannot_be_merged","approvals_required":2,"approvals_left":2,"approved_by":[],"approvers":[{"user":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://localhost:3000/root"}}],"approver_groups":[{"group":{"id":5,"name":"group1","path":"group1","description":"","visibility":"public","lfs_enabled":false,"avatar_url":null,"web_url":"http://localhost/groups/group1","request_access_enabled":false,"full_name":"group1","full_path":"group1","parent_id":null,"ldap_cn":null,"ldap_access":null}}]} \ No newline at end of file diff --git a/spec/fixtures/merge_request_approvals.json b/spec/fixtures/merge_request_approvals.json index 66f385e..8e4de42 100644 --- a/spec/fixtures/merge_request_approvals.json +++ b/spec/fixtures/merge_request_approvals.json @@ -1,46 +1 @@ -{ - "id": 5, - "iid": 5, - "project_id": 1, - "title": "Approvals API", - "description": "Test", - "state": "opened", - "created_at": "2016-06-08T00:19:52.638Z", - "updated_at": "2016-06-08T21:20:42.470Z", - "merge_status": "can_be_merged", - "approvals_required": 2, - "approvals_missing": 2, - "approved_by": [], - "approvers": [ - { - "user": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon", - "web_url": "http://localhost:3000/u/root" - } - } - ], - "approver_groups": [ - { - "group": { - "id": 5, - "name": "group1", - "path": "group1", - "description": "", - "visibility": "public", - "lfs_enabled": false, - "avatar_url": null, - "web_url": "http://localhost/groups/group1", - "request_access_enabled": false, - "full_name": "group1", - "full_path": "group1", - "parent_id": null, - "ldap_cn": null, - "ldap_access": null - } - } - ] -} +{"id":5,"iid":5,"project_id":1,"title":"Approvals API","description":"Test","state":"opened","created_at":"2016-06-08T00:19:52.638Z","updated_at":"2016-06-08T21:20:42.470Z","merge_status":"can_be_merged","approvals_required":2,"approvals_missing":2,"approved_by":[],"approvers":[{"user":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://localhost:3000/u/root"}}],"approver_groups":[{"group":{"id":5,"name":"group1","path":"group1","description":"","visibility":"public","lfs_enabled":false,"avatar_url":null,"web_url":"http://localhost/groups/group1","request_access_enabled":false,"full_name":"group1","full_path":"group1","parent_id":null,"ldap_cn":null,"ldap_access":null}}]} \ No newline at end of file diff --git a/spec/fixtures/merge_request_award_emoji.json b/spec/fixtures/merge_request_award_emoji.json index 491493a..d4c1387 100644 --- a/spec/fixtures/merge_request_award_emoji.json +++ b/spec/fixtures/merge_request_award_emoji.json @@ -1,16 +1 @@ -{ - "id": 4, - "name": "blowfish", - "user": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://gitlab.example.com/root" - }, - "created_at": "2016-06-15T10:09:34.206Z", - "updated_at": "2016-06-15T10:09:34.206Z", - "awardable_id": 80, - "awardable_type": "MergeRequest" -} \ No newline at end of file +{"id":4,"name":"blowfish","user":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://gitlab.example.com/root"},"created_at":"2016-06-15T10:09:34.206Z","updated_at":"2016-06-15T10:09:34.206Z","awardable_id":80,"awardable_type":"MergeRequest"} \ No newline at end of file diff --git a/spec/fixtures/merge_request_award_emojis.json b/spec/fixtures/merge_request_award_emojis.json index 1cb0758..509443a 100644 --- a/spec/fixtures/merge_request_award_emojis.json +++ b/spec/fixtures/merge_request_award_emojis.json @@ -1,34 +1 @@ -[ - { - "id": 4, - "name": "1234", - "user": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://gitlab.example.com/root" - }, - "created_at": "2016-06-15T10:09:34.206Z", - "updated_at": "2016-06-15T10:09:34.206Z", - "awardable_id": 80, - "awardable_type": "MergeRequest" - }, - { - "id": 1, - "name": "microphone", - "user": { - "name": "User 4", - "username": "user4", - "id": 26, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/7e65550957227bd38fe2d7fbc6fd2f7b?s=80&d=identicon", - "web_url": "http://gitlab.example.com/user4" - }, - "created_at": "2016-06-15T10:09:34.177Z", - "updated_at": "2016-06-15T10:09:34.177Z", - "awardable_id": 80, - "awardable_type": "MergeRequest" - } -] \ No newline at end of file +[{"id":4,"name":"1234","user":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://gitlab.example.com/root"},"created_at":"2016-06-15T10:09:34.206Z","updated_at":"2016-06-15T10:09:34.206Z","awardable_id":80,"awardable_type":"MergeRequest"},{"id":1,"name":"microphone","user":{"name":"User 4","username":"user4","id":26,"state":"active","avatar_url":"http://www.gravatar.com/avatar/7e65550957227bd38fe2d7fbc6fd2f7b?s=80&d=identicon","web_url":"http://gitlab.example.com/user4"},"created_at":"2016-06-15T10:09:34.177Z","updated_at":"2016-06-15T10:09:34.177Z","awardable_id":80,"awardable_type":"MergeRequest"}] \ No newline at end of file diff --git a/spec/fixtures/merge_request_changes.json b/spec/fixtures/merge_request_changes.json index 6a75abf..7237aad 100644 --- a/spec/fixtures/merge_request_changes.json +++ b/spec/fixtures/merge_request_changes.json @@ -1 +1 @@ -{"id":2,"iid":5,"project_id":3,"title":"Uncovered","description":"","state":"opened","created_at":"2015-03-15T23:15:13.292+01:00","updated_at":"2015-03-15T23:15:14.132+01:00","target_branch":"master","source_branch":"uncovered","upvotes":0,"downvotes":0,"author":{"name":"Dominik Sander","username":"dsander","id":1,"state":"active","avatar_url":"https://secure.gravatar.com/avatar/7f01734389dd6730d076ddee04838bd3?s=40\u0026d=identicon"},"assignee":null,"source_project_id":6,"target_project_id":6,"labels":[],"milestone":null,"changes":[{"old_path":"lib/omniauth/builder.rb","new_path":"lib/omniauth/builder.rb","a_mode":"100644","b_mode":"100644","diff":"--- a/lib/omniauth/builder.rb\n+++ b/lib/omniauth/builder.rb\n@@ -7,11 +7,13 @@ module OmniAuth\n else\n @app = app\n super(\u0026block)\n+ two = 1 # woah! uncovered\n @ins \u003c\u003c @app\n end\n end\n \n def rack14?\n+ one = 2 # thats oke!\n Rack.release.split('.')[1].to_i \u003e= 4\n end\n ","new_file":false,"renamed_file":false,"deleted_file":false}]} \ No newline at end of file +{"id":2,"iid":5,"project_id":3,"title":"Uncovered","description":"","state":"opened","created_at":"2015-03-15T23:15:13.292+01:00","updated_at":"2015-03-15T23:15:14.132+01:00","target_branch":"master","source_branch":"uncovered","upvotes":0,"downvotes":0,"author":{"name":"Dominik Sander","username":"dsander","id":1,"state":"active","avatar_url":"https://secure.gravatar.com/avatar/7f01734389dd6730d076ddee04838bd3?s=40&d=identicon"},"assignee":null,"source_project_id":6,"target_project_id":6,"labels":[],"milestone":null,"changes":[{"old_path":"lib/omniauth/builder.rb","new_path":"lib/omniauth/builder.rb","a_mode":"100644","b_mode":"100644","diff":"--- a/lib/omniauth/builder.rb\n+++ b/lib/omniauth/builder.rb\n@@ -7,11 +7,13 @@ module OmniAuth\n else\n @app = app\n super(&block)\n+ two = 1 # woah! uncovered\n @ins << @app\n end\n end\n \n def rack14?\n+ one = 2 # thats oke!\n Rack.release.split('.')[1].to_i >= 4\n end\n ","new_file":false,"renamed_file":false,"deleted_file":false}]} \ No newline at end of file diff --git a/spec/fixtures/merge_request_closes_issues.json b/spec/fixtures/merge_request_closes_issues.json index 4a12eff..0225100 100644 --- a/spec/fixtures/merge_request_closes_issues.json +++ b/spec/fixtures/merge_request_closes_issues.json @@ -1 +1 @@ -[{"id":1,"iid":1,"project_id":5,"title":"Merge request 1 issue 1","description":"","state":"opened","created_at":"2017-04-06T08:03:36.163Z","updated_at":"2017-04-06T08:03:57.087Z","labels":[],"milestone":null,"assignee":null,"author":{"name":"John","username":"jdoe","id":1,"state":"active","avatar_url":"","web_url":"https://gitlab.com/jdoe"},"user_notes_count":0,"upvotes":0,"downvotes":0,"due_date":null,"confidential":false,"weight":null,"web_url":"https://gitlab.com/jdoe/milestone_merge_requests_test/issues/1"},{"id":2,"iid":2,"project_id":5,"title":"Merge request 1 issue 2","description":"","state":"opened","created_at":"2017-04-06T08:03:44.023Z","updated_at":"2017-04-06T08:03:44.023Z","labels":[],"milestone":null,"assignee":null,"author":{"name":"John","username":"jdoe","id":426047,"state":"active","avatar_url":"","web_url":"https://gitlab.com/jdoe"},"user_notes_count":0,"upvotes":0,"downvotes":0,"due_date":null,"confidential":false,"weight":null,"web_url":"https://gitlab.com/jdoe/milestone_merge_requests_test/issues/2"}] +[{"id":1,"iid":1,"project_id":5,"title":"Merge request 1 issue 1","description":"","state":"opened","created_at":"2017-04-06T08:03:36.163Z","updated_at":"2017-04-06T08:03:57.087Z","labels":[],"milestone":null,"assignee":null,"author":{"name":"John","username":"jdoe","id":1,"state":"active","avatar_url":"","web_url":"https://gitlab.com/jdoe"},"user_notes_count":0,"upvotes":0,"downvotes":0,"due_date":null,"confidential":false,"weight":null,"web_url":"https://gitlab.com/jdoe/milestone_merge_requests_test/issues/1"},{"id":2,"iid":2,"project_id":5,"title":"Merge request 1 issue 2","description":"","state":"opened","created_at":"2017-04-06T08:03:44.023Z","updated_at":"2017-04-06T08:03:44.023Z","labels":[],"milestone":null,"assignee":null,"author":{"name":"John","username":"jdoe","id":426047,"state":"active","avatar_url":"","web_url":"https://gitlab.com/jdoe"},"user_notes_count":0,"upvotes":0,"downvotes":0,"due_date":null,"confidential":false,"weight":null,"web_url":"https://gitlab.com/jdoe/milestone_merge_requests_test/issues/2"}] \ No newline at end of file diff --git a/spec/fixtures/merge_request_comments.json b/spec/fixtures/merge_request_comments.json index 3b9733e..0084c96 100644 --- a/spec/fixtures/merge_request_comments.json +++ b/spec/fixtures/merge_request_comments.json @@ -1 +1 @@ -[{"note":"this is the 1st comment on the 2merge merge request","author":{"id":11,"username":"admin","email":"admin@example.com","name":"A User","state":"active","created_at":"2014-03-06T08:17:35.000Z"}},{"note":"another discussion point on the 2merge request","author":{"id":12,"username":"admin","email":"admin@example.com","name":"A User","state":"active","created_at":"2014-03-06T08:17:35.000Z"}}] +[{"note":"this is the 1st comment on the 2merge merge request","author":{"id":11,"username":"admin","email":"admin@example.com","name":"A User","state":"active","created_at":"2014-03-06T08:17:35.000Z"}},{"note":"another discussion point on the 2merge request","author":{"id":12,"username":"admin","email":"admin@example.com","name":"A User","state":"active","created_at":"2014-03-06T08:17:35.000Z"}}] \ No newline at end of file diff --git a/spec/fixtures/merge_request_commits.json b/spec/fixtures/merge_request_commits.json index 806277d..1ebc1c1 100644 --- a/spec/fixtures/merge_request_commits.json +++ b/spec/fixtures/merge_request_commits.json @@ -1 +1 @@ -[{"id":"a2da7552f26d5b46a6a09bb8b7b066e3a102be7d","short_id":"a2da7552","title": "piyo","author_name":"example","author_email":"example@example.com","created_at":"2015-12-19T18:02:31.000+09:00","message":"fuga"},{"id":"3ce509590f37dbce5b877c3e1c78bd3903493170","short_id":"3ce50959","title":"hoge","author_name":"example","author_email":"example@example.com","created_at":"2015-12-19T17:53:46.000+09:00","message":"Hoge"}] +[{"id":"a2da7552f26d5b46a6a09bb8b7b066e3a102be7d","short_id":"a2da7552","title":"piyo","author_name":"example","author_email":"example@example.com","created_at":"2015-12-19T18:02:31.000+09:00","message":"fuga"},{"id":"3ce509590f37dbce5b877c3e1c78bd3903493170","short_id":"3ce50959","title":"hoge","author_name":"example","author_email":"example@example.com","created_at":"2015-12-19T17:53:46.000+09:00","message":"Hoge"}] \ No newline at end of file diff --git a/spec/fixtures/merge_request_diff_version.json b/spec/fixtures/merge_request_diff_version.json index 91df5ca..ec18292 100644 --- a/spec/fixtures/merge_request_diff_version.json +++ b/spec/fixtures/merge_request_diff_version.json @@ -1,45 +1 @@ -{ - "id": 110, - "head_commit_sha": "33e2ee8579fda5bc36accc9c6fbd0b4fefda9e30", - "base_commit_sha": "eeb57dffe83deb686a60a71c16c32f71046868fd", - "start_commit_sha": "eeb57dffe83deb686a60a71c16c32f71046868fd", - "created_at": "2016-07-26T14:44:48.926Z", - "merge_request_id": 105, - "state": "collected", - "real_size": "1", - "commits": [{ - "id": "33e2ee8579fda5bc36accc9c6fbd0b4fefda9e30", - "short_id": "33e2ee85", - "title": "Change year to 2018", - "author_name": "Administrator", - "author_email": "admin@example.com", - "created_at": "2016-07-26T17:44:29.000+03:00", - "message": "Change year to 2018" - }, { - "id": "aa24655de48b36335556ac8a3cd8bb521f977cbd", - "short_id": "aa24655d", - "title": "Update LICENSE", - "author_name": "Administrator", - "author_email": "admin@example.com", - "created_at": "2016-07-25T17:21:53.000+03:00", - "message": "Update LICENSE" - }, { - "id": "3eed087b29835c48015768f839d76e5ea8f07a24", - "short_id": "3eed087b", - "title": "Add license", - "author_name": "Administrator", - "author_email": "admin@example.com", - "created_at": "2016-07-25T17:21:20.000+03:00", - "message": "Add license" - }], - "diffs": [{ - "old_path": "LICENSE", - "new_path": "LICENSE", - "a_mode": "0", - "b_mode": "100644", - "diff": "--- /dev/null\n+++ b/LICENSE\n@@ -0,0 +1,21 @@\n+The MIT License (MIT)\n+\n+Copyright (c) 2018 Administrator\n+\n+Permission is hereby granted, free of charge, to any person obtaining a copy\n+of this software and associated documentation files (the \"Software\"), to deal\n+in the Software without restriction, including without limitation the rights\n+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+copies of the Software, and to permit persons to whom the Software is\n+furnished to do so, subject to the following conditions:\n+\n+The above copyright notice and this permission notice shall be included in all\n+copies or substantial portions of the Software.\n+\n+THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n+SOFTWARE.\n", - "new_file": true, - "renamed_file": false, - "deleted_file": false - }] -} +{"id":110,"head_commit_sha":"33e2ee8579fda5bc36accc9c6fbd0b4fefda9e30","base_commit_sha":"eeb57dffe83deb686a60a71c16c32f71046868fd","start_commit_sha":"eeb57dffe83deb686a60a71c16c32f71046868fd","created_at":"2016-07-26T14:44:48.926Z","merge_request_id":105,"state":"collected","real_size":"1","commits":[{"id":"33e2ee8579fda5bc36accc9c6fbd0b4fefda9e30","short_id":"33e2ee85","title":"Change year to 2018","author_name":"Administrator","author_email":"admin@example.com","created_at":"2016-07-26T17:44:29.000+03:00","message":"Change year to 2018"},{"id":"aa24655de48b36335556ac8a3cd8bb521f977cbd","short_id":"aa24655d","title":"Update LICENSE","author_name":"Administrator","author_email":"admin@example.com","created_at":"2016-07-25T17:21:53.000+03:00","message":"Update LICENSE"},{"id":"3eed087b29835c48015768f839d76e5ea8f07a24","short_id":"3eed087b","title":"Add license","author_name":"Administrator","author_email":"admin@example.com","created_at":"2016-07-25T17:21:20.000+03:00","message":"Add license"}],"diffs":[{"old_path":"LICENSE","new_path":"LICENSE","a_mode":"0","b_mode":"100644","diff":"--- /dev/null\n+++ b/LICENSE\n@@ -0,0 +1,21 @@\n+The MIT License (MIT)\n+\n+Copyright (c) 2018 Administrator\n+\n+Permission is hereby granted, free of charge, to any person obtaining a copy\n+of this software and associated documentation files (the \"Software\"), to deal\n+in the Software without restriction, including without limitation the rights\n+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+copies of the Software, and to permit persons to whom the Software is\n+furnished to do so, subject to the following conditions:\n+\n+The above copyright notice and this permission notice shall be included in all\n+copies or substantial portions of the Software.\n+\n+THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n+SOFTWARE.\n","new_file":true,"renamed_file":false,"deleted_file":false}]} \ No newline at end of file diff --git a/spec/fixtures/merge_request_diff_versions.json b/spec/fixtures/merge_request_diff_versions.json index 48ede0e..705899e 100644 --- a/spec/fixtures/merge_request_diff_versions.json +++ b/spec/fixtures/merge_request_diff_versions.json @@ -1,19 +1 @@ -[{ - "id": 110, - "head_commit_sha": "33e2ee8579fda5bc36accc9c6fbd0b4fefda9e30", - "base_commit_sha": "eeb57dffe83deb686a60a71c16c32f71046868fd", - "start_commit_sha": "eeb57dffe83deb686a60a71c16c32f71046868fd", - "created_at": "2016-07-26T14:44:48.926Z", - "merge_request_id": 105, - "state": "collected", - "real_size": "1" -}, { - "id": 108, - "head_commit_sha": "3eed087b29835c48015768f839d76e5ea8f07a24", - "base_commit_sha": "eeb57dffe83deb686a60a71c16c32f71046868fd", - "start_commit_sha": "eeb57dffe83deb686a60a71c16c32f71046868fd", - "created_at": "2016-07-25T14:21:33.028Z", - "merge_request_id": 105, - "state": "collected", - "real_size": "1" -}] +[{"id":110,"head_commit_sha":"33e2ee8579fda5bc36accc9c6fbd0b4fefda9e30","base_commit_sha":"eeb57dffe83deb686a60a71c16c32f71046868fd","start_commit_sha":"eeb57dffe83deb686a60a71c16c32f71046868fd","created_at":"2016-07-26T14:44:48.926Z","merge_request_id":105,"state":"collected","real_size":"1"},{"id":108,"head_commit_sha":"3eed087b29835c48015768f839d76e5ea8f07a24","base_commit_sha":"eeb57dffe83deb686a60a71c16c32f71046868fd","start_commit_sha":"eeb57dffe83deb686a60a71c16c32f71046868fd","created_at":"2016-07-25T14:21:33.028Z","merge_request_id":105,"state":"collected","real_size":"1"}] \ No newline at end of file diff --git a/spec/fixtures/merge_request_discussion.json b/spec/fixtures/merge_request_discussion.json index b296ce3..3507102 100644 --- a/spec/fixtures/merge_request_discussion.json +++ b/spec/fixtures/merge_request_discussion.json @@ -1,39 +1 @@ -{ - "id": "7d66bf19bf835e6a4666130544ba1b5c343fc705", - "individual_note": false, - "notes": [ - { - "id": 1758, - "type": "DiffNote", - "body": "test test", - "attachment": null, - "author": { - "id": 1, - "name": "Dominik Sander", - "username": "dsander", - "state": "active", - "avatar_url": "https://secure.gravatar.com/avatar/7f017343sf43896ddee04838bd3?s=80&d=identicon", - "web_url": "https://example.com/dsander" - }, - "created_at": "2018-05-22T22:00:18.858+02:00", - "updated_at": "2018-05-22T22:00:18.858+02:00", - "system": false, - "noteable_id": 208, - "noteable_type": "MergeRequest", - "position": { - "base_sha": "fb60b1f9e3005a4ec8e039c4ec16b6d36f8e75c9", - "start_sha": "3c14868ce2ffbf3294ff8c0de828fd1a0e545aae", - "head_sha": "7d938cb8ac15788d71f4b67c035515a160ea76d8", - "old_path": "spec/omniauth/form_spec.rb", - "new_path": "spec/omniauth/form_spec.rb", - "position_type": "text", - "old_line": 5, - "new_line": null - }, - "resolvable": true, - "resolved": false, - "resolved_by": null, - "noteable_iid": 13 - } - ] -} +{"id":"7d66bf19bf835e6a4666130544ba1b5c343fc705","individual_note":false,"notes":[{"id":1758,"type":"DiffNote","body":"test test","attachment":null,"author":{"id":1,"name":"Dominik Sander","username":"dsander","state":"active","avatar_url":"https://secure.gravatar.com/avatar/7f017343sf43896ddee04838bd3?s=80&d=identicon","web_url":"https://example.com/dsander"},"created_at":"2018-05-22T22:00:18.858+02:00","updated_at":"2018-05-22T22:00:18.858+02:00","system":false,"noteable_id":208,"noteable_type":"MergeRequest","position":{"base_sha":"fb60b1f9e3005a4ec8e039c4ec16b6d36f8e75c9","start_sha":"3c14868ce2ffbf3294ff8c0de828fd1a0e545aae","head_sha":"7d938cb8ac15788d71f4b67c035515a160ea76d8","old_path":"spec/omniauth/form_spec.rb","new_path":"spec/omniauth/form_spec.rb","position_type":"text","old_line":5,"new_line":null},"resolvable":true,"resolved":false,"resolved_by":null,"noteable_iid":13}]} \ No newline at end of file diff --git a/spec/fixtures/merge_request_discussion_note.json b/spec/fixtures/merge_request_discussion_note.json index 620a6d5..7441716 100644 --- a/spec/fixtures/merge_request_discussion_note.json +++ b/spec/fixtures/merge_request_discussion_note.json @@ -1,33 +1 @@ -{ - "id": 1775, - "type": "DiffNote", - "body": "much note", - "attachment": null, - "author": { - "id": 1, - "name": "Dominik Sander", - "username": "dsander", - "state": "active", - "avatar_url": "https://secure.gravatar.com/avatar/7f017343sf43896ddee04838bd3?s=80&d=identicon", - "web_url": "https://example.com/dsander" - }, - "created_at": "2018-05-23T22:21:46.993+02:00", - "updated_at": "2018-05-23T22:21:46.993+02:00", - "system": false, - "noteable_id": 208, - "noteable_type": "MergeRequest", - "position": { - "base_sha": "fb60b1f9e3005a4ec8e039c4ec16b6d36f8e75c9", - "start_sha": "3c14868ce2ffbf3294ff8c0de828fd1a0e545aae", - "head_sha": "7d938cb8ac15788d71f4b67c035515a160ea76d8", - "old_path": "spec/omniauth/form_spec.rb", - "new_path": "spec/omniauth/form_spec.rb", - "position_type": "text", - "old_line": 9, - "new_line": null - }, - "resolvable": true, - "resolved": false, - "resolved_by": null, - "noteable_iid": 13 -} +{"id":1775,"type":"DiffNote","body":"much note","attachment":null,"author":{"id":1,"name":"Dominik Sander","username":"dsander","state":"active","avatar_url":"https://secure.gravatar.com/avatar/7f017343sf43896ddee04838bd3?s=80&d=identicon","web_url":"https://example.com/dsander"},"created_at":"2018-05-23T22:21:46.993+02:00","updated_at":"2018-05-23T22:21:46.993+02:00","system":false,"noteable_id":208,"noteable_type":"MergeRequest","position":{"base_sha":"fb60b1f9e3005a4ec8e039c4ec16b6d36f8e75c9","start_sha":"3c14868ce2ffbf3294ff8c0de828fd1a0e545aae","head_sha":"7d938cb8ac15788d71f4b67c035515a160ea76d8","old_path":"spec/omniauth/form_spec.rb","new_path":"spec/omniauth/form_spec.rb","position_type":"text","old_line":9,"new_line":null},"resolvable":true,"resolved":false,"resolved_by":null,"noteable_iid":13} \ No newline at end of file diff --git a/spec/fixtures/merge_request_discussions.json b/spec/fixtures/merge_request_discussions.json index 43dcaf5..7a131ce 100644 --- a/spec/fixtures/merge_request_discussions.json +++ b/spec/fixtures/merge_request_discussions.json @@ -1,41 +1 @@ -[ - { - "id": "7d66bf19bf835e6a4666130544ba1b5c343fc705", - "individual_note": false, - "notes": [ - { - "id": 1758, - "type": "DiffNote", - "body": "test test", - "attachment": null, - "author": { - "id": 1, - "name": "Dominik Sander", - "username": "dsander", - "state": "active", - "avatar_url": "https://secure.gravatar.com/avatar/7f017343sf43896ddee04838bd3?s=80&d=identicon", - "web_url": "https://example.com/dsander" - }, - "created_at": "2018-05-22T22:00:18.858+02:00", - "updated_at": "2018-05-22T22:00:18.858+02:00", - "system": false, - "noteable_id": 208, - "noteable_type": "MergeRequest", - "position": { - "base_sha": "fb60b1f9e3005a4ec8e039c4ec16b6d36f8e75c9", - "start_sha": "3c14868ce2ffbf3294ff8c0de828fd1a0e545aae", - "head_sha": "7d938cb8ac15788d71f4b67c035515a160ea76d8", - "old_path": "spec/omniauth/form_spec.rb", - "new_path": "spec/omniauth/form_spec.rb", - "position_type": "text", - "old_line": 5, - "new_line": null - }, - "resolvable": true, - "resolved": false, - "resolved_by": null, - "noteable_iid": 13 - } - ] - } -] +[{"id":"7d66bf19bf835e6a4666130544ba1b5c343fc705","individual_note":false,"notes":[{"id":1758,"type":"DiffNote","body":"test test","attachment":null,"author":{"id":1,"name":"Dominik Sander","username":"dsander","state":"active","avatar_url":"https://secure.gravatar.com/avatar/7f017343sf43896ddee04838bd3?s=80&d=identicon","web_url":"https://example.com/dsander"},"created_at":"2018-05-22T22:00:18.858+02:00","updated_at":"2018-05-22T22:00:18.858+02:00","system":false,"noteable_id":208,"noteable_type":"MergeRequest","position":{"base_sha":"fb60b1f9e3005a4ec8e039c4ec16b6d36f8e75c9","start_sha":"3c14868ce2ffbf3294ff8c0de828fd1a0e545aae","head_sha":"7d938cb8ac15788d71f4b67c035515a160ea76d8","old_path":"spec/omniauth/form_spec.rb","new_path":"spec/omniauth/form_spec.rb","position_type":"text","old_line":5,"new_line":null},"resolvable":true,"resolved":false,"resolved_by":null,"noteable_iid":13}]}] \ No newline at end of file diff --git a/spec/fixtures/merge_requests.json b/spec/fixtures/merge_requests.json index ea32ac4..ca9cfc7 100644 --- a/spec/fixtures/merge_requests.json +++ b/spec/fixtures/merge_requests.json @@ -1 +1 @@ -[{"id":1,"target_branch":"master","source_branch":"api","project_id":3,"title":"New feature","closed":false,"merged":false,"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-10-19T05:56:05Z"},"assignee":{"id":2,"email":"jack@example.com","name":"Jack Smith","blocked":false,"created_at":"2012-10-19T05:56:14Z"}}] +[{"id":1,"target_branch":"master","source_branch":"api","project_id":3,"title":"New feature","closed":false,"merged":false,"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-10-19T05:56:05Z"},"assignee":{"id":2,"email":"jack@example.com","name":"Jack Smith","blocked":false,"created_at":"2012-10-19T05:56:14Z"}}] \ No newline at end of file diff --git a/spec/fixtures/merge_requests_closing_issue_on_merge.json b/spec/fixtures/merge_requests_closing_issue_on_merge.json index 0217ab3..a79793a 100644 --- a/spec/fixtures/merge_requests_closing_issue_on_merge.json +++ b/spec/fixtures/merge_requests_closing_issue_on_merge.json @@ -1 +1 @@ -[{"id":1,"target_branch":"master","source_branch":"api","project_id":3,"title":"New feature","closed":false,"merged":false,"author":{"id":2,"email":"john2@example.com","name":"John Smith 2","blocked":false,"created_at":"2012-10-19T05:56:05Z"},"assignee":{"id":2,"email":"jack@example.com","name":"Jack Smith 2","blocked":false,"created_at":"2012-10-19T05:56:14Z"}},{"id":2,"target_branch":"master","source_branch":"api","project_id":2,"title":"New feature 2","closed":false,"merged":false,"author":{"id":2,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-10-19T05:56:05Z"},"assignee":{"id":4,"email":"jack@example.com","name":"Jack Smith","blocked":false,"created_at":"2012-10-19T05:56:14Z"}}] +[{"id":1,"target_branch":"master","source_branch":"api","project_id":3,"title":"New feature","closed":false,"merged":false,"author":{"id":2,"email":"john2@example.com","name":"John Smith 2","blocked":false,"created_at":"2012-10-19T05:56:05Z"},"assignee":{"id":2,"email":"jack@example.com","name":"Jack Smith 2","blocked":false,"created_at":"2012-10-19T05:56:14Z"}},{"id":2,"target_branch":"master","source_branch":"api","project_id":2,"title":"New feature 2","closed":false,"merged":false,"author":{"id":2,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-10-19T05:56:05Z"},"assignee":{"id":4,"email":"jack@example.com","name":"Jack Smith","blocked":false,"created_at":"2012-10-19T05:56:14Z"}}] \ No newline at end of file diff --git a/spec/fixtures/milestone_issues.json b/spec/fixtures/milestone_issues.json index 32597d0..b2322d2 100644 --- a/spec/fixtures/milestone_issues.json +++ b/spec/fixtures/milestone_issues.json @@ -1 +1 @@ -[{"id":1,"project_id":3,"title":"Culpa eius recusandae suscipit autem distinctio dolorum.","description":null,"labels":[],"milestone":{"id": 1},"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z"},{"id":6,"project_id":3,"title":"Ut in dolorum omnis sed sit aliquam.","description":null,"labels":[],"milestone":{"id": 1},"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z"},{"id":12,"project_id":3,"title":"Veniam et tempore quidem eum reprehenderit cupiditate non aut velit eaque.","description":null,"labels":[],"milestone":{"id": 1},"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z"},{"id":21,"project_id":3,"title":"Vitae ea aliquam et quo eligendi sapiente voluptatum labore hic nihil culpa.","description":null,"labels":[],"milestone":{"id": 1},"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z"},{"id":26,"project_id":3,"title":"Quo enim est nihil atque placeat voluptas neque eos voluptas.","description":null,"labels":[],"milestone":{"id": 1},"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z"},{"id":32,"project_id":3,"title":"Deserunt tenetur impedit est beatae voluptas voluptas quaerat quisquam.","description":null,"labels":[],"milestone":{"id": 1},"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z"}] \ No newline at end of file +[{"id":1,"project_id":3,"title":"Culpa eius recusandae suscipit autem distinctio dolorum.","description":null,"labels":[],"milestone":{"id":1},"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z"},{"id":6,"project_id":3,"title":"Ut in dolorum omnis sed sit aliquam.","description":null,"labels":[],"milestone":{"id":1},"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z"},{"id":12,"project_id":3,"title":"Veniam et tempore quidem eum reprehenderit cupiditate non aut velit eaque.","description":null,"labels":[],"milestone":{"id":1},"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z"},{"id":21,"project_id":3,"title":"Vitae ea aliquam et quo eligendi sapiente voluptatum labore hic nihil culpa.","description":null,"labels":[],"milestone":{"id":1},"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z"},{"id":26,"project_id":3,"title":"Quo enim est nihil atque placeat voluptas neque eos voluptas.","description":null,"labels":[],"milestone":{"id":1},"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z"},{"id":32,"project_id":3,"title":"Deserunt tenetur impedit est beatae voluptas voluptas quaerat quisquam.","description":null,"labels":[],"milestone":{"id":1},"assignee":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"closed":false,"updated_at":"2012-09-17T09:42:20Z","created_at":"2012-09-17T09:42:20Z"}] \ No newline at end of file diff --git a/spec/fixtures/milestone_merge_requests.json b/spec/fixtures/milestone_merge_requests.json index aa01a29..1fe4308 100644 --- a/spec/fixtures/milestone_merge_requests.json +++ b/spec/fixtures/milestone_merge_requests.json @@ -1 +1 @@ -[{"id":1,"iid":1,"project_id":1,"title":"lorem ipsum","description":"","state":"opened","created_at":"2017-03-24T12:23:53.918Z","updated_at":"2017-03-24T12:23:53.918Z","target_branch":"master","source_branch":"def","upvotes":0,"downvotes":0,"author":{"name":"John Doe","username":"jdoe","id":1,"state":"active","avatar_url":"","web_url":"https://gitlab.com/jdoen"},"assignee":null,"source_project_id":1,"target_project_id":1,"labels":[],"work_in_progress":false,"milestone":{"id":1,"iid":1,"project_id":1,"title":"Test","description":"","state":"active","created_at":"2017-03-24T12:23:00.560Z","updated_at":"2017-03-24T12:23:00.560Z","due_date":null,"start_date":null},"merge_when_pipeline_succeeds":false,"merge_status":"can_be_merged","sha":"aec123d1775790b2347fdd684b5ba613fdeb994b","merge_commit_sha":null,"user_notes_count":0,"approvals_before_merge":null,"should_remove_source_branch":null,"force_remove_source_branch":false,"squash":false,"web_url":"https://gitlab.com/jdoe/milestone_merge_requests_test/merge_requests/2"},{"id":2,"iid":2,"project_id":1,"title":"ipsum lorem","description":"","state":"opened","created_at":"2017-03-24T12:23:24.662Z","updated_at":"2017-03-24T12:23:33.522Z","target_branch":"master","source_branch":"test1","upvotes":0,"downvotes":0,"author":{"name":"Joren","username":"jdoe","id":1,"state":"active","":"","web_url":"https://gitlab.com/jdoe"},"assignee":null,"source_project_id":1,"target_project_id":1,"labels":[],"work_in_progress":false,"milestone":{"id":1,"iid":1,"project_id":1,"title":"Test","description":"","state":"active","created_at":"2017-03-24T12:23:00.560Z","updated_at":"2017-03-24T12:23:00.560Z","due_date":null,"start_date":null},"merge_when_pipeline_succeeds":false,"merge_status":"can_be_merged","sha":"3ee44c9b40deddae596f838b97523c6f010fd80d","merge_commit_sha":null,"user_notes_count":0,"approvals_before_merge":null,"should_remove_source_branch":null,"force_remove_source_branch":true,"squash":false,"web_url":"https://gitlab.com/jdoe/milestone_merge_requests_test/merge_requests/1"}] +[{"id":1,"iid":1,"project_id":1,"title":"lorem ipsum","description":"","state":"opened","created_at":"2017-03-24T12:23:53.918Z","updated_at":"2017-03-24T12:23:53.918Z","target_branch":"master","source_branch":"def","upvotes":0,"downvotes":0,"author":{"name":"John Doe","username":"jdoe","id":1,"state":"active","avatar_url":"","web_url":"https://gitlab.com/jdoen"},"assignee":null,"source_project_id":1,"target_project_id":1,"labels":[],"work_in_progress":false,"milestone":{"id":1,"iid":1,"project_id":1,"title":"Test","description":"","state":"active","created_at":"2017-03-24T12:23:00.560Z","updated_at":"2017-03-24T12:23:00.560Z","due_date":null,"start_date":null},"merge_when_pipeline_succeeds":false,"merge_status":"can_be_merged","sha":"aec123d1775790b2347fdd684b5ba613fdeb994b","merge_commit_sha":null,"user_notes_count":0,"approvals_before_merge":null,"should_remove_source_branch":null,"force_remove_source_branch":false,"squash":false,"web_url":"https://gitlab.com/jdoe/milestone_merge_requests_test/merge_requests/2"},{"id":2,"iid":2,"project_id":1,"title":"ipsum lorem","description":"","state":"opened","created_at":"2017-03-24T12:23:24.662Z","updated_at":"2017-03-24T12:23:33.522Z","target_branch":"master","source_branch":"test1","upvotes":0,"downvotes":0,"author":{"name":"Joren","username":"jdoe","id":1,"state":"active","":"","web_url":"https://gitlab.com/jdoe"},"assignee":null,"source_project_id":1,"target_project_id":1,"labels":[],"work_in_progress":false,"milestone":{"id":1,"iid":1,"project_id":1,"title":"Test","description":"","state":"active","created_at":"2017-03-24T12:23:00.560Z","updated_at":"2017-03-24T12:23:00.560Z","due_date":null,"start_date":null},"merge_when_pipeline_succeeds":false,"merge_status":"can_be_merged","sha":"3ee44c9b40deddae596f838b97523c6f010fd80d","merge_commit_sha":null,"user_notes_count":0,"approvals_before_merge":null,"should_remove_source_branch":null,"force_remove_source_branch":true,"squash":false,"web_url":"https://gitlab.com/jdoe/milestone_merge_requests_test/merge_requests/1"}] \ No newline at end of file diff --git a/spec/fixtures/namespaces.json b/spec/fixtures/namespaces.json index ae2538b..502d957 100644 --- a/spec/fixtures/namespaces.json +++ b/spec/fixtures/namespaces.json @@ -1 +1 @@ -[{"id": 1, "path": "john", "kind": "user"}] +[{"id":1,"path":"john","kind":"user"}] \ No newline at end of file diff --git a/spec/fixtures/no_content_gitlab_ci_yml.json b/spec/fixtures/no_content_gitlab_ci_yml.json index ee627ec..1471ed4 100644 --- a/spec/fixtures/no_content_gitlab_ci_yml.json +++ b/spec/fixtures/no_content_gitlab_ci_yml.json @@ -1,3 +1 @@ -{ - "error": "content is missing" -} +{"error":"content is missing"} \ No newline at end of file diff --git a/spec/fixtures/note.json b/spec/fixtures/note.json index 3f575ae..18cce45 100644 --- a/spec/fixtures/note.json +++ b/spec/fixtures/note.json @@ -1 +1 @@ -{"id":1201,"body":"The solution is rather tricky","author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"created_at":"2012-11-27T19:16:44Z"} +{"id":1201,"body":"The solution is rather tricky","author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"created_at":"2012-11-27T19:16:44Z"} \ No newline at end of file diff --git a/spec/fixtures/note_award_emoji.json b/spec/fixtures/note_award_emoji.json index 26c7413..93f965a 100644 --- a/spec/fixtures/note_award_emoji.json +++ b/spec/fixtures/note_award_emoji.json @@ -1,16 +1 @@ -{ - "id": 4, - "name": "mood_bubble_lightning", - "user": { - "name": "User 4", - "username": "user4", - "id": 26, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/7e65550957227bd38fe2d7fbc6fd2f7b?s=80&d=identicon", - "web_url": "http://gitlab.example.com/user4" - }, - "created_at": "2016-06-15T10:09:34.197Z", - "updated_at": "2016-06-15T10:09:34.197Z", - "awardable_id": 1, - "awardable_type": "Note" -} +{"id":4,"name":"mood_bubble_lightning","user":{"name":"User 4","username":"user4","id":26,"state":"active","avatar_url":"http://www.gravatar.com/avatar/7e65550957227bd38fe2d7fbc6fd2f7b?s=80&d=identicon","web_url":"http://gitlab.example.com/user4"},"created_at":"2016-06-15T10:09:34.197Z","updated_at":"2016-06-15T10:09:34.197Z","awardable_id":1,"awardable_type":"Note"} \ No newline at end of file diff --git a/spec/fixtures/note_award_emojis.json b/spec/fixtures/note_award_emojis.json index cc701ba..20c30ac 100644 --- a/spec/fixtures/note_award_emojis.json +++ b/spec/fixtures/note_award_emojis.json @@ -1,18 +1 @@ -[ - { - "id": 2, - "name": "mood_bubble_lightning", - "user": { - "name": "User 4", - "username": "user4", - "id": 26, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/7e65550957227bd38fe2d7fbc6fd2f7b?s=80&d=identicon", - "web_url": "http://gitlab.example.com/user4" - }, - "created_at": "2016-06-15T10:09:34.197Z", - "updated_at": "2016-06-15T10:09:34.197Z", - "awardable_id": 1, - "awardable_type": "Note" - } -] \ No newline at end of file +[{"id":2,"name":"mood_bubble_lightning","user":{"name":"User 4","username":"user4","id":26,"state":"active","avatar_url":"http://www.gravatar.com/avatar/7e65550957227bd38fe2d7fbc6fd2f7b?s=80&d=identicon","web_url":"http://gitlab.example.com/user4"},"created_at":"2016-06-15T10:09:34.197Z","updated_at":"2016-06-15T10:09:34.197Z","awardable_id":1,"awardable_type":"Note"}] \ No newline at end of file diff --git a/spec/fixtures/notes.json b/spec/fixtures/notes.json index 15c0d8c..bfbc02c 100644 --- a/spec/fixtures/notes.json +++ b/spec/fixtures/notes.json @@ -1 +1 @@ -[{"id":1201,"body":"The solution is rather tricky","author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"created_at":"2012-11-27T19:16:44Z"},{"id":1207,"body":"I know, right?","author":{"id":1,"email":"jack@example.com","name":"Jack Smith","blocked":false,"created_at":"2012-09-17T09:42:03Z"},"created_at":"2012-11-27T19:58:21Z"}] +[{"id":1201,"body":"The solution is rather tricky","author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"created_at":"2012-11-27T19:16:44Z"},{"id":1207,"body":"I know, right?","author":{"id":1,"email":"jack@example.com","name":"Jack Smith","blocked":false,"created_at":"2012-09-17T09:42:03Z"},"created_at":"2012-11-27T19:58:21Z"}] \ No newline at end of file diff --git a/spec/fixtures/participants.json b/spec/fixtures/participants.json index 0581790..e3b61ed 100644 --- a/spec/fixtures/participants.json +++ b/spec/fixtures/participants.json @@ -1,18 +1 @@ -[ - { - "id": 1, - "name": "John Doe1", - "username": "user1", - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/c922747a93b40d1ea88262bf1aebee62?s=80&d=identicon", - "web_url": "http://localhost/user1" - }, - { - "id": 2, - "name": "John Doe2", - "username": "user2", - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/10fc7f102be8de7657fb4d80898bbfe3?s=80&d=identicon", - "web_url": "http://localhost/user2" - } -] \ No newline at end of file +[{"id":1,"name":"John Doe1","username":"user1","state":"active","avatar_url":"http://www.gravatar.com/avatar/c922747a93b40d1ea88262bf1aebee62?s=80&d=identicon","web_url":"http://localhost/user1"},{"id":2,"name":"John Doe2","username":"user2","state":"active","avatar_url":"http://www.gravatar.com/avatar/10fc7f102be8de7657fb4d80898bbfe3?s=80&d=identicon","web_url":"http://localhost/user2"}] \ No newline at end of file diff --git a/spec/fixtures/participants_on_issue.json b/spec/fixtures/participants_on_issue.json index d15bb8f..e7fce03 100644 --- a/spec/fixtures/participants_on_issue.json +++ b/spec/fixtures/participants_on_issue.json @@ -1,18 +1 @@ -[ - { - "id": 1, - "name": "John Doe1", - "username": "user1", - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/c922747a93b40d1ea88262bf1aebee62?s=80&d=identicon", - "web_url": "http://localhost/user1" - }, - { - "id": 5, - "name": "John Doe5", - "username": "user5", - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/4aea8cf834ed91844a2da4ff7ae6b491?s=80&d=identicon", - "web_url": "http://localhost/user5" - } -] +[{"id":1,"name":"John Doe1","username":"user1","state":"active","avatar_url":"http://www.gravatar.com/avatar/c922747a93b40d1ea88262bf1aebee62?s=80&d=identicon","web_url":"http://localhost/user1"},{"id":5,"name":"John Doe5","username":"user5","state":"active","avatar_url":"http://www.gravatar.com/avatar/4aea8cf834ed91844a2da4ff7ae6b491?s=80&d=identicon","web_url":"http://localhost/user5"}] \ No newline at end of file diff --git a/spec/fixtures/pipeline.json b/spec/fixtures/pipeline.json index d015a6a..a54d261 100644 --- a/spec/fixtures/pipeline.json +++ b/spec/fixtures/pipeline.json @@ -1,23 +1 @@ -{ - "id": 46, - "status": "success", - "ref": "master", - "sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a", - "before_sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a", - "tag": false, - "yaml_errors": null, - "user": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://localhost:3000/root" - }, - "created_at": "2016-08-11T11:28:34.085Z", - "updated_at": "2016-08-11T11:32:35.169Z", - "started_at": null, - "finished_at": "2016-08-11T11:32:35.145Z", - "committed_at": null, - "duration": null -} \ No newline at end of file +{"id":46,"status":"success","ref":"master","sha":"a91957a858320c0e17f3a0eca7cfacbff50ea29a","before_sha":"a91957a858320c0e17f3a0eca7cfacbff50ea29a","tag":false,"yaml_errors":null,"user":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://localhost:3000/root"},"created_at":"2016-08-11T11:28:34.085Z","updated_at":"2016-08-11T11:32:35.169Z","started_at":null,"finished_at":"2016-08-11T11:32:35.145Z","committed_at":null,"duration":null} \ No newline at end of file diff --git a/spec/fixtures/pipeline_cancel.json b/spec/fixtures/pipeline_cancel.json index fd3fcba..ae8e1fa 100644 --- a/spec/fixtures/pipeline_cancel.json +++ b/spec/fixtures/pipeline_cancel.json @@ -1,23 +1 @@ -{ - "id": 46, - "status": "canceled", - "ref": "master", - "sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a", - "before_sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a", - "tag": false, - "yaml_errors": null, - "user": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://localhost:3000/root" - }, - "created_at": "2016-08-11T11:28:34.085Z", - "updated_at": "2016-08-11T11:32:35.169Z", - "started_at": null, - "finished_at": "2016-08-11T11:32:35.145Z", - "committed_at": null, - "duration": null -} \ No newline at end of file +{"id":46,"status":"canceled","ref":"master","sha":"a91957a858320c0e17f3a0eca7cfacbff50ea29a","before_sha":"a91957a858320c0e17f3a0eca7cfacbff50ea29a","tag":false,"yaml_errors":null,"user":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://localhost:3000/root"},"created_at":"2016-08-11T11:28:34.085Z","updated_at":"2016-08-11T11:32:35.169Z","started_at":null,"finished_at":"2016-08-11T11:32:35.145Z","committed_at":null,"duration":null} \ No newline at end of file diff --git a/spec/fixtures/pipeline_create.json b/spec/fixtures/pipeline_create.json index b687baa..e7c9775 100644 --- a/spec/fixtures/pipeline_create.json +++ b/spec/fixtures/pipeline_create.json @@ -1,23 +1 @@ -{ - "id": 61, - "sha": "384c444e840a515b23f21915ee5766b87068a70d", - "ref": "master", - "status": "pending", - "before_sha": "0000000000000000000000000000000000000000", - "tag": false, - "yaml_errors": null, - "user": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://localhost:3000/root" - }, - "created_at": "2016-11-04T09:36:13.747Z", - "updated_at": "2016-11-04T09:36:13.977Z", - "started_at": null, - "finished_at": null, - "committed_at": null, - "duration": null -} \ No newline at end of file +{"id":61,"sha":"384c444e840a515b23f21915ee5766b87068a70d","ref":"master","status":"pending","before_sha":"0000000000000000000000000000000000000000","tag":false,"yaml_errors":null,"user":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://localhost:3000/root"},"created_at":"2016-11-04T09:36:13.747Z","updated_at":"2016-11-04T09:36:13.977Z","started_at":null,"finished_at":null,"committed_at":null,"duration":null} \ No newline at end of file diff --git a/spec/fixtures/pipeline_jobs.json b/spec/fixtures/pipeline_jobs.json index 5ea084b..e5f3ef8 100644 --- a/spec/fixtures/pipeline_jobs.json +++ b/spec/fixtures/pipeline_jobs.json @@ -1,91 +1 @@ -[ - { - "commit": { - "author_email": "admin@example.com", - "author_name": "Administrator", - "created_at": "2015-12-24T16:51:14.000+01:00", - "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", - "message": "Test the CI integration.", - "short_id": "0ff3ae19", - "title": "Test the CI integration." - }, - "coverage": null, - "created_at": "2015-12-24T15:51:21.802Z", - "artifacts_file": { - "filename": "artifacts.zip", - "size": 1000 - }, - "finished_at": "2015-12-24T17:54:27.895Z", - "id": 7, - "name": "teaspoon", - "pipeline": { - "id": 6, - "ref": "master", - "sha": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", - "status": "pending" - }, - "ref": "master", - "runner": null, - "stage": "test", - "started_at": "2015-12-24T17:54:27.722Z", - "status": "failed", - "tag": false, - "user": { - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "bio": null, - "created_at": "2015-12-21T13:14:24.077Z", - "id": 1, - "linkedin": "", - "name": "Administrator", - "skype": "", - "state": "active", - "twitter": "", - "username": "root", - "web_url": "http://gitlab.dev/root", - "website_url": "" - } - }, - { - "commit": { - "author_email": "admin@example.com", - "author_name": "Administrator", - "created_at": "2015-12-24T16:51:14.000+01:00", - "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", - "message": "Test the CI integration.", - "short_id": "0ff3ae19", - "title": "Test the CI integration." - }, - "coverage": null, - "created_at": "2015-12-24T15:51:21.727Z", - "artifacts_file": null, - "finished_at": "2015-12-24T17:54:24.921Z", - "id": 6, - "name": "spinach:other", - "pipeline": { - "id": 6, - "ref": "master", - "sha": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", - "status": "pending" - }, - "ref": "master", - "runner": null, - "stage": "test", - "started_at": "2015-12-24T17:54:24.729Z", - "status": "failed", - "tag": false, - "user": { - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "bio": null, - "created_at": "2015-12-21T13:14:24.077Z", - "id": 1, - "linkedin": "", - "name": "Administrator", - "skype": "", - "state": "active", - "twitter": "", - "username": "root", - "web_url": "http://gitlab.dev/root", - "website_url": "" - } - } -] +[{"commit":{"author_email":"admin@example.com","author_name":"Administrator","created_at":"2015-12-24T16:51:14.000+01:00","id":"0ff3ae198f8601a285adcf5c0fff204ee6fba5fd","message":"Test the CI integration.","short_id":"0ff3ae19","title":"Test the CI integration."},"coverage":null,"created_at":"2015-12-24T15:51:21.802Z","artifacts_file":{"filename":"artifacts.zip","size":1000},"finished_at":"2015-12-24T17:54:27.895Z","id":7,"name":"teaspoon","pipeline":{"id":6,"ref":"master","sha":"0ff3ae198f8601a285adcf5c0fff204ee6fba5fd","status":"pending"},"ref":"master","runner":null,"stage":"test","started_at":"2015-12-24T17:54:27.722Z","status":"failed","tag":false,"user":{"avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","bio":null,"created_at":"2015-12-21T13:14:24.077Z","id":1,"linkedin":"","name":"Administrator","skype":"","state":"active","twitter":"","username":"root","web_url":"http://gitlab.dev/root","website_url":""}},{"commit":{"author_email":"admin@example.com","author_name":"Administrator","created_at":"2015-12-24T16:51:14.000+01:00","id":"0ff3ae198f8601a285adcf5c0fff204ee6fba5fd","message":"Test the CI integration.","short_id":"0ff3ae19","title":"Test the CI integration."},"coverage":null,"created_at":"2015-12-24T15:51:21.727Z","artifacts_file":null,"finished_at":"2015-12-24T17:54:24.921Z","id":6,"name":"spinach:other","pipeline":{"id":6,"ref":"master","sha":"0ff3ae198f8601a285adcf5c0fff204ee6fba5fd","status":"pending"},"ref":"master","runner":null,"stage":"test","started_at":"2015-12-24T17:54:24.729Z","status":"failed","tag":false,"user":{"avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","bio":null,"created_at":"2015-12-21T13:14:24.077Z","id":1,"linkedin":"","name":"Administrator","skype":"","state":"active","twitter":"","username":"root","web_url":"http://gitlab.dev/root","website_url":""}}] \ No newline at end of file diff --git a/spec/fixtures/pipeline_retry.json b/spec/fixtures/pipeline_retry.json index 6fcd1ae..a100bd9 100644 --- a/spec/fixtures/pipeline_retry.json +++ b/spec/fixtures/pipeline_retry.json @@ -1,23 +1 @@ -{ - "id": 46, - "status": "pending", - "ref": "master", - "sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a", - "before_sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a", - "tag": false, - "yaml_errors": null, - "user": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://localhost:3000/root" - }, - "created_at": "2016-08-11T11:28:34.085Z", - "updated_at": "2016-08-11T11:32:35.169Z", - "started_at": null, - "finished_at": "2016-08-11T11:32:35.145Z", - "committed_at": null, - "duration": null -} \ No newline at end of file +{"id":46,"status":"pending","ref":"master","sha":"a91957a858320c0e17f3a0eca7cfacbff50ea29a","before_sha":"a91957a858320c0e17f3a0eca7cfacbff50ea29a","tag":false,"yaml_errors":null,"user":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://localhost:3000/root"},"created_at":"2016-08-11T11:28:34.085Z","updated_at":"2016-08-11T11:32:35.169Z","started_at":null,"finished_at":"2016-08-11T11:32:35.145Z","committed_at":null,"duration":null} \ No newline at end of file diff --git a/spec/fixtures/pipeline_schedule.json b/spec/fixtures/pipeline_schedule.json index 0830452..1c1f9e7 100644 --- a/spec/fixtures/pipeline_schedule.json +++ b/spec/fixtures/pipeline_schedule.json @@ -1,32 +1 @@ -{ - "id": 13, - "description": "Test schedule pipeline", - "ref": "master", - "cron": "* * * * *", - "cron_timezone": "Asia/Tokyo", - "next_run_at": "2017-05-19T13:41:00.000Z", - "active": true, - "created_at": "2017-05-19T13:31:08.849Z", - "updated_at": "2017-05-19T13:40:17.727Z", - "last_pipeline": { - "id": 332, - "sha": "0e788619d0b5ec17388dffb973ecd505946156db", - "ref": "master", - "status": "pending" - }, - "owner": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "https://gitlab.example.com/root" - }, - "variables": [ - { - "key": "TEST_VARIABLE_1", - "value": "TEST_1" - } - ] -} - +{"id":13,"description":"Test schedule pipeline","ref":"master","cron":"* * * * *","cron_timezone":"Asia/Tokyo","next_run_at":"2017-05-19T13:41:00.000Z","active":true,"created_at":"2017-05-19T13:31:08.849Z","updated_at":"2017-05-19T13:40:17.727Z","last_pipeline":{"id":332,"sha":"0e788619d0b5ec17388dffb973ecd505946156db","ref":"master","status":"pending"},"owner":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"https://gitlab.example.com/root"},"variables":[{"key":"TEST_VARIABLE_1","value":"TEST_1"}]} \ No newline at end of file diff --git a/spec/fixtures/pipeline_schedule_create.json b/spec/fixtures/pipeline_schedule_create.json index fb00eb8..bf96aab 100644 --- a/spec/fixtures/pipeline_schedule_create.json +++ b/spec/fixtures/pipeline_schedule_create.json @@ -1,21 +1 @@ -{ - "id": 14, - "description": "Build packages", - "ref": "master", - "cron": "0 1 * * 5", - "cron_timezone": "UTC", - "next_run_at": "2017-05-26T01:00:00.000Z", - "active": true, - "created_at": "2017-05-19T13:43:08.169Z", - "updated_at": "2017-05-19T13:43:08.169Z", - "last_pipeline": null, - "owner": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "https://gitlab.example.com/root" - } -} - +{"id":14,"description":"Build packages","ref":"master","cron":"0 1 * * 5","cron_timezone":"UTC","next_run_at":"2017-05-26T01:00:00.000Z","active":true,"created_at":"2017-05-19T13:43:08.169Z","updated_at":"2017-05-19T13:43:08.169Z","last_pipeline":null,"owner":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"https://gitlab.example.com/root"}} \ No newline at end of file diff --git a/spec/fixtures/pipeline_schedule_update.json b/spec/fixtures/pipeline_schedule_update.json index f3edc15..23e1afb 100644 --- a/spec/fixtures/pipeline_schedule_update.json +++ b/spec/fixtures/pipeline_schedule_update.json @@ -1,26 +1 @@ -{ - "id": 13, - "description": "Test schedule pipeline", - "ref": "master", - "cron": "0 2 * * *", - "cron_timezone": "Asia/Tokyo", - "next_run_at": "2017-05-19T17:00:00.000Z", - "active": true, - "created_at": "2017-05-19T13:31:08.849Z", - "updated_at": "2017-05-19T13:44:16.135Z", - "last_pipeline": { - "id": 332, - "sha": "0e788619d0b5ec17388dffb973ecd505946156db", - "ref": "master", - "status": "pending" - }, - "owner": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "https://gitlab.example.com/root" - } -} - +{"id":13,"description":"Test schedule pipeline","ref":"master","cron":"0 2 * * *","cron_timezone":"Asia/Tokyo","next_run_at":"2017-05-19T17:00:00.000Z","active":true,"created_at":"2017-05-19T13:31:08.849Z","updated_at":"2017-05-19T13:44:16.135Z","last_pipeline":{"id":332,"sha":"0e788619d0b5ec17388dffb973ecd505946156db","ref":"master","status":"pending"},"owner":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"https://gitlab.example.com/root"}} \ No newline at end of file diff --git a/spec/fixtures/pipeline_schedule_variable.json b/spec/fixtures/pipeline_schedule_variable.json index 3c3021e..135dacc 100644 --- a/spec/fixtures/pipeline_schedule_variable.json +++ b/spec/fixtures/pipeline_schedule_variable.json @@ -1,5 +1 @@ -{ - "key": "NEW_VARIABLE", - "value": "new value" -} - +{"key":"NEW_VARIABLE","value":"new value"} \ No newline at end of file diff --git a/spec/fixtures/pipeline_schedule_variable_update.json b/spec/fixtures/pipeline_schedule_variable_update.json index cc7a682..25de0cb 100644 --- a/spec/fixtures/pipeline_schedule_variable_update.json +++ b/spec/fixtures/pipeline_schedule_variable_update.json @@ -1,5 +1 @@ -{ - "key": "NEW_VARIABLE", - "value": "update value" -} - +{"key":"NEW_VARIABLE","value":"update value"} \ No newline at end of file diff --git a/spec/fixtures/pipeline_schedules.json b/spec/fixtures/pipeline_schedules.json index c7e3eda..42a4353 100644 --- a/spec/fixtures/pipeline_schedules.json +++ b/spec/fixtures/pipeline_schedules.json @@ -1,22 +1 @@ -[ - { - "id": 13, - "description": "Test schedule pipeline", - "ref": "master", - "cron": "* * * * *", - "cron_timezone": "Asia/Tokyo", - "next_run_at": "2017-05-19T13:41:00.000Z", - "active": true, - "created_at": "2017-05-19T13:31:08.849Z", - "updated_at": "2017-05-19T13:40:17.727Z", - "owner": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "https://gitlab.example.com/root" - } - } -] - +[{"id":13,"description":"Test schedule pipeline","ref":"master","cron":"* * * * *","cron_timezone":"Asia/Tokyo","next_run_at":"2017-05-19T13:41:00.000Z","active":true,"created_at":"2017-05-19T13:31:08.849Z","updated_at":"2017-05-19T13:40:17.727Z","owner":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"https://gitlab.example.com/root"}}] \ No newline at end of file diff --git a/spec/fixtures/pipelines.json b/spec/fixtures/pipelines.json index c5bd396..7e0bb7c 100644 --- a/spec/fixtures/pipelines.json +++ b/spec/fixtures/pipelines.json @@ -1,48 +1 @@ -[ - { - "id": 47, - "status": "pending", - "ref": "new-pipeline", - "sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a", - "before_sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a", - "tag": false, - "yaml_errors": null, - "user": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://localhost:3000/root" - }, - "created_at": "2016-08-16T10:23:19.007Z", - "updated_at": "2016-08-16T10:23:19.216Z", - "started_at": null, - "finished_at": null, - "committed_at": null, - "duration": null - }, - { - "id": 48, - "status": "pending", - "ref": "new-pipeline", - "sha": "eb94b618fb5865b26e80fdd8ae531b7a63ad851a", - "before_sha": "eb94b618fb5865b26e80fdd8ae531b7a63ad851a", - "tag": false, - "yaml_errors": null, - "user": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://localhost:3000/root" - }, - "created_at": "2016-08-16T10:23:21.184Z", - "updated_at": "2016-08-16T10:23:21.314Z", - "started_at": null, - "finished_at": null, - "committed_at": null, - "duration": null - } -] \ No newline at end of file +[{"id":47,"status":"pending","ref":"new-pipeline","sha":"a91957a858320c0e17f3a0eca7cfacbff50ea29a","before_sha":"a91957a858320c0e17f3a0eca7cfacbff50ea29a","tag":false,"yaml_errors":null,"user":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://localhost:3000/root"},"created_at":"2016-08-16T10:23:19.007Z","updated_at":"2016-08-16T10:23:19.216Z","started_at":null,"finished_at":null,"committed_at":null,"duration":null},{"id":48,"status":"pending","ref":"new-pipeline","sha":"eb94b618fb5865b26e80fdd8ae531b7a63ad851a","before_sha":"eb94b618fb5865b26e80fdd8ae531b7a63ad851a","tag":false,"yaml_errors":null,"user":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://localhost:3000/root"},"created_at":"2016-08-16T10:23:21.184Z","updated_at":"2016-08-16T10:23:21.314Z","started_at":null,"finished_at":null,"committed_at":null,"duration":null}] \ No newline at end of file diff --git a/spec/fixtures/preview_project_badge.json b/spec/fixtures/preview_project_badge.json index ea2ace2..358e6d2 100644 --- a/spec/fixtures/preview_project_badge.json +++ b/spec/fixtures/preview_project_badge.json @@ -1,6 +1 @@ -{ - "link_url": "http://example.com/ci_status.svg?project=%{project_path}&ref=%{default_branch}", - "image_url": "https://shields.io/my/badge", - "rendered_link_url": "http://example.com/ci_status.svg?project=example-org/example-project&ref=master", - "rendered_image_url": "https://shields.io/my/badge" -} +{"link_url":"http://example.com/ci_status.svg?project=%{project_path}&ref=%{default_branch}","image_url":"https://shields.io/my/badge","rendered_link_url":"http://example.com/ci_status.svg?project=example-org/example-project&ref=master","rendered_image_url":"https://shields.io/my/badge"} \ No newline at end of file diff --git a/spec/fixtures/project_archive.json b/spec/fixtures/project_archive.json index 33bc36f..dacc8ff 100644 --- a/spec/fixtures/project_archive.json +++ b/spec/fixtures/project_archive.json @@ -1,44 +1 @@ -{ - "id": 3, - "description": null, - "default_branch": "master", - "public": false, - "visibility_level": 10, - "ssh_url_to_repo":"git@git.gitlab.com:root/gitlab.git", - "http_url_to_repo":"http://git.gitlab.com/root/gitlab.git", - "web_url":"http://git.gitlab.com/root/gitlab", - "tag_list": [ - - ], - "name": "GitLab Community Edition", - "name_with_namespace": "GitLab / GitLab Community Edition", - "path": "gitlab-ce", - "path_with_namespace": "gitlab/gitlab-ce", - "issues_enabled": true, - "open_issues_count": 1, - "merge_requests_enabled": true, - "builds_enabled": true, - "wiki_enabled": true, - "snippets_enabled": false, - "container_registry_enabled": false, - "created_at": "2013-09-30T13:46:02Z", - "last_activity_at": "2013-09-30T13:46:02Z", - "creator_id": 3, - "namespace": { - "created_at": "2013-09-30T13:46:02Z", - "description": "", - "id": 3, - "name": "GitLab", - "owner_id": 1, - "path": "gitlab", - "updated_at": "2013-09-30T13:46:02Z" - }, - "archived": true, - "avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png", - "shared_runners_enabled": true, - "forks_count": 0, - "star_count": 0, - "public_builds": true, - "shared_with_groups": [], - "only_allow_merge_if_build_succeeds": false -} +{"id":3,"description":null,"default_branch":"master","public":false,"visibility_level":10,"ssh_url_to_repo":"git@git.gitlab.com:root/gitlab.git","http_url_to_repo":"http://git.gitlab.com/root/gitlab.git","web_url":"http://git.gitlab.com/root/gitlab","tag_list":[],"name":"GitLab Community Edition","name_with_namespace":"GitLab / GitLab Community Edition","path":"gitlab-ce","path_with_namespace":"gitlab/gitlab-ce","issues_enabled":true,"open_issues_count":1,"merge_requests_enabled":true,"builds_enabled":true,"wiki_enabled":true,"snippets_enabled":false,"container_registry_enabled":false,"created_at":"2013-09-30T13:46:02Z","last_activity_at":"2013-09-30T13:46:02Z","creator_id":3,"namespace":{"created_at":"2013-09-30T13:46:02Z","description":"","id":3,"name":"GitLab","owner_id":1,"path":"gitlab","updated_at":"2013-09-30T13:46:02Z"},"archived":true,"avatar_url":"http://example.com/uploads/project/avatar/3/uploads/avatar.png","shared_runners_enabled":true,"forks_count":0,"star_count":0,"public_builds":true,"shared_with_groups":[],"only_allow_merge_if_build_succeeds":false} \ No newline at end of file diff --git a/spec/fixtures/project_badge.json b/spec/fixtures/project_badge.json index ac66910..96ba178 100644 --- a/spec/fixtures/project_badge.json +++ b/spec/fixtures/project_badge.json @@ -1,8 +1 @@ -{ - "id": 1, - "link_url": "http://example.com/ci_status.svg?project=%{project_path}&ref=%{default_branch}", - "image_url": "https://shields.io/my/badge", - "rendered_link_url": "http://example.com/ci_status.svg?project=example-org/example-project&ref=master", - "rendered_image_url": "https://shields.io/my/badge", - "kind": "project" -} +{"id":1,"link_url":"http://example.com/ci_status.svg?project=%{project_path}&ref=%{default_branch}","image_url":"https://shields.io/my/badge","rendered_link_url":"http://example.com/ci_status.svg?project=example-org/example-project&ref=master","rendered_image_url":"https://shields.io/my/badge","kind":"project"} \ No newline at end of file diff --git a/spec/fixtures/project_badges.json b/spec/fixtures/project_badges.json index 059a0e2..a62260d 100644 --- a/spec/fixtures/project_badges.json +++ b/spec/fixtures/project_badges.json @@ -1,18 +1 @@ -[ - { - "id": 1, - "link_url": "http://example.com/ci_status.svg?project=%{project_path}&ref=%{default_branch}", - "image_url": "https://shields.io/my/badge", - "rendered_link_url": "http://example.com/ci_status.svg?project=example-org/example-project&ref=master", - "rendered_image_url": "https://shields.io/my/badge", - "kind": "project" - }, - { - "id": 2, - "link_url": "http://example.com/ci_status.svg?project=%{project_path}&ref=%{default_branch}", - "image_url": "https://shields.io/my/badge", - "rendered_link_url": "http://example.com/ci_status.svg?project=example-org/example-project&ref=master", - "rendered_image_url": "https://shields.io/my/badge", - "kind": "group" - } -] +[{"id":1,"link_url":"http://example.com/ci_status.svg?project=%{project_path}&ref=%{default_branch}","image_url":"https://shields.io/my/badge","rendered_link_url":"http://example.com/ci_status.svg?project=example-org/example-project&ref=master","rendered_image_url":"https://shields.io/my/badge","kind":"project"},{"id":2,"link_url":"http://example.com/ci_status.svg?project=%{project_path}&ref=%{default_branch}","image_url":"https://shields.io/my/badge","rendered_link_url":"http://example.com/ci_status.svg?project=example-org/example-project&ref=master","rendered_image_url":"https://shields.io/my/badge","kind":"group"}] \ No newline at end of file diff --git a/spec/fixtures/project_cluster.json b/spec/fixtures/project_cluster.json index 0cb97ae..6b8824a 100644 --- a/spec/fixtures/project_cluster.json +++ b/spec/fixtures/project_cluster.json @@ -1,54 +1 @@ -{ - "id":18, - "name":"cluster-1", - "created_at":"2019-01-02T20:18:12.563Z", - "provider_type":"user", - "platform_type":"kubernetes", - "environment_scope":"*", - "cluster_type":"project_type", - "user": - { - "id":1, - "name":"Administrator", - "username":"root", - "state":"active", - "avatar_url":"https://www.gravatar.com/avatar/4249f4df72b..", - "web_url":"https://gitlab.example.com/root" - }, - "platform_kubernetes": - { - "api_url":"https://104.197.68.152", - "namespace":"cluster-1-namespace", - "authorization_type":"rbac", - "ca_cert":"-----BEGIN CERTIFICATE-----\r\nhFiK1L61owwDQYJKoZIhvcNAQELBQAw\r\nLzEtMCsGA1UEAxMkZDA1YzQ1YjctNzdiMS00NDY0LThjNmEtMTQ0ZDJkZjM4ZDBj\r\nMB4XDTE4MTIyNzIwMDM1MVoXDTIzMTIyNjIxMDM1MVowLzEtMCsGA1UEAxMkZDA1\r\nYzQ1YjctNzdiMS00NDY0LThjNmEtMTQ0ZDJkZjM.......-----END CERTIFICATE-----" - }, - "project": - { - "id":26, - "description":"", - "name":"project-with-clusters-api", - "name_with_namespace":"Administrator / project-with-clusters-api", - "path":"project-with-clusters-api", - "path_with_namespace":"root/project-with-clusters-api", - "created_at":"2019-01-02T20:13:32.600Z", - "default_branch":null, - "tag_list":[], - "ssh_url_to_repo":"ssh://gitlab.example.com/root/project-with-clusters-api.git", - "http_url_to_repo":"https://gitlab.example.com/root/project-with-clusters-api.git", - "web_url":"https://gitlab.example.com/root/project-with-clusters-api", - "readme_url":null, - "avatar_url":null, - "star_count":0, - "forks_count":0, - "last_activity_at":"2019-01-02T20:13:32.600Z", - "namespace": - { - "id":1, - "name":"root", - "path":"root", - "kind":"user", - "full_path":"root", - "parent_id":null - } - } -} +{"id":18,"name":"cluster-1","created_at":"2019-01-02T20:18:12.563Z","provider_type":"user","platform_type":"kubernetes","environment_scope":"*","cluster_type":"project_type","user":{"id":1,"name":"Administrator","username":"root","state":"active","avatar_url":"https://www.gravatar.com/avatar/4249f4df72b..","web_url":"https://gitlab.example.com/root"},"platform_kubernetes":{"api_url":"https://104.197.68.152","namespace":"cluster-1-namespace","authorization_type":"rbac","ca_cert":"-----BEGIN CERTIFICATE-----\r\nhFiK1L61owwDQYJKoZIhvcNAQELBQAw\r\nLzEtMCsGA1UEAxMkZDA1YzQ1YjctNzdiMS00NDY0LThjNmEtMTQ0ZDJkZjM4ZDBj\r\nMB4XDTE4MTIyNzIwMDM1MVoXDTIzMTIyNjIxMDM1MVowLzEtMCsGA1UEAxMkZDA1\r\nYzQ1YjctNzdiMS00NDY0LThjNmEtMTQ0ZDJkZjM.......-----END CERTIFICATE-----"},"project":{"id":26,"description":"","name":"project-with-clusters-api","name_with_namespace":"Administrator / project-with-clusters-api","path":"project-with-clusters-api","path_with_namespace":"root/project-with-clusters-api","created_at":"2019-01-02T20:13:32.600Z","default_branch":null,"tag_list":[],"ssh_url_to_repo":"ssh://gitlab.example.com/root/project-with-clusters-api.git","http_url_to_repo":"https://gitlab.example.com/root/project-with-clusters-api.git","web_url":"https://gitlab.example.com/root/project-with-clusters-api","readme_url":null,"avatar_url":null,"star_count":0,"forks_count":0,"last_activity_at":"2019-01-02T20:13:32.600Z","namespace":{"id":1,"name":"root","path":"root","kind":"user","full_path":"root","parent_id":null}}} \ No newline at end of file diff --git a/spec/fixtures/project_clusters.json b/spec/fixtures/project_clusters.json index 88f3e12..4099efc 100644 --- a/spec/fixtures/project_clusters.json +++ b/spec/fixtures/project_clusters.json @@ -1,27 +1 @@ -[ - { - "id":18, - "name":"cluster-1", - "created_at":"2019-01-02T20:18:12.563Z", - "provider_type":"user", - "platform_type":"kubernetes", - "environment_scope":"*", - "cluster_type":"project_type", - "user": - { - "id":1, - "name":"Administrator", - "username":"root", - "state":"active", - "avatar_url":"https://www.gravatar.com/avatar/4249f4df72b..", - "web_url":"https://gitlab.example.com/root" - }, - "platform_kubernetes": - { - "api_url":"https://104.197.68.152", - "namespace":"cluster-1-namespace", - "authorization_type":"rbac", - "ca_cert":"-----BEGIN CERTIFICATE-----\r\nhFiK1L61owwDQYJKoZIhvcNAQELBQAw\r\nLzEtMCsGA1UEAxMkZDA1YzQ1YjctNzdiMS00NDY0LThjNmEtMTQ0ZDJkZjM4ZDBj\r\nMB4XDTE4MTIyNzIwMDM1MVoXDTIzMTIyNjIxMDM1MVowLzEtMCsGA1UEAxMkZDA1\r\nYzQ1YjctNzdiMS00NDY0LThjNmEtMTQ0ZDJkZjM.......-----END CERTIFICATE-----" - } - } -] +[{"id":18,"name":"cluster-1","created_at":"2019-01-02T20:18:12.563Z","provider_type":"user","platform_type":"kubernetes","environment_scope":"*","cluster_type":"project_type","user":{"id":1,"name":"Administrator","username":"root","state":"active","avatar_url":"https://www.gravatar.com/avatar/4249f4df72b..","web_url":"https://gitlab.example.com/root"},"platform_kubernetes":{"api_url":"https://104.197.68.152","namespace":"cluster-1-namespace","authorization_type":"rbac","ca_cert":"-----BEGIN CERTIFICATE-----\r\nhFiK1L61owwDQYJKoZIhvcNAQELBQAw\r\nLzEtMCsGA1UEAxMkZDA1YzQ1YjctNzdiMS00NDY0LThjNmEtMTQ0ZDJkZjM4ZDBj\r\nMB4XDTE4MTIyNzIwMDM1MVoXDTIzMTIyNjIxMDM1MVowLzEtMCsGA1UEAxMkZDA1\r\nYzQ1YjctNzdiMS00NDY0LThjNmEtMTQ0ZDJkZjM.......-----END CERTIFICATE-----"}}] \ No newline at end of file diff --git a/spec/fixtures/project_commit.json b/spec/fixtures/project_commit.json index ace52b7..60774f4 100644 --- a/spec/fixtures/project_commit.json +++ b/spec/fixtures/project_commit.json @@ -1,13 +1 @@ -{ - "id": "6104942438c14ec7bd21c6cd5bd995272b3faff6", - "short_id": "6104942438c", - "title": "Sanitize for network graph", - "author_name": "randx", - "author_email": "dmitriy.zaporozhets@gmail.com", - "created_at": "2012-09-20T09:06:12+03:00", - "committed_date": "2012-09-20T09:06:12+03:00", - "authored_date": "2012-09-20T09:06:12+03:00", - "parent_ids": [ - "ae1d9fb46aa2b07ee9836d49862ec4e2c46fbbba" - ] -} +{"id":"6104942438c14ec7bd21c6cd5bd995272b3faff6","short_id":"6104942438c","title":"Sanitize for network graph","author_name":"randx","author_email":"dmitriy.zaporozhets@gmail.com","created_at":"2012-09-20T09:06:12+03:00","committed_date":"2012-09-20T09:06:12+03:00","authored_date":"2012-09-20T09:06:12+03:00","parent_ids":["ae1d9fb46aa2b07ee9836d49862ec4e2c46fbbba"]} \ No newline at end of file diff --git a/spec/fixtures/project_commit_comment.json b/spec/fixtures/project_commit_comment.json index d1cdd90..4fe2cda 100644 --- a/spec/fixtures/project_commit_comment.json +++ b/spec/fixtures/project_commit_comment.json @@ -1 +1 @@ -{"note":"Nice code!","author":{"id":1,"username":"jsmith","email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-07-11T01:32:18Z"}} +{"note":"Nice code!","author":{"id":1,"username":"jsmith","email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-07-11T01:32:18Z"}} \ No newline at end of file diff --git a/spec/fixtures/project_commit_comments.json b/spec/fixtures/project_commit_comments.json index 6690e29..af7c232 100644 --- a/spec/fixtures/project_commit_comments.json +++ b/spec/fixtures/project_commit_comments.json @@ -1 +1 @@ -[{"note":"this is the 1st comment on commit 6104942438c14ec7bd21c6cd5bd995272b3faff6","author":{"id":11,"username":"admin","email":"admin@example.com","name":"A User","state":"active","created_at":"2014-03-06T08:17:35.000Z"}},{"note":"another discussion point on commit 6104942438c14ec7bd21c6cd5bd995272b3faff6","author":{"id":12,"username":"admin","email":"admin@example.com","name":"A User","state":"active","created_at":"2014-03-06T08:17:35.000Z"}}] +[{"note":"this is the 1st comment on commit 6104942438c14ec7bd21c6cd5bd995272b3faff6","author":{"id":11,"username":"admin","email":"admin@example.com","name":"A User","state":"active","created_at":"2014-03-06T08:17:35.000Z"}},{"note":"another discussion point on commit 6104942438c14ec7bd21c6cd5bd995272b3faff6","author":{"id":12,"username":"admin","email":"admin@example.com","name":"A User","state":"active","created_at":"2014-03-06T08:17:35.000Z"}}] \ No newline at end of file diff --git a/spec/fixtures/project_commit_create.json b/spec/fixtures/project_commit_create.json index a0fae22..8adea89 100644 --- a/spec/fixtures/project_commit_create.json +++ b/spec/fixtures/project_commit_create.json @@ -1,22 +1 @@ -{ - "id": "ed899a2f4b50b4370feeea94676502b42383c746", - "short_id": "ed899a2f4b5", - "title": "some commit message", - "author_name": "Dmitriy Zaporozhets", - "author_email": "dzaporozhets@sphereconsultinginc.com", - "committer_name": "Dmitriy Zaporozhets", - "committer_email": "dzaporozhets@sphereconsultinginc.com", - "created_at": "2016-09-20T09:26:24.000-07:00", - "message": "some commit message", - "parent_ids": [ - "ae1d9fb46aa2b07ee9836d49862ec4e2c46fbbba" - ], - "committed_date": "2016-09-20T09:26:24.000-07:00", - "authored_date": "2016-09-20T09:26:24.000-07:00", - "stats": { - "additions": 2, - "deletions": 2, - "total": 4 - }, - "status": null -} \ No newline at end of file +{"id":"ed899a2f4b50b4370feeea94676502b42383c746","short_id":"ed899a2f4b5","title":"some commit message","author_name":"Dmitriy Zaporozhets","author_email":"dzaporozhets@sphereconsultinginc.com","committer_name":"Dmitriy Zaporozhets","committer_email":"dzaporozhets@sphereconsultinginc.com","created_at":"2016-09-20T09:26:24.000-07:00","message":"some commit message","parent_ids":["ae1d9fb46aa2b07ee9836d49862ec4e2c46fbbba"],"committed_date":"2016-09-20T09:26:24.000-07:00","authored_date":"2016-09-20T09:26:24.000-07:00","stats":{"additions":2,"deletions":2,"total":4},"status":null} \ No newline at end of file diff --git a/spec/fixtures/project_commit_diff.json b/spec/fixtures/project_commit_diff.json index ad3dfde..e2bf3c2 100644 --- a/spec/fixtures/project_commit_diff.json +++ b/spec/fixtures/project_commit_diff.json @@ -1,10 +1 @@ -{ - "diff": "--- a/doc/update/5.4-to-6.0.md\n+++ b/doc/update/5.4-to-6.0.md\n@@ -71,6 +71,8 @@\n sudo -u git -H bundle exec rake migrate_keys RAILS_ENV=production\n sudo -u git -H bundle exec rake migrate_inline_notes RAILS_ENV=production\n \n+sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production\n+\n ```\n \n ### 6. Update config files", - "new_path": "doc/update/5.4-to-6.0.md", - "old_path": "doc/update/5.4-to-6.0.md", - "a_mode": null, - "b_mode": "100644", - "new_file": false, - "renamed_file": false, - "deleted_file": false -} +{"diff":"--- a/doc/update/5.4-to-6.0.md\n+++ b/doc/update/5.4-to-6.0.md\n@@ -71,6 +71,8 @@\n sudo -u git -H bundle exec rake migrate_keys RAILS_ENV=production\n sudo -u git -H bundle exec rake migrate_inline_notes RAILS_ENV=production\n \n+sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production\n+\n ```\n \n ### 6. Update config files","new_path":"doc/update/5.4-to-6.0.md","old_path":"doc/update/5.4-to-6.0.md","a_mode":null,"b_mode":"100644","new_file":false,"renamed_file":false,"deleted_file":false} \ No newline at end of file diff --git a/spec/fixtures/project_commit_merge_requests.json b/spec/fixtures/project_commit_merge_requests.json index b14854f..78da110 100644 --- a/spec/fixtures/project_commit_merge_requests.json +++ b/spec/fixtures/project_commit_merge_requests.json @@ -1 +1 @@ -[{"id":1,"iid":1,"project_id":1,"title":"Title","description":"","state":"merged","created_at":"2018-05-15T18:38:47.192Z","updated_at":"2018-05-15T18:39:19.621Z","target_branch":"a","source_branch":"b","upvotes":0,"downvotes":0,"author":{"id":1,"name":"admin","username":"admin","state":"active","avatar_url":"https://gitlab.example.com/uploads/-/system/user/avatar/1/avatar.png","web_url":"https://gitlab.example.com/admin"},"assignee":null,"source_project_id":1,"target_project_id":1,"labels":[],"work_in_progress":false,"milestone":null,"merge_when_pipeline_succeeds":false,"merge_status":"can_be_merged","sha":"8d35ce134dc1dc52b8060c413a8a47964e1d5c92","merge_commit_sha":"ca0eedb9ca03107d1bb62a4c98498bc35b2e17eb","user_notes_count":0,"discussion_locked":null,"should_remove_source_branch":null,"force_remove_source_branch":true,"web_url":"https://gitlab.example.com/example-group/example-project/merge_requests/1","time_stats":{"time_estimate":0,"total_time_spent":0,"human_time_estimate":null,"human_total_time_spent":null},"approvals_before_merge":null,"squash":false},{"id":2,"iid":2,"project_id":1,"title":"Title","description":"","state":"merged","created_at":"2018-05-15T18:39:39.528Z","updated_at":"2018-05-15T18:39:47.013Z","target_branch":"master","source_branch":"a","upvotes":0,"downvotes":0,"author":{"id":2,"name":"admin2","username":"admin2","state":"active","avatar_url":"https://gitlab.example.com/uploads/-/system/user/avatar/2/avatar.png","web_url":"https://gitlab.example.com/admin2"},"assignee":null,"source_project_id":1,"target_project_id":1,"labels":[],"work_in_progress":false,"milestone":null,"merge_when_pipeline_succeeds":false,"merge_status":"can_be_merged","sha":"ca0eedb9ca03107d1bb62a4c98498bc35b2e17eb","merge_commit_sha":"a5d1608991cec904a63c95eeed59d14caef43336","user_notes_count":0,"discussion_locked":null,"should_remove_source_branch":null,"force_remove_source_branch":true,"web_url":"https://gitlab.example.com/example-group/example-project/merge_requests/2","time_stats":{"time_estimate":0,"total_time_spent":0,"human_time_estimate":null,"human_total_time_spent":null},"approvals_before_merge":null,"squash":false}] +[{"id":1,"iid":1,"project_id":1,"title":"Title","description":"","state":"merged","created_at":"2018-05-15T18:38:47.192Z","updated_at":"2018-05-15T18:39:19.621Z","target_branch":"a","source_branch":"b","upvotes":0,"downvotes":0,"author":{"id":1,"name":"admin","username":"admin","state":"active","avatar_url":"https://gitlab.example.com/uploads/-/system/user/avatar/1/avatar.png","web_url":"https://gitlab.example.com/admin"},"assignee":null,"source_project_id":1,"target_project_id":1,"labels":[],"work_in_progress":false,"milestone":null,"merge_when_pipeline_succeeds":false,"merge_status":"can_be_merged","sha":"8d35ce134dc1dc52b8060c413a8a47964e1d5c92","merge_commit_sha":"ca0eedb9ca03107d1bb62a4c98498bc35b2e17eb","user_notes_count":0,"discussion_locked":null,"should_remove_source_branch":null,"force_remove_source_branch":true,"web_url":"https://gitlab.example.com/example-group/example-project/merge_requests/1","time_stats":{"time_estimate":0,"total_time_spent":0,"human_time_estimate":null,"human_total_time_spent":null},"approvals_before_merge":null,"squash":false},{"id":2,"iid":2,"project_id":1,"title":"Title","description":"","state":"merged","created_at":"2018-05-15T18:39:39.528Z","updated_at":"2018-05-15T18:39:47.013Z","target_branch":"master","source_branch":"a","upvotes":0,"downvotes":0,"author":{"id":2,"name":"admin2","username":"admin2","state":"active","avatar_url":"https://gitlab.example.com/uploads/-/system/user/avatar/2/avatar.png","web_url":"https://gitlab.example.com/admin2"},"assignee":null,"source_project_id":1,"target_project_id":1,"labels":[],"work_in_progress":false,"milestone":null,"merge_when_pipeline_succeeds":false,"merge_status":"can_be_merged","sha":"ca0eedb9ca03107d1bb62a4c98498bc35b2e17eb","merge_commit_sha":"a5d1608991cec904a63c95eeed59d14caef43336","user_notes_count":0,"discussion_locked":null,"should_remove_source_branch":null,"force_remove_source_branch":true,"web_url":"https://gitlab.example.com/example-group/example-project/merge_requests/2","time_stats":{"time_estimate":0,"total_time_spent":0,"human_time_estimate":null,"human_total_time_spent":null},"approvals_before_merge":null,"squash":false}] \ No newline at end of file diff --git a/spec/fixtures/project_commit_refs.json b/spec/fixtures/project_commit_refs.json index 93e21df..897a207 100644 --- a/spec/fixtures/project_commit_refs.json +++ b/spec/fixtures/project_commit_refs.json @@ -1,22 +1 @@ -[ - { - "type": "branch", - "name": "12-1-stable" - }, - { - "type": "branch", - "name": "12-1-stable-prepare-rc23" - }, - { - "type": "tag", - "name": "v12.1.0" - }, - { - "type": "tag", - "name": "v12.1.0-rc22" - }, - { - "type": "tag", - "name": "v12.1.0-rc23" - } -] +[{"type":"branch","name":"12-1-stable"},{"type":"branch","name":"12-1-stable-prepare-rc23"},{"type":"tag","name":"v12.1.0"},{"type":"tag","name":"v12.1.0-rc22"},{"type":"tag","name":"v12.1.0-rc23"}] \ No newline at end of file diff --git a/spec/fixtures/project_commit_status.json b/spec/fixtures/project_commit_status.json index 4b852f8..7f6b72e 100644 --- a/spec/fixtures/project_commit_status.json +++ b/spec/fixtures/project_commit_status.json @@ -1,42 +1 @@ -[ - { - "id": 496, - "sha": "7d938cb8ac15788d71f4b67c035515a160ea76d8", - "ref": "decreased-spec", - "status": "failed", - "name": "test", - "target_url": null, - "description": null, - "created_at": "2015-10-23T23:35:48.693+02:00", - "started_at": null, - "finished_at": "2015-10-23T23:35:48.716+02:00", - "author": { - "name": "Dominik Sander", - "username": "dsander", - "id": 1, - "state": "active", - "avatar_url": "https://secure.gravatar.com/avatar/xxxxx?s=40&d=identicon", - "web_url": "https://github.com/u/dsander" - } - }, - { - "id": 493, - "sha": "7d938cb8ac15788d71f4b67c035515a160ea76d8", - "ref": "decreased-spec", - "status": "success", - "name": "specs", - "target_url": "https://github.com/dsander/omniauth/builds/493", - "description": null, - "created_at": "2015-10-23T21:39:19.384+02:00", - "started_at": "2015-10-23T21:39:21.900+02:00", - "finished_at": "2015-10-23T21:39:35.215+02:00", - "author": { - "name": "Dominik Sander", - "username": "dsander", - "id": 1, - "state": "active", - "avatar_url": "https://secure.gravatar.com/avatar/xxxxx?s=40&d=identicon", - "web_url": "https://github.com/u/dsander" - } - } -] \ No newline at end of file +[{"id":496,"sha":"7d938cb8ac15788d71f4b67c035515a160ea76d8","ref":"decreased-spec","status":"failed","name":"test","target_url":null,"description":null,"created_at":"2015-10-23T23:35:48.693+02:00","started_at":null,"finished_at":"2015-10-23T23:35:48.716+02:00","author":{"name":"Dominik Sander","username":"dsander","id":1,"state":"active","avatar_url":"https://secure.gravatar.com/avatar/xxxxx?s=40&d=identicon","web_url":"https://github.com/u/dsander"}},{"id":493,"sha":"7d938cb8ac15788d71f4b67c035515a160ea76d8","ref":"decreased-spec","status":"success","name":"specs","target_url":"https://github.com/dsander/omniauth/builds/493","description":null,"created_at":"2015-10-23T21:39:19.384+02:00","started_at":"2015-10-23T21:39:21.900+02:00","finished_at":"2015-10-23T21:39:35.215+02:00","author":{"name":"Dominik Sander","username":"dsander","id":1,"state":"active","avatar_url":"https://secure.gravatar.com/avatar/xxxxx?s=40&d=identicon","web_url":"https://github.com/u/dsander"}}] \ No newline at end of file diff --git a/spec/fixtures/project_edit.json b/spec/fixtures/project_edit.json index 38b71e0..381c2da 100644 --- a/spec/fixtures/project_edit.json +++ b/spec/fixtures/project_edit.json @@ -1,21 +1 @@ -{ - "id":3, - "code":"gitlab", - "name":"Gitlab-edit", - "description":null, - "path":"gitlab", - "default_branch":null, - "owner":{ - "id":1, - "email":"john@example.com", - "name":"John Smith", - "blocked":false, - "created_at":"2012-09-17T09:41:56Z" - }, - "visibility":"private", - "issues_enabled":true, - "merge_requests_enabled":true, - "wall_enabled":true, - "wiki_enabled":true, - "created_at":"2012-09-17T09:41:58Z" -} +{"id":3,"code":"gitlab","name":"Gitlab-edit","description":null,"path":"gitlab","default_branch":null,"owner":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"visibility":"private","issues_enabled":true,"merge_requests_enabled":true,"wall_enabled":true,"wiki_enabled":true,"created_at":"2012-09-17T09:41:58Z"} \ No newline at end of file diff --git a/spec/fixtures/project_events.json b/spec/fixtures/project_events.json index 81b3e5f..c26aa10 100644 --- a/spec/fixtures/project_events.json +++ b/spec/fixtures/project_events.json @@ -1,81 +1 @@ -[ - { - "title":null, - "project_id":1, - "action_name":"opened", - "target_id":160, - "target_iid":160, - "target_type":"Issue", - "author_id":25, - "target_title":"Qui natus eos odio tempore et quaerat consequuntur ducimus cupiditate quis.", - "created_at":"2017-02-09T10:43:19.667Z", - "author":{ - "name":"User 3", - "username":"user3", - "id":25, - "state":"active", - "avatar_url":"http://www.gravatar.com/avatar/97d6d9441ff85fdc730e02a6068d267b?s=80\u0026d=identicon", - "web_url":"https://gitlab.example.com/user3" - }, - "author_username":"user3" - }, - { - "title":null, - "project_id":1, - "action_name":"opened", - "target_id":159, - "target_iid":159, - "target_type":"Issue", - "author_id":21, - "target_title":"Nostrum enim non et sed optio illo deleniti non.", - "created_at":"2017-02-09T10:43:19.426Z", - "author":{ - "name":"Test User", - "username":"ted", - "id":21, - "state":"active", - "avatar_url":"http://www.gravatar.com/avatar/80fb888c9a48b9a3f87477214acaa63f?s=80\u0026d=identicon", - "web_url":"https://gitlab.example.com/ted" - }, - "author_username":"ted" - }, - { - "title": null, - "project_id": 1, - "action_name": "commented on", - "target_id": 1312, - "target_iid": 1312, - "target_type": "Note", - "author_id": 1, - "data": null, - "target_title": null, - "created_at": "2015-12-04T10:33:58.089Z", - "note": { - "id": 1312, - "body": "What an awesome day!", - "attachment": null, - "author": { - "name": "Dmitriy Zaporozhets", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://localhost:3000/uploads/user/avatar/1/fox_avatar.png", - "web_url": "http://localhost:3000/root" - }, - "created_at": "2015-12-04T10:33:56.698Z", - "system": false, - "noteable_id": 377, - "noteable_type": "Issue", - "noteable_iid": 377 - }, - "author": { - "name": "Dmitriy Zaporozhets", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://localhost:3000/uploads/user/avatar/1/fox_avatar.png", - "web_url": "http://localhost:3000/root" - }, - "author_username": "root" - } -] +[{"title":null,"project_id":1,"action_name":"opened","target_id":160,"target_iid":160,"target_type":"Issue","author_id":25,"target_title":"Qui natus eos odio tempore et quaerat consequuntur ducimus cupiditate quis.","created_at":"2017-02-09T10:43:19.667Z","author":{"name":"User 3","username":"user3","id":25,"state":"active","avatar_url":"http://www.gravatar.com/avatar/97d6d9441ff85fdc730e02a6068d267b?s=80&d=identicon","web_url":"https://gitlab.example.com/user3"},"author_username":"user3"},{"title":null,"project_id":1,"action_name":"opened","target_id":159,"target_iid":159,"target_type":"Issue","author_id":21,"target_title":"Nostrum enim non et sed optio illo deleniti non.","created_at":"2017-02-09T10:43:19.426Z","author":{"name":"Test User","username":"ted","id":21,"state":"active","avatar_url":"http://www.gravatar.com/avatar/80fb888c9a48b9a3f87477214acaa63f?s=80&d=identicon","web_url":"https://gitlab.example.com/ted"},"author_username":"ted"},{"title":null,"project_id":1,"action_name":"commented on","target_id":1312,"target_iid":1312,"target_type":"Note","author_id":1,"data":null,"target_title":null,"created_at":"2015-12-04T10:33:58.089Z","note":{"id":1312,"body":"What an awesome day!","attachment":null,"author":{"name":"Dmitriy Zaporozhets","username":"root","id":1,"state":"active","avatar_url":"http://localhost:3000/uploads/user/avatar/1/fox_avatar.png","web_url":"http://localhost:3000/root"},"created_at":"2015-12-04T10:33:56.698Z","system":false,"noteable_id":377,"noteable_type":"Issue","noteable_iid":377},"author":{"name":"Dmitriy Zaporozhets","username":"root","id":1,"state":"active","avatar_url":"http://localhost:3000/uploads/user/avatar/1/fox_avatar.png","web_url":"http://localhost:3000/root"},"author_username":"root"}] \ No newline at end of file diff --git a/spec/fixtures/project_for_user.json b/spec/fixtures/project_for_user.json index e2835d8..c5f0269 100644 --- a/spec/fixtures/project_for_user.json +++ b/spec/fixtures/project_for_user.json @@ -1 +1 @@ -{"id":1,"code":"brute","name":"Brute","description":null,"path":"brute","default_branch":null,"owner":{"id":1,"email":"john@example.com","name":"John Owner","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"private":true,"issues_enabled":true,"merge_requests_enabled":true,"wall_enabled":true,"wiki_enabled":true,"created_at":"2012-09-17T09:41:56Z"} +{"id":1,"code":"brute","name":"Brute","description":null,"path":"brute","default_branch":null,"owner":{"id":1,"email":"john@example.com","name":"John Owner","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"private":true,"issues_enabled":true,"merge_requests_enabled":true,"wall_enabled":true,"wiki_enabled":true,"created_at":"2012-09-17T09:41:56Z"} \ No newline at end of file diff --git a/spec/fixtures/project_fork.json b/spec/fixtures/project_fork.json index f87d687..032c0e7 100644 --- a/spec/fixtures/project_fork.json +++ b/spec/fixtures/project_fork.json @@ -1,50 +1 @@ -{ - "id":20, - "description":"desc", - "default_branch":"master", - "tag_list":[ - - ], - "public":false, - "archived":false, - "visibility_level":10, - "ssh_url_to_repo":"git@git.gitlab.com:root/gitlab.git", - "http_url_to_repo":"http://git.gitlab.com/root/gitlab.git", - "web_url":"http://git.gitlab.com/root/gitlab", - "owner":{ - "name":"Administrator", - "username":"root", - "id":1, - "state":"active", - "avatar_url":"http://git.gitlab.com/uploads/user/avatar/1/12586377.jpeg" - }, - "name":"gitlab", - "name_with_namespace":"Administrator / gitlab", - "path":"gitlab", - "path_with_namespace":"root/gitlab", - "issues_enabled":true, - "merge_requests_enabled":true, - "wiki_enabled":true, - "snippets_enabled":false, - "created_at":"2015-06-08T01:29:17.190Z", - "last_activity_at":"2015-06-08T01:29:17.190Z", - "creator_id":1, - "namespace":{ - "id":1, - "name":"root", - "path":"root", - "owner_id":1, - "created_at":"2015-05-28T19:23:40.445Z", - "updated_at":"2015-05-28T19:23:40.445Z", - "description":"", - "avatar":null - }, - "forked_from_project":{ - "id":3, - "name":"Gitlab", - "name_with_namespace":"Root / gitlab", - "path":"gitlab", - "path_with_namespace":"root/gitlab" - }, - "avatar_url":null -} +{"id":20,"description":"desc","default_branch":"master","tag_list":[],"public":false,"archived":false,"visibility_level":10,"ssh_url_to_repo":"git@git.gitlab.com:root/gitlab.git","http_url_to_repo":"http://git.gitlab.com/root/gitlab.git","web_url":"http://git.gitlab.com/root/gitlab","owner":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://git.gitlab.com/uploads/user/avatar/1/12586377.jpeg"},"name":"gitlab","name_with_namespace":"Administrator / gitlab","path":"gitlab","path_with_namespace":"root/gitlab","issues_enabled":true,"merge_requests_enabled":true,"wiki_enabled":true,"snippets_enabled":false,"created_at":"2015-06-08T01:29:17.190Z","last_activity_at":"2015-06-08T01:29:17.190Z","creator_id":1,"namespace":{"id":1,"name":"root","path":"root","owner_id":1,"created_at":"2015-05-28T19:23:40.445Z","updated_at":"2015-05-28T19:23:40.445Z","description":"","avatar":null},"forked_from_project":{"id":3,"name":"Gitlab","name_with_namespace":"Root / gitlab","path":"gitlab","path_with_namespace":"root/gitlab"},"avatar_url":null} \ No newline at end of file diff --git a/spec/fixtures/project_forked_for_user.json b/spec/fixtures/project_forked_for_user.json index 254c517..b70264a 100644 --- a/spec/fixtures/project_forked_for_user.json +++ b/spec/fixtures/project_forked_for_user.json @@ -1,50 +1 @@ -{ - "id":20, - "description":"desc", - "default_branch":"master", - "tag_list":[ - - ], - "public":false, - "archived":false, - "visibility_level":10, - "ssh_url_to_repo":"git@git.gitlab.com:root/gitlab.git", - "http_url_to_repo":"http://git.gitlab.com/root/gitlab.git", - "web_url":"http://git.gitlab.com/root/gitlab", - "owner":{ - "name":"Jack Smith", - "username":"jack.smith", - "id":2, - "state":"active", - "avatar_url":"http://git.gitlab.com/uploads/user/avatar/1/12586377.jpeg" - }, - "name":"gitlab", - "name_with_namespace":"Jack Smith / gitlab", - "path":"gitlab", - "path_with_namespace":"jack.smith/gitlab", - "issues_enabled":true, - "merge_requests_enabled":true, - "wiki_enabled":true, - "snippets_enabled":false, - "created_at":"2015-06-08T01:29:17.190Z", - "last_activity_at":"2015-06-08T01:29:17.190Z", - "creator_id":1, - "namespace":{ - "id":1, - "name":"jack.smith", - "path":"jack.smith", - "owner_id":2, - "created_at":"2015-05-28T19:23:40.445Z", - "updated_at":"2015-05-28T19:23:40.445Z", - "description":"", - "avatar":null - }, - "forked_from_project":{ - "id":3, - "name":"Gitlab", - "name_with_namespace":"Root / gitlab", - "path":"gitlab", - "path_with_namespace":"root/gitlab" - }, - "avatar_url":null -} +{"id":20,"description":"desc","default_branch":"master","tag_list":[],"public":false,"archived":false,"visibility_level":10,"ssh_url_to_repo":"git@git.gitlab.com:root/gitlab.git","http_url_to_repo":"http://git.gitlab.com/root/gitlab.git","web_url":"http://git.gitlab.com/root/gitlab","owner":{"name":"Jack Smith","username":"jack.smith","id":2,"state":"active","avatar_url":"http://git.gitlab.com/uploads/user/avatar/1/12586377.jpeg"},"name":"gitlab","name_with_namespace":"Jack Smith / gitlab","path":"gitlab","path_with_namespace":"jack.smith/gitlab","issues_enabled":true,"merge_requests_enabled":true,"wiki_enabled":true,"snippets_enabled":false,"created_at":"2015-06-08T01:29:17.190Z","last_activity_at":"2015-06-08T01:29:17.190Z","creator_id":1,"namespace":{"id":1,"name":"jack.smith","path":"jack.smith","owner_id":2,"created_at":"2015-05-28T19:23:40.445Z","updated_at":"2015-05-28T19:23:40.445Z","description":"","avatar":null},"forked_from_project":{"id":3,"name":"Gitlab","name_with_namespace":"Root / gitlab","path":"gitlab","path_with_namespace":"root/gitlab"},"avatar_url":null} \ No newline at end of file diff --git a/spec/fixtures/project_forks.json b/spec/fixtures/project_forks.json index 07f4496..f0d9bbf 100644 --- a/spec/fixtures/project_forks.json +++ b/spec/fixtures/project_forks.json @@ -1,50 +1 @@ -[{ - "id":20, - "description":"desc", - "default_branch":"master", - "tag_list":[ - - ], - "public":false, - "archived":false, - "visibility_level":10, - "ssh_url_to_repo":"git@git.gitlab.com:root/gitlab.git", - "http_url_to_repo":"http://git.gitlab.com/root/gitlab.git", - "web_url":"http://git.gitlab.com/root/gitlab", - "owner":{ - "name":"Administrator", - "username":"root", - "id":1, - "state":"active", - "avatar_url":"http://git.gitlab.com/uploads/user/avatar/1/12586377.jpeg" - }, - "name":"gitlab", - "name_with_namespace":"Administrator / gitlab", - "path":"gitlab", - "path_with_namespace":"root/gitlab", - "issues_enabled":true, - "merge_requests_enabled":true, - "wiki_enabled":true, - "snippets_enabled":false, - "created_at":"2015-06-08T01:29:17.190Z", - "last_activity_at":"2015-06-08T01:29:17.190Z", - "creator_id":1, - "namespace":{ - "id":1, - "name":"root", - "path":"root", - "owner_id":1, - "created_at":"2015-05-28T19:23:40.445Z", - "updated_at":"2015-05-28T19:23:40.445Z", - "description":"", - "avatar":null - }, - "forked_from_project":{ - "id":3, - "name":"Gitlab", - "name_with_namespace":"Root / gitlab", - "path":"gitlab", - "path_with_namespace":"root/gitlab" - }, - "avatar_url":null -}] +[{"id":20,"description":"desc","default_branch":"master","tag_list":[],"public":false,"archived":false,"visibility_level":10,"ssh_url_to_repo":"git@git.gitlab.com:root/gitlab.git","http_url_to_repo":"http://git.gitlab.com/root/gitlab.git","web_url":"http://git.gitlab.com/root/gitlab","owner":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://git.gitlab.com/uploads/user/avatar/1/12586377.jpeg"},"name":"gitlab","name_with_namespace":"Administrator / gitlab","path":"gitlab","path_with_namespace":"root/gitlab","issues_enabled":true,"merge_requests_enabled":true,"wiki_enabled":true,"snippets_enabled":false,"created_at":"2015-06-08T01:29:17.190Z","last_activity_at":"2015-06-08T01:29:17.190Z","creator_id":1,"namespace":{"id":1,"name":"root","path":"root","owner_id":1,"created_at":"2015-05-28T19:23:40.445Z","updated_at":"2015-05-28T19:23:40.445Z","description":"","avatar":null},"forked_from_project":{"id":3,"name":"Gitlab","name_with_namespace":"Root / gitlab","path":"gitlab","path_with_namespace":"root/gitlab"},"avatar_url":null}] \ No newline at end of file diff --git a/spec/fixtures/project_hook.json b/spec/fixtures/project_hook.json index 180dd45..690d94f 100644 --- a/spec/fixtures/project_hook.json +++ b/spec/fixtures/project_hook.json @@ -1 +1 @@ -{"id":1,"url":"https://api.example.net/v1/webhooks/ci"} +{"id":1,"url":"https://api.example.net/v1/webhooks/ci"} \ No newline at end of file diff --git a/spec/fixtures/project_issue_links.json b/spec/fixtures/project_issue_links.json index 825999e..612559c 100644 --- a/spec/fixtures/project_issue_links.json +++ b/spec/fixtures/project_issue_links.json @@ -1,33 +1 @@ -[ - { - "id": 84, - "iid": 14, - "issue_link_id": 1, - "project_id": 4, - "created_at": "2016-01-07T12:44:33.959Z", - "title": "Issues with auth", - "state": "opened", - "assignees": [], - "assignee": null, - "labels": [ - "bug" - ], - "author": { - "name": "Alexandra Bashirian", - "avatar_url": null, - "state": "active", - "web_url": "https://gitlab.example.com/eileen.lowe", - "id": 18, - "username": "eileen.lowe" - }, - "description": null, - "updated_at": "2016-01-07T12:44:33.959Z", - "milestone": null, - "subscribed": true, - "user_notes_count": 0, - "due_date": null, - "web_url": "http://example.com/example/example/issues/14", - "confidential": false, - "weight": null - } -] \ No newline at end of file +[{"id":84,"iid":14,"issue_link_id":1,"project_id":4,"created_at":"2016-01-07T12:44:33.959Z","title":"Issues with auth","state":"opened","assignees":[],"assignee":null,"labels":["bug"],"author":{"name":"Alexandra Bashirian","avatar_url":null,"state":"active","web_url":"https://gitlab.example.com/eileen.lowe","id":18,"username":"eileen.lowe"},"description":null,"updated_at":"2016-01-07T12:44:33.959Z","milestone":null,"subscribed":true,"user_notes_count":0,"due_date":null,"web_url":"http://example.com/example/example/issues/14","confidential":false,"weight":null}] \ No newline at end of file diff --git a/spec/fixtures/project_key.json b/spec/fixtures/project_key.json index 7563fcd..49d250c 100644 --- a/spec/fixtures/project_key.json +++ b/spec/fixtures/project_key.json @@ -1,7 +1 @@ -{ - "id": 2, - "title": "Key Title", - "key": "ssh-rsa ...", - "can_push": false, - "created_at": "2013-09-22T18:34:32Z" -} +{"id":2,"title":"Key Title","key":"ssh-rsa ...","can_push":false,"created_at":"2013-09-22T18:34:32Z"} \ No newline at end of file diff --git a/spec/fixtures/project_key_edit.json b/spec/fixtures/project_key_edit.json index 3684b06..22a18b5 100644 --- a/spec/fixtures/project_key_edit.json +++ b/spec/fixtures/project_key_edit.json @@ -1,7 +1 @@ -{ - "id": 2, - "title": "New key name", - "key": "ssh-rsa ...", - "can_push": true, - "created_at": "2013-09-22T18:34:32Z" -} +{"id":2,"title":"New key name","key":"ssh-rsa ...","can_push":true,"created_at":"2013-09-22T18:34:32Z"} \ No newline at end of file diff --git a/spec/fixtures/project_keys.json b/spec/fixtures/project_keys.json index 02ba4b0..6187d6a 100644 --- a/spec/fixtures/project_keys.json +++ b/spec/fixtures/project_keys.json @@ -1,7 +1 @@ -[{ - "id": 2, - "title": "Key Title", - "key": "ssh-rsa ...", - "can_push": false, - "created_at": "2013-09-22T18:34:32Z" -}] +[{"id":2,"title":"Key Title","key":"ssh-rsa ...","can_push":false,"created_at":"2013-09-22T18:34:32Z"}] \ No newline at end of file diff --git a/spec/fixtures/project_merge_request_approval_rules.json b/spec/fixtures/project_merge_request_approval_rules.json new file mode 100644 index 0000000..7c6cb9b --- /dev/null +++ b/spec/fixtures/project_merge_request_approval_rules.json @@ -0,0 +1 @@ +[{"id":1,"name":"security","rule_type":"regular","eligible_approvers":[{"id":5,"name":"John Doe","username":"jdoe","state":"active","avatar_url":"https://www.gravatar.com/avatar/0?s=80&d=identicon","web_url":"http://localhost/jdoe"},{"id":50,"name":"Group Member 1","username":"group_member_1","state":"active","avatar_url":"https://www.gravatar.com/avatar/0?s=80&d=identicon","web_url":"http://localhost/group_member_1"}],"approvals_required":3,"users":[{"id":5,"name":"John Doe","username":"jdoe","state":"active","avatar_url":"https://www.gravatar.com/avatar/0?s=80&d=identicon","web_url":"http://localhost/jdoe"}],"groups":[{"id":5,"name":"group1","path":"group1","description":"","visibility":"public","lfs_enabled":false,"avatar_url":null,"web_url":"http://localhost/groups/group1","request_access_enabled":false,"full_name":"group1","full_path":"group1","parent_id":null,"ldap_cn":null,"ldap_access":null}],"protected_branches":[{"id":1,"name":"master","push_access_levels":[{"access_level":30,"access_level_description":"Developers + Maintainers"}],"merge_access_levels":[{"access_level":30,"access_level_description":"Developers + Maintainers"}],"unprotect_access_levels":[{"access_level":40,"access_level_description":"Maintainers"}],"code_owner_approval_required":"false"}],"contains_hidden_groups":false}] \ No newline at end of file diff --git a/spec/fixtures/project_merge_request_approvals.json b/spec/fixtures/project_merge_request_approvals.json index 799b5c6..6e38d15 100644 --- a/spec/fixtures/project_merge_request_approvals.json +++ b/spec/fixtures/project_merge_request_approvals.json @@ -1,35 +1 @@ -{ - "approvers": [ - { - "user": { - "id": 5, - "name": "John Doe6", - "username": "user5", - "state":"active","avatar_url":"https://www.gravatar.com/avatar/4aea8cf834ed91844a2da4ff7ae6b491?s=80\u0026d=identicon","web_url":"http://localhost/user5" - } - } - ], - "approver_groups": [ - { - "group": { - "id": 1, - "name": "group1", - "path": "group1", - "description": "", - "visibility": "public", - "lfs_enabled": false, - "avatar_url": null, - "web_url": "http://localhost/groups/group1", - "request_access_enabled": false, - "full_name": "group1", - "full_path": "group1", - "parent_id": null, - "ldap_cn": null, - "ldap_access": null - } - } - ], - "approvals_before_merge": 3, - "reset_approvals_on_push": false, - "disable_overriding_approvers_per_merge_request": true -} +{"approvers":[{"user":{"id":5,"name":"John Doe6","username":"user5","state":"active","avatar_url":"https://www.gravatar.com/avatar/4aea8cf834ed91844a2da4ff7ae6b491?s=80&d=identicon","web_url":"http://localhost/user5"}}],"approver_groups":[{"group":{"id":1,"name":"group1","path":"group1","description":"","visibility":"public","lfs_enabled":false,"avatar_url":null,"web_url":"http://localhost/groups/group1","request_access_enabled":false,"full_name":"group1","full_path":"group1","parent_id":null,"ldap_cn":null,"ldap_access":null}}],"approvals_before_merge":3,"reset_approvals_on_push":false,"disable_overriding_approvers_per_merge_request":true} \ No newline at end of file diff --git a/spec/fixtures/project_release.json b/spec/fixtures/project_release.json index da0f542..d24c9a8 100644 --- a/spec/fixtures/project_release.json +++ b/spec/fixtures/project_release.json @@ -1,55 +1 @@ -{ - "tag_name":"v0.1", - "description":"## CHANGELOG\r\n\r\n- Remove limit of 100 when searching repository code. !8671\r\n- Show error message when attempting to reopen an MR and there is an open MR for the same branch. !16447 (Akos Gyimesi)\r\n- Fix a bug where internal email pattern wasn't respected. !22516", - "name":"Awesome app v0.1 alpha", - "description_html":"\u003ch2 dir=\"auto\"\u003e\n\u003ca id=\"user-content-changelog\" class=\"anchor\" href=\"#changelog\" aria-hidden=\"true\"\u003e\u003c/a\u003eCHANGELOG\u003c/h2\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003eRemove limit of 100 when searching repository code. !8671\u003c/li\u003e\n\u003cli\u003eShow error message when attempting to reopen an MR and there is an open MR for the same branch. !16447 (Akos Gyimesi)\u003c/li\u003e\n\u003cli\u003eFix a bug where internal email pattern wasn't respected. !22516\u003c/li\u003e\n\u003c/ul\u003e", - "created_at":"2019-01-03T01:55:18.203Z", - "author":{ - "id":1, - "name":"Administrator", - "username":"root", - "state":"active", - "avatar_url":"https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon", - "web_url":"http://localhost:3000/root" - }, - "commit":{ - "id":"f8d3d94cbd347e924aa7b715845e439d00e80ca4", - "short_id":"f8d3d94c", - "title":"Initial commit", - "created_at":"2019-01-03T01:53:28.000Z", - "parent_ids":[ - - ], - "message":"Initial commit", - "author_name":"Administrator", - "author_email":"admin@example.com", - "authored_date":"2019-01-03T01:53:28.000Z", - "committer_name":"Administrator", - "committer_email":"admin@example.com", - "committed_date":"2019-01-03T01:53:28.000Z" - }, - "assets":{ - "count":4, - "sources":[ - { - "format":"zip", - "url":"http://localhost:3000/root/awesome-app/-/archive/v0.1/awesome-app-v0.1.zip" - }, - { - "format":"tar.gz", - "url":"http://localhost:3000/root/awesome-app/-/archive/v0.1/awesome-app-v0.1.tar.gz" - }, - { - "format":"tar.bz2", - "url":"http://localhost:3000/root/awesome-app/-/archive/v0.1/awesome-app-v0.1.tar.bz2" - }, - { - "format":"tar", - "url":"http://localhost:3000/root/awesome-app/-/archive/v0.1/awesome-app-v0.1.tar" - } - ], - "links":[ - - ] - } -} +{"tag_name":"v0.1","description":"## CHANGELOG\r\n\r\n- Remove limit of 100 when searching repository code. !8671\r\n- Show error message when attempting to reopen an MR and there is an open MR for the same branch. !16447 (Akos Gyimesi)\r\n- Fix a bug where internal email pattern wasn't respected. !22516","name":"Awesome app v0.1 alpha","description_html":"

\nCHANGELOG

\n
    \n
  • Remove limit of 100 when searching repository code. !8671
  • \n
  • Show error message when attempting to reopen an MR and there is an open MR for the same branch. !16447 (Akos Gyimesi)
  • \n
  • Fix a bug where internal email pattern wasn't respected. !22516
  • \n
","created_at":"2019-01-03T01:55:18.203Z","author":{"id":1,"name":"Administrator","username":"root","state":"active","avatar_url":"https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://localhost:3000/root"},"commit":{"id":"f8d3d94cbd347e924aa7b715845e439d00e80ca4","short_id":"f8d3d94c","title":"Initial commit","created_at":"2019-01-03T01:53:28.000Z","parent_ids":[],"message":"Initial commit","author_name":"Administrator","author_email":"admin@example.com","authored_date":"2019-01-03T01:53:28.000Z","committer_name":"Administrator","committer_email":"admin@example.com","committed_date":"2019-01-03T01:53:28.000Z"},"assets":{"count":4,"sources":[{"format":"zip","url":"http://localhost:3000/root/awesome-app/-/archive/v0.1/awesome-app-v0.1.zip"},{"format":"tar.gz","url":"http://localhost:3000/root/awesome-app/-/archive/v0.1/awesome-app-v0.1.tar.gz"},{"format":"tar.bz2","url":"http://localhost:3000/root/awesome-app/-/archive/v0.1/awesome-app-v0.1.tar.bz2"},{"format":"tar","url":"http://localhost:3000/root/awesome-app/-/archive/v0.1/awesome-app-v0.1.tar"}],"links":[]}} \ No newline at end of file diff --git a/spec/fixtures/project_release_link.json b/spec/fixtures/project_release_link.json index 690e82c..65ace17 100644 --- a/spec/fixtures/project_release_link.json +++ b/spec/fixtures/project_release_link.json @@ -1,6 +1 @@ -{ - "id":1, - "name":"awesome-v0.2.dmg", - "url":"http://192.168.10.15:3000", - "external":true -} +{"id":1,"name":"awesome-v0.2.dmg","url":"http://192.168.10.15:3000","external":true} \ No newline at end of file diff --git a/spec/fixtures/project_release_links.json b/spec/fixtures/project_release_links.json index 472dcdd..137c4f0 100644 --- a/spec/fixtures/project_release_links.json +++ b/spec/fixtures/project_release_links.json @@ -1,14 +1 @@ -[ - { - "id":2, - "name":"awesome-v0.2.msi", - "url":"http://192.168.10.15:3000/msi", - "external":true - }, - { - "id":1, - "name":"awesome-v0.2.dmg", - "url":"http://192.168.10.15:3000", - "external":true - } -] +[{"id":2,"name":"awesome-v0.2.msi","url":"http://192.168.10.15:3000/msi","external":true},{"id":1,"name":"awesome-v0.2.dmg","url":"http://192.168.10.15:3000","external":true}] \ No newline at end of file diff --git a/spec/fixtures/project_release_with_assets.json b/spec/fixtures/project_release_with_assets.json index 1d281fe..c5d41d2 100644 --- a/spec/fixtures/project_release_with_assets.json +++ b/spec/fixtures/project_release_with_assets.json @@ -1,66 +1 @@ -{ - "tag_name":"v0.1", - "description":"## CHANGELOG\r\n\r\n- Remove limit of 100 when searching repository code. !8671\r\n- Show error message when attempting to reopen an MR and there is an open MR for the same branch. !16447 (Akos Gyimesi)\r\n- Fix a bug where internal email pattern wasn't respected. !22516", - "name":"Awesome app v0.1 alpha", - "description_html":"\u003ch2 dir=\"auto\"\u003e\n\u003ca id=\"user-content-changelog\" class=\"anchor\" href=\"#changelog\" aria-hidden=\"true\"\u003e\u003c/a\u003eCHANGELOG\u003c/h2\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003eRemove limit of 100 when searching repository code. !8671\u003c/li\u003e\n\u003cli\u003eShow error message when attempting to reopen an MR and there is an open MR for the same branch. !16447 (Akos Gyimesi)\u003c/li\u003e\n\u003cli\u003eFix a bug where internal email pattern wasn't respected. !22516\u003c/li\u003e\n\u003c/ul\u003e", - "created_at":"2019-01-03T01:55:18.203Z", - "author":{ - "id":1, - "name":"Administrator", - "username":"root", - "state":"active", - "avatar_url":"https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon", - "web_url":"http://localhost:3000/root" - }, - "commit":{ - "id":"f8d3d94cbd347e924aa7b715845e439d00e80ca4", - "short_id":"f8d3d94c", - "title":"Initial commit", - "created_at":"2019-01-03T01:53:28.000Z", - "parent_ids":[ - - ], - "message":"Initial commit", - "author_name":"Administrator", - "author_email":"admin@example.com", - "authored_date":"2019-01-03T01:53:28.000Z", - "committer_name":"Administrator", - "committer_email":"admin@example.com", - "committed_date":"2019-01-03T01:53:28.000Z" - }, - "assets":{ - "count":4, - "sources":[ - { - "format":"zip", - "url":"http://localhost:3000/root/awesome-app/-/archive/v0.1/awesome-app-v0.1.zip" - }, - { - "format":"tar.gz", - "url":"http://localhost:3000/root/awesome-app/-/archive/v0.1/awesome-app-v0.1.tar.gz" - }, - { - "format":"tar.bz2", - "url":"http://localhost:3000/root/awesome-app/-/archive/v0.1/awesome-app-v0.1.tar.bz2" - }, - { - "format":"tar", - "url":"http://localhost:3000/root/awesome-app/-/archive/v0.1/awesome-app-v0.1.tar" - } - ], - "links":[ - { - "id":2, - "name":"awesome-v0.2.msi", - "url":"http://192.168.10.15:3000/msi", - "external":true - }, - { - "id":1, - "name":"awesome-v0.2.dmg", - "url":"http://192.168.10.15:3000", - "external":true - } - ] - } -} +{"tag_name":"v0.1","description":"## CHANGELOG\r\n\r\n- Remove limit of 100 when searching repository code. !8671\r\n- Show error message when attempting to reopen an MR and there is an open MR for the same branch. !16447 (Akos Gyimesi)\r\n- Fix a bug where internal email pattern wasn't respected. !22516","name":"Awesome app v0.1 alpha","description_html":"

\nCHANGELOG

\n
    \n
  • Remove limit of 100 when searching repository code. !8671
  • \n
  • Show error message when attempting to reopen an MR and there is an open MR for the same branch. !16447 (Akos Gyimesi)
  • \n
  • Fix a bug where internal email pattern wasn't respected. !22516
  • \n
","created_at":"2019-01-03T01:55:18.203Z","author":{"id":1,"name":"Administrator","username":"root","state":"active","avatar_url":"https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://localhost:3000/root"},"commit":{"id":"f8d3d94cbd347e924aa7b715845e439d00e80ca4","short_id":"f8d3d94c","title":"Initial commit","created_at":"2019-01-03T01:53:28.000Z","parent_ids":[],"message":"Initial commit","author_name":"Administrator","author_email":"admin@example.com","authored_date":"2019-01-03T01:53:28.000Z","committer_name":"Administrator","committer_email":"admin@example.com","committed_date":"2019-01-03T01:53:28.000Z"},"assets":{"count":4,"sources":[{"format":"zip","url":"http://localhost:3000/root/awesome-app/-/archive/v0.1/awesome-app-v0.1.zip"},{"format":"tar.gz","url":"http://localhost:3000/root/awesome-app/-/archive/v0.1/awesome-app-v0.1.tar.gz"},{"format":"tar.bz2","url":"http://localhost:3000/root/awesome-app/-/archive/v0.1/awesome-app-v0.1.tar.bz2"},{"format":"tar","url":"http://localhost:3000/root/awesome-app/-/archive/v0.1/awesome-app-v0.1.tar"}],"links":[{"id":2,"name":"awesome-v0.2.msi","url":"http://192.168.10.15:3000/msi","external":true},{"id":1,"name":"awesome-v0.2.dmg","url":"http://192.168.10.15:3000","external":true}]}} \ No newline at end of file diff --git a/spec/fixtures/project_releases.json b/spec/fixtures/project_releases.json index 0d9bbf1..73080ed 100644 --- a/spec/fixtures/project_releases.json +++ b/spec/fixtures/project_releases.json @@ -1,123 +1 @@ -[ - { - "tag_name":"v0.2", - "description":"## CHANGELOG\r\n\r\n- Escape label and milestone titles to prevent XSS in GFM autocomplete. !2740\r\n- Prevent private snippets from being embeddable.\r\n- Add subresources removal to member destroy service.", - "name":"Awesome app v0.2 beta", - "description_html":"\u003ch2 dir=\"auto\"\u003e\n\u003ca id=\"user-content-changelog\" class=\"anchor\" href=\"#changelog\" aria-hidden=\"true\"\u003e\u003c/a\u003eCHANGELOG\u003c/h2\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003eEscape label and milestone titles to prevent XSS in GFM autocomplete. !2740\u003c/li\u003e\n\u003cli\u003ePrevent private snippets from being embeddable.\u003c/li\u003e\n\u003cli\u003eAdd subresources removal to member destroy service.\u003c/li\u003e\n\u003c/ul\u003e", - "created_at":"2019-01-03T01:56:19.539Z", - "author":{ - "id":1, - "name":"Administrator", - "username":"root", - "state":"active", - "avatar_url":"https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon", - "web_url":"http://localhost:3000/root" - }, - "commit":{ - "id":"079e90101242458910cccd35eab0e211dfc359c0", - "short_id":"079e9010", - "title":"Update README.md", - "created_at":"2019-01-03T01:55:38.000Z", - "parent_ids":[ - "f8d3d94cbd347e924aa7b715845e439d00e80ca4" - ], - "message":"Update README.md", - "author_name":"Administrator", - "author_email":"admin@example.com", - "authored_date":"2019-01-03T01:55:38.000Z", - "committer_name":"Administrator", - "committer_email":"admin@example.com", - "committed_date":"2019-01-03T01:55:38.000Z" - }, - "assets":{ - "count":6, - "sources":[ - { - "format":"zip", - "url":"http://localhost:3000/root/awesome-app/-/archive/v0.2/awesome-app-v0.2.zip" - }, - { - "format":"tar.gz", - "url":"http://localhost:3000/root/awesome-app/-/archive/v0.2/awesome-app-v0.2.tar.gz" - }, - { - "format":"tar.bz2", - "url":"http://localhost:3000/root/awesome-app/-/archive/v0.2/awesome-app-v0.2.tar.bz2" - }, - { - "format":"tar", - "url":"http://localhost:3000/root/awesome-app/-/archive/v0.2/awesome-app-v0.2.tar" - } - ], - "links":[ - { - "id":2, - "name":"awesome-v0.2.msi", - "url":"http://192.168.10.15:3000/msi", - "external":true - }, - { - "id":1, - "name":"awesome-v0.2.dmg", - "url":"http://192.168.10.15:3000", - "external":true - } - ] - } - }, - { - "tag_name":"v0.1", - "description":"## CHANGELOG\r\n\r\n-Remove limit of 100 when searching repository code. !8671\r\n- Show error message when attempting to reopen an MR and there is an open MR for the same branch. !16447 (Akos Gyimesi)\r\n- Fix a bug where internal email pattern wasn't respected. !22516", - "name":"Awesome app v0.1 alpha", - "description_html":"\u003ch2 dir=\"auto\"\u003e\n\u003ca id=\"user-content-changelog\" class=\"anchor\" href=\"#changelog\" aria-hidden=\"true\"\u003e\u003c/a\u003eCHANGELOG\u003c/h2\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003eRemove limit of 100 when searching repository code. !8671\u003c/li\u003e\n\u003cli\u003eShow error message when attempting to reopen an MR and there is an open MR for the same branch. !16447 (Akos Gyimesi)\u003c/li\u003e\n\u003cli\u003eFix a bug where internal email pattern wasn't respected. !22516\u003c/li\u003e\n\u003c/ul\u003e", - "created_at":"2019-01-03T01:55:18.203Z", - "author":{ - "id":1, - "name":"Administrator", - "username":"root", - "state":"active", - "avatar_url":"https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon", - "web_url":"http://localhost:3000/root" - }, - "commit":{ - "id":"f8d3d94cbd347e924aa7b715845e439d00e80ca4", - "short_id":"f8d3d94c", - "title":"Initial commit", - "created_at":"2019-01-03T01:53:28.000Z", - "parent_ids":[ - - ], - "message":"Initial commit", - "author_name":"Administrator", - "author_email":"admin@example.com", - "authored_date":"2019-01-03T01:53:28.000Z", - "committer_name":"Administrator", - "committer_email":"admin@example.com", - "committed_date":"2019-01-03T01:53:28.000Z" - }, - "assets":{ - "count":4, - "sources":[ - { - "format":"zip", - "url":"http://localhost:3000/root/awesome-app/-/archive/v0.1/awesome-app-v0.1.zip" - }, - { - "format":"tar.gz", - "url":"http://localhost:3000/root/awesome-app/-/archive/v0.1/awesome-app-v0.1.tar.gz" - }, - { - "format":"tar.bz2", - "url":"http://localhost:3000/root/awesome-app/-/archive/v0.1/awesome-app-v0.1.tar.bz2" - }, - { - "format":"tar", - "url":"http://localhost:3000/root/awesome-app/-/archive/v0.1/awesome-app-v0.1.tar" - } - ], - "links":[ - - ] - } - } -] +[{"tag_name":"v0.2","description":"## CHANGELOG\r\n\r\n- Escape label and milestone titles to prevent XSS in GFM autocomplete. !2740\r\n- Prevent private snippets from being embeddable.\r\n- Add subresources removal to member destroy service.","name":"Awesome app v0.2 beta","description_html":"

\nCHANGELOG

\n
    \n
  • Escape label and milestone titles to prevent XSS in GFM autocomplete. !2740
  • \n
  • Prevent private snippets from being embeddable.
  • \n
  • Add subresources removal to member destroy service.
  • \n
","created_at":"2019-01-03T01:56:19.539Z","author":{"id":1,"name":"Administrator","username":"root","state":"active","avatar_url":"https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://localhost:3000/root"},"commit":{"id":"079e90101242458910cccd35eab0e211dfc359c0","short_id":"079e9010","title":"Update README.md","created_at":"2019-01-03T01:55:38.000Z","parent_ids":["f8d3d94cbd347e924aa7b715845e439d00e80ca4"],"message":"Update README.md","author_name":"Administrator","author_email":"admin@example.com","authored_date":"2019-01-03T01:55:38.000Z","committer_name":"Administrator","committer_email":"admin@example.com","committed_date":"2019-01-03T01:55:38.000Z"},"assets":{"count":6,"sources":[{"format":"zip","url":"http://localhost:3000/root/awesome-app/-/archive/v0.2/awesome-app-v0.2.zip"},{"format":"tar.gz","url":"http://localhost:3000/root/awesome-app/-/archive/v0.2/awesome-app-v0.2.tar.gz"},{"format":"tar.bz2","url":"http://localhost:3000/root/awesome-app/-/archive/v0.2/awesome-app-v0.2.tar.bz2"},{"format":"tar","url":"http://localhost:3000/root/awesome-app/-/archive/v0.2/awesome-app-v0.2.tar"}],"links":[{"id":2,"name":"awesome-v0.2.msi","url":"http://192.168.10.15:3000/msi","external":true},{"id":1,"name":"awesome-v0.2.dmg","url":"http://192.168.10.15:3000","external":true}]}},{"tag_name":"v0.1","description":"## CHANGELOG\r\n\r\n-Remove limit of 100 when searching repository code. !8671\r\n- Show error message when attempting to reopen an MR and there is an open MR for the same branch. !16447 (Akos Gyimesi)\r\n- Fix a bug where internal email pattern wasn't respected. !22516","name":"Awesome app v0.1 alpha","description_html":"

\nCHANGELOG

\n
    \n
  • Remove limit of 100 when searching repository code. !8671
  • \n
  • Show error message when attempting to reopen an MR and there is an open MR for the same branch. !16447 (Akos Gyimesi)
  • \n
  • Fix a bug where internal email pattern wasn't respected. !22516
  • \n
","created_at":"2019-01-03T01:55:18.203Z","author":{"id":1,"name":"Administrator","username":"root","state":"active","avatar_url":"https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://localhost:3000/root"},"commit":{"id":"f8d3d94cbd347e924aa7b715845e439d00e80ca4","short_id":"f8d3d94c","title":"Initial commit","created_at":"2019-01-03T01:53:28.000Z","parent_ids":[],"message":"Initial commit","author_name":"Administrator","author_email":"admin@example.com","authored_date":"2019-01-03T01:53:28.000Z","committer_name":"Administrator","committer_email":"admin@example.com","committed_date":"2019-01-03T01:53:28.000Z"},"assets":{"count":4,"sources":[{"format":"zip","url":"http://localhost:3000/root/awesome-app/-/archive/v0.1/awesome-app-v0.1.zip"},{"format":"tar.gz","url":"http://localhost:3000/root/awesome-app/-/archive/v0.1/awesome-app-v0.1.tar.gz"},{"format":"tar.bz2","url":"http://localhost:3000/root/awesome-app/-/archive/v0.1/awesome-app-v0.1.tar.bz2"},{"format":"tar","url":"http://localhost:3000/root/awesome-app/-/archive/v0.1/awesome-app-v0.1.tar"}],"links":[]}}] \ No newline at end of file diff --git a/spec/fixtures/project_runner_enable.json b/spec/fixtures/project_runner_enable.json index 60c5326..f11514a 100644 --- a/spec/fixtures/project_runner_enable.json +++ b/spec/fixtures/project_runner_enable.json @@ -1,7 +1 @@ -{ - "active": true, - "description": "test-2016-02-01", - "id": 9, - "is_shared": false, - "name": null -} +{"active":true,"description":"test-2016-02-01","id":9,"is_shared":false,"name":null} \ No newline at end of file diff --git a/spec/fixtures/project_runners.json b/spec/fixtures/project_runners.json index f043a2c..cb52a68 100644 --- a/spec/fixtures/project_runners.json +++ b/spec/fixtures/project_runners.json @@ -1,16 +1 @@ -[ - { - "active": true, - "description": "test-2-20150125", - "id": 8, - "is_shared": false, - "name": null - }, - { - "active": true, - "description": "development_runner", - "id": 5, - "is_shared": true, - "name": null - } -] +[{"active":true,"description":"test-2-20150125","id":8,"is_shared":false,"name":null},{"active":true,"description":"development_runner","id":5,"is_shared":true,"name":null}] \ No newline at end of file diff --git a/spec/fixtures/project_search.json b/spec/fixtures/project_search.json index 80fd4af..c49f6b4 100644 --- a/spec/fixtures/project_search.json +++ b/spec/fixtures/project_search.json @@ -1 +1 @@ -[{"id":3,"code":"gitlab","name":"Gitlab","description":null,"path":"gitlab","default_branch":null,"owner":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"private":true,"issues_enabled":true,"merge_requests_enabled":true,"wall_enabled":true,"wiki_enabled":true,"created_at":"2012-09-17T09:41:58Z"}] +[{"id":3,"code":"gitlab","name":"Gitlab","description":null,"path":"gitlab","default_branch":null,"owner":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"private":true,"issues_enabled":true,"merge_requests_enabled":true,"wall_enabled":true,"wiki_enabled":true,"created_at":"2012-09-17T09:41:58Z"}] \ No newline at end of file diff --git a/spec/fixtures/project_star.json b/spec/fixtures/project_star.json index 4e932f7..da7b767 100644 --- a/spec/fixtures/project_star.json +++ b/spec/fixtures/project_star.json @@ -1,44 +1 @@ -{ - "id": 3, - "description": null, - "default_branch": "master", - "public": false, - "visibility_level": 10, - "ssh_url_to_repo":"git@git.gitlab.com:root/gitlab.git", - "http_url_to_repo":"http://git.gitlab.com/root/gitlab.git", - "web_url":"http://git.gitlab.com/root/gitlab", - "tag_list": [ - - ], - "name": "GitLab Community Edition", - "name_with_namespace": "GitLab / GitLab Community Edition", - "path": "gitlab-ce", - "path_with_namespace": "gitlab/gitlab-ce", - "issues_enabled": true, - "open_issues_count": 1, - "merge_requests_enabled": true, - "builds_enabled": true, - "wiki_enabled": true, - "snippets_enabled": false, - "container_registry_enabled": false, - "created_at": "2013-09-30T13:46:02Z", - "last_activity_at": "2013-09-30T13:46:02Z", - "creator_id": 3, - "namespace": { - "created_at": "2013-09-30T13:46:02Z", - "description": "", - "id": 3, - "name": "GitLab", - "owner_id": 1, - "path": "gitlab", - "updated_at": "2013-09-30T13:46:02Z" - }, - "archived": true, - "avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png", - "shared_runners_enabled": true, - "forks_count": 0, - "star_count": 1, - "public_builds": true, - "shared_with_groups": [], - "only_allow_merge_if_build_succeeds": false -} +{"id":3,"description":null,"default_branch":"master","public":false,"visibility_level":10,"ssh_url_to_repo":"git@git.gitlab.com:root/gitlab.git","http_url_to_repo":"http://git.gitlab.com/root/gitlab.git","web_url":"http://git.gitlab.com/root/gitlab","tag_list":[],"name":"GitLab Community Edition","name_with_namespace":"GitLab / GitLab Community Edition","path":"gitlab-ce","path_with_namespace":"gitlab/gitlab-ce","issues_enabled":true,"open_issues_count":1,"merge_requests_enabled":true,"builds_enabled":true,"wiki_enabled":true,"snippets_enabled":false,"container_registry_enabled":false,"created_at":"2013-09-30T13:46:02Z","last_activity_at":"2013-09-30T13:46:02Z","creator_id":3,"namespace":{"created_at":"2013-09-30T13:46:02Z","description":"","id":3,"name":"GitLab","owner_id":1,"path":"gitlab","updated_at":"2013-09-30T13:46:02Z"},"archived":true,"avatar_url":"http://example.com/uploads/project/avatar/3/uploads/avatar.png","shared_runners_enabled":true,"forks_count":0,"star_count":1,"public_builds":true,"shared_with_groups":[],"only_allow_merge_if_build_succeeds":false} \ No newline at end of file diff --git a/spec/fixtures/project_tag_annotated.json b/spec/fixtures/project_tag_annotated.json index 3bd2070..a99d8be 100644 --- a/spec/fixtures/project_tag_annotated.json +++ b/spec/fixtures/project_tag_annotated.json @@ -1 +1 @@ -{"name": "v1.1.0","message": "Release 1.1.0","commit": {"id": "2695effb5807a22ff3d138d593fd856244e155e7","parents": [],"message": "Initial commit","authored_date": "2012-05-28T04:42:42-07:00","author_name": "John Smith","author email": "john@example.com","committer_name": "Jack Smith","committed_date": "2012-05-28T04:42:42-07:00","committer_email": "jack@example.com"}} +{"name":"v1.1.0","message":"Release 1.1.0","commit":{"id":"2695effb5807a22ff3d138d593fd856244e155e7","parents":[],"message":"Initial commit","authored_date":"2012-05-28T04:42:42-07:00","author_name":"John Smith","author email":"john@example.com","committer_name":"Jack Smith","committed_date":"2012-05-28T04:42:42-07:00","committer_email":"jack@example.com"}} \ No newline at end of file diff --git a/spec/fixtures/project_tag_lightweight.json b/spec/fixtures/project_tag_lightweight.json index cec1381..a98fb5f 100644 --- a/spec/fixtures/project_tag_lightweight.json +++ b/spec/fixtures/project_tag_lightweight.json @@ -1 +1 @@ -{"name": "v1.0.0","message": null,"commit": {"id": "2695effb5807a22ff3d138d593fd856244e155e7","parents": [],"message": "Initial commit","authored_date": "2012-05-28T04:42:42-07:00","author_name": "John Smith","author email": "john@example.com","committer_name": "Jack Smith","committed_date": "2012-05-28T04:42:42-07:00","committer_email": "jack@example.com"}} +{"name":"v1.0.0","message":null,"commit":{"id":"2695effb5807a22ff3d138d593fd856244e155e7","parents":[],"message":"Initial commit","authored_date":"2012-05-28T04:42:42-07:00","author_name":"John Smith","author email":"john@example.com","committer_name":"Jack Smith","committed_date":"2012-05-28T04:42:42-07:00","committer_email":"jack@example.com"}} \ No newline at end of file diff --git a/spec/fixtures/project_templates.json b/spec/fixtures/project_templates.json index 01d2763..b090abf 100644 --- a/spec/fixtures/project_templates.json +++ b/spec/fixtures/project_templates.json @@ -1,50 +1 @@ -[ - { - "key": "epl-1.0", - "name": "Eclipse Public License 1.0" - }, - { - "key": "lgpl-3.0", - "name": "GNU Lesser General Public License v3.0" - }, - { - "key": "unlicense", - "name": "The Unlicense" - }, - { - "key": "agpl-3.0", - "name": "GNU Affero General Public License v3.0" - }, - { - "key": "gpl-3.0", - "name": "GNU General Public License v3.0" - }, - { - "key": "bsd-3-clause", - "name": "BSD 3-clause \"New\" or \"Revised\" License" - }, - { - "key": "lgpl-2.1", - "name": "GNU Lesser General Public License v2.1" - }, - { - "key": "mit", - "name": "MIT License" - }, - { - "key": "apache-2.0", - "name": "Apache License 2.0" - }, - { - "key": "bsd-2-clause", - "name": "BSD 2-clause \"Simplified\" License" - }, - { - "key": "mpl-2.0", - "name": "Mozilla Public License 2.0" - }, - { - "key": "gpl-2.0", - "name": "GNU General Public License v2.0" - } -] +[{"key":"epl-1.0","name":"Eclipse Public License 1.0"},{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0"},{"key":"unlicense","name":"The Unlicense"},{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0"},{"key":"gpl-3.0","name":"GNU General Public License v3.0"},{"key":"bsd-3-clause","name":"BSD 3-clause \"New\" or \"Revised\" License"},{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1"},{"key":"mit","name":"MIT License"},{"key":"apache-2.0","name":"Apache License 2.0"},{"key":"bsd-2-clause","name":"BSD 2-clause \"Simplified\" License"},{"key":"mpl-2.0","name":"Mozilla Public License 2.0"},{"key":"gpl-2.0","name":"GNU General Public License v2.0"}] \ No newline at end of file diff --git a/spec/fixtures/project_unarchive.json b/spec/fixtures/project_unarchive.json index 765bb4d..2caa5ff 100644 --- a/spec/fixtures/project_unarchive.json +++ b/spec/fixtures/project_unarchive.json @@ -1,44 +1 @@ -{ - "id": 3, - "description": null, - "default_branch": "master", - "public": false, - "visibility_level": 10, - "ssh_url_to_repo":"git@git.gitlab.com:root/gitlab.git", - "http_url_to_repo":"http://git.gitlab.com/root/gitlab.git", - "web_url":"http://git.gitlab.com/root/gitlab", - "tag_list": [ - - ], - "name": "GitLab Community Edition", - "name_with_namespace": "GitLab / GitLab Community Edition", - "path": "gitlab-ce", - "path_with_namespace": "gitlab/gitlab-ce", - "issues_enabled": true, - "open_issues_count": 1, - "merge_requests_enabled": true, - "builds_enabled": true, - "wiki_enabled": true, - "snippets_enabled": false, - "container_registry_enabled": false, - "created_at": "2013-09-30T13:46:02Z", - "last_activity_at": "2013-09-30T13:46:02Z", - "creator_id": 3, - "namespace": { - "created_at": "2013-09-30T13:46:02Z", - "description": "", - "id": 3, - "name": "GitLab", - "owner_id": 1, - "path": "gitlab", - "updated_at": "2013-09-30T13:46:02Z" - }, - "archived": false, - "avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png", - "shared_runners_enabled": true, - "forks_count": 0, - "star_count": 0, - "public_builds": true, - "shared_with_groups": [], - "only_allow_merge_if_build_succeeds": false -} +{"id":3,"description":null,"default_branch":"master","public":false,"visibility_level":10,"ssh_url_to_repo":"git@git.gitlab.com:root/gitlab.git","http_url_to_repo":"http://git.gitlab.com/root/gitlab.git","web_url":"http://git.gitlab.com/root/gitlab","tag_list":[],"name":"GitLab Community Edition","name_with_namespace":"GitLab / GitLab Community Edition","path":"gitlab-ce","path_with_namespace":"gitlab/gitlab-ce","issues_enabled":true,"open_issues_count":1,"merge_requests_enabled":true,"builds_enabled":true,"wiki_enabled":true,"snippets_enabled":false,"container_registry_enabled":false,"created_at":"2013-09-30T13:46:02Z","last_activity_at":"2013-09-30T13:46:02Z","creator_id":3,"namespace":{"created_at":"2013-09-30T13:46:02Z","description":"","id":3,"name":"GitLab","owner_id":1,"path":"gitlab","updated_at":"2013-09-30T13:46:02Z"},"archived":false,"avatar_url":"http://example.com/uploads/project/avatar/3/uploads/avatar.png","shared_runners_enabled":true,"forks_count":0,"star_count":0,"public_builds":true,"shared_with_groups":[],"only_allow_merge_if_build_succeeds":false} \ No newline at end of file diff --git a/spec/fixtures/project_unstar.json b/spec/fixtures/project_unstar.json index 33bc36f..dacc8ff 100644 --- a/spec/fixtures/project_unstar.json +++ b/spec/fixtures/project_unstar.json @@ -1,44 +1 @@ -{ - "id": 3, - "description": null, - "default_branch": "master", - "public": false, - "visibility_level": 10, - "ssh_url_to_repo":"git@git.gitlab.com:root/gitlab.git", - "http_url_to_repo":"http://git.gitlab.com/root/gitlab.git", - "web_url":"http://git.gitlab.com/root/gitlab", - "tag_list": [ - - ], - "name": "GitLab Community Edition", - "name_with_namespace": "GitLab / GitLab Community Edition", - "path": "gitlab-ce", - "path_with_namespace": "gitlab/gitlab-ce", - "issues_enabled": true, - "open_issues_count": 1, - "merge_requests_enabled": true, - "builds_enabled": true, - "wiki_enabled": true, - "snippets_enabled": false, - "container_registry_enabled": false, - "created_at": "2013-09-30T13:46:02Z", - "last_activity_at": "2013-09-30T13:46:02Z", - "creator_id": 3, - "namespace": { - "created_at": "2013-09-30T13:46:02Z", - "description": "", - "id": 3, - "name": "GitLab", - "owner_id": 1, - "path": "gitlab", - "updated_at": "2013-09-30T13:46:02Z" - }, - "archived": true, - "avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png", - "shared_runners_enabled": true, - "forks_count": 0, - "star_count": 0, - "public_builds": true, - "shared_with_groups": [], - "only_allow_merge_if_build_succeeds": false -} +{"id":3,"description":null,"default_branch":"master","public":false,"visibility_level":10,"ssh_url_to_repo":"git@git.gitlab.com:root/gitlab.git","http_url_to_repo":"http://git.gitlab.com/root/gitlab.git","web_url":"http://git.gitlab.com/root/gitlab","tag_list":[],"name":"GitLab Community Edition","name_with_namespace":"GitLab / GitLab Community Edition","path":"gitlab-ce","path_with_namespace":"gitlab/gitlab-ce","issues_enabled":true,"open_issues_count":1,"merge_requests_enabled":true,"builds_enabled":true,"wiki_enabled":true,"snippets_enabled":false,"container_registry_enabled":false,"created_at":"2013-09-30T13:46:02Z","last_activity_at":"2013-09-30T13:46:02Z","creator_id":3,"namespace":{"created_at":"2013-09-30T13:46:02Z","description":"","id":3,"name":"GitLab","owner_id":1,"path":"gitlab","updated_at":"2013-09-30T13:46:02Z"},"archived":true,"avatar_url":"http://example.com/uploads/project/avatar/3/uploads/avatar.png","shared_runners_enabled":true,"forks_count":0,"star_count":0,"public_builds":true,"shared_with_groups":[],"only_allow_merge_if_build_succeeds":false} \ No newline at end of file diff --git a/spec/fixtures/project_update_commit_status.json b/spec/fixtures/project_update_commit_status.json index fd81d18..c9006a3 100644 --- a/spec/fixtures/project_update_commit_status.json +++ b/spec/fixtures/project_update_commit_status.json @@ -1,20 +1 @@ -{ - "id": 498, - "sha": "7d938cb8ac15788d71f4b67c035515a160ea76d8", - "ref": "decreased-spec", - "status": "failed", - "name": "test", - "target_url": null, - "description": null, - "created_at": "2015-10-23T23:56:49.499+02:00", - "started_at": null, - "finished_at": "2015-10-23T23:56:49.534+02:00", - "author": { - "name": "Dominik Sander", - "username": "dsander", - "id": 1, - "state": "active", - "avatar_url": "https://secure.gravatar.com/avatar/xxx?s=40&d=identicon", - "web_url": "https://github.com/u/dsander" - } -} \ No newline at end of file +{"id":498,"sha":"7d938cb8ac15788d71f4b67c035515a160ea76d8","ref":"decreased-spec","status":"failed","name":"test","target_url":null,"description":null,"created_at":"2015-10-23T23:56:49.499+02:00","started_at":null,"finished_at":"2015-10-23T23:56:49.534+02:00","author":{"name":"Dominik Sander","username":"dsander","id":1,"state":"active","avatar_url":"https://secure.gravatar.com/avatar/xxx?s=40&d=identicon","web_url":"https://github.com/u/dsander"}} \ No newline at end of file diff --git a/spec/fixtures/protected_branch.json b/spec/fixtures/protected_branch.json index e77622c..8ad1017 100644 --- a/spec/fixtures/protected_branch.json +++ b/spec/fixtures/protected_branch.json @@ -1,15 +1 @@ -{ - "name": "master", - "push_access_levels": [ - { - "access_level": 40, - "access_level_description": "Maintainers" - } - ], - "merge_access_levels": [ - { - "access_level": 40, - "access_level_description": "Maintainers" - } - ] -} +{"name":"master","push_access_levels":[{"access_level":40,"access_level_description":"Maintainers"}],"merge_access_levels":[{"access_level":40,"access_level_description":"Maintainers"}]} \ No newline at end of file diff --git a/spec/fixtures/protected_branches.json b/spec/fixtures/protected_branches.json index fa00014..d01adf6 100644 --- a/spec/fixtures/protected_branches.json +++ b/spec/fixtures/protected_branches.json @@ -1,17 +1 @@ -[ - { - "name": "master", - "push_access_levels": [ - { - "access_level": 40, - "access_level_description": "Maintainers" - } - ], - "merge_access_levels": [ - { - "access_level": 40, - "access_level_description": "Maintainers" - } - ] - } -] +[{"name":"master","push_access_levels":[{"access_level":40,"access_level_description":"Maintainers"}],"merge_access_levels":[{"access_level":40,"access_level_description":"Maintainers"}]}] \ No newline at end of file diff --git a/spec/fixtures/protected_tag.json b/spec/fixtures/protected_tag.json index b804883..98ae5e1 100644 --- a/spec/fixtures/protected_tag.json +++ b/spec/fixtures/protected_tag.json @@ -1,9 +1 @@ -{ - "name": "release-1-0", - "create_access_levels": [ - { - "access_level": 40, - "access_level_description": "Maintainers" - } - ] -} +{"name":"release-1-0","create_access_levels":[{"access_level":40,"access_level_description":"Maintainers"}]} \ No newline at end of file diff --git a/spec/fixtures/protected_tags.json b/spec/fixtures/protected_tags.json index a1675c1..bc0c9b3 100644 --- a/spec/fixtures/protected_tags.json +++ b/spec/fixtures/protected_tags.json @@ -1,11 +1 @@ -[ - { - "name": "release-1-0", - "create_access_levels": [ - { - "access_level": 40, - "access_level_description": "Maintainers" - } - ] - } -] +[{"name":"release-1-0","create_access_levels":[{"access_level":40,"access_level_description":"Maintainers"}]}] \ No newline at end of file diff --git a/spec/fixtures/public_snippets.json b/spec/fixtures/public_snippets.json new file mode 100644 index 0000000..00c33db --- /dev/null +++ b/spec/fixtures/public_snippets.json @@ -0,0 +1 @@ +[{"author":{"avatar_url":"http://www.gravatar.com/avatar/edaf55a9e363ea263e3b981d09e0f7f7?s=80&d=identicon","id":12,"name":"Libby Rolfson","state":"active","username":"elton_wehner","web_url":"http://example.com/elton_wehner"},"created_at":"2016-11-25T16:53:34.504Z","file_name":"oconnerrice.rb","id":49,"title":"Ratione cupiditate et laborum temporibus.","updated_at":"2016-11-25T16:53:34.504Z","project_id":null,"web_url":"http://example.com/snippets/49","raw_url":"http://example.com/snippets/49/raw"},{"author":{"avatar_url":"http://www.gravatar.com/avatar/36583b28626de71061e6e5a77972c3bd?s=80&d=identicon","id":16,"name":"Llewellyn Flatley","state":"active","username":"adaline","web_url":"http://example.com/adaline"},"created_at":"2016-11-25T16:53:34.479Z","file_name":"muellershields.rb","id":48,"title":"Minus similique nesciunt vel fugiat qui ullam sunt.","updated_at":"2016-11-25T16:53:34.479Z","project_id":null,"web_url":"http://example.com/snippets/48","raw_url":"http://example.com/snippets/49/raw","visibility":"public"}] \ No newline at end of file diff --git a/spec/fixtures/push_rule.json b/spec/fixtures/push_rule.json index 0f38ef9..fceeba7 100644 --- a/spec/fixtures/push_rule.json +++ b/spec/fixtures/push_rule.json @@ -1 +1 @@ -{"id": 1, "project_id": 1, "created_at": "2016-05-25T20:27:15.545Z", "commit_message_regex": "\\b[A-Z]{3}-[0-9]+\\b", "deny_delete_tag": false} +{"id":1,"project_id":1,"created_at":"2016-05-25T20:27:15.545Z","commit_message_regex":"\\b[A-Z]{3}-[0-9]+\\b","deny_delete_tag":false} \ No newline at end of file diff --git a/spec/fixtures/raw_file.json b/spec/fixtures/raw_file.json deleted file mode 100644 index 46a991f..0000000 --- a/spec/fixtures/raw_file.json +++ /dev/null @@ -1,2 +0,0 @@ -source 'https://rubygems.org' -gem 'rails', '4.1.2' diff --git a/spec/fixtures/raw_file.txt b/spec/fixtures/raw_file.txt new file mode 100644 index 0000000..46a991f --- /dev/null +++ b/spec/fixtures/raw_file.txt @@ -0,0 +1,2 @@ +source 'https://rubygems.org' +gem 'rails', '4.1.2' diff --git a/spec/fixtures/register_runner_response.json b/spec/fixtures/register_runner_response.json index f6d3d6e..ef11897 100644 --- a/spec/fixtures/register_runner_response.json +++ b/spec/fixtures/register_runner_response.json @@ -1,4 +1 @@ -{ - "id": "12345", - "token": "6337ff461c94fd3fa32ba3b1ff4125" -} +{"id":"12345","token":"6337ff461c94fd3fa32ba3b1ff4125"} \ No newline at end of file diff --git a/spec/fixtures/registry_repositories.json b/spec/fixtures/registry_repositories.json index 302b575..516c042 100644 --- a/spec/fixtures/registry_repositories.json +++ b/spec/fixtures/registry_repositories.json @@ -1,16 +1 @@ -[ - { - "id": 1, - "name": "", - "path": "group/project", - "location": "gitlab.example.com:5000/group/project", - "created_at": "2019-01-10T13:38:57.391Z" - }, - { - "id": 2, - "name": "releases", - "path": "group/project/releases", - "location": "gitlab.example.com:5000/group/project/releases", - "created_at": "2019-01-10T13:39:08.229Z" - } -] +[{"id":1,"name":"","path":"group/project","location":"gitlab.example.com:5000/group/project","created_at":"2019-01-10T13:38:57.391Z"},{"id":2,"name":"releases","path":"group/project/releases","location":"gitlab.example.com:5000/group/project/releases","created_at":"2019-01-10T13:39:08.229Z"}] \ No newline at end of file diff --git a/spec/fixtures/registry_repository_tag.json b/spec/fixtures/registry_repository_tag.json index 979f39e..7183359 100644 --- a/spec/fixtures/registry_repository_tag.json +++ b/spec/fixtures/registry_repository_tag.json @@ -1,10 +1 @@ -{ - "name": "v10.0.0", - "path": "group/project:latest", - "location": "gitlab.example.com:5000/group/project:latest", - "revision": "e9ed9d87c881d8c2fd3a31b41904d01ba0b836e7fd15240d774d811a1c248181", - "short_revision": "e9ed9d87c", - "digest": "sha256:c3490dcf10ffb6530c1303522a1405dfaf7daecd8f38d3e6a1ba19ea1f8a1751", - "created_at": "2019-01-06T16:49:51.272+00:00", - "total_size": 350224384 -} +{"name":"v10.0.0","path":"group/project:latest","location":"gitlab.example.com:5000/group/project:latest","revision":"e9ed9d87c881d8c2fd3a31b41904d01ba0b836e7fd15240d774d811a1c248181","short_revision":"e9ed9d87c","digest":"sha256:c3490dcf10ffb6530c1303522a1405dfaf7daecd8f38d3e6a1ba19ea1f8a1751","created_at":"2019-01-06T16:49:51.272+00:00","total_size":350224384} \ No newline at end of file diff --git a/spec/fixtures/registry_repository_tags.json b/spec/fixtures/registry_repository_tags.json index de12118..6a01ec6 100644 --- a/spec/fixtures/registry_repository_tags.json +++ b/spec/fixtures/registry_repository_tags.json @@ -1,12 +1 @@ -[ - { - "name": "A", - "path": "group/project:A", - "location": "gitlab.example.com:5000/group/project:A" - }, - { - "name": "latest", - "path": "group/project:latest", - "location": "gitlab.example.com:5000/group/project:latest" - } -] +[{"name":"A","path":"group/project:A","location":"gitlab.example.com:5000/group/project:A"},{"name":"latest","path":"group/project:latest","location":"gitlab.example.com:5000/group/project:latest"}] \ No newline at end of file diff --git a/spec/fixtures/release_create.json b/spec/fixtures/release_create.json index 02164aa..8035b80 100644 --- a/spec/fixtures/release_create.json +++ b/spec/fixtures/release_create.json @@ -1 +1 @@ -{"tag_name":"0.0.1","description":"Amazing release. Wow"} +{"tag_name":"0.0.1","description":"Amazing release. Wow"} \ No newline at end of file diff --git a/spec/fixtures/release_update.json b/spec/fixtures/release_update.json index 02164aa..8035b80 100644 --- a/spec/fixtures/release_update.json +++ b/spec/fixtures/release_update.json @@ -1 +1 @@ -{"tag_name":"0.0.1","description":"Amazing release. Wow"} +{"tag_name":"0.0.1","description":"Amazing release. Wow"} \ No newline at end of file diff --git a/spec/fixtures/repository_file.json b/spec/fixtures/repository_file.json index 84c3918..1a52b0f 100644 --- a/spec/fixtures/repository_file.json +++ b/spec/fixtures/repository_file.json @@ -1 +1 @@ -{"file_path":"path","branch_name":"branch","encoding":"base64","content":"Y29udGVudA==","commit_message":"commit message"} +{"file_path":"path","branch_name":"branch","encoding":"base64","content":"Y29udGVudA==","commit_message":"commit message"} \ No newline at end of file diff --git a/spec/fixtures/repository_submodule.json b/spec/fixtures/repository_submodule.json index 1afc08d..2262b1e 100644 --- a/spec/fixtures/repository_submodule.json +++ b/spec/fixtures/repository_submodule.json @@ -1,17 +1 @@ -{ - "id": "ed899a2f4b50b4370feeea94676502b42383c746", - "short_id": "ed899a2f4b5", - "title": "Updated submodule example_submodule with oid 3ddec28ea23acc5caa5d8331a6ecb2a65fc03e88", - "author_name": "Dmitriy Zaporozhets", - "author_email": "dzaporozhets@sphereconsultinginc.com", - "committer_name": "Dmitriy Zaporozhets", - "committer_email": "dzaporozhets@sphereconsultinginc.com", - "created_at": "2018-09-20T09:26:24.000-07:00", - "message": "Updated submodule example_submodule with oid 3ddec28ea23acc5caa5d8331a6ecb2a65fc03e88", - "parent_ids": [ - "ae1d9fb46aa2b07ee9836d49862ec4e2c46fbbba" - ], - "committed_date": "2018-09-20T09:26:24.000-07:00", - "authored_date": "2018-09-20T09:26:24.000-07:00", - "status": null -} +{"id":"ed899a2f4b50b4370feeea94676502b42383c746","short_id":"ed899a2f4b5","title":"Updated submodule example_submodule with oid 3ddec28ea23acc5caa5d8331a6ecb2a65fc03e88","author_name":"Dmitriy Zaporozhets","author_email":"dzaporozhets@sphereconsultinginc.com","committer_name":"Dmitriy Zaporozhets","committer_email":"dzaporozhets@sphereconsultinginc.com","created_at":"2018-09-20T09:26:24.000-07:00","message":"Updated submodule example_submodule with oid 3ddec28ea23acc5caa5d8331a6ecb2a65fc03e88","parent_ids":["ae1d9fb46aa2b07ee9836d49862ec4e2c46fbbba"],"committed_date":"2018-09-20T09:26:24.000-07:00","authored_date":"2018-09-20T09:26:24.000-07:00","status":null} \ No newline at end of file diff --git a/spec/fixtures/resource_label_event.json b/spec/fixtures/resource_label_event.json index e1a03a2..c765605 100644 --- a/spec/fixtures/resource_label_event.json +++ b/spec/fixtures/resource_label_event.json @@ -1,21 +1 @@ -{ - "id": 142, - "user": { - "id": 1, - "name": "Administrator", - "username": "root", - "state": "active", - "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://gitlab.example.com/root" - }, - "created_at": "2018-08-20T13:38:20.077Z", - "resource_type": "Issue", - "resource_id": 253, - "label": { - "id": 73, - "name": "a1", - "color": "#34495E", - "description": "" - }, - "action": "add" -} +{"id":142,"user":{"id":1,"name":"Administrator","username":"root","state":"active","avatar_url":"https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://gitlab.example.com/root"},"created_at":"2018-08-20T13:38:20.077Z","resource_type":"Issue","resource_id":253,"label":{"id":73,"name":"a1","color":"#34495E","description":""},"action":"add"} \ No newline at end of file diff --git a/spec/fixtures/resource_label_events.json b/spec/fixtures/resource_label_events.json index 35ff142..089e0b2 100644 --- a/spec/fixtures/resource_label_events.json +++ b/spec/fixtures/resource_label_events.json @@ -1,44 +1 @@ -[ - { - "id": 142, - "user": { - "id": 1, - "name": "Administrator", - "username": "root", - "state": "active", - "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://gitlab.example.com/root" - }, - "created_at": "2018-08-20T13:38:20.077Z", - "resource_type": "Issue", - "resource_id": 253, - "label": { - "id": 73, - "name": "a1", - "color": "#34495E", - "description": "" - }, - "action": "add" - }, - { - "id": 143, - "user": { - "id": 1, - "name": "Administrator", - "username": "root", - "state": "active", - "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://gitlab.example.com/root" - }, - "created_at": "2018-08-20T13:38:20.077Z", - "resource_type": "Issue", - "resource_id": 253, - "label": { - "id": 74, - "name": "p1", - "color": "#0033CC", - "description": "" - }, - "action": "remove" - } -] +[{"id":142,"user":{"id":1,"name":"Administrator","username":"root","state":"active","avatar_url":"https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://gitlab.example.com/root"},"created_at":"2018-08-20T13:38:20.077Z","resource_type":"Issue","resource_id":253,"label":{"id":73,"name":"a1","color":"#34495E","description":""},"action":"add"},{"id":143,"user":{"id":1,"name":"Administrator","username":"root","state":"active","avatar_url":"https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://gitlab.example.com/root"},"created_at":"2018-08-20T13:38:20.077Z","resource_type":"Issue","resource_id":253,"label":{"id":74,"name":"p1","color":"#0033CC","description":""},"action":"remove"}] \ No newline at end of file diff --git a/spec/fixtures/run_trigger.json b/spec/fixtures/run_trigger.json index aa0ed2f..8f6765c 100644 --- a/spec/fixtures/run_trigger.json +++ b/spec/fixtures/run_trigger.json @@ -1 +1 @@ -{"id":8,"variables":{"a":"10"}} +{"id":8,"variables":{"a":"10"}} \ No newline at end of file diff --git a/spec/fixtures/runner.json b/spec/fixtures/runner.json index 4a77c32..5c193c5 100644 --- a/spec/fixtures/runner.json +++ b/spec/fixtures/runner.json @@ -1,26 +1 @@ -{ - "active": true, - "architecture": null, - "description": "test-1-20150125", - "id": 6, - "is_shared": false, - "contacted_at": "2016-01-25T16:39:48.066Z", - "name": null, - "platform": null, - "projects": [ - { - "id": 1, - "name": "GitLab Community Edition", - "name_with_namespace": "GitLab.org / GitLab Community Edition", - "path": "gitlab-ce", - "path_with_namespace": "gitlab-org/gitlab-ce" - } - ], - "token": "205086a8e3b9a2b818ffac9b89d102", - "revision": null, - "tag_list": [ - "ruby", - "mysql" - ], - "version": null -} +{"active":true,"architecture":null,"description":"test-1-20150125","id":6,"is_shared":false,"contacted_at":"2016-01-25T16:39:48.066Z","name":null,"platform":null,"projects":[{"id":1,"name":"GitLab Community Edition","name_with_namespace":"GitLab.org / GitLab Community Edition","path":"gitlab-ce","path_with_namespace":"gitlab-org/gitlab-ce"}],"token":"205086a8e3b9a2b818ffac9b89d102","revision":null,"tag_list":["ruby","mysql"],"version":null} \ No newline at end of file diff --git a/spec/fixtures/runner_delete.json b/spec/fixtures/runner_delete.json index 5083086..609f1e0 100644 --- a/spec/fixtures/runner_delete.json +++ b/spec/fixtures/runner_delete.json @@ -1,7 +1 @@ -{ - "active": true, - "description": "test-1-20150125-test", - "id": 6, - "is_shared": false, - "name": null -} +{"active":true,"description":"test-1-20150125-test","id":6,"is_shared":false,"name":null} \ No newline at end of file diff --git a/spec/fixtures/runner_edit.json b/spec/fixtures/runner_edit.json index abb340e..50a929c 100644 --- a/spec/fixtures/runner_edit.json +++ b/spec/fixtures/runner_edit.json @@ -1,26 +1 @@ -{ - "active": true, - "architecture": null, - "description": "abcefg", - "id": 6, - "is_shared": false, - "contacted_at": "2016-01-25T16:39:48.066Z", - "name": null, - "platform": null, - "projects": [ - { - "id": 1, - "name": "GitLab Community Edition", - "name_with_namespace": "GitLab.org / GitLab Community Edition", - "path": "gitlab-ce", - "path_with_namespace": "gitlab-org/gitlab-ce" - } - ], - "token": "205086a8e3b9a2b818ffac9b89d102", - "revision": null, - "tag_list": [ - "ruby", - "mysql" - ], - "version": null -} +{"active":true,"architecture":null,"description":"abcefg","id":6,"is_shared":false,"contacted_at":"2016-01-25T16:39:48.066Z","name":null,"platform":null,"projects":[{"id":1,"name":"GitLab Community Edition","name_with_namespace":"GitLab.org / GitLab Community Edition","path":"gitlab-ce","path_with_namespace":"gitlab-org/gitlab-ce"}],"token":"205086a8e3b9a2b818ffac9b89d102","revision":null,"tag_list":["ruby","mysql"],"version":null} \ No newline at end of file diff --git a/spec/fixtures/runner_jobs.json b/spec/fixtures/runner_jobs.json index df30260..f9f913d 100644 --- a/spec/fixtures/runner_jobs.json +++ b/spec/fixtures/runner_jobs.json @@ -1,63 +1 @@ -[ - { - "id": 2, - "status": "running", - "stage": "test", - "name": "test", - "ref": "master", - "tag": false, - "coverage": null, - "created_at": "2017-11-16T08:50:29.000Z", - "started_at": "2017-11-16T08:51:29.000Z", - "finished_at": "2017-11-16T08:53:29.000Z", - "duration": 120, - "user": { - "id": 1, - "name": "John Doe2", - "username": "user2", - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/c922747a93b40d1ea88262bf1aebee62?s=80&d=identicon", - "web_url": "http://localhost/user2", - "created_at": "2017-11-16T18:38:46.000Z", - "bio": null, - "location": null, - "skype": "", - "linkedin": "", - "twitter": "", - "website_url": "", - "organization": null - }, - "commit": { - "id": "97de212e80737a608d939f648d959671fb0a0142", - "short_id": "97de212e", - "title": "Update configuration\r", - "created_at": "2017-11-16T08:50:28.000Z", - "parent_ids": [ - "1b12f15a11fc6e62177bef08f47bc7b5ce50b141", - "498214de67004b1da3d820901307bed2a68a8ef6" - ], - "message": "See merge request !123", - "author_name": "John Doe2", - "author_email": "user2@example.org", - "authored_date": "2017-11-16T08:50:27.000Z", - "committer_name": "John Doe2", - "committer_email": "user2@example.org", - "committed_date": "2017-11-16T08:50:27.000Z" - }, - "pipeline": { - "id": 2, - "sha": "97de212e80737a608d939f648d959671fb0a0142", - "ref": "master", - "status": "running" - }, - "project": { - "id": 1, - "description": null, - "name": "project1", - "name_with_namespace": "John Doe2 / project1", - "path": "project1", - "path_with_namespace": "namespace1/project1", - "created_at": "2017-11-16T18:38:46.620Z" - } - } -] +[{"id":2,"status":"running","stage":"test","name":"test","ref":"master","tag":false,"coverage":null,"created_at":"2017-11-16T08:50:29.000Z","started_at":"2017-11-16T08:51:29.000Z","finished_at":"2017-11-16T08:53:29.000Z","duration":120,"user":{"id":1,"name":"John Doe2","username":"user2","state":"active","avatar_url":"http://www.gravatar.com/avatar/c922747a93b40d1ea88262bf1aebee62?s=80&d=identicon","web_url":"http://localhost/user2","created_at":"2017-11-16T18:38:46.000Z","bio":null,"location":null,"skype":"","linkedin":"","twitter":"","website_url":"","organization":null},"commit":{"id":"97de212e80737a608d939f648d959671fb0a0142","short_id":"97de212e","title":"Update configuration\r","created_at":"2017-11-16T08:50:28.000Z","parent_ids":["1b12f15a11fc6e62177bef08f47bc7b5ce50b141","498214de67004b1da3d820901307bed2a68a8ef6"],"message":"See merge request !123","author_name":"John Doe2","author_email":"user2@example.org","authored_date":"2017-11-16T08:50:27.000Z","committer_name":"John Doe2","committer_email":"user2@example.org","committed_date":"2017-11-16T08:50:27.000Z"},"pipeline":{"id":2,"sha":"97de212e80737a608d939f648d959671fb0a0142","ref":"master","status":"running"},"project":{"id":1,"description":null,"name":"project1","name_with_namespace":"John Doe2 / project1","path":"project1","path_with_namespace":"namespace1/project1","created_at":"2017-11-16T18:38:46.620Z"}}] \ No newline at end of file diff --git a/spec/fixtures/runners.json b/spec/fixtures/runners.json index b8e5412..3a158e8 100644 --- a/spec/fixtures/runners.json +++ b/spec/fixtures/runners.json @@ -1,16 +1 @@ -[ - { - "active": true, - "description": "test-1-20150125", - "id": 6, - "is_shared": false, - "name": null - }, - { - "active": true, - "description": "test-2-20150125", - "id": 8, - "is_shared": false, - "name": null - } -] +[{"active":true,"description":"test-1-20150125","id":6,"is_shared":false,"name":null},{"active":true,"description":"test-2-20150125","id":8,"is_shared":false,"name":null}] \ No newline at end of file diff --git a/spec/fixtures/runners_all.json b/spec/fixtures/runners_all.json index 8e30e71..d45c7d6 100644 --- a/spec/fixtures/runners_all.json +++ b/spec/fixtures/runners_all.json @@ -1,30 +1 @@ -[ - { - "active": true, - "description": "shared-runner-1", - "id": 1, - "is_shared": true, - "name": null - }, - { - "active": true, - "description": "shared-runner-2", - "id": 3, - "is_shared": true, - "name": null - }, - { - "active": true, - "description": "test-1-20150125", - "id": 6, - "is_shared": false, - "name": null - }, - { - "active": true, - "description": "test-2-20150125", - "id": 8, - "is_shared": false, - "name": null - } -] +[{"active":true,"description":"shared-runner-1","id":1,"is_shared":true,"name":null},{"active":true,"description":"shared-runner-2","id":3,"is_shared":true,"name":null},{"active":true,"description":"test-1-20150125","id":6,"is_shared":false,"name":null},{"active":true,"description":"test-2-20150125","id":8,"is_shared":false,"name":null}] \ No newline at end of file diff --git a/spec/fixtures/search_blobs_results.json b/spec/fixtures/search_blobs_results.json index e2dad38..5c688c8 100644 --- a/spec/fixtures/search_blobs_results.json +++ b/spec/fixtures/search_blobs_results.json @@ -1,12 +1 @@ - -[ - { - "basename": "README", - "data": "```\n\n## Installation\n\nQuick start using the [pre-built", - "filename": "README.md", - "id": null, - "ref": "master", - "startline": 46, - "project_id": 6 - } -] +[{"basename":"README","data":"```\n\n## Installation\n\nQuick start using the [pre-built","filename":"README.md","id":null,"ref":"master","startline":46,"project_id":6}] \ No newline at end of file diff --git a/spec/fixtures/search_commits_results.json b/spec/fixtures/search_commits_results.json index a4f9e41..bab24fb 100644 --- a/spec/fixtures/search_commits_results.json +++ b/spec/fixtures/search_commits_results.json @@ -1,20 +1 @@ - -[ - { - "id": "4109c2d872d5fdb1ed057400d103766aaea97f98", - "short_id": "4109c2d8", - "title": "goodbye $.browser", - "created_at": "2013-02-18T22:02:54.000Z", - "parent_ids": [ - "59d05353ab575bcc2aa958fe1782e93297de64c9" - ], - "message": "goodbye $.browser\n", - "author_name": "angus croll", - "author_email": "anguscroll@gmail.com", - "authored_date": "2013-02-18T22:02:54.000Z", - "committer_name": "angus croll", - "committer_email": "anguscroll@gmail.com", - "committed_date": "2013-02-18T22:02:54.000Z", - "project_id": 6 - } -] +[{"id":"4109c2d872d5fdb1ed057400d103766aaea97f98","short_id":"4109c2d8","title":"goodbye $.browser","created_at":"2013-02-18T22:02:54.000Z","parent_ids":["59d05353ab575bcc2aa958fe1782e93297de64c9"],"message":"goodbye $.browser\n","author_name":"angus croll","author_email":"anguscroll@gmail.com","authored_date":"2013-02-18T22:02:54.000Z","committer_name":"angus croll","committer_email":"anguscroll@gmail.com","committed_date":"2013-02-18T22:02:54.000Z","project_id":6}] \ No newline at end of file diff --git a/spec/fixtures/search_issues_results.json b/spec/fixtures/search_issues_results.json index b01bfd4..a63bc8b 100644 --- a/spec/fixtures/search_issues_results.json +++ b/spec/fixtures/search_issues_results.json @@ -1,52 +1 @@ -[ - { - "id": 83, - "iid": 1, - "project_id": 12, - "title": "Add file", - "description": "Add first file", - "state": "opened", - "created_at": "2018-01-24T06:02:15.514Z", - "updated_at": "2018-02-06T12:36:23.263Z", - "closed_at": null, - "labels":[], - "milestone": null, - "assignees": [{ - "id": 20, - "name": "Ceola Deckow", - "username": "sammy.collier", - "state": "active", - "avatar_url": "https://www.gravatar.com/avatar/c23d85a4f50e0ea76ab739156c639231?s=80&d=identicon", - "web_url": "http://localhost:3000/sammy.collier" - }], - "author": { - "id": 1, - "name": "Administrator", - "username": "root", - "state": "active", - "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://localhost:3000/root" - }, - "assignee": { - "id": 20, - "name": "Ceola Deckow", - "username": "sammy.collier", - "state": "active", - "avatar_url": "https://www.gravatar.com/avatar/c23d85a4f50e0ea76ab739156c639231?s=80&d=identicon", - "web_url": "http://localhost:3000/sammy.collier" - }, - "user_notes_count": 0, - "upvotes": 0, - "downvotes": 0, - "due_date": null, - "confidential": false, - "discussion_locked": null, - "web_url": "http://localhost:3000/h5bp/7bp/subgroup-prj/issues/1", - "time_stats": { - "time_estimate": 0, - "total_time_spent": 0, - "human_time_estimate": null, - "human_total_time_spent": null - } - } -] +[{"id":83,"iid":1,"project_id":12,"title":"Add file","description":"Add first file","state":"opened","created_at":"2018-01-24T06:02:15.514Z","updated_at":"2018-02-06T12:36:23.263Z","closed_at":null,"labels":[],"milestone":null,"assignees":[{"id":20,"name":"Ceola Deckow","username":"sammy.collier","state":"active","avatar_url":"https://www.gravatar.com/avatar/c23d85a4f50e0ea76ab739156c639231?s=80&d=identicon","web_url":"http://localhost:3000/sammy.collier"}],"author":{"id":1,"name":"Administrator","username":"root","state":"active","avatar_url":"https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://localhost:3000/root"},"assignee":{"id":20,"name":"Ceola Deckow","username":"sammy.collier","state":"active","avatar_url":"https://www.gravatar.com/avatar/c23d85a4f50e0ea76ab739156c639231?s=80&d=identicon","web_url":"http://localhost:3000/sammy.collier"},"user_notes_count":0,"upvotes":0,"downvotes":0,"due_date":null,"confidential":false,"discussion_locked":null,"web_url":"http://localhost:3000/h5bp/7bp/subgroup-prj/issues/1","time_stats":{"time_estimate":0,"total_time_spent":0,"human_time_estimate":null,"human_total_time_spent":null}}] \ No newline at end of file diff --git a/spec/fixtures/search_merge_requests_results.json b/spec/fixtures/search_merge_requests_results.json index ec3e108..723ede9 100644 --- a/spec/fixtures/search_merge_requests_results.json +++ b/spec/fixtures/search_merge_requests_results.json @@ -1,66 +1 @@ -[ - { - "id": 56, - "iid": 8, - "project_id": 6, - "title": "Add first file", - "description": "This is a test MR to add file", - "state": "opened", - "created_at": "2018-01-22T14:21:50.830Z", - "updated_at": "2018-02-06T12:40:33.295Z", - "target_branch": "master", - "source_branch": "jaja-test", - "upvotes": 0, - "downvotes": 0, - "author": { - "id": 1, - "name": "Administrator", - "username": "root", - "state": "active", - "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://localhost:3000/root" - }, - "assignee": { - "id": 5, - "name": "Jacquelyn Kutch", - "username": "abigail", - "state": "active", - "avatar_url": "https://www.gravatar.com/avatar/3138c66095ee4bd11a508c2f7f7772da?s=80&d=identicon", - "web_url": "http://localhost:3000/abigail" - }, - "source_project_id": 6, - "target_project_id": 6, - "labels": [ - "ruby", - "tests" - ], - "work_in_progress": false, - "milestone": { - "id": 13, - "iid": 3, - "project_id": 6, - "title": "v2.0", - "description": "Qui aut qui eos dolor beatae itaque tempore molestiae.", - "state": "active", - "created_at": "2017-09-05T07:58:29.099Z", - "updated_at": "2017-09-05T07:58:29.099Z", - "due_date": null, - "start_date": null - }, - "merge_when_pipeline_succeeds": false, - "merge_status": "can_be_merged", - "sha": "78765a2d5e0a43585945c58e61ba2f822e4d090b", - "merge_commit_sha": null, - "user_notes_count": 0, - "discussion_locked": null, - "should_remove_source_branch": null, - "force_remove_source_branch": true, - "web_url": "http://localhost:3000/twitter/flight/merge_requests/8", - "time_stats": { - "time_estimate": 0, - "total_time_spent": 0, - "human_time_estimate": null, - "human_total_time_spent": null - } - } -] +[{"id":56,"iid":8,"project_id":6,"title":"Add first file","description":"This is a test MR to add file","state":"opened","created_at":"2018-01-22T14:21:50.830Z","updated_at":"2018-02-06T12:40:33.295Z","target_branch":"master","source_branch":"jaja-test","upvotes":0,"downvotes":0,"author":{"id":1,"name":"Administrator","username":"root","state":"active","avatar_url":"https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://localhost:3000/root"},"assignee":{"id":5,"name":"Jacquelyn Kutch","username":"abigail","state":"active","avatar_url":"https://www.gravatar.com/avatar/3138c66095ee4bd11a508c2f7f7772da?s=80&d=identicon","web_url":"http://localhost:3000/abigail"},"source_project_id":6,"target_project_id":6,"labels":["ruby","tests"],"work_in_progress":false,"milestone":{"id":13,"iid":3,"project_id":6,"title":"v2.0","description":"Qui aut qui eos dolor beatae itaque tempore molestiae.","state":"active","created_at":"2017-09-05T07:58:29.099Z","updated_at":"2017-09-05T07:58:29.099Z","due_date":null,"start_date":null},"merge_when_pipeline_succeeds":false,"merge_status":"can_be_merged","sha":"78765a2d5e0a43585945c58e61ba2f822e4d090b","merge_commit_sha":null,"user_notes_count":0,"discussion_locked":null,"should_remove_source_branch":null,"force_remove_source_branch":true,"web_url":"http://localhost:3000/twitter/flight/merge_requests/8","time_stats":{"time_estimate":0,"total_time_spent":0,"human_time_estimate":null,"human_total_time_spent":null}}] \ No newline at end of file diff --git a/spec/fixtures/search_milestones_results.json b/spec/fixtures/search_milestones_results.json index 335e006..03e65f6 100644 --- a/spec/fixtures/search_milestones_results.json +++ b/spec/fixtures/search_milestones_results.json @@ -1,14 +1 @@ -[ - { - "id": 44, - "iid": 1, - "project_id": 12, - "title": "next release", - "description": "Next release milestone", - "state": "active", - "created_at": "2018-02-06T12:43:39.271Z", - "updated_at": "2018-02-06T12:44:01.298Z", - "due_date": "2018-04-18", - "start_date": "2018-02-04" - } -] +[{"id":44,"iid":1,"project_id":12,"title":"next release","description":"Next release milestone","state":"active","created_at":"2018-02-06T12:43:39.271Z","updated_at":"2018-02-06T12:44:01.298Z","due_date":"2018-04-18","start_date":"2018-02-04"}] \ No newline at end of file diff --git a/spec/fixtures/search_notes_results.json b/spec/fixtures/search_notes_results.json index f43a5f6..be3c21d 100644 --- a/spec/fixtures/search_notes_results.json +++ b/spec/fixtures/search_notes_results.json @@ -1,21 +1 @@ -[ - { - "id": 191, - "body": "Harum maxime consequuntur et et deleniti assumenda facilis.", - "attachment": null, - "author": { - "id": 23, - "name": "User 1", - "username": "user1", - "state": "active", - "avatar_url": "https://www.gravatar.com/avatar/111d68d06e2d317b5a59c2c6c5bad808?s=80&d=identicon", - "web_url": "http://localhost:3000/user1" - }, - "created_at": "2017-09-05T08:01:32.068Z", - "updated_at": "2017-09-05T08:01:32.068Z", - "system": false, - "noteable_id": 22, - "noteable_type": "Issue", - "noteable_iid": 2 - } -] +[{"id":191,"body":"Harum maxime consequuntur et et deleniti assumenda facilis.","attachment":null,"author":{"id":23,"name":"User 1","username":"user1","state":"active","avatar_url":"https://www.gravatar.com/avatar/111d68d06e2d317b5a59c2c6c5bad808?s=80&d=identicon","web_url":"http://localhost:3000/user1"},"created_at":"2017-09-05T08:01:32.068Z","updated_at":"2017-09-05T08:01:32.068Z","system":false,"noteable_id":22,"noteable_type":"Issue","noteable_iid":2}] \ No newline at end of file diff --git a/spec/fixtures/search_projects_results.json b/spec/fixtures/search_projects_results.json index 6ee6b39..d27c191 100644 --- a/spec/fixtures/search_projects_results.json +++ b/spec/fixtures/search_projects_results.json @@ -1,20 +1 @@ -[ - { - "id": 6, - "description": "Nobis sed ipsam vero quod cupiditate veritatis hic.", - "name": "Flight", - "name_with_namespace": "Twitter / Flight", - "path": "flight", - "path_with_namespace": "twitter/flight", - "created_at": "2017-09-05T07:58:01.621Z", - "default_branch": "master", - "tag_list":[], - "ssh_url_to_repo": "ssh://jarka@localhost:2222/twitter/flight.git", - "http_url_to_repo": "http://localhost:3000/twitter/flight.git", - "web_url": "http://localhost:3000/twitter/flight", - "avatar_url": null, - "star_count": 0, - "forks_count": 0, - "last_activity_at": "2018-01-31T09:56:30.902Z" - } -] +[{"id":6,"description":"Nobis sed ipsam vero quod cupiditate veritatis hic.","name":"Flight","name_with_namespace":"Twitter / Flight","path":"flight","path_with_namespace":"twitter/flight","created_at":"2017-09-05T07:58:01.621Z","default_branch":"master","tag_list":[],"ssh_url_to_repo":"ssh://jarka@localhost:2222/twitter/flight.git","http_url_to_repo":"http://localhost:3000/twitter/flight.git","web_url":"http://localhost:3000/twitter/flight","avatar_url":null,"star_count":0,"forks_count":0,"last_activity_at":"2018-01-31T09:56:30.902Z"}] \ No newline at end of file diff --git a/spec/fixtures/search_snippet_blobs_results.json b/spec/fixtures/search_snippet_blobs_results.json index 75fd62f..23afb07 100644 --- a/spec/fixtures/search_snippet_blobs_results.json +++ b/spec/fixtures/search_snippet_blobs_results.json @@ -1,20 +1 @@ -[ - { - "id": 50, - "title": "Sample file", - "file_name": "file.rb", - "description": "Simple ruby file", - "author": { - "id": 1, - "name": "Administrator", - "username": "root", - "state": "active", - "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://localhost:3000/root" - }, - "updated_at": "2018-02-06T12:49:29.104Z", - "created_at": "2017-11-28T08:20:18.071Z", - "project_id": 9, - "web_url": "http://localhost:3000/root/jira-test/snippets/50" - } -] +[{"id":50,"title":"Sample file","file_name":"file.rb","description":"Simple ruby file","author":{"id":1,"name":"Administrator","username":"root","state":"active","avatar_url":"https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://localhost:3000/root"},"updated_at":"2018-02-06T12:49:29.104Z","created_at":"2017-11-28T08:20:18.071Z","project_id":9,"web_url":"http://localhost:3000/root/jira-test/snippets/50"}] \ No newline at end of file diff --git a/spec/fixtures/search_snippet_titles_results.json b/spec/fixtures/search_snippet_titles_results.json index 75fd62f..23afb07 100644 --- a/spec/fixtures/search_snippet_titles_results.json +++ b/spec/fixtures/search_snippet_titles_results.json @@ -1,20 +1 @@ -[ - { - "id": 50, - "title": "Sample file", - "file_name": "file.rb", - "description": "Simple ruby file", - "author": { - "id": 1, - "name": "Administrator", - "username": "root", - "state": "active", - "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://localhost:3000/root" - }, - "updated_at": "2018-02-06T12:49:29.104Z", - "created_at": "2017-11-28T08:20:18.071Z", - "project_id": 9, - "web_url": "http://localhost:3000/root/jira-test/snippets/50" - } -] +[{"id":50,"title":"Sample file","file_name":"file.rb","description":"Simple ruby file","author":{"id":1,"name":"Administrator","username":"root","state":"active","avatar_url":"https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://localhost:3000/root"},"updated_at":"2018-02-06T12:49:29.104Z","created_at":"2017-11-28T08:20:18.071Z","project_id":9,"web_url":"http://localhost:3000/root/jira-test/snippets/50"}] \ No newline at end of file diff --git a/spec/fixtures/search_wiki_blobs_results.json b/spec/fixtures/search_wiki_blobs_results.json index 801c785..0b6ef5f 100644 --- a/spec/fixtures/search_wiki_blobs_results.json +++ b/spec/fixtures/search_wiki_blobs_results.json @@ -1,12 +1 @@ - -[ - { - "basename": "home", - "data": "hello\n\nand bye\n\nend", - "filename": "home.md", - "id": null, - "ref": "master", - "startline": 5, - "project_id": 6 - } -] +[{"basename":"home","data":"hello\n\nand bye\n\nend","filename":"home.md","id":null,"ref":"master","startline":5,"project_id":6}] \ No newline at end of file diff --git a/spec/fixtures/shell_history.json b/spec/fixtures/shell_history.json deleted file mode 100644 index 8e4be8a..0000000 --- a/spec/fixtures/shell_history.json +++ /dev/null @@ -1,2 +0,0 @@ -party on, dudes -be excellent to each other diff --git a/spec/fixtures/shell_history.txt b/spec/fixtures/shell_history.txt new file mode 100644 index 0000000..8e4be8a --- /dev/null +++ b/spec/fixtures/shell_history.txt @@ -0,0 +1,2 @@ +party on, dudes +be excellent to each other diff --git a/spec/fixtures/sidekiq_compound_metrics.json b/spec/fixtures/sidekiq_compound_metrics.json index d900da5..2587493 100644 --- a/spec/fixtures/sidekiq_compound_metrics.json +++ b/spec/fixtures/sidekiq_compound_metrics.json @@ -1,36 +1 @@ -{ - "queues": { - "default": { - "backlog": 0, - "latency": 0 - } - }, - "processes": [ - { - "hostname": "gitlab.example.com", - "pid": 5649, - "tag": "gitlab", - "started_at": "2016-06-14T10:45:07.159-05:00", - "queues": [ - "post_receive", - "mailers", - "archive_repo", - "system_hook", - "project_web_hook", - "gitlab_shell", - "incoming_email", - "runner", - "common", - "default" - ], - "labels": [], - "concurrency": 25, - "busy": 0 - } - ], - "jobs": { - "processed": 2, - "failed": 0, - "enqueued": 0 - } -} +{"queues":{"default":{"backlog":0,"latency":0}},"processes":[{"hostname":"gitlab.example.com","pid":5649,"tag":"gitlab","started_at":"2016-06-14T10:45:07.159-05:00","queues":["post_receive","mailers","archive_repo","system_hook","project_web_hook","gitlab_shell","incoming_email","runner","common","default"],"labels":[],"concurrency":25,"busy":0}],"jobs":{"processed":2,"failed":0,"enqueued":0}} \ No newline at end of file diff --git a/spec/fixtures/sidekiq_job_stats.json b/spec/fixtures/sidekiq_job_stats.json index 3596e68..d84ebf5 100644 --- a/spec/fixtures/sidekiq_job_stats.json +++ b/spec/fixtures/sidekiq_job_stats.json @@ -1,7 +1 @@ -{ - "jobs": { - "processed": 2, - "failed": 0, - "enqueued": 0 - } -} +{"jobs":{"processed":2,"failed":0,"enqueued":0}} \ No newline at end of file diff --git a/spec/fixtures/sidekiq_process_metrics.json b/spec/fixtures/sidekiq_process_metrics.json index 404ffd2..372a949 100644 --- a/spec/fixtures/sidekiq_process_metrics.json +++ b/spec/fixtures/sidekiq_process_metrics.json @@ -1,25 +1 @@ -{ - "processes": [ - { - "hostname": "gitlab.example.com", - "pid": 5649, - "tag": "gitlab", - "started_at": "2016-06-14T10:45:07.159-05:00", - "queues": [ - "post_receive", - "mailers", - "archive_repo", - "system_hook", - "project_web_hook", - "gitlab_shell", - "incoming_email", - "runner", - "common", - "default" - ], - "labels": [], - "concurrency": 25, - "busy": 0 - } - ] -} +{"processes":[{"hostname":"gitlab.example.com","pid":5649,"tag":"gitlab","started_at":"2016-06-14T10:45:07.159-05:00","queues":["post_receive","mailers","archive_repo","system_hook","project_web_hook","gitlab_shell","incoming_email","runner","common","default"],"labels":[],"concurrency":25,"busy":0}]} \ No newline at end of file diff --git a/spec/fixtures/sidekiq_queue_metrics.json b/spec/fixtures/sidekiq_queue_metrics.json index 1079280..2ad03ec 100644 --- a/spec/fixtures/sidekiq_queue_metrics.json +++ b/spec/fixtures/sidekiq_queue_metrics.json @@ -1,8 +1 @@ -{ - "queues": { - "default": { - "backlog": 0, - "latency": 0 - } - } -} +{"queues":{"default":{"backlog":0,"latency":0}}} \ No newline at end of file diff --git a/spec/fixtures/snippet_award_emoji.json b/spec/fixtures/snippet_award_emoji.json index 666e296..b2e27e4 100644 --- a/spec/fixtures/snippet_award_emoji.json +++ b/spec/fixtures/snippet_award_emoji.json @@ -1,16 +1 @@ -{ - "id": 4, - "name": "blowfish", - "user": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://gitlab.example.com/root" - }, - "created_at": "2016-06-15T10:09:34.206Z", - "updated_at": "2016-06-15T10:09:34.206Z", - "awardable_id": 80, - "awardable_type": "Snippet" -} \ No newline at end of file +{"id":4,"name":"blowfish","user":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://gitlab.example.com/root"},"created_at":"2016-06-15T10:09:34.206Z","updated_at":"2016-06-15T10:09:34.206Z","awardable_id":80,"awardable_type":"Snippet"} \ No newline at end of file diff --git a/spec/fixtures/snippet_award_emojis.json b/spec/fixtures/snippet_award_emojis.json index cce5887..2357488 100644 --- a/spec/fixtures/snippet_award_emojis.json +++ b/spec/fixtures/snippet_award_emojis.json @@ -1,34 +1 @@ -[ - { - "id": 4, - "name": "1234", - "user": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://gitlab.example.com/root" - }, - "created_at": "2016-06-15T10:09:34.206Z", - "updated_at": "2016-06-15T10:09:34.206Z", - "awardable_id": 80, - "awardable_type": "Snippet" - }, - { - "id": 1, - "name": "microphone", - "user": { - "name": "User 4", - "username": "user4", - "id": 26, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/7e65550957227bd38fe2d7fbc6fd2f7b?s=80&d=identicon", - "web_url": "http://gitlab.example.com/user4" - }, - "created_at": "2016-06-15T10:09:34.177Z", - "updated_at": "2016-06-15T10:09:34.177Z", - "awardable_id": 80, - "awardable_type": "Snippet" - } -] \ No newline at end of file +[{"id":4,"name":"1234","user":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://gitlab.example.com/root"},"created_at":"2016-06-15T10:09:34.206Z","updated_at":"2016-06-15T10:09:34.206Z","awardable_id":80,"awardable_type":"Snippet"},{"id":1,"name":"microphone","user":{"name":"User 4","username":"user4","id":26,"state":"active","avatar_url":"http://www.gravatar.com/avatar/7e65550957227bd38fe2d7fbc6fd2f7b?s=80&d=identicon","web_url":"http://gitlab.example.com/user4"},"created_at":"2016-06-15T10:09:34.177Z","updated_at":"2016-06-15T10:09:34.177Z","awardable_id":80,"awardable_type":"Snippet"}] \ No newline at end of file diff --git a/spec/fixtures/snippet_user_agent_details.json b/spec/fixtures/snippet_user_agent_details.json new file mode 100644 index 0000000..ce0bb38 --- /dev/null +++ b/spec/fixtures/snippet_user_agent_details.json @@ -0,0 +1 @@ +{"user_agent":"AppleWebKit/537.36","ip_address":"127.0.0.1","akismet_submitted":false} \ No newline at end of file diff --git a/spec/fixtures/snippets.json b/spec/fixtures/snippets.json index 2645799..d210694 100644 --- a/spec/fixtures/snippets.json +++ b/spec/fixtures/snippets.json @@ -1 +1 @@ -[{"id":1,"title":"Rails Console ActionMailer","file_name":"mailer_test.rb","author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"expires_at":"2012-09-24T00:00:00Z","updated_at":"2012-09-17T09:51:42Z","created_at":"2012-09-17T09:51:42Z"}] +[{"id":1,"title":"Rails Console ActionMailer","file_name":"mailer_test.rb","author":{"id":1,"email":"john@example.com","name":"John Smith","blocked":false,"created_at":"2012-09-17T09:41:56Z"},"expires_at":"2012-09-24T00:00:00Z","updated_at":"2012-09-17T09:51:42Z","created_at":"2012-09-17T09:51:42Z"}] \ No newline at end of file diff --git a/spec/fixtures/system_hook.json b/spec/fixtures/system_hook.json index 0028b7a..0c50b2c 100644 --- a/spec/fixtures/system_hook.json +++ b/spec/fixtures/system_hook.json @@ -1 +1 @@ -{"id": 3, "url": "http://example.com/hook", "created_at": "2013-10-02T10:15:31Z"} +{"id":3,"url":"http://example.com/hook","created_at":"2013-10-02T10:15:31Z"} \ No newline at end of file diff --git a/spec/fixtures/system_hooks.json b/spec/fixtures/system_hooks.json index 2b58791..d33590b 100644 --- a/spec/fixtures/system_hooks.json +++ b/spec/fixtures/system_hooks.json @@ -1 +1 @@ -[{"id": 3, "url": "http://example.com/hook", "created_at": "2013-10-02T10:15:31Z"}] +[{"id":3,"url":"http://example.com/hook","created_at":"2013-10-02T10:15:31Z"}] \ No newline at end of file diff --git a/spec/fixtures/tag.json b/spec/fixtures/tag.json index 1a95113..96fef62 100644 --- a/spec/fixtures/tag.json +++ b/spec/fixtures/tag.json @@ -1 +1 @@ -{"name":"0.0.1","message":null,"commit":{"id":"c260c39f4d73d9087482d29b4d7a88bec834a3d1","message":"rubocop 100%","parent_ids":["b55be4dc5c052fb0058ef1ea96acd5e4e37f1bed"],"authored_date":"2016-04-29T16:11:32.000+01:00","author_name":"Bob Bloggs","author_email":"bob.bloggs@nowhere","committed_date":"2016-04-29T16:11:32.000+01:00","committer_name":"Bob Bloggs","committer_email":"bob.bloggs@nowhere"},"release":null} +{"name":"0.0.1","message":null,"commit":{"id":"c260c39f4d73d9087482d29b4d7a88bec834a3d1","message":"rubocop 100%","parent_ids":["b55be4dc5c052fb0058ef1ea96acd5e4e37f1bed"],"authored_date":"2016-04-29T16:11:32.000+01:00","author_name":"Bob Bloggs","author_email":"bob.bloggs@nowhere","committed_date":"2016-04-29T16:11:32.000+01:00","committer_name":"Bob Bloggs","committer_email":"bob.bloggs@nowhere"},"release":null} \ No newline at end of file diff --git a/spec/fixtures/tag_create.json b/spec/fixtures/tag_create.json index 60e599b..6ddbfd1 100644 --- a/spec/fixtures/tag_create.json +++ b/spec/fixtures/tag_create.json @@ -1 +1 @@ -{"name":"0.0.1","message":"this tag is annotated","commit":{"id":"3d3f9288d70f75aa55ea495a3ed5948a628fce11","message":"Added README.md\n","parent_ids":[],"authored_date":"2016-05-25T11:23:07.000+01:00","author_name":"Bob Bloggs","author_email":"bob.bloggs@nowhere","committed_date":"2016-05-25T11:23:07.000+01:00","committer_name":"Bob Bloggs","committer_email":"bob.bloggs@nowhere"},"release":{"tag_name":"0.0.1","description":"and it has release notes"}} +{"name":"0.0.1","message":"this tag is annotated","commit":{"id":"3d3f9288d70f75aa55ea495a3ed5948a628fce11","message":"Added README.md\n","parent_ids":[],"authored_date":"2016-05-25T11:23:07.000+01:00","author_name":"Bob Bloggs","author_email":"bob.bloggs@nowhere","committed_date":"2016-05-25T11:23:07.000+01:00","committer_name":"Bob Bloggs","committer_email":"bob.bloggs@nowhere"},"release":{"tag_name":"0.0.1","description":"and it has release notes"}} \ No newline at end of file diff --git a/spec/fixtures/tag_create_with_description.json b/spec/fixtures/tag_create_with_description.json index 76ce879..7099eb4 100644 --- a/spec/fixtures/tag_create_with_description.json +++ b/spec/fixtures/tag_create_with_description.json @@ -1 +1 @@ -{"name":"0.0.1","message":"this tag is annotated","commit":{"id":"7225ddbe28add8d168e3175266830ab8e6aabdcc","message":"Readme updated","parent_ids":["c3f101968138aa9b09a92c8b6399b3269d17865e"],"authored_date":"2016-03-07T13:38:07.000+00:00","author_name":"Bob Bloggs","author_email":"bob.bloggs@nowhere","committed_date":"2016-03-07T13:38:07.000+00:00","committer_name":"Bob Bloggs","committer_email":"bob.bloggs@nowhere"},"release":null} +{"name":"0.0.1","message":"this tag is annotated","commit":{"id":"7225ddbe28add8d168e3175266830ab8e6aabdcc","message":"Readme updated","parent_ids":["c3f101968138aa9b09a92c8b6399b3269d17865e"],"authored_date":"2016-03-07T13:38:07.000+00:00","author_name":"Bob Bloggs","author_email":"bob.bloggs@nowhere","committed_date":"2016-03-07T13:38:07.000+00:00","committer_name":"Bob Bloggs","committer_email":"bob.bloggs@nowhere"},"release":null} \ No newline at end of file diff --git a/spec/fixtures/tag_delete.json b/spec/fixtures/tag_delete.json index 9eb1f86..b0ce039 100644 --- a/spec/fixtures/tag_delete.json +++ b/spec/fixtures/tag_delete.json @@ -1 +1 @@ -{"tag_name":"0.0.1"} +{"tag_name":"0.0.1"} \ No newline at end of file diff --git a/spec/fixtures/tags.json b/spec/fixtures/tags.json index 32fd6b1..a658e31 100644 --- a/spec/fixtures/tags.json +++ b/spec/fixtures/tags.json @@ -1 +1 @@ -[{"name":"0.0.2","message":null,"commit":{"id":"c260c39f4d73d9087482d29b4d7a88bec834a3d1","message":"rubocop 100%","parent_ids":["b55be4dc5c052fb0058ef1ea96acd5e4e37f1bed"],"authored_date":"2016-04-29T16:11:32.000+01:00","author_name":"Bob Bloggs","author_email":"bob.bloggs@nowhere","committed_date":"2016-04-29T16:11:32.000+01:00","committer_name":"Bob Bloggs","committer_email":"bob.bloggs@nowhere"},"release":null},{"name":"0.0.1","message":null,"commit":{"id":"c260c39f4d73d9087482d29b4d7a88bec834a3d1","message":"rubocop 100%","parent_ids":["b55be4dc5c052fb0058ef1ea96acd5e4e37f1bed"],"authored_date":"2016-04-29T16:11:32.000+01:00","author_name":"Bob Bloggs","author_email":"bob.bloggs@nowhere","committed_date":"2016-04-29T16:11:32.000+01:00","committer_name":"Bob Bloggs","committer_email":"bob.bloggs@nowhere"},"release":null}] +[{"name":"0.0.2","message":null,"commit":{"id":"c260c39f4d73d9087482d29b4d7a88bec834a3d1","message":"rubocop 100%","parent_ids":["b55be4dc5c052fb0058ef1ea96acd5e4e37f1bed"],"authored_date":"2016-04-29T16:11:32.000+01:00","author_name":"Bob Bloggs","author_email":"bob.bloggs@nowhere","committed_date":"2016-04-29T16:11:32.000+01:00","committer_name":"Bob Bloggs","committer_email":"bob.bloggs@nowhere"},"release":null},{"name":"0.0.1","message":null,"commit":{"id":"c260c39f4d73d9087482d29b4d7a88bec834a3d1","message":"rubocop 100%","parent_ids":["b55be4dc5c052fb0058ef1ea96acd5e4e37f1bed"],"authored_date":"2016-04-29T16:11:32.000+01:00","author_name":"Bob Bloggs","author_email":"bob.bloggs@nowhere","committed_date":"2016-04-29T16:11:32.000+01:00","committer_name":"Bob Bloggs","committer_email":"bob.bloggs@nowhere"},"release":null}] \ No newline at end of file diff --git a/spec/fixtures/team_member.json b/spec/fixtures/team_member.json index 3009696..0874275 100644 --- a/spec/fixtures/team_member.json +++ b/spec/fixtures/team_member.json @@ -1,10 +1 @@ -{ - "id": 1, - "username": "john_smith", - "name": "John Smith", - "state": "active", - "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon", - "web_url": "http://192.168.1.8:3000/root", - "expires_at": "2018-12-31T00:00:00Z", - "access_level": 40 -} \ No newline at end of file +{"id":1,"username":"john_smith","name":"John Smith","state":"active","avatar_url":"https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon","web_url":"http://192.168.1.8:3000/root","expires_at":"2018-12-31T00:00:00Z","access_level":40} \ No newline at end of file diff --git a/spec/fixtures/todo.json b/spec/fixtures/todo.json index deff6fb..ea0a3c4 100644 --- a/spec/fixtures/todo.json +++ b/spec/fixtures/todo.json @@ -1,73 +1 @@ -{ - "id": 102, - "project": { - "id": 2, - "name": "Gitlab Ce", - "name_with_namespace": "Gitlab Org / Gitlab Ce", - "path": "gitlab-ce", - "path_with_namespace": "gitlab-org/gitlab-ce" - }, - "author": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "https://gitlab.example.com/root" - }, - "action_name": "marked", - "target_type": "MergeRequest", - "target": { - "id": 34, - "iid": 7, - "project_id": 2, - "title": "Dolores in voluptatem tenetur praesentium omnis repellendus voluptatem quaerat.", - "description": "Et ea et omnis illum cupiditate. Dolor aspernatur tenetur ducimus facilis est nihil. Quo esse cupiditate molestiae illo corrupti qui quidem dolor.", - "state": "opened", - "created_at": "2016-06-17T07:49:24.419Z", - "updated_at": "2016-06-17T07:52:43.484Z", - "target_branch": "tutorials_git_tricks", - "source_branch": "DNSBL_docs", - "upvotes": 0, - "downvotes": 0, - "author": { - "name": "Maxie Medhurst", - "username": "craig_rutherford", - "id": 12, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/a0d477b3ea21970ce6ffcbb817b0b435?s=80&d=identicon", - "web_url": "https://gitlab.example.com/craig_rutherford" - }, - "assignee": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "https://gitlab.example.com/root" - }, - "source_project_id": 2, - "target_project_id": 2, - "labels": [], - "work_in_progress": false, - "milestone": { - "id": 32, - "iid": 2, - "project_id": 2, - "title": "v1.0", - "description": "Assumenda placeat ea voluptatem voluptate qui.", - "state": "active", - "created_at": "2016-06-17T07:47:34.163Z", - "updated_at": "2016-06-17T07:47:34.163Z", - "due_date": null - }, - "merge_when_pipeline_succeeds": false, - "merge_status": "cannot_be_merged", - "subscribed": true, - "user_notes_count": 7 - }, - "target_url": "https://gitlab.example.com/gitlab-org/gitlab-ce/merge_requests/7", - "body": "Dolores in voluptatem tenetur praesentium omnis repellendus voluptatem quaerat.", - "state": "done", - "created_at": "2016-06-17T07:52:35.225Z" -} \ No newline at end of file +{"id":102,"project":{"id":2,"name":"Gitlab Ce","name_with_namespace":"Gitlab Org / Gitlab Ce","path":"gitlab-ce","path_with_namespace":"gitlab-org/gitlab-ce"},"author":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"https://gitlab.example.com/root"},"action_name":"marked","target_type":"MergeRequest","target":{"id":34,"iid":7,"project_id":2,"title":"Dolores in voluptatem tenetur praesentium omnis repellendus voluptatem quaerat.","description":"Et ea et omnis illum cupiditate. Dolor aspernatur tenetur ducimus facilis est nihil. Quo esse cupiditate molestiae illo corrupti qui quidem dolor.","state":"opened","created_at":"2016-06-17T07:49:24.419Z","updated_at":"2016-06-17T07:52:43.484Z","target_branch":"tutorials_git_tricks","source_branch":"DNSBL_docs","upvotes":0,"downvotes":0,"author":{"name":"Maxie Medhurst","username":"craig_rutherford","id":12,"state":"active","avatar_url":"http://www.gravatar.com/avatar/a0d477b3ea21970ce6ffcbb817b0b435?s=80&d=identicon","web_url":"https://gitlab.example.com/craig_rutherford"},"assignee":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"https://gitlab.example.com/root"},"source_project_id":2,"target_project_id":2,"labels":[],"work_in_progress":false,"milestone":{"id":32,"iid":2,"project_id":2,"title":"v1.0","description":"Assumenda placeat ea voluptatem voluptate qui.","state":"active","created_at":"2016-06-17T07:47:34.163Z","updated_at":"2016-06-17T07:47:34.163Z","due_date":null},"merge_when_pipeline_succeeds":false,"merge_status":"cannot_be_merged","subscribed":true,"user_notes_count":7},"target_url":"https://gitlab.example.com/gitlab-org/gitlab-ce/merge_requests/7","body":"Dolores in voluptatem tenetur praesentium omnis repellendus voluptatem quaerat.","state":"done","created_at":"2016-06-17T07:52:35.225Z"} \ No newline at end of file diff --git a/spec/fixtures/todos.json b/spec/fixtures/todos.json index 98a7db3..78f0e4f 100644 --- a/spec/fixtures/todos.json +++ b/spec/fixtures/todos.json @@ -1,148 +1 @@ -[ - { - "id": 102, - "project": { - "id": 2, - "name": "Gitlab Ce", - "name_with_namespace": "Gitlab Org / Gitlab Ce", - "path": "gitlab-ce", - "path_with_namespace": "gitlab-org/gitlab-ce" - }, - "author": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "https://gitlab.example.com/root" - }, - "action_name": "marked", - "target_type": "MergeRequest", - "target": { - "id": 34, - "iid": 7, - "project_id": 2, - "title": "Dolores in voluptatem tenetur praesentium omnis repellendus voluptatem quaerat.", - "description": "Et ea et omnis illum cupiditate. Dolor aspernatur tenetur ducimus facilis est nihil. Quo esse cupiditate molestiae illo corrupti qui quidem dolor.", - "state": "opened", - "created_at": "2016-06-17T07:49:24.419Z", - "updated_at": "2016-06-17T07:52:43.484Z", - "target_branch": "tutorials_git_tricks", - "source_branch": "DNSBL_docs", - "upvotes": 0, - "downvotes": 0, - "author": { - "name": "Maxie Medhurst", - "username": "craig_rutherford", - "id": 12, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/a0d477b3ea21970ce6ffcbb817b0b435?s=80&d=identicon", - "web_url": "https://gitlab.example.com/craig_rutherford" - }, - "assignee": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "https://gitlab.example.com/root" - }, - "source_project_id": 2, - "target_project_id": 2, - "labels": [], - "work_in_progress": false, - "milestone": { - "id": 32, - "iid": 2, - "project_id": 2, - "title": "v1.0", - "description": "Assumenda placeat ea voluptatem voluptate qui.", - "state": "active", - "created_at": "2016-06-17T07:47:34.163Z", - "updated_at": "2016-06-17T07:47:34.163Z", - "due_date": null - }, - "merge_when_pipeline_succeeds": false, - "merge_status": "cannot_be_merged", - "subscribed": true, - "user_notes_count": 7 - }, - "target_url": "https://gitlab.example.com/gitlab-org/gitlab-ce/merge_requests/7", - "body": "Dolores in voluptatem tenetur praesentium omnis repellendus voluptatem quaerat.", - "state": "pending", - "created_at": "2016-06-17T07:52:35.225Z" - }, - { - "id": 98, - "project": { - "id": 2, - "name": "Gitlab Ce", - "name_with_namespace": "Gitlab Org / Gitlab Ce", - "path": "gitlab-ce", - "path_with_namespace": "gitlab-org/gitlab-ce" - }, - "author": { - "name": "Maxie Medhurst", - "username": "craig_rutherford", - "id": 12, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/a0d477b3ea21970ce6ffcbb817b0b435?s=80&d=identicon", - "web_url": "https://gitlab.example.com/craig_rutherford" - }, - "action_name": "assigned", - "target_type": "MergeRequest", - "target": { - "id": 34, - "iid": 7, - "project_id": 2, - "title": "Dolores in voluptatem tenetur praesentium omnis repellendus voluptatem quaerat.", - "description": "Et ea et omnis illum cupiditate. Dolor aspernatur tenetur ducimus facilis est nihil. Quo esse cupiditate molestiae illo corrupti qui quidem dolor.", - "state": "opened", - "created_at": "2016-06-17T07:49:24.419Z", - "updated_at": "2016-06-17T07:52:43.484Z", - "target_branch": "tutorials_git_tricks", - "source_branch": "DNSBL_docs", - "upvotes": 0, - "downvotes": 0, - "author": { - "name": "Maxie Medhurst", - "username": "craig_rutherford", - "id": 12, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/a0d477b3ea21970ce6ffcbb817b0b435?s=80&d=identicon", - "web_url": "https://gitlab.example.com/craig_rutherford" - }, - "assignee": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "https://gitlab.example.com/root" - }, - "source_project_id": 2, - "target_project_id": 2, - "labels": [], - "work_in_progress": false, - "milestone": { - "id": 32, - "iid": 2, - "project_id": 2, - "title": "v1.0", - "description": "Assumenda placeat ea voluptatem voluptate qui.", - "state": "active", - "created_at": "2016-06-17T07:47:34.163Z", - "updated_at": "2016-06-17T07:47:34.163Z", - "due_date": null - }, - "merge_when_pipeline_succeeds": false, - "merge_status": "cannot_be_merged", - "subscribed": true, - "user_notes_count": 7 - }, - "target_url": "https://gitlab.example.com/gitlab-org/gitlab-ce/merge_requests/7", - "body": "Dolores in voluptatem tenetur praesentium omnis repellendus voluptatem quaerat.", - "state": "pending", - "created_at": "2016-06-17T07:49:24.624Z" - } -] \ No newline at end of file +[{"id":102,"project":{"id":2,"name":"Gitlab Ce","name_with_namespace":"Gitlab Org / Gitlab Ce","path":"gitlab-ce","path_with_namespace":"gitlab-org/gitlab-ce"},"author":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"https://gitlab.example.com/root"},"action_name":"marked","target_type":"MergeRequest","target":{"id":34,"iid":7,"project_id":2,"title":"Dolores in voluptatem tenetur praesentium omnis repellendus voluptatem quaerat.","description":"Et ea et omnis illum cupiditate. Dolor aspernatur tenetur ducimus facilis est nihil. Quo esse cupiditate molestiae illo corrupti qui quidem dolor.","state":"opened","created_at":"2016-06-17T07:49:24.419Z","updated_at":"2016-06-17T07:52:43.484Z","target_branch":"tutorials_git_tricks","source_branch":"DNSBL_docs","upvotes":0,"downvotes":0,"author":{"name":"Maxie Medhurst","username":"craig_rutherford","id":12,"state":"active","avatar_url":"http://www.gravatar.com/avatar/a0d477b3ea21970ce6ffcbb817b0b435?s=80&d=identicon","web_url":"https://gitlab.example.com/craig_rutherford"},"assignee":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"https://gitlab.example.com/root"},"source_project_id":2,"target_project_id":2,"labels":[],"work_in_progress":false,"milestone":{"id":32,"iid":2,"project_id":2,"title":"v1.0","description":"Assumenda placeat ea voluptatem voluptate qui.","state":"active","created_at":"2016-06-17T07:47:34.163Z","updated_at":"2016-06-17T07:47:34.163Z","due_date":null},"merge_when_pipeline_succeeds":false,"merge_status":"cannot_be_merged","subscribed":true,"user_notes_count":7},"target_url":"https://gitlab.example.com/gitlab-org/gitlab-ce/merge_requests/7","body":"Dolores in voluptatem tenetur praesentium omnis repellendus voluptatem quaerat.","state":"pending","created_at":"2016-06-17T07:52:35.225Z"},{"id":98,"project":{"id":2,"name":"Gitlab Ce","name_with_namespace":"Gitlab Org / Gitlab Ce","path":"gitlab-ce","path_with_namespace":"gitlab-org/gitlab-ce"},"author":{"name":"Maxie Medhurst","username":"craig_rutherford","id":12,"state":"active","avatar_url":"http://www.gravatar.com/avatar/a0d477b3ea21970ce6ffcbb817b0b435?s=80&d=identicon","web_url":"https://gitlab.example.com/craig_rutherford"},"action_name":"assigned","target_type":"MergeRequest","target":{"id":34,"iid":7,"project_id":2,"title":"Dolores in voluptatem tenetur praesentium omnis repellendus voluptatem quaerat.","description":"Et ea et omnis illum cupiditate. Dolor aspernatur tenetur ducimus facilis est nihil. Quo esse cupiditate molestiae illo corrupti qui quidem dolor.","state":"opened","created_at":"2016-06-17T07:49:24.419Z","updated_at":"2016-06-17T07:52:43.484Z","target_branch":"tutorials_git_tricks","source_branch":"DNSBL_docs","upvotes":0,"downvotes":0,"author":{"name":"Maxie Medhurst","username":"craig_rutherford","id":12,"state":"active","avatar_url":"http://www.gravatar.com/avatar/a0d477b3ea21970ce6ffcbb817b0b435?s=80&d=identicon","web_url":"https://gitlab.example.com/craig_rutherford"},"assignee":{"name":"Administrator","username":"root","id":1,"state":"active","avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"https://gitlab.example.com/root"},"source_project_id":2,"target_project_id":2,"labels":[],"work_in_progress":false,"milestone":{"id":32,"iid":2,"project_id":2,"title":"v1.0","description":"Assumenda placeat ea voluptatem voluptate qui.","state":"active","created_at":"2016-06-17T07:47:34.163Z","updated_at":"2016-06-17T07:47:34.163Z","due_date":null},"merge_when_pipeline_succeeds":false,"merge_status":"cannot_be_merged","subscribed":true,"user_notes_count":7},"target_url":"https://gitlab.example.com/gitlab-org/gitlab-ce/merge_requests/7","body":"Dolores in voluptatem tenetur praesentium omnis repellendus voluptatem quaerat.","state":"pending","created_at":"2016-06-17T07:49:24.624Z"}] \ No newline at end of file diff --git a/spec/fixtures/transfer_project.json b/spec/fixtures/transfer_project.json index 27112a1..b794c91 100644 --- a/spec/fixtures/transfer_project.json +++ b/spec/fixtures/transfer_project.json @@ -1,59 +1 @@ -{ - "id": 1, - "description": null, - "name": "test", - "name_with_namespace": "Yolo / test", - "path": "test", - "path_with_namespace": "yolo/test", - "created_at": "2018-10-26T21:14:12.851Z", - "default_branch": "master", - "tag_list": [], - "ssh_url_to_repo": "git@gitlab.com:yolo/test.git", - "http_url_to_repo": "https://gitlab.com/yolo/test.git", - "web_url": "https://gitlab.com/yolo/test", - "readme_url": null, - "avatar_url": null, - "star_count": 0, - "forks_count": 0, - "last_activity_at": "2018-10-26T21:14:12.851Z", - "namespace": { - "id": 2, - "name": "Yolo", - "path": "yolo", - "kind": "group", - "full_path": "yolo", - "parent_id": null - }, - "_links": { - "self": "https://gitlab.com/api/v4/projects/1", - "issues": "https://gitlab.com/api/v4/projects/1/issues", - "merge_requests": "https://gitlab.com/api/v4/projects/1/merge_requests", - "repo_branches": "https://gitlab.com/api/v4/projects/1/repository/branches", - "labels": "https://gitlab.com/api/v4/projects/1/labels", - "events": "https://gitlab.com/api/v4/projects/1/events", - "members": "https://gitlab.com/api/v4/projects/1/members" - }, - "archived": false, - "visibility": "private", - "resolve_outdated_diff_discussions": false, - "container_registry_enabled": true, - "issues_enabled": true, - "merge_requests_enabled": true, - "wiki_enabled": true, - "jobs_enabled": true, - "snippets_enabled": true, - "shared_runners_enabled": true, - "lfs_enabled": true, - "creator_id": 42, - "import_status": "none", - "open_issues_count": 0, - "public_jobs": true, - "ci_config_path": null, - "shared_with_groups": [], - "only_allow_merge_if_pipeline_succeeds": false, - "request_access_enabled": false, - "only_allow_merge_if_all_discussions_are_resolved": false, - "printing_merge_request_link_enabled": true, - "merge_method": "merge", - "mirror": false -} +{"id":1,"description":null,"name":"test","name_with_namespace":"Yolo / test","path":"test","path_with_namespace":"yolo/test","created_at":"2018-10-26T21:14:12.851Z","default_branch":"master","tag_list":[],"ssh_url_to_repo":"git@gitlab.com:yolo/test.git","http_url_to_repo":"https://gitlab.com/yolo/test.git","web_url":"https://gitlab.com/yolo/test","readme_url":null,"avatar_url":null,"star_count":0,"forks_count":0,"last_activity_at":"2018-10-26T21:14:12.851Z","namespace":{"id":2,"name":"Yolo","path":"yolo","kind":"group","full_path":"yolo","parent_id":null},"_links":{"self":"https://gitlab.com/api/v4/projects/1","issues":"https://gitlab.com/api/v4/projects/1/issues","merge_requests":"https://gitlab.com/api/v4/projects/1/merge_requests","repo_branches":"https://gitlab.com/api/v4/projects/1/repository/branches","labels":"https://gitlab.com/api/v4/projects/1/labels","events":"https://gitlab.com/api/v4/projects/1/events","members":"https://gitlab.com/api/v4/projects/1/members"},"archived":false,"visibility":"private","resolve_outdated_diff_discussions":false,"container_registry_enabled":true,"issues_enabled":true,"merge_requests_enabled":true,"wiki_enabled":true,"jobs_enabled":true,"snippets_enabled":true,"shared_runners_enabled":true,"lfs_enabled":true,"creator_id":42,"import_status":"none","open_issues_count":0,"public_jobs":true,"ci_config_path":null,"shared_with_groups":[],"only_allow_merge_if_pipeline_succeeds":false,"request_access_enabled":false,"only_allow_merge_if_all_discussions_are_resolved":false,"printing_merge_request_link_enabled":true,"merge_method":"merge","mirror":false} \ No newline at end of file diff --git a/spec/fixtures/tree.json b/spec/fixtures/tree.json index fe734e9..ee328ac 100644 --- a/spec/fixtures/tree.json +++ b/spec/fixtures/tree.json @@ -1 +1 @@ -[{"id":"a2cc3b0ffc1c7d06fab5642eb99ea387b57f22f8","name":"app","type":"tree","mode":"040000"},{"id":"63164bdfbc11b69f1032fbe35da0f1e9c18af2fd","name":"bin","type":"tree","mode":"040000"},{"id":"2cf682191722f20f00a371d7da58f6a35701c11d","name":"config","type":"tree","mode":"040000"},{"id":"2e76c8c1bbc46bcc762788a432d802d65a534a28","name":"db","type":"tree","mode":"040000"},{"id":"767cfc8360b50c50bb5bdde288b96a84e3efa66e","name":"doc","type":"tree","mode":"040000"},{"id":"3fa0d1024f5e372bf9e43d1dac47bd1e95ab0858","name":"lib","type":"tree","mode":"040000"},{"id":"4e79d0ac6225844602a1b9273b26d8996f777bf2","name":"log","type":"tree","mode":"040000"},{"id":"7cb7f593c6914d20fa6cc4ab5a7c34337a50e97c","name":"public","type":"tree","mode":"040000"},{"id":"d97169eef778f3cd1d4d94cbe3415b3166d15c71","name":"spec","type":"tree","mode":"040000"},{"id":"97c97da29fa97e2158cfdcdcb042af9da0bc3de4","name":"vendor","type":"tree","mode":"040000"},{"id":"d316760e4746059c117007507594a1d75b47df38","name":".gitignore","type":"blob","mode":"100644"},{"id":"f2e7cd477536f18d8e939faf452930b59a27063d","name":".travis.yml","type":"blob","mode":"100644"},{"id":"d5c68bda5f0fe703a80906f66cfe537ca807a5a6","name":"Capfile","type":"blob","mode":"100644"},{"id":"8f46eac03c6cd7ce03cda7ec3d78afdc6971e4c0","name":"Gemfile","type":"blob","mode":"100644"},{"id":"5e260573173b51eaa073661d7914fb0e935ee27f","name":"Gemfile.lock","type":"blob","mode":"100644"},{"id":"e57032f682b69f14243c09d66a0892a03b4c6045","name":"Procfile","type":"blob","mode":"100644"},{"id":"905e96da839dad683dfcf4e202bf1e030390b964","name":"README.md","type":"blob","mode":"100644"},{"id":"24a16769fd94926350a59f7b1cbd78e9e2674c57","name":"Rakefile","type":"blob","mode":"100644"},{"id":"b384d6d57c6a775a9b6bc35d79ad7f03e673a233","name":"config.ru","type":"blob","mode":"100644"}] +[{"id":"a2cc3b0ffc1c7d06fab5642eb99ea387b57f22f8","name":"app","type":"tree","mode":"040000"},{"id":"63164bdfbc11b69f1032fbe35da0f1e9c18af2fd","name":"bin","type":"tree","mode":"040000"},{"id":"2cf682191722f20f00a371d7da58f6a35701c11d","name":"config","type":"tree","mode":"040000"},{"id":"2e76c8c1bbc46bcc762788a432d802d65a534a28","name":"db","type":"tree","mode":"040000"},{"id":"767cfc8360b50c50bb5bdde288b96a84e3efa66e","name":"doc","type":"tree","mode":"040000"},{"id":"3fa0d1024f5e372bf9e43d1dac47bd1e95ab0858","name":"lib","type":"tree","mode":"040000"},{"id":"4e79d0ac6225844602a1b9273b26d8996f777bf2","name":"log","type":"tree","mode":"040000"},{"id":"7cb7f593c6914d20fa6cc4ab5a7c34337a50e97c","name":"public","type":"tree","mode":"040000"},{"id":"d97169eef778f3cd1d4d94cbe3415b3166d15c71","name":"spec","type":"tree","mode":"040000"},{"id":"97c97da29fa97e2158cfdcdcb042af9da0bc3de4","name":"vendor","type":"tree","mode":"040000"},{"id":"d316760e4746059c117007507594a1d75b47df38","name":".gitignore","type":"blob","mode":"100644"},{"id":"f2e7cd477536f18d8e939faf452930b59a27063d","name":".travis.yml","type":"blob","mode":"100644"},{"id":"d5c68bda5f0fe703a80906f66cfe537ca807a5a6","name":"Capfile","type":"blob","mode":"100644"},{"id":"8f46eac03c6cd7ce03cda7ec3d78afdc6971e4c0","name":"Gemfile","type":"blob","mode":"100644"},{"id":"5e260573173b51eaa073661d7914fb0e935ee27f","name":"Gemfile.lock","type":"blob","mode":"100644"},{"id":"e57032f682b69f14243c09d66a0892a03b4c6045","name":"Procfile","type":"blob","mode":"100644"},{"id":"905e96da839dad683dfcf4e202bf1e030390b964","name":"README.md","type":"blob","mode":"100644"},{"id":"24a16769fd94926350a59f7b1cbd78e9e2674c57","name":"Rakefile","type":"blob","mode":"100644"},{"id":"b384d6d57c6a775a9b6bc35d79ad7f03e673a233","name":"config.ru","type":"blob","mode":"100644"}] \ No newline at end of file diff --git a/spec/fixtures/trigger.json b/spec/fixtures/trigger.json index d0657df..1fa6f33 100644 --- a/spec/fixtures/trigger.json +++ b/spec/fixtures/trigger.json @@ -1,10 +1 @@ -{ - "id": 10, - "description": "my trigger", - "created_at": "2016-01-07T09:53:58.235Z", - "deleted_at": null, - "last_used": null, - "token": "6d056f63e50fe6f8c5f8f4aa10edb7", - "updated_at": "2016-01-07T09:53:58.235Z", - "owner": null -} +{"id":10,"description":"my trigger","created_at":"2016-01-07T09:53:58.235Z","deleted_at":null,"last_used":null,"token":"6d056f63e50fe6f8c5f8f4aa10edb7","updated_at":"2016-01-07T09:53:58.235Z","owner":null} \ No newline at end of file diff --git a/spec/fixtures/triggers.json b/spec/fixtures/triggers.json index 35218b5..f3cee2f 100644 --- a/spec/fixtures/triggers.json +++ b/spec/fixtures/triggers.json @@ -1,12 +1 @@ -[ - { - "id": 10, - "description": "my trigger", - "created_at": "2016-01-07T09:53:58.235Z", - "deleted_at": null, - "last_used": null, - "token": "6d056f63e50fe6f8c5f8f4aa10edb7", - "updated_at": "2016-01-07T09:53:58.235Z", - "owner": null - } -] +[{"id":10,"description":"my trigger","created_at":"2016-01-07T09:53:58.235Z","deleted_at":null,"last_used":null,"token":"6d056f63e50fe6f8c5f8f4aa10edb7","updated_at":"2016-01-07T09:53:58.235Z","owner":null}] \ No newline at end of file diff --git a/spec/fixtures/updated_board.json b/spec/fixtures/updated_board.json index 485ddff..17e6308 100644 --- a/spec/fixtures/updated_board.json +++ b/spec/fixtures/updated_board.json @@ -1,52 +1 @@ - { - "id": 1, - "project": { - "id": 5, - "name": "Diaspora Project Site", - "name_with_namespace": "Diaspora / Diaspora Project Site", - "path": "diaspora-project-site", - "path_with_namespace": "diaspora/diaspora-project-site", - "created_at": "2018-07-03T05:48:49.982Z", - "default_branch": null, - "tag_list": [], - "ssh_url_to_repo": "ssh://user@example.com/diaspora/diaspora-project-site.git", - "http_url_to_repo": "http://example.com/diaspora/diaspora-project-site.git", - "web_url": "http://example.com/diaspora/diaspora-project-site", - "readme_url": null, - "avatar_url": null, - "star_count": 0, - "forks_count": 0, - "last_activity_at": "2018-07-03T05:48:49.982Z" - }, - "lists": [], - "name": "new_name", - "group": null, - "milestone": { - "id": 43, - "iid": 1, - "project_id": 15, - "title": "Milestone 1", - "description": "Milestone 1 desc", - "state": "active", - "created_at": "2018-07-03T06:36:42.618Z", - "updated_at": "2018-07-03T06:36:42.618Z", - "due_date": null, - "start_date": null, - "web_url": "http://example.com/root/board1/milestones/1" - }, - "assignee": { - "id": 1, - "name": "Administrator", - "username": "root", - "state": "active", - "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://example.com/root" - }, - "labels": [{ - "id": 10, - "name": "Doing", - "color": "#5CB85C", - "description": null - }], - "weight": 4 - } +{"id":1,"project":{"id":5,"name":"Diaspora Project Site","name_with_namespace":"Diaspora / Diaspora Project Site","path":"diaspora-project-site","path_with_namespace":"diaspora/diaspora-project-site","created_at":"2018-07-03T05:48:49.982Z","default_branch":null,"tag_list":[],"ssh_url_to_repo":"ssh://user@example.com/diaspora/diaspora-project-site.git","http_url_to_repo":"http://example.com/diaspora/diaspora-project-site.git","web_url":"http://example.com/diaspora/diaspora-project-site","readme_url":null,"avatar_url":null,"star_count":0,"forks_count":0,"last_activity_at":"2018-07-03T05:48:49.982Z"},"lists":[],"name":"new_name","group":null,"milestone":{"id":43,"iid":1,"project_id":15,"title":"Milestone 1","description":"Milestone 1 desc","state":"active","created_at":"2018-07-03T06:36:42.618Z","updated_at":"2018-07-03T06:36:42.618Z","due_date":null,"start_date":null,"web_url":"http://example.com/root/board1/milestones/1"},"assignee":{"id":1,"name":"Administrator","username":"root","state":"active","avatar_url":"https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://example.com/root"},"labels":[{"id":10,"name":"Doing","color":"#5CB85C","description":null}],"weight":4} \ No newline at end of file diff --git a/spec/fixtures/updated_group_board.json b/spec/fixtures/updated_group_board.json index 9cd4d3f..b789df9 100644 --- a/spec/fixtures/updated_group_board.json +++ b/spec/fixtures/updated_group_board.json @@ -1,64 +1 @@ - { - "id": 1, - "project": null, - "lists": [], - "name": "new_name", - "group": { - "id": 5, - "name": "Documentcloud", - "path": "documentcloud", - "owner_id": null, - "created_at": "2018-05-07T06:52:45.788Z", - "updated_at": "2018-07-03T06:48:17.005Z", - "description": "Consequatur aut a aperiam ut.", - "avatar": { - "url": null - }, - "membership_lock": false, - "share_with_group_lock": false, - "visibility_level": 20, - "request_access_enabled": false, - "ldap_sync_status": "ready", - "ldap_sync_error": null, - "ldap_sync_last_update_at": null, - "ldap_sync_last_successful_update_at": null, - "ldap_sync_last_sync_at": null, - "lfs_enabled": null, - "parent_id": null, - "shared_runners_minutes_limit": null, - "repository_size_limit": null, - "require_two_factor_authentication": false, - "two_factor_grace_period": 48, - "plan_id": null, - "project_creation_level": 2, - "runners_token": "rgeeL-nv3wa6YdRvuMid" - }, - "milestone": { - "id": 44, - "iid": 1, - "group_id": 5, - "title": "Group Milestone", - "description": "Group Milestone Desc", - "state": "active", - "created_at": "2018-07-03T07:15:19.271Z", - "updated_at": "2018-07-03T07:15:19.271Z", - "due_date": null, - "start_date": null, - "web_url": "http://example.com/groups/documentcloud/-/milestones/1" - }, - "assignee": { - "id": 1, - "name": "Administrator", - "username": "root", - "state": "active", - "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://example.com/root" - }, - "labels": [{ - "id": 11, - "name": "GroupLabel", - "color": "#428BCA", - "description": "" - }], - "weight": 4 - } +{"id":1,"project":null,"lists":[],"name":"new_name","group":{"id":5,"name":"Documentcloud","path":"documentcloud","owner_id":null,"created_at":"2018-05-07T06:52:45.788Z","updated_at":"2018-07-03T06:48:17.005Z","description":"Consequatur aut a aperiam ut.","avatar":{"url":null},"membership_lock":false,"share_with_group_lock":false,"visibility_level":20,"request_access_enabled":false,"ldap_sync_status":"ready","ldap_sync_error":null,"ldap_sync_last_update_at":null,"ldap_sync_last_successful_update_at":null,"ldap_sync_last_sync_at":null,"lfs_enabled":null,"parent_id":null,"shared_runners_minutes_limit":null,"repository_size_limit":null,"require_two_factor_authentication":false,"two_factor_grace_period":48,"plan_id":null,"project_creation_level":2,"runners_token":"rgeeL-nv3wa6YdRvuMid"},"milestone":{"id":44,"iid":1,"group_id":5,"title":"Group Milestone","description":"Group Milestone Desc","state":"active","created_at":"2018-07-03T07:15:19.271Z","updated_at":"2018-07-03T07:15:19.271Z","due_date":null,"start_date":null,"web_url":"http://example.com/groups/documentcloud/-/milestones/1"},"assignee":{"id":1,"name":"Administrator","username":"root","state":"active","avatar_url":"https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon","web_url":"http://example.com/root"},"labels":[{"id":11,"name":"GroupLabel","color":"#428BCA","description":""}],"weight":4} \ No newline at end of file diff --git a/spec/fixtures/updated_user_snippet.json b/spec/fixtures/updated_user_snippet.json new file mode 100644 index 0000000..f23ab17 --- /dev/null +++ b/spec/fixtures/updated_user_snippet.json @@ -0,0 +1 @@ +{"id":1,"title":"test","file_name":"add.rb","description":"description of snippet","visibility":"internal","author":{"id":1,"username":"john_smith","email":"john@example.com","name":"John Smith","state":"active","created_at":"2012-05-23T08:00:58Z"},"expires_at":null,"updated_at":"2012-06-28T10:52:04Z","created_at":"2012-06-28T10:52:04Z","project_id":null,"web_url":"http://example.com/snippets/1","raw_url":"http://example.com/snippets/1/raw"} \ No newline at end of file diff --git a/spec/fixtures/upload_file.json b/spec/fixtures/upload_file.json index ede0afb..99b37eb 100644 --- a/spec/fixtures/upload_file.json +++ b/spec/fixtures/upload_file.json @@ -1,5 +1 @@ -{ - "alt": "null", - "url": "/uploads/f22e67e35e1bcb339058212c54bb8772/null", - "markdown": "[null](/uploads/f22e67e35e1bcb339058212c54bb8772/null)" -} +{"alt":"null","url":"/uploads/f22e67e35e1bcb339058212c54bb8772/null","markdown":"[null](/uploads/f22e67e35e1bcb339058212c54bb8772/null)"} \ No newline at end of file diff --git a/spec/fixtures/user_contribution_events.json b/spec/fixtures/user_contribution_events.json index f975dc6..1352ca0 100644 --- a/spec/fixtures/user_contribution_events.json +++ b/spec/fixtures/user_contribution_events.json @@ -1,101 +1 @@ -[ - { - "title": null, - "project_id": 15, - "action_name": "closed", - "target_id": 830, - "target_type": "Issue", - "author_id": 1, - "target_title": "Public project search field", - "author": { - "name": "Dmitriy Zaporozhets", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://localhost:3000/uploads/user/avatar/1/fox_avatar.png", - "web_url": "http://localhost:3000/root" - }, - "author_username": "root" - }, - { - "title": null, - "project_id": 15, - "action_name": "pushed", - "target_id": null, - "target_type": null, - "author_id": 1, - "author": { - "name": "Dmitriy Zaporozhets", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://localhost:3000/uploads/user/avatar/1/fox_avatar.png", - "web_url": "http://localhost:3000/root" - }, - "author_username": "john", - "push_data": { - "commit_count": 1, - "action": "pushed", - "ref_type": "branch", - "commit_from": "50d4420237a9de7be1304607147aec22e4a14af7", - "commit_to": "c5feabde2d8cd023215af4d2ceeb7a64839fc428", - "ref": "master", - "commit_title": "Add simple search to projects in public area" - }, - "target_title": null - }, - { - "title": null, - "project_id": 15, - "action_name": "closed", - "target_id": 840, - "target_type": "Issue", - "author_id": 1, - "target_title": "Finish & merge Code search PR", - "author": { - "name": "Dmitriy Zaporozhets", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://localhost:3000/uploads/user/avatar/1/fox_avatar.png", - "web_url": "http://localhost:3000/root" - }, - "author_username": "root" - }, - { - "title": null, - "project_id": 15, - "action_name": "commented on", - "target_id": 1312, - "target_type": "Note", - "author_id": 1, - "target_title": null, - "created_at": "2015-12-04T10:33:58.089Z", - "note": { - "id": 1312, - "body": "What an awesome day!", - "attachment": null, - "author": { - "name": "Dmitriy Zaporozhets", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://localhost:3000/uploads/user/avatar/1/fox_avatar.png", - "web_url": "http://localhost:3000/root" - }, - "created_at": "2015-12-04T10:33:56.698Z", - "system": false, - "noteable_id": 377, - "noteable_type": "Issue" - }, - "author": { - "name": "Dmitriy Zaporozhets", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://localhost:3000/uploads/user/avatar/1/fox_avatar.png", - "web_url": "http://localhost:3000/root" - }, - "author_username": "root" - } -] +[{"title":null,"project_id":15,"action_name":"closed","target_id":830,"target_type":"Issue","author_id":1,"target_title":"Public project search field","author":{"name":"Dmitriy Zaporozhets","username":"root","id":1,"state":"active","avatar_url":"http://localhost:3000/uploads/user/avatar/1/fox_avatar.png","web_url":"http://localhost:3000/root"},"author_username":"root"},{"title":null,"project_id":15,"action_name":"pushed","target_id":null,"target_type":null,"author_id":1,"author":{"name":"Dmitriy Zaporozhets","username":"root","id":1,"state":"active","avatar_url":"http://localhost:3000/uploads/user/avatar/1/fox_avatar.png","web_url":"http://localhost:3000/root"},"author_username":"john","push_data":{"commit_count":1,"action":"pushed","ref_type":"branch","commit_from":"50d4420237a9de7be1304607147aec22e4a14af7","commit_to":"c5feabde2d8cd023215af4d2ceeb7a64839fc428","ref":"master","commit_title":"Add simple search to projects in public area"},"target_title":null},{"title":null,"project_id":15,"action_name":"closed","target_id":840,"target_type":"Issue","author_id":1,"target_title":"Finish & merge Code search PR","author":{"name":"Dmitriy Zaporozhets","username":"root","id":1,"state":"active","avatar_url":"http://localhost:3000/uploads/user/avatar/1/fox_avatar.png","web_url":"http://localhost:3000/root"},"author_username":"root"},{"title":null,"project_id":15,"action_name":"commented on","target_id":1312,"target_type":"Note","author_id":1,"target_title":null,"created_at":"2015-12-04T10:33:58.089Z","note":{"id":1312,"body":"What an awesome day!","attachment":null,"author":{"name":"Dmitriy Zaporozhets","username":"root","id":1,"state":"active","avatar_url":"http://localhost:3000/uploads/user/avatar/1/fox_avatar.png","web_url":"http://localhost:3000/root"},"created_at":"2015-12-04T10:33:56.698Z","system":false,"noteable_id":377,"noteable_type":"Issue"},"author":{"name":"Dmitriy Zaporozhets","username":"root","id":1,"state":"active","avatar_url":"http://localhost:3000/uploads/user/avatar/1/fox_avatar.png","web_url":"http://localhost:3000/root"},"author_username":"root"}] \ No newline at end of file diff --git a/spec/fixtures/user_events.json b/spec/fixtures/user_events.json index 01716d4..9d5fbca 100644 --- a/spec/fixtures/user_events.json +++ b/spec/fixtures/user_events.json @@ -1,40 +1 @@ -[ - { - "title":null, - "project_id":1, - "action_name":"opened", - "target_id":160, - "target_type":"Issue", - "author_id":25, - "target_title":"Qui natus eos odio tempore et quaerat consequuntur ducimus cupiditate quis.", - "created_at":"2017-02-09T10:43:19.667Z", - "author":{ - "name":"User 3", - "username":"user3", - "id":25, - "state":"active", - "avatar_url":"http://www.gravatar.com/avatar/97d6d9441ff85fdc730e02a6068d267b?s=80\u0026d=identicon", - "web_url":"https://gitlab.example.com/user3" - }, - "author_username":"user3" - }, - { - "title":null, - "project_id":1, - "action_name":"opened", - "target_id":159, - "target_type":"Issue", - "author_id":21, - "target_title":"Nostrum enim non et sed optio illo deleniti non.", - "created_at":"2017-02-09T10:43:19.426Z", - "author":{ - "name":"Test User", - "username":"ted", - "id":21, - "state":"active", - "avatar_url":"http://www.gravatar.com/avatar/80fb888c9a48b9a3f87477214acaa63f?s=80\u0026d=identicon", - "web_url":"https://gitlab.example.com/ted" - }, - "author_username":"ted" - } -] +[{"title":null,"project_id":1,"action_name":"opened","target_id":160,"target_type":"Issue","author_id":25,"target_title":"Qui natus eos odio tempore et quaerat consequuntur ducimus cupiditate quis.","created_at":"2017-02-09T10:43:19.667Z","author":{"name":"User 3","username":"user3","id":25,"state":"active","avatar_url":"http://www.gravatar.com/avatar/97d6d9441ff85fdc730e02a6068d267b?s=80&d=identicon","web_url":"https://gitlab.example.com/user3"},"author_username":"user3"},{"title":null,"project_id":1,"action_name":"opened","target_id":159,"target_type":"Issue","author_id":21,"target_title":"Nostrum enim non et sed optio illo deleniti non.","created_at":"2017-02-09T10:43:19.426Z","author":{"name":"Test User","username":"ted","id":21,"state":"active","avatar_url":"http://www.gravatar.com/avatar/80fb888c9a48b9a3f87477214acaa63f?s=80&d=identicon","web_url":"https://gitlab.example.com/ted"},"author_username":"ted"}] \ No newline at end of file diff --git a/spec/fixtures/user_projects.json b/spec/fixtures/user_projects.json index 584f7a1..e9ed2b3 100644 --- a/spec/fixtures/user_projects.json +++ b/spec/fixtures/user_projects.json @@ -1,153 +1 @@ -[ - { - "id": 1, - "description": null, - "default_branch": "master", - "visibility": "private", - "ssh_url_to_repo": "git@example.com:diaspora/diaspora-client.git", - "http_url_to_repo": "http://example.com/diaspora/diaspora-client.git", - "web_url": "http://example.com/diaspora/diaspora-client", - "tag_list": [ - "example", - "disapora client" - ], - "owner": { - "id": 1, - "name": "Diaspora", - "created_at": "2013-09-30T13:46:02Z" - }, - "name": "Diaspora Client", - "name_with_namespace": "Diaspora / Diaspora Client", - "path": "diaspora-client", - "path_with_namespace": "diaspora/diaspora-client", - "issues_enabled": true, - "open_issues_count": 1, - "merge_requests_enabled": true, - "jobs_enabled": true, - "wiki_enabled": true, - "snippets_enabled": false, - "resolve_outdated_diff_discussions": false, - "container_registry_enabled": false, - "created_at": "2013-09-30T13:46:02Z", - "last_activity_at": "2013-09-30T13:46:02Z", - "creator_id": 3, - "namespace": { - "id": 3, - "name": "Diaspora", - "path": "diaspora", - "kind": "group", - "full_path": "diaspora" - }, - "import_status": "none", - "archived": false, - "avatar_url": "http://example.com/uploads/project/avatar/4/uploads/avatar.png", - "shared_runners_enabled": true, - "forks_count": 0, - "star_count": 0, - "runners_token": "b8547b1dc37721d05889db52fa2f02", - "public_jobs": true, - "shared_with_groups": [ - - ], - "only_allow_merge_if_pipeline_succeeds": false, - "only_allow_merge_if_all_discussions_are_resolved": false, - "request_access_enabled": false, - "statistics": { - "commit_count": 37, - "storage_size": 1038090, - "repository_size": 1038090, - "lfs_objects_size": 0, - "job_artifacts_size": 0 - }, - "_links": { - "self": "http://example.com/api/v4/projects", - "issues": "http://example.com/api/v4/projects/1/issues", - "merge_requests": "http://example.com/api/v4/projects/1/merge_requests", - "repo_branches": "http://example.com/api/v4/projects/1/repository_branches", - "labels": "http://example.com/api/v4/projects/1/labels", - "events": "http://example.com/api/v4/projects/1/events", - "members": "http://example.com/api/v4/projects/1/members" - } - }, - { - "id": 6, - "description": null, - "default_branch": "master", - "visibility": "private", - "ssh_url_to_repo": "git@example.com:brightbox/puppet.git", - "http_url_to_repo": "http://example.com/brightbox/puppet.git", - "web_url": "http://example.com/brightbox/puppet", - "tag_list": [ - "example", - "puppet" - ], - "owner": { - "id": 1, - "name": "Brightbox", - "created_at": "2013-09-30T13:46:02Z" - }, - "name": "Puppet", - "name_with_namespace": "Brightbox / Puppet", - "path": "puppet", - "path_with_namespace": "brightbox/puppet", - "issues_enabled": true, - "open_issues_count": 1, - "merge_requests_enabled": true, - "jobs_enabled": true, - "wiki_enabled": true, - "snippets_enabled": false, - "resolve_outdated_diff_discussions": false, - "container_registry_enabled": false, - "created_at": "2013-09-30T13:46:02Z", - "last_activity_at": "2013-09-30T13:46:02Z", - "creator_id": 3, - "namespace": { - "id": 4, - "name": "Brightbox", - "path": "brightbox", - "kind": "group", - "full_path": "brightbox" - }, - "import_status": "none", - "import_error": null, - "permissions": { - "project_access": { - "access_level": 10, - "notification_level": 3 - }, - "group_access": { - "access_level": 50, - "notification_level": 3 - } - }, - "archived": false, - "avatar_url": null, - "shared_runners_enabled": true, - "forks_count": 0, - "star_count": 0, - "runners_token": "b8547b1dc37721d05889db52fa2f02", - "public_jobs": true, - "shared_with_groups": [ - - ], - "only_allow_merge_if_pipeline_succeeds": false, - "only_allow_merge_if_all_discussions_are_resolved": false, - "request_access_enabled": false, - "statistics": { - "commit_count": 12, - "storage_size": 2066080, - "repository_size": 2066080, - "lfs_objects_size": 0, - "job_artifacts_size": 0 - }, - "_links": { - "self": "http://example.com/api/v4/projects", - "issues": "http://example.com/api/v4/projects/1/issues", - "merge_requests": "http://example.com/api/v4/projects/1/merge_requests", - "repo_branches": "http://example.com/api/v4/projects/1/repository_branches", - "labels": "http://example.com/api/v4/projects/1/labels", - "events": "http://example.com/api/v4/projects/1/events", - "members": "http://example.com/api/v4/projects/1/members" - } - } -] +[{"id":1,"description":null,"default_branch":"master","visibility":"private","ssh_url_to_repo":"git@example.com:diaspora/diaspora-client.git","http_url_to_repo":"http://example.com/diaspora/diaspora-client.git","web_url":"http://example.com/diaspora/diaspora-client","tag_list":["example","disapora client"],"owner":{"id":1,"name":"Diaspora","created_at":"2013-09-30T13:46:02Z"},"name":"Diaspora Client","name_with_namespace":"Diaspora / Diaspora Client","path":"diaspora-client","path_with_namespace":"diaspora/diaspora-client","issues_enabled":true,"open_issues_count":1,"merge_requests_enabled":true,"jobs_enabled":true,"wiki_enabled":true,"snippets_enabled":false,"resolve_outdated_diff_discussions":false,"container_registry_enabled":false,"created_at":"2013-09-30T13:46:02Z","last_activity_at":"2013-09-30T13:46:02Z","creator_id":3,"namespace":{"id":3,"name":"Diaspora","path":"diaspora","kind":"group","full_path":"diaspora"},"import_status":"none","archived":false,"avatar_url":"http://example.com/uploads/project/avatar/4/uploads/avatar.png","shared_runners_enabled":true,"forks_count":0,"star_count":0,"runners_token":"b8547b1dc37721d05889db52fa2f02","public_jobs":true,"shared_with_groups":[],"only_allow_merge_if_pipeline_succeeds":false,"only_allow_merge_if_all_discussions_are_resolved":false,"request_access_enabled":false,"statistics":{"commit_count":37,"storage_size":1038090,"repository_size":1038090,"lfs_objects_size":0,"job_artifacts_size":0},"_links":{"self":"http://example.com/api/v4/projects","issues":"http://example.com/api/v4/projects/1/issues","merge_requests":"http://example.com/api/v4/projects/1/merge_requests","repo_branches":"http://example.com/api/v4/projects/1/repository_branches","labels":"http://example.com/api/v4/projects/1/labels","events":"http://example.com/api/v4/projects/1/events","members":"http://example.com/api/v4/projects/1/members"}},{"id":6,"description":null,"default_branch":"master","visibility":"private","ssh_url_to_repo":"git@example.com:brightbox/puppet.git","http_url_to_repo":"http://example.com/brightbox/puppet.git","web_url":"http://example.com/brightbox/puppet","tag_list":["example","puppet"],"owner":{"id":1,"name":"Brightbox","created_at":"2013-09-30T13:46:02Z"},"name":"Puppet","name_with_namespace":"Brightbox / Puppet","path":"puppet","path_with_namespace":"brightbox/puppet","issues_enabled":true,"open_issues_count":1,"merge_requests_enabled":true,"jobs_enabled":true,"wiki_enabled":true,"snippets_enabled":false,"resolve_outdated_diff_discussions":false,"container_registry_enabled":false,"created_at":"2013-09-30T13:46:02Z","last_activity_at":"2013-09-30T13:46:02Z","creator_id":3,"namespace":{"id":4,"name":"Brightbox","path":"brightbox","kind":"group","full_path":"brightbox"},"import_status":"none","import_error":null,"permissions":{"project_access":{"access_level":10,"notification_level":3},"group_access":{"access_level":50,"notification_level":3}},"archived":false,"avatar_url":null,"shared_runners_enabled":true,"forks_count":0,"star_count":0,"runners_token":"b8547b1dc37721d05889db52fa2f02","public_jobs":true,"shared_with_groups":[],"only_allow_merge_if_pipeline_succeeds":false,"only_allow_merge_if_all_discussions_are_resolved":false,"request_access_enabled":false,"statistics":{"commit_count":12,"storage_size":2066080,"repository_size":2066080,"lfs_objects_size":0,"job_artifacts_size":0},"_links":{"self":"http://example.com/api/v4/projects","issues":"http://example.com/api/v4/projects/1/issues","merge_requests":"http://example.com/api/v4/projects/1/merge_requests","repo_branches":"http://example.com/api/v4/projects/1/repository_branches","labels":"http://example.com/api/v4/projects/1/labels","events":"http://example.com/api/v4/projects/1/events","members":"http://example.com/api/v4/projects/1/members"}}] \ No newline at end of file diff --git a/spec/fixtures/user_snippet.json b/spec/fixtures/user_snippet.json new file mode 100644 index 0000000..1a2cfe1 --- /dev/null +++ b/spec/fixtures/user_snippet.json @@ -0,0 +1 @@ +{"id":1,"title":"test","file_name":"add.rb","description":"Ruby test snippet","visibility":"private","author":{"id":1,"username":"john_smith","email":"john@example.com","name":"John Smith","state":"active","created_at":"2012-05-23T08:00:58Z"},"expires_at":null,"updated_at":"2012-06-28T10:52:04Z","created_at":"2012-06-28T10:52:04Z","project_id":null,"web_url":"http://example.com/snippets/1","raw_url":"http://example.com/snippets/1/raw"} \ No newline at end of file diff --git a/spec/fixtures/user_snippets.json b/spec/fixtures/user_snippets.json new file mode 100644 index 0000000..b0bc14b --- /dev/null +++ b/spec/fixtures/user_snippets.json @@ -0,0 +1 @@ +[{"id":42,"title":"Voluptatem iure ut qui aut et consequatur quaerat.","file_name":"mclaughlin.rb","description":null,"visibility":"internal","author":{"id":22,"name":"User 0","username":"user0","state":"active","avatar_url":"https://www.gravatar.com/avatar/52e4ce24a915fb7e51e1ad3b57f4b00a?s=80&d=identicon","web_url":"http://example.com/user0"},"updated_at":"2018-09-18T01:12:26.383Z","created_at":"2018-09-18T01:12:26.383Z","project_id":null,"web_url":"http://example.com/snippets/42","raw_url":"http://example.com/snippets/42/raw"},{"id":41,"title":"Ut praesentium non et atque.","file_name":"ondrickaemard.rb","description":null,"visibility":"internal","author":{"id":22,"name":"User 0","username":"user0","state":"active","avatar_url":"https://www.gravatar.com/avatar/52e4ce24a915fb7e51e1ad3b57f4b00a?s=80&d=identicon","web_url":"http://example.com/user0"},"updated_at":"2018-09-18T01:12:26.360Z","created_at":"2018-09-18T01:12:26.360Z","project_id":1,"web_url":"http://example.com/gitlab-org/gitlab-test/snippets/41","raw_url":"http://example.com/gitlab-org/gitlab-test/snippets/41/raw"}] \ No newline at end of file diff --git a/spec/fixtures/valid_content_gitlab_ci_yml.json b/spec/fixtures/valid_content_gitlab_ci_yml.json index 18529f3..5ec2e97 100644 --- a/spec/fixtures/valid_content_gitlab_ci_yml.json +++ b/spec/fixtures/valid_content_gitlab_ci_yml.json @@ -1,4 +1 @@ -{ - "status": "valid", - "errors": [] -} +{"status":"valid","errors":[]} \ No newline at end of file diff --git a/spec/fixtures/variable.json b/spec/fixtures/variable.json index 4550c49..9211517 100644 --- a/spec/fixtures/variable.json +++ b/spec/fixtures/variable.json @@ -1,4 +1 @@ -{ - "key": "VARIABLE", - "value": "the value" -} +{"key":"VARIABLE","value":"the value"} \ No newline at end of file diff --git a/spec/fixtures/variables.json b/spec/fixtures/variables.json index 94eea18..dab3947 100644 --- a/spec/fixtures/variables.json +++ b/spec/fixtures/variables.json @@ -1,10 +1 @@ -[ - { - "key": "TEST_VARIABLE_1", - "value": "TEST_1" - }, - { - "key": "TEST_VARIABLE_2", - "value": "TEST_2" - } -] +[{"key":"TEST_VARIABLE_1","value":"TEST_1"},{"key":"TEST_VARIABLE_2","value":"TEST_2"}] \ No newline at end of file diff --git a/spec/fixtures/version.json b/spec/fixtures/version.json index abb214f..f39378e 100644 --- a/spec/fixtures/version.json +++ b/spec/fixtures/version.json @@ -1,4 +1 @@ -{ - "version": "8.13.0-pre", - "revision": "4e963fe" -} +{"version":"8.13.0-pre","revision":"4e963fe"} \ No newline at end of file diff --git a/spec/fixtures/wiki.json b/spec/fixtures/wiki.json index a893abf..07055c4 100644 --- a/spec/fixtures/wiki.json +++ b/spec/fixtures/wiki.json @@ -1,7 +1 @@ -{ - "content" : "home page", - "format" : "markdown", - "slug" : "home", - "title" : "home" -} - +{"content":"home page","format":"markdown","slug":"home","title":"home"} \ No newline at end of file diff --git a/spec/fixtures/wiki_attachment.json b/spec/fixtures/wiki_attachment.json index e984e73..2789bb4 100644 --- a/spec/fixtures/wiki_attachment.json +++ b/spec/fixtures/wiki_attachment.json @@ -1,9 +1 @@ -{ - "file_name" : "dk.png", - "file_path" : "uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png", - "branch" : "master", - "link" : { - "url" : "uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png", - "markdown" : "![dk](uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png)" - } -} +{"file_name":"dk.png","file_path":"uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png","branch":"master","link":{"url":"uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png","markdown":"![dk](uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png)"}} \ No newline at end of file diff --git a/spec/fixtures/wikis.json b/spec/fixtures/wikis.json index e2bba6c..a71f023 100644 --- a/spec/fixtures/wikis.json +++ b/spec/fixtures/wikis.json @@ -1,19 +1 @@ -[ - { - "content" : "Here is an instruction how to deploy this project.", - "format" : "markdown", - "slug" : "deploy", - "title" : "deploy" - }, - { - "content" : "Our development process is described here.", - "format" : "markdown", - "slug" : "development", - "title" : "development" - },{ - "content" : "* [Deploy](deploy)\n* [Development](development)", - "format" : "markdown", - "slug" : "home", - "title" : "home" - } -] +[{"content":"Here is an instruction how to deploy this project.","format":"markdown","slug":"deploy","title":"deploy"},{"content":"Our development process is described here.","format":"markdown","slug":"development","title":"development"},{"content":"* [Deploy](deploy)\n* [Development](development)","format":"markdown","slug":"home","title":"home"}] \ No newline at end of file diff --git a/spec/gitlab/client/builds_spec.rb b/spec/gitlab/client/builds_spec.rb index 46551cf..09ed525 100644 --- a/spec/gitlab/client/builds_spec.rb +++ b/spec/gitlab/client/builds_spec.rb @@ -41,7 +41,7 @@ describe '.build_artifacts' do context 'when successful request' do before do - fixture = load_fixture('build_artifacts') + fixture = load_fixture('build_artifacts.zip') fixture.set_encoding(Encoding::ASCII_8BIT) stub_request(:get, "#{Gitlab.endpoint}/projects/3/builds/8/artifacts") .with(headers: { 'PRIVATE-TOKEN' => Gitlab.private_token }) diff --git a/spec/gitlab/client/epic_issues_spec.rb b/spec/gitlab/client/epic_issues_spec.rb new file mode 100644 index 0000000..251c143 --- /dev/null +++ b/spec/gitlab/client/epic_issues_spec.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe Gitlab::Client do + describe '.epic_issues' do + before do + stub_get('/groups/7/epics/3/issues', 'epic_issues') + @issues = Gitlab.epic_issues(7, 3) + end + + it 'gets the correct resource' do + expect(a_get('/groups/7/epics/3/issues')).to have_been_made + end + + it "returns a paginated response of project's issues" do + expect(@issues).to be_a Gitlab::PaginatedResponse + expect(@issues.first.epic.group_id).to eq(7) + expect(@issues.first.epic.iid).to eq(3) + expect(@issues.first.epic_iid).to eq(3) + end + end +end diff --git a/spec/gitlab/client/merge_request_approvals_spec.rb b/spec/gitlab/client/merge_request_approvals_spec.rb index 091bf5f..c2ce345 100644 --- a/spec/gitlab/client/merge_request_approvals_spec.rb +++ b/spec/gitlab/client/merge_request_approvals_spec.rb @@ -39,6 +39,68 @@ end end + describe '.project_merge_request_approval_rules' do + before do + stub_get('/projects/1/approval_rules', 'project_merge_request_approval_rules') + @project_mr_approval_rules = Gitlab.project_merge_request_approval_rules(1) + end + + it 'gets the correct resource' do + expect(a_get('/projects/1/approval_rules')).to have_been_made + end + + it 'returns the paginated list of approval rules' do + expect(@project_mr_approval_rules).to be_a Gitlab::PaginatedResponse + end + end + + describe '.create_project_merge_request_approval_rule' do + before do + stub_post('/projects/1/approval_rules', 'project_merge_request_approval_rules') + @project_mr_approval_rules = Gitlab.create_project_merge_request_approval_rule(1, name: 'security', approvals_required: 1) + end + + it 'creates the correct resource' do + expect(a_post('/projects/1/approval_rules')).to have_been_made + end + + it 'returns the paginated list of approval rules' do + expect(@project_mr_approval_rules).to be_a Gitlab::PaginatedResponse + expect(@project_mr_approval_rules.first.id).to eq(1) + expect(@project_mr_approval_rules.first.name).to eq('security') + expect(@project_mr_approval_rules.first.approvals_required).to eq(3) + end + end + + describe '.update_project_merge_request_approval_rule' do + before do + stub_put('/projects/1/approval_rules/1', 'project_merge_request_approval_rules') + @project_mr_approval_rules = Gitlab.update_project_merge_request_approval_rule(1, 1, name: 'security', approvals_required: 1) + end + + it 'updates the correct resource' do + expect(a_put('/projects/1/approval_rules/1')).to have_been_made + end + + it 'returns the paginated list of approval rules' do + expect(@project_mr_approval_rules).to be_a Gitlab::PaginatedResponse + expect(@project_mr_approval_rules.first.id).to eq(1) + expect(@project_mr_approval_rules.first.name).to eq('security') + expect(@project_mr_approval_rules.first.approvals_required).to eq(3) + end + end + + describe '.delete_project_merge_request_approval_rule' do + before do + stub_delete('/projects/1/approval_rules/1', 'empty') + Gitlab.delete_project_merge_request_approval_rule(1, 1) + end + + it 'deletes the correct resource' do + expect(a_delete('/projects/1/approval_rules/1')).to have_been_made + end + end + describe '.edit_project_approvers' do before do body = { "approver_ids": ['5'], "approver_group_ids": ['1'] } @@ -140,4 +202,21 @@ expect(a_post('/projects/1/merge_requests/5/unapprove')).to have_been_made end end + + describe '.merge_request_approval_state' do + before do + stub_get('/projects/3/merge_requests/1/approval_state', 'merge_request_approval_state') + @approval_state = Gitlab.merge_request_approval_state(3, 1) + end + + it 'gets the correct resource' do + expect(a_get('/projects/3/merge_requests/1/approval_state')).to have_been_made + end + + it 'returns information about all approval states of merge request' do + expect(@approval_state.approvals_required).to eq(2) + expect(@approval_state.approvals_left).to eq(2) + expect(@approval_state.approved_by).to be_empty + end + end end diff --git a/spec/gitlab/client/merge_requests_spec.rb b/spec/gitlab/client/merge_requests_spec.rb index 5cb6f57..2ecdf83 100644 --- a/spec/gitlab/client/merge_requests_spec.rb +++ b/spec/gitlab/client/merge_requests_spec.rb @@ -303,7 +303,7 @@ it 'posts the correct resource' do expect(a_post('/projects/3/merge_requests/2/discussions') - .with(body: 'body=Discussion&position[old_line]=1')).to have_been_made + .with(body: 'body=Discussion&position[old_line]=1'.gsub('[', '%5B').gsub(']', '%5D'))).to have_been_made end it 'returns information about the discussions' do diff --git a/spec/gitlab/client/notes_spec.rb b/spec/gitlab/client/notes_spec.rb index 43a3f18..ebbd903 100644 --- a/spec/gitlab/client/notes_spec.rb +++ b/spec/gitlab/client/notes_spec.rb @@ -67,6 +67,22 @@ expect(@notes.first.author.name).to eq('John Smith') end end + + context 'when epic notes' do + before do + stub_get('/groups/3/epics/7/notes', 'notes') + @notes = Gitlab.epic_notes(3, 7) + end + + it 'gets the correct resource' do + expect(a_get('/groups/3/epics/7/notes')).to have_been_made + end + + it 'returns a paginated response of notes' do + expect(@notes).to be_a Gitlab::PaginatedResponse + expect(@notes.first.author.name).to eq('John Smith') + end + end end describe 'note' do @@ -203,6 +219,23 @@ expect(@note.author.name).to eq('John Smith') end end + + context 'when epic note' do + before do + stub_post('/groups/3/epics/7/notes', 'note') + @note = Gitlab.create_epic_note(3, 7, 'The solution is rather tricky') + end + + it 'gets the correct resource' do + expect(a_post('/groups/3/epics/7/notes') + .with(body: { body: 'The solution is rather tricky' })).to have_been_made + end + + it 'returns information about a created note' do + expect(@note.body).to eq('The solution is rather tricky') + expect(@note.author.name).to eq('John Smith') + end + end end describe 'delete note' do diff --git a/spec/gitlab/client/pipelines_spec.rb b/spec/gitlab/client/pipelines_spec.rb index fc4604b..b50272a 100644 --- a/spec/gitlab/client/pipelines_spec.rb +++ b/spec/gitlab/client/pipelines_spec.rb @@ -67,7 +67,7 @@ it 'calls with the correct body' do expected_body = 'variables[][key]=VAR1&variables[][value]=value&variables[][key]=VAR2&variables[][value]=value' - expect(a_post(pipeline_path).with(body: expected_body)).to have_been_made + expect(a_post(pipeline_path).with(body: expected_body.gsub('[', '%5B').gsub(']', '%5D'))).to have_been_made end end end diff --git a/spec/gitlab/client/repository_files_spec.rb b/spec/gitlab/client/repository_files_spec.rb index 3412927..24706d8 100644 --- a/spec/gitlab/client/repository_files_spec.rb +++ b/spec/gitlab/client/repository_files_spec.rb @@ -5,7 +5,7 @@ describe Gitlab::Client do describe '.file_contents' do before do - stub_get('/projects/3/repository/files/Gemfile/raw?ref=master', 'raw_file') + stub_get('/projects/3/repository/files/Gemfile/raw?ref=master', 'raw_file.txt') @file_contents = Gitlab.file_contents(3, 'Gemfile') end diff --git a/spec/gitlab/client/user_snippets_spec.rb b/spec/gitlab/client/user_snippets_spec.rb new file mode 100644 index 0000000..4a0854a --- /dev/null +++ b/spec/gitlab/client/user_snippets_spec.rb @@ -0,0 +1,129 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe Gitlab::Client do + describe '.user_snippets' do + before do + stub_get('/snippets', 'user_snippets') + @snippets = Gitlab.user_snippets + end + + it 'gets the correct resource' do + expect(a_get('/snippets')).to have_been_made + end + + it "returns a paginated response of user's snippets" do + expect(@snippets).to be_a Gitlab::PaginatedResponse + expect(@snippets.first.file_name).to eq('mclaughlin.rb') + end + end + + describe '.user_snippet' do + before do + stub_get('/snippets/1', 'user_snippet') + @snippet = Gitlab.user_snippet(1) + end + + it 'gets the correct resource' do + expect(a_get('/snippets/1')).to have_been_made + end + + it 'returns information about a snippet' do + expect(@snippet.file_name).to eq('add.rb') + expect(@snippet.author.name).to eq('John Smith') + end + end + + describe '.user_snippet_raw' do + before do + stub_get('/snippets/1/raw', 'snippet_content') + @snippet_content = Gitlab.user_snippet_raw(1) + end + + it 'gets the correct resource' do + expect(a_get('/snippets/1/raw')).to have_been_made + end + + it 'returns raw content of a user snippet' do + expect(@snippet_content).to eq("#!/usr/bin/env ruby\n\nputs \"Cool snippet!\"\n") + end + end + + describe '.create_user_snippet' do + before do + stub_post('/snippets', 'created_user_snippet') + @snippet = Gitlab.create_user_snippet(title: 'This is a snippet', content: 'Hello world', description: 'Hello World snippet', file_name: 'test.txt', visibility: 'internal') + end + + it 'gets the correct resource' do + body = { title: 'This is a snippet', content: 'Hello world', description: 'Hello World snippet', file_name: 'test.txt', visibility: 'internal' } + expect(a_post('/snippets').with(body: body)).to have_been_made + end + + it 'returns information about a new snippet' do + expect(@snippet.file_name).to eq('test.txt') + expect(@snippet.description).to eq('Hello World snippet') + expect(@snippet.author.name).to eq('John Smith') + end + end + + describe '.edit_user_snippet' do + before do + stub_put('/snippets/1', 'updated_user_snippet') + @snippet = Gitlab.edit_user_snippet(1, file_name: 'add.rb') + end + + it 'gets the correct resource' do + expect(a_put('/snippets/1') + .with(body: { file_name: 'add.rb' })).to have_been_made + end + + it 'returns information about an edited snippet' do + expect(@snippet.file_name).to eq('add.rb') + end + end + + describe '.delete_user_snippet' do + before do + stub_delete('/snippets/1', 'empty') + @snippet = Gitlab.delete_user_snippet(1) + end + + it 'gets the correct resource' do + expect(a_delete('/snippets/1')).to have_been_made + end + end + + describe '.public_snippets' do + before do + stub_get('/snippets/public', 'public_snippets').with(query: { per_page: 2, page: 1 }) + @snippets = Gitlab.public_snippets(per_page: 2, page: 1) + end + + it 'gets the correct resource' do + expect(a_get('/snippets/public') + .with(query: { per_page: 2, page: 1 })).to have_been_made + end + + it 'returns a paginated response of public snippets' do + expect(@snippets).to be_a Gitlab::PaginatedResponse + expect(@snippets.last.visibility).to eq('public') + end + end + + describe '.snippet_user_agent_details' do + before do + stub_get('/snippets/1/user_agent_detail', 'snippet_user_agent_details') + @detail = Gitlab.snippet_user_agent_details(1) + end + + it 'gets the correct resource' do + expect(a_get('/snippets/1/user_agent_detail')).to have_been_made + end + + it 'returns user agent detail information about the snippet' do + expect(@detail.to_h.keys.sort).to eq(%w[akismet_submitted ip_address user_agent]) + end + end +end diff --git a/spec/gitlab/client/users_spec.rb b/spec/gitlab/client/users_spec.rb index 435959b..893bad5 100644 --- a/spec/gitlab/client/users_spec.rb +++ b/spec/gitlab/client/users_spec.rb @@ -210,6 +210,22 @@ end end + describe '.activities' do + before do + stub_get('/user/activities', 'activities') + @activities = Gitlab.activities + end + + it 'gets the correct resource' do + expect(a_get('/user/activities')).to have_been_made + end + + it 'returns a paginated response of user activity' do + expect(@activities).to be_a Gitlab::PaginatedResponse + expect(@activities.first.username).to eq('someuser') + end + end + describe '.ssh_keys' do context 'with user ID passed' do before do diff --git a/spec/gitlab/error_spec.rb b/spec/gitlab/error_spec.rb index f5f1538..7fdc12e 100644 --- a/spec/gitlab/error_spec.rb +++ b/spec/gitlab/error_spec.rb @@ -51,4 +51,21 @@ response_double = double('response', body: 'Retry later', to_s: 'Retry text', parsed_response: { message: 'Retry hash' }, code: 429, options: {}, headers: headers, request: @request_double) expect(described_class.new(response_double).send(:build_error_message)).to match(/Retry hash/) end + + context 'parsing errors' do + let(:headers) { { 'content-type' => 'application/json' } } + let(:response_double) do + double('response', body: 'Retry later', to_s: 'Retry text', code: status, options: {}, headers: headers, request: @request_double) + end + let(:status) { 429 } + + before do + allow(response_double).to receive(:parsed_response) + .and_raise(Gitlab::Error::Parsing) + end + + it 'Builds an error message from text' do + expect(described_class.new(response_double).send(:build_error_message)).to match(/Retry text/) + end + end end diff --git a/spec/gitlab/objectified_hash_spec.rb b/spec/gitlab/objectified_hash_spec.rb index 1808a4f..9b96cfc 100644 --- a/spec/gitlab/objectified_hash_spec.rb +++ b/spec/gitlab/objectified_hash_spec.rb @@ -4,13 +4,39 @@ describe Gitlab::ObjectifiedHash do before do - @hash = { a: 1, b: 2, 'string' => 'string', symbol: :symbol } + @hash = { a: 1, b: 2, 'string' => 'string', symbol: :symbol, array: ['string', { a: 1, b: 2 }] } @oh = described_class.new @hash + end + + describe 'Hash behavior' do + let(:hash) { { foo: 'bar' } } + let(:oh) { described_class.new(hash) } + + it 'allows to call Hash methods' do + expect(oh.dig('foo')).to eq('bar') + expect(oh.merge(key: :value)).to eq({ 'foo' => 'bar', key: :value }) + end + + it 'warns about calling Hash methods' do + output = capture_output { oh.values } + expect(output).to eq("WARNING: Please convert ObjectifiedHash object to hash before calling Hash methods on it.\n") + end end it 'objectifies a hash' do expect(@oh.a).to eq(@hash[:a]) expect(@oh.b).to eq(@hash[:b]) + end + + it 'objectifies a hash contained in an array' do + expect(@oh.array[1].a).to eq(@hash[:array][1][:a]) + expect(@oh.array[1].b).to eq(@hash[:array][1][:b]) + expect(@oh.array[0]).to eq(@hash[:array][0]) + end + + it 'supports legacy addressing mode' do + expect(@oh['a']).to eq(@hash[:a]) + expect(@oh['b']).to eq(@hash[:b]) end describe '#to_hash' do diff --git a/spec/gitlab/paginated_response_spec.rb b/spec/gitlab/paginated_response_spec.rb index b5b65c1..97119da 100644 --- a/spec/gitlab/paginated_response_spec.rb +++ b/spec/gitlab/paginated_response_spec.rb @@ -37,6 +37,20 @@ expect(@paginated_response.next_page).to be_nil expect(@paginated_response.prev_page).to be_nil end + + context 'when the Link header endpoint does not match the configured endpoint' do + it 'removes the apprpriate prefix from the pagination link' do + @paginated_response.parse_headers!('Link' => '; rel="first", ; rel="last"') + client = @paginated_response.client = double('client') + first_page_response = double('first_page_response') + last_page_response = double('last_page_response') + allow(client).to receive(:endpoint).and_return('http://internal.example.com/api/v3') + allow(client).to receive(:get).with('/projects?page=1&per_page=5').and_return(first_page_response) + allow(client).to receive(:get).with('/projects?page=20&per_page=5').and_return(last_page_response) + expect(@paginated_response.first_page).to be first_page_response + expect(@paginated_response.last_page).to be last_page_response + end + end end describe '.each_page' do @@ -46,6 +60,25 @@ allow(@paginated_response).to receive(:next_page).and_return(next_page) allow(next_page).to receive(:has_next_page?).and_return(false) expect { |b| @paginated_response.each_page(&b) }.to yield_successive_args(@paginated_response, next_page) + end + end + + describe '.lazy_paginate' do + it 'returns a lazy enumerator' do + expect(@paginated_response.lazy_paginate).to be_an(Enumerator::Lazy) + end + + it 'only requests needed pages' do + next_page = double('next_page') + allow(@paginated_response).to receive(:has_next_page?).and_return(true) + allow(@paginated_response).to receive(:next_page).and_return(next_page) + allow(next_page).to receive(:has_next_page?).and_return(true) + # NOTE: + # Do not define :next_page on the next_page double to prove that it is NOT + # called even though :has_next_page? has been defined to claim another + # page is available. + allow(next_page).to receive(:to_ary).and_return([5, 6, 7, 8]) + expect(@paginated_response.lazy_paginate.take(8)).to contain_exactly(1, 2, 3, 4, 5, 6, 7, 8) end end @@ -90,7 +123,7 @@ allow(@paginated_response).to receive(:has_next_page?).and_return(true) allow(@paginated_response).to receive(:next_page).and_return(next_page) allow(next_page).to receive(:has_next_page?).and_return(false) - allow(next_page).to receive(:[]).with(0, 1).and_return([5]) + allow(next_page).to receive(:to_ary).and_return([5]) expect(@paginated_response.paginate_with_limit(5)).to contain_exactly(1, 2, 3, 4, 5) end end @@ -101,7 +134,7 @@ allow(@paginated_response).to receive(:has_next_page?).and_return(true) allow(@paginated_response).to receive(:next_page).and_return(next_page) allow(next_page).to receive(:has_next_page?).and_return(false) - allow(next_page).to receive(:each).and_yield(5).and_yield(6).and_yield(7).and_yield(8) + allow(next_page).to receive(:to_ary).and_return([5, 6, 7, 8]) end end @@ -125,4 +158,17 @@ expect { |b| @paginated_response.paginate_with_limit(5, &b) }.to yield_successive_args(1, 2, 3, 4, 5) end end + + describe '.client_relative_path' do + subject(:client_relative_path) do + @paginated_response.client_relative_path('https://127.0.0.1/api/v4/projects/1/merge_requests/2/notes') + end + + it 'removes the prefix and api version from the link' do + client = @paginated_response.client = double('client') + allow(client).to receive(:endpoint).and_return('https://example.com/api/v4') + + expect(client_relative_path).to eq '/projects/1/merge_requests/2/notes' + end + end end diff --git a/spec/gitlab/shell_history_spec.rb b/spec/gitlab/shell_history_spec.rb index e768617..74dcd96 100644 --- a/spec/gitlab/shell_history_spec.rb +++ b/spec/gitlab/shell_history_spec.rb @@ -42,7 +42,7 @@ context 'loading a file' do before do - @file = load_fixture('shell_history') + @file = load_fixture('shell_history.txt') @history = described_class.new(file_path: @file.path) end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 7591dd7..b6b0c42 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -17,7 +17,8 @@ end def load_fixture(name) - File.new(File.dirname(__FILE__) + "/fixtures/#{name}.json") + name, extension = name.split('.') + File.new(File.dirname(__FILE__) + "/fixtures/#{name}.#{extension || 'json'}") end RSpec.configure do |config|