Skip to content

Commit

Permalink
Merge pull request #5841 from openSUSE/master
Browse files Browse the repository at this point in the history
Update bootstrap master
  • Loading branch information
Moisés Déniz Alemán committed Sep 12, 2018
2 parents 096418c + 4a85f8e commit 64f1958
Show file tree
Hide file tree
Showing 318 changed files with 10,353 additions and 17,030 deletions.
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Please only create issues/feature requests for the Open Build Service server here, GitHub issues are not meant to be used for support requests!

For security issues, please refer to [SECURITY.md](https://github.com/openSUSE/open-build-service/blob/master/SECURITY.md).

For support contact our OBS community, they meet online in a chat/mailing list. There you can ask questions if you have trouble understanding something, seek advice and mingle with other OBS community members. See http://openbuildservice.org/support/ for further information.

Having problems with the OBS command line interface osc? It has its own issue tracker here: https://github.com/openSUSE/osc
Expand Down
64 changes: 33 additions & 31 deletions .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
---
name: Bug report
about: Create a report to help us improve

---

Having problems with the OBS command line interface osc? It has its own issue tracker here: https://github.com/openSUSE/osc

Having problems with the obs-build tool that controls the build process? It has its issue tracker here: https://github.com/openSUSE/obs-build

Good to go? Then please remove these lines above, including this one, and help us understand your issue by answering the following:

# Issue Description
A clear and concise description of what the bug is.

Expected Result
============
A clear and concise description of what you expected to happen.

How to Reproduce
===============
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error


Further Information
===============
* A link to an OBS instance showing the issue
* Exact server version (in case a private instance is used)
---
name: Bug report
about: Create a report to help us improve

---

For security issues, please refer to [SECURITY.md](https://github.com/openSUSE/open-build-service/blob/master/SECURITY.md).

Having problems with the OBS command line interface osc? It has its own issue tracker here: https://github.com/openSUSE/osc

Having problems with the obs-build tool that controls the build process? It has its issue tracker here: https://github.com/openSUSE/obs-build

Good to go? Then please remove these lines above, including this one, and help us understand your issue by answering the following:

# Issue Description
A clear and concise description of what the bug is.

Expected Result
============
A clear and concise description of what you expected to happen.

How to Reproduce
===============
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error


Further Information
===============
* A link to an OBS instance showing the issue
* Exact server version (in case a private instance is used)
24 changes: 13 additions & 11 deletions .github/ISSUE_TEMPLATE/Custom.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
---
name: Support Request
about: Report a problem with https://build.opensuse.org

---

![WARNING](https://media.giphy.com/media/Zsx8ZwmX3ajny/giphy.gif)

Please only create issues/feature requests for the Open Build Service server here, GitHub issues are not meant to be used for support requests!

For support contact our OBS community, they meet online in a chat/mailing list. There you can ask questions if you have trouble understanding something, seek advice and mingle with other OBS community members. For further information see http://openbuildservice.org/support/
---
name: Support Request
about: Report a problem with https://build.opensuse.org

---

![WARNING](https://media.giphy.com/media/Zsx8ZwmX3ajny/giphy.gif)

Please only create issues/feature requests for the Open Build Service server here, GitHub issues are not meant to be used for support requests!

For security issues, please refer to [SECURITY.md](https://github.com/openSUSE/open-build-service/blob/master/SECURITY.md).

For support contact our OBS community, they meet online in a chat/mailing list. There you can ask questions if you have trouble understanding something, seek advice and mingle with other OBS community members. For further information see http://openbuildservice.org/support/
34 changes: 17 additions & 17 deletions .github/ISSUE_TEMPLATE/Feature_request.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
---
name: Feature request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
6 changes: 5 additions & 1 deletion dist/obs-api-testsuite-rspec.spec
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ export RAILS_ENV=test
bin/rake db:create db:setup
bin/rails assets:precompile

bin/rspec -f d
#without boostrap
bin/rspec -f d --exclude-pattern "spec/bootstrap/**/*_spec.rb"

#only bootstrap
BOOTSTRAP=1 bin/rspec -f d spec/bootstrap/

%install

Expand Down
1 change: 0 additions & 1 deletion src/api/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ Style/MethodCallWithArgsParentheses:
- head
- headers
- hook_into
- http_do
- ignore_hosts
- include
- index
Expand Down
8 changes: 1 addition & 7 deletions src/api/.rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ Lint/Debugger:
Lint/DuplicateMethods:
Exclude:
- 'app/models/history_element.rb'
- 'lib/activexml/node.rb'

# Offense count: 22
Lint/HandleExceptions:
Expand Down Expand Up @@ -183,7 +182,7 @@ Lint/RescueException:
# Offense count: 1
Lint/ShadowedException:
Exclude:
- 'lib/activexml/transport.rb'
- 'app/models/project/remote_url.rb'

# Offense count: 17
# Cop supports --auto-correct.
Expand Down Expand Up @@ -299,7 +298,6 @@ Naming/HeredocDelimiterNaming:
Naming/MemoizedInstanceVariableName:
Exclude:
- 'app/models/obs_factory/distribution.rb'
- 'lib/activexml/transport.rb'
- 'lib/authenticator.rb'

# Offense count: 11
Expand Down Expand Up @@ -338,7 +336,6 @@ Naming/PredicateName:
- 'app/models/repository.rb'
- 'app/models/user.rb'
- 'app/models/user_ldap_strategy.rb'
- 'lib/activexml/node.rb'

# Offense count: 62
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
Expand Down Expand Up @@ -762,8 +759,6 @@ Style/ClassVars:
- 'app/models/obs_factory/openqa_job.rb'
- 'app/models/user.rb'
- 'app/models/user_ldap_strategy.rb'
- 'lib/activexml/node.rb'
- 'lib/activexml/transport.rb'
- 'test/functional/branch_publish_flag_test.rb'
- 'test/test_helper.rb'

Expand Down Expand Up @@ -1067,7 +1062,6 @@ Style/SymbolProc:
# Whitelist: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
Style/TrivialAccessors:
Exclude:
- 'lib/activexml/node.rb'
- 'test/test_helper.rb'

# Offense count: 1
Expand Down
4 changes: 2 additions & 2 deletions src/api/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ gem 'rails', '~> 5.2.0'

# as our database
gem 'mysql2'
# as requirement for activexml
# for XML handling
gem 'nokogiri'
# for delayed tasks
gem 'delayed_job_active_record', '>= 4.0.0'
Expand Down Expand Up @@ -71,7 +71,7 @@ gem 'gssapi', require: false
# for sending events to rabbitmq
gem 'bunny'
# for making changes to existing data
gem 'data_migrate', '= 4.0.0'
gem 'data_migrate', '= 5.0.2'
# for URI encoding
gem 'addressable'
# for XML builder
Expand Down
12 changes: 6 additions & 6 deletions src/api/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ GEM
bunny (2.11.0)
amq-protocol (~> 2.3.0)
byebug (10.0.2)
capybara (3.7.0)
capybara (3.7.1)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
Expand Down Expand Up @@ -119,7 +119,7 @@ GEM
cssmin (1.0.3)
daemons (1.2.6)
dalli (2.7.8)
data_migrate (4.0.0)
data_migrate (5.0.2)
rails (>= 4.2)
database_cleaner (1.7.0)
delayed_job (4.1.5)
Expand All @@ -133,10 +133,10 @@ GEM
erubis (2.7.0)
escape_utils (1.2.1)
execjs (2.7.0)
factory_bot (4.11.0)
factory_bot (4.11.1)
activesupport (>= 3.0.0)
factory_bot_rails (4.11.0)
factory_bot (~> 4.11.0)
factory_bot_rails (4.11.1)
factory_bot (~> 4.11.1)
railties (>= 3.0.0)
faker (1.9.1)
i18n (>= 0.7)
Expand Down Expand Up @@ -470,7 +470,7 @@ DEPENDENCIES
cssmin (>= 1.0.2)
daemons
dalli
data_migrate (= 4.0.0)
data_migrate (= 5.0.2)
database_cleaner (>= 1.0.1)
delayed_job_active_record (>= 4.0.0)
escape_utils
Expand Down
3 changes: 2 additions & 1 deletion src/api/app/assets/javascripts/webui/application/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ function addChangesEntryTemplate() { // jshint ignore:line
templ = "-------------------------------------------------------------------\n" +
DAYS[date.getUTCDay()] + " " + MONTHS[date.getUTCMonth()] + " " + day + " " +
hours + ":" + minutes + ":" + seconds + " UTC " + date.getUTCFullYear() +
" - " + $("a.changes-link").data('email') + "\n\n" + "- \n" + "\n";
" - " + $("a.changes-link").data('packagername') +
" <" + $("a.changes-link").data('packageremail') + ">" +"\n\n" + "- \n" + "\n";

editors[0].setValue(templ + editors[0].getValue());
editors[0].focus();
Expand Down
3 changes: 2 additions & 1 deletion src/api/app/assets/javascripts/webui2/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
//= require peek
//= require popper
//= require bootstrap
//= require cocoon
//= require jquery.flot
//= require jquery.flot.resize
//= require jquery.flot.time
Expand All @@ -23,7 +24,7 @@
//= require webui2/datatables.js
//= require webui2/tabs.js
//= require webui2/requests_table.js

//= require webui2/attributes.js
// FIXME refactor these files
//= require webui2/autocomplete.js
//= require webui2/comment.js
Expand Down
9 changes: 9 additions & 0 deletions src/api/app/assets/javascripts/webui2/attributes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
$(document).ready(function() {
// TODO: Edge case - When a user is already on the page and does a refresh, the description flickers as it appears. Find a way to fix this...
$('#attribute_type-description-' + $('#attrib_attrib_type_id option:selected').val()).removeClass('d-none');

$('#attrib_attrib_type_id').change(function() {
$("[id^='attribute_type-description-']:visible").addClass('d-none');
$('#attribute_type-description-' + $(this).val()).removeClass('d-none');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ a.openqa-failed, a.check-error, a.check-failure {
color: red
}

a.openqa-none, a.check-pending {
a.openqa-none, span.check-pending {
color: #006699
}

Expand Down
11 changes: 11 additions & 0 deletions src/api/app/assets/stylesheets/webui2/package-attributes.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ul li.value {
&:not(:last-child) {
margin-bottom: 5px;
}

& pre {
background-color: #f6f6f6;
border: 1px dotted #690;
padding: 2px 3px;
}
}
1 change: 1 addition & 0 deletions src/api/app/assets/stylesheets/webui2/webui2.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@
@import 'texts';
@import 'build-results';
@import 'autocomplete';
@import 'package-attributes';
22 changes: 7 additions & 15 deletions src/api/app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -201,18 +201,14 @@ def pass_to_backend(path = nil)
render_error status: 400, errorcode: 'invalid_record', message: exception.record.errors.full_messages.join('\n')
end

rescue_from ActiveXML::Transport::Error do |exception|
rescue_from Backend::Error do |exception|
render_error status: exception.code, errorcode: 'uncaught_exception', message: exception.summary
end

rescue_from Timeout::Error do |exception|
render_error status: 408, errorcode: 'timeout_error', message: exception.message
end

rescue_from ActiveXML::ParseError do
render_error status: 400, errorcode: 'invalid_xml', message: 'Invalid XML'
end

rescue_from APIError do |exception|
bt = exception.backtrace.join("\n")
logger.debug "#{exception.class.name} #{exception.message} #{bt}"
Expand All @@ -223,16 +219,12 @@ def pass_to_backend(path = nil)
render_error message: message, status: exception.status, errorcode: exception.errorcode
end

rescue_from ActiveXML::Transport::Error do |exception|
rescue_from Backend::Error do |exception|
text = exception.message
http_status = 500
begin
xml = ActiveXML::Node.new(text)
http_status = xml.value('code')
xml.set_attribute('origin', 'backend') unless xml.has_attribute?('origin')
text = xml.dump_xml
rescue ActiveXML::ParseError
end
xml = Nokogiri::XML(text).root
http_status = xml['code'] || 500
xml['origin'] ||= 'backend'
text = xml.to_xml
render plain: text, status: http_status
end

Expand All @@ -244,7 +236,7 @@ def pass_to_backend(path = nil)
render_error status: 403, errorcode: 'modify_package_no_permission', message: exception.message
end

rescue_from ActiveXML::Transport::NotFoundError, ActiveRecord::RecordNotFound do |exception|
rescue_from Backend::NotFoundError, ActiveRecord::RecordNotFound do |exception|
render_error message: exception.message, status: 404, errorcode: 'not_found'
end

Expand Down
2 changes: 1 addition & 1 deletion src/api/app/controllers/cloud/upload_jobs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def create
def destroy
::Backend::Api::Cloud.destroy(@upload_job.job_id)
render_ok
rescue ActiveXML::Transport::NotFoundError, ActiveXML::Transport::Error => exception
rescue ::Backend::Error => exception
render_error status: 500,
errorcode: 'cloud_upload_job_error',
message: exception.message
Expand Down
Loading

0 comments on commit 64f1958

Please sign in to comment.