Commit 51391fdd authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'sh-update-rugged-v1.0.1' into 'master'

Update Rugged to v1.0.1

See merge request gitlab-org/gitlab!53212
parents 0552d2ca f552fc6c
9c2da9436f6a41a244a30deef6f48798f877e909 2c7c204731f6e4f1c8cdb3d8a705caf7acf6689d
...@@ -15,7 +15,7 @@ gem 'default_value_for', '~> 3.4.0' ...@@ -15,7 +15,7 @@ gem 'default_value_for', '~> 3.4.0'
# Supported DBs # Supported DBs
gem 'pg', '~> 1.1' gem 'pg', '~> 1.1'
gem 'rugged', '~> 0.28' gem 'rugged', '~> 1.0.1'
gem 'grape-path-helpers', '~> 1.6.1' gem 'grape-path-helpers', '~> 1.6.1'
gem 'faraday', '~> 1.0' gem 'faraday', '~> 1.0'
...@@ -266,7 +266,7 @@ gem 'babosa', '~> 1.0.2' ...@@ -266,7 +266,7 @@ gem 'babosa', '~> 1.0.2'
gem 'loofah', '~> 2.2' gem 'loofah', '~> 2.2'
# Working with license # Working with license
gem 'licensee', '~> 8.9' gem 'licensee', '~> 9.14.1'
# Detect and convert string character encoding # Detect and convert string character encoding
gem 'charlock_holmes', '~> 0.7.7' gem 'charlock_holmes', '~> 0.7.7'
......
...@@ -267,6 +267,7 @@ GEM ...@@ -267,6 +267,7 @@ GEM
doorkeeper-openid_connect (1.7.5) doorkeeper-openid_connect (1.7.5)
doorkeeper (>= 5.2, < 5.5) doorkeeper (>= 5.2, < 5.5)
json-jwt (>= 1.11.0) json-jwt (>= 1.11.0)
dotenv (2.7.6)
dry-configurable (0.12.0) dry-configurable (0.12.0)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
dry-core (~> 0.5, >= 0.5.0) dry-core (~> 0.5, >= 0.5.0)
...@@ -674,8 +675,12 @@ GEM ...@@ -674,8 +675,12 @@ GEM
toml (= 0.2.0) toml (= 0.2.0)
with_env (= 1.1.0) with_env (= 1.1.0)
xml-simple xml-simple
licensee (8.9.2) licensee (9.14.1)
rugged (~> 0.24) dotenv (~> 2.0)
octokit (~> 4.17)
reverse_markdown (~> 1.0)
rugged (>= 0.24, < 2.0)
thor (>= 0.19, < 2.0)
listen (3.2.1) listen (3.2.1)
rb-fsevent (~> 0.10, >= 0.10.3) rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10) rb-inotify (~> 0.9, >= 0.9.10)
...@@ -756,7 +761,7 @@ GEM ...@@ -756,7 +761,7 @@ GEM
multi_json (~> 1.3) multi_json (~> 1.3)
multi_xml (~> 0.5) multi_xml (~> 0.5)
rack (>= 1.2, < 3) rack (>= 1.2, < 3)
octokit (4.15.0) octokit (4.20.0)
faraday (>= 0.9) faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3) sawyer (~> 0.8.0, >= 0.5.3)
oj (3.10.6) oj (3.10.6)
...@@ -990,6 +995,8 @@ GEM ...@@ -990,6 +995,8 @@ GEM
mime-types (>= 1.16, < 4.0) mime-types (>= 1.16, < 4.0)
netrc (~> 0.8) netrc (~> 0.8)
retriable (3.1.2) retriable (3.1.2)
reverse_markdown (1.4.0)
nokogiri
rexml (3.2.4) rexml (3.2.4)
rinku (2.0.0) rinku (2.0.0)
rotp (2.1.2) rotp (2.1.2)
...@@ -1072,7 +1079,7 @@ GEM ...@@ -1072,7 +1079,7 @@ GEM
rubyntlm (0.6.2) rubyntlm (0.6.2)
rubypants (0.2.0) rubypants (0.2.0)
rubyzip (2.0.0) rubyzip (2.0.0)
rugged (0.28.4.1) rugged (1.0.1)
safe_yaml (1.0.4) safe_yaml (1.0.4)
safety_net_attestation (0.4.0) safety_net_attestation (0.4.0)
jwt (~> 2.0) jwt (~> 2.0)
...@@ -1417,7 +1424,7 @@ DEPENDENCIES ...@@ -1417,7 +1424,7 @@ DEPENDENCIES
lefthook (~> 0.7) lefthook (~> 0.7)
letter_opener_web (~> 1.3.4) letter_opener_web (~> 1.3.4)
license_finder (~> 6.0) license_finder (~> 6.0)
licensee (~> 8.9) licensee (~> 9.14.1)
lockbox (~> 0.3.3) lockbox (~> 0.3.3)
lograge (~> 0.5) lograge (~> 0.5)
loofah (~> 2.2) loofah (~> 2.2)
...@@ -1501,7 +1508,7 @@ DEPENDENCIES ...@@ -1501,7 +1508,7 @@ DEPENDENCIES
ruby-progressbar (~> 1.10) ruby-progressbar (~> 1.10)
ruby_parser (~> 3.15) ruby_parser (~> 3.15)
rubyzip (~> 2.0.0) rubyzip (~> 2.0.0)
rugged (~> 0.28) rugged (~> 1.0.1)
sanitize (~> 5.2.1) sanitize (~> 5.2.1)
sassc-rails (~> 2.1.0) sassc-rails (~> 2.1.0)
scss_lint (~> 0.59.0) scss_lint (~> 0.59.0)
......
---
title: Update Rugged to v1.0.1
merge_request: 53212
author:
type: changed
...@@ -310,7 +310,7 @@ ...@@ -310,7 +310,7 @@
- dompurify - dompurify
- Apache-2.0 - Apache-2.0
- :who: Lukas Eipert - :who: Lukas Eipert
:why: "https://github.com/cure53/DOMPurify/blob/main/LICENSE and https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31928#note_346604841" :why: https://github.com/cure53/DOMPurify/blob/main/LICENSE and https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31928#note_346604841
:versions: [] :versions: []
:when: 2020-08-13 13:42:46.508082000 Z :when: 2020-08-13 13:42:46.508082000 Z
- - :permit - - :permit
...@@ -325,3 +325,9 @@ ...@@ -325,3 +325,9 @@
:why: Used to generate documentation. https://pypi.org/project/docutils/0.13.1/ :why: Used to generate documentation. https://pypi.org/project/docutils/0.13.1/
:versions: [] :versions: []
:when: 2020-10-05 20:22:55.955189491 Z :when: 2020-10-05 20:22:55.955189491 Z
- - :permit
- WTFPL
- :who: Stan Hu
:why: https://github.com/xijo/reverse_markdown/blob/master/LICENSE
:versions: []
:when: 2021-02-03 08:47:28.792907000 Z
...@@ -1894,8 +1894,11 @@ RSpec.describe Gitlab::Git::Repository, :seed_helper do ...@@ -1894,8 +1894,11 @@ RSpec.describe Gitlab::Git::Repository, :seed_helper do
it 'removes the remote' do it 'removes the remote' do
repository_rugged.remotes.create(remote_name, url) repository_rugged.remotes.create(remote_name, url)
repository.remove_remote(remote_name) expect(repository.remove_remote(remote_name)).to be true
# Since we deleted the remote via Gitaly, Rugged doesn't know
# this changed underneath it. Let's refresh the Rugged repo.
repository_rugged = Rugged::Repository.new(repository_path)
expect(repository_rugged.remotes[remote_name]).to be_nil expect(repository_rugged.remotes[remote_name]).to be_nil
end end
end end
......
...@@ -1136,11 +1136,11 @@ RSpec.describe Repository do ...@@ -1136,11 +1136,11 @@ RSpec.describe Repository do
expect(repository.license_key).to be_nil expect(repository.license_key).to be_nil
end end
it 'returns nil when the content is not recognizable' do it 'returns other when the content is not recognizable' do
repository.create_file(user, 'LICENSE', 'Gitlab B.V.', repository.create_file(user, 'LICENSE', 'Gitlab B.V.',
message: 'Add LICENSE', branch_name: 'master') message: 'Add LICENSE', branch_name: 'master')
expect(repository.license_key).to be_nil expect(repository.license_key).to eq('other')
end end
it 'returns nil when the commit SHA does not exist' do it 'returns nil when the commit SHA does not exist' do
...@@ -1180,11 +1180,12 @@ RSpec.describe Repository do ...@@ -1180,11 +1180,12 @@ RSpec.describe Repository do
expect(repository.license).to be_nil expect(repository.license).to be_nil
end end
it 'returns nil when the content is not recognizable' do it 'returns other when the content is not recognizable' do
license = Licensee::License.new('other')
repository.create_file(user, 'LICENSE', 'Gitlab B.V.', repository.create_file(user, 'LICENSE', 'Gitlab B.V.',
message: 'Add LICENSE', branch_name: 'master') message: 'Add LICENSE', branch_name: 'master')
expect(repository.license).to be_nil expect(repository.license).to eq(license)
end end
it 'returns the license' do it 'returns the license' do
......
...@@ -65,7 +65,9 @@ RSpec.describe API::Templates do ...@@ -65,7 +65,9 @@ RSpec.describe API::Templates do
expect(json_response['nickname']).to be_nil expect(json_response['nickname']).to be_nil
expect(json_response['popular']).to be true expect(json_response['popular']).to be true
expect(json_response['html_url']).to eq('http://choosealicense.com/licenses/mit/') expect(json_response['html_url']).to eq('http://choosealicense.com/licenses/mit/')
expect(json_response['source_url']).to eq('https://opensource.org/licenses/MIT') # This was dropped:
# https://github.com/github/choosealicense.com/commit/325806b42aa3d5b78e84120327ec877bc936dbdd#diff-66df8f1997786f7052d29010f2cbb4c66391d60d24ca624c356acc0ab986f139
expect(json_response['source_url']).to be_nil
expect(json_response['description']).to include('A short and simple permissive license with conditions') expect(json_response['description']).to include('A short and simple permissive license with conditions')
expect(json_response['conditions']).to eq(%w[include-copyright]) expect(json_response['conditions']).to eq(%w[include-copyright])
expect(json_response['permissions']).to eq(%w[commercial-use modifications distribution private-use]) expect(json_response['permissions']).to eq(%w[commercial-use modifications distribution private-use])
...@@ -81,7 +83,7 @@ RSpec.describe API::Templates do ...@@ -81,7 +83,7 @@ RSpec.describe API::Templates do
expect(response).to have_gitlab_http_status(:ok) expect(response).to have_gitlab_http_status(:ok)
expect(response).to include_pagination_headers expect(response).to include_pagination_headers
expect(json_response).to be_an Array expect(json_response).to be_an Array
expect(json_response.size).to eq(12) expect(json_response.size).to eq(13)
expect(json_response.map { |l| l['key'] }).to include('agpl-3.0') expect(json_response.map { |l| l['key'] }).to include('agpl-3.0')
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment