Commit fae2650c authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'cs-upgrade-licensee' into 'master'

Update Licensee from 8.0.0 to 8.7.0.

See merge request !9451
parents 4db8088f fcb15c56
...@@ -201,7 +201,7 @@ gem 'babosa', '~> 1.0.2' ...@@ -201,7 +201,7 @@ gem 'babosa', '~> 1.0.2'
gem 'loofah', '~> 2.0.3' gem 'loofah', '~> 2.0.3'
# Working with license # Working with license
gem 'licensee', '~> 8.0.0' gem 'licensee', '~> 8.7.0'
# Protect against bruteforcing # Protect against bruteforcing
gem 'rack-attack', '~> 4.4.1' gem 'rack-attack', '~> 4.4.1'
......
...@@ -398,8 +398,8 @@ GEM ...@@ -398,8 +398,8 @@ GEM
rubyzip rubyzip
thor thor
xml-simple xml-simple
licensee (8.0.0) licensee (8.7.0)
rugged (>= 0.24b) rugged (~> 0.24)
little-plugger (1.1.4) little-plugger (1.1.4)
logging (2.1.0) logging (2.1.0)
little-plugger (~> 1.1) little-plugger (~> 1.1)
...@@ -907,7 +907,7 @@ DEPENDENCIES ...@@ -907,7 +907,7 @@ DEPENDENCIES
kubeclient (~> 2.2.0) kubeclient (~> 2.2.0)
letter_opener_web (~> 1.3.0) letter_opener_web (~> 1.3.0)
license_finder (~> 2.1.0) license_finder (~> 2.1.0)
licensee (~> 8.0.0) licensee (~> 8.7.0)
loofah (~> 2.0.3) loofah (~> 2.0.3)
mail_room (~> 0.9.1) mail_room (~> 0.9.1)
method_source (~> 0.8) method_source (~> 0.8)
......
...@@ -25,7 +25,7 @@ feature 'project owner creates a license file', feature: true, js: true do ...@@ -25,7 +25,7 @@ feature 'project owner creates a license file', feature: true, js: true do
select_template('MIT License') select_template('MIT License')
file_content = first('.file-editor') file_content = first('.file-editor')
expect(file_content).to have_content('The MIT License (MIT)') expect(file_content).to have_content('MIT License')
expect(file_content).to have_content("Copyright (c) #{Time.now.year} #{project.namespace.human_name}") expect(file_content).to have_content("Copyright (c) #{Time.now.year} #{project.namespace.human_name}")
fill_in :commit_message, with: 'Add a LICENSE file', visible: true fill_in :commit_message, with: 'Add a LICENSE file', visible: true
...@@ -33,7 +33,7 @@ feature 'project owner creates a license file', feature: true, js: true do ...@@ -33,7 +33,7 @@ feature 'project owner creates a license file', feature: true, js: true do
expect(current_path).to eq( expect(current_path).to eq(
namespace_project_blob_path(project.namespace, project, 'master/LICENSE')) namespace_project_blob_path(project.namespace, project, 'master/LICENSE'))
expect(page).to have_content('The MIT License (MIT)') expect(page).to have_content('MIT License')
expect(page).to have_content("Copyright (c) #{Time.now.year} #{project.namespace.human_name}") expect(page).to have_content("Copyright (c) #{Time.now.year} #{project.namespace.human_name}")
end end
...@@ -49,7 +49,7 @@ feature 'project owner creates a license file', feature: true, js: true do ...@@ -49,7 +49,7 @@ feature 'project owner creates a license file', feature: true, js: true do
select_template('MIT License') select_template('MIT License')
file_content = first('.file-editor') file_content = first('.file-editor')
expect(file_content).to have_content('The MIT License (MIT)') expect(file_content).to have_content('MIT License')
expect(file_content).to have_content("Copyright (c) #{Time.now.year} #{project.namespace.human_name}") expect(file_content).to have_content("Copyright (c) #{Time.now.year} #{project.namespace.human_name}")
fill_in :commit_message, with: 'Add a LICENSE file', visible: true fill_in :commit_message, with: 'Add a LICENSE file', visible: true
...@@ -57,7 +57,7 @@ feature 'project owner creates a license file', feature: true, js: true do ...@@ -57,7 +57,7 @@ feature 'project owner creates a license file', feature: true, js: true do
expect(current_path).to eq( expect(current_path).to eq(
namespace_project_blob_path(project.namespace, project, 'master/LICENSE')) namespace_project_blob_path(project.namespace, project, 'master/LICENSE'))
expect(page).to have_content('The MIT License (MIT)') expect(page).to have_content('MIT License')
expect(page).to have_content("Copyright (c) #{Time.now.year} #{project.namespace.human_name}") expect(page).to have_content("Copyright (c) #{Time.now.year} #{project.namespace.human_name}")
end end
......
...@@ -24,7 +24,7 @@ feature 'project owner sees a link to create a license file in empty project', f ...@@ -24,7 +24,7 @@ feature 'project owner sees a link to create a license file in empty project', f
select_template('MIT License') select_template('MIT License')
file_content = first('.file-editor') file_content = first('.file-editor')
expect(file_content).to have_content('The MIT License (MIT)') expect(file_content).to have_content('MIT License')
expect(file_content).to have_content("Copyright (c) #{Time.now.year} #{project.namespace.human_name}") expect(file_content).to have_content("Copyright (c) #{Time.now.year} #{project.namespace.human_name}")
fill_in :commit_message, with: 'Add a LICENSE file', visible: true fill_in :commit_message, with: 'Add a LICENSE file', visible: true
...@@ -34,7 +34,7 @@ feature 'project owner sees a link to create a license file in empty project', f ...@@ -34,7 +34,7 @@ feature 'project owner sees a link to create a license file in empty project', f
expect(current_path).to eq( expect(current_path).to eq(
namespace_project_blob_path(project.namespace, project, 'master/LICENSE')) namespace_project_blob_path(project.namespace, project, 'master/LICENSE'))
expect(page).to have_content('The MIT License (MIT)') expect(page).to have_content('MIT License')
expect(page).to have_content("Copyright (c) #{Time.now.year} #{project.namespace.human_name}") expect(page).to have_content("Copyright (c) #{Time.now.year} #{project.namespace.human_name}")
end end
......
...@@ -58,11 +58,11 @@ describe API::Templates, api: true do ...@@ -58,11 +58,11 @@ describe API::Templates, api: true do
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') expect(json_response['source_url']).to eq('https://opensource.org/licenses/MIT')
expect(json_response['description']).to include('A permissive license that is short and to the point.') 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])
expect(json_response['limitations']).to eq(%w[no-liability]) expect(json_response['limitations']).to eq(%w[no-liability])
expect(json_response['content']).to include('The MIT License (MIT)') expect(json_response['content']).to include('MIT License')
end end
end end
...@@ -73,7 +73,7 @@ describe API::Templates, api: true do ...@@ -73,7 +73,7 @@ describe API::Templates, api: true do
expect(response).to have_http_status(200) expect(response).to have_http_status(200)
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(15) expect(json_response.size).to eq(12)
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
...@@ -102,7 +102,7 @@ describe API::Templates, api: true do ...@@ -102,7 +102,7 @@ describe API::Templates, api: true do
let(:license_type) { 'mit' } let(:license_type) { 'mit' }
it 'returns the license text' do it 'returns the license text' do
expect(json_response['content']).to include('The MIT License (MIT)') expect(json_response['content']).to include('MIT License')
end end
it 'replaces placeholder values' do it 'replaces placeholder values' do
......
...@@ -56,11 +56,11 @@ describe API::V3::Templates, api: true do ...@@ -56,11 +56,11 @@ describe API::V3::Templates, api: true do
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') expect(json_response['source_url']).to eq('https://opensource.org/licenses/MIT')
expect(json_response['description']).to include('A permissive license that is short and to the point.') 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])
expect(json_response['limitations']).to eq(%w[no-liability]) expect(json_response['limitations']).to eq(%w[no-liability])
expect(json_response['content']).to include('The MIT License (MIT)') expect(json_response['content']).to include('MIT License')
end end
end end
...@@ -70,7 +70,7 @@ describe API::V3::Templates, api: true do ...@@ -70,7 +70,7 @@ describe API::V3::Templates, api: true do
expect(response).to have_http_status(200) expect(response).to have_http_status(200)
expect(json_response).to be_an Array expect(json_response).to be_an Array
expect(json_response.size).to eq(15) expect(json_response.size).to eq(12)
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
...@@ -98,7 +98,7 @@ describe API::V3::Templates, api: true do ...@@ -98,7 +98,7 @@ describe API::V3::Templates, api: true do
let(:license_type) { 'mit' } let(:license_type) { 'mit' }
it 'returns the license text' do it 'returns the license text' do
expect(json_response['content']).to include('The MIT License (MIT)') expect(json_response['content']).to include('MIT License')
end end
it 'replaces placeholder values' do it 'replaces placeholder values' do
......
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