diff --git a/docs/api/api/obs.rng b/docs/api/api/obs.rng
index f8a57f3aff6..615d3b41db4 100644
--- a/docs/api/api/obs.rng
+++ b/docs/api/api/obs.rng
@@ -244,11 +244,9 @@
-
-
-
-
-
+
+
+
diff --git a/src/api/Gemfile b/src/api/Gemfile
index bddf3aecd65..17bf026b2cc 100644
--- a/src/api/Gemfile
+++ b/src/api/Gemfile
@@ -67,7 +67,7 @@ end
# Gems used only for testing the application and not required in production environments by default.
group :test do
# as testing frameworks
- gem 'minitest', '= 5.8.0'
+ gem 'minitest', '= 5.8.3'
gem 'test-unit'
# to ensure a clean state for testing
gem 'database_cleaner', '>= 1.0.1'
diff --git a/src/api/Gemfile.lock b/src/api/Gemfile.lock
index 31b4cab3a6d..891b7dabd61 100644
--- a/src/api/Gemfile.lock
+++ b/src/api/Gemfile.lock
@@ -1,36 +1,36 @@
GEM
remote: https://rubygems.org/
specs:
- actionmailer (4.2.2)
- actionpack (= 4.2.2)
- actionview (= 4.2.2)
- activejob (= 4.2.2)
+ actionmailer (4.2.5)
+ actionpack (= 4.2.5)
+ actionview (= 4.2.5)
+ activejob (= 4.2.5)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
- actionpack (4.2.2)
- actionview (= 4.2.2)
- activesupport (= 4.2.2)
+ actionpack (4.2.5)
+ actionview (= 4.2.5)
+ activesupport (= 4.2.5)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
- rails-html-sanitizer (~> 1.0, >= 1.0.1)
- actionview (4.2.2)
- activesupport (= 4.2.2)
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
+ actionview (4.2.5)
+ activesupport (= 4.2.5)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
- rails-html-sanitizer (~> 1.0, >= 1.0.1)
- activejob (4.2.2)
- activesupport (= 4.2.2)
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
+ activejob (4.2.5)
+ activesupport (= 4.2.5)
globalid (>= 0.3.0)
- activemodel (4.2.2)
- activesupport (= 4.2.2)
+ activemodel (4.2.5)
+ activesupport (= 4.2.5)
builder (~> 3.1)
- activerecord (4.2.2)
- activemodel (= 4.2.2)
- activesupport (= 4.2.2)
+ activerecord (4.2.5)
+ activemodel (= 4.2.5)
+ activesupport (= 4.2.5)
arel (~> 6.0)
- activesupport (4.2.2)
+ activesupport (4.2.5)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
@@ -38,18 +38,18 @@ GEM
tzinfo (~> 1.1)
acts_as_list (0.7.2)
activerecord (>= 3.0)
- acts_as_tree (2.2.0)
+ acts_as_tree (2.3.0)
activerecord (>= 3.0.0)
- addressable (2.3.8)
+ addressable (2.4.0)
ansi (1.5.0)
- arel (6.0.0)
+ arel (6.0.3)
ast (2.1.0)
astrolabe (1.3.1)
parser (~> 2.2)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
builder (3.2.2)
- capybara (2.4.4)
+ capybara (2.5.0)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
@@ -58,7 +58,7 @@ GEM
capybara_minitest_spec (1.0.5)
capybara (>= 2)
minitest (>= 4)
- chunky_png (1.3.4)
+ chunky_png (1.3.5)
ci_reporter (2.0.0)
builder (>= 2.1.2)
cliver (0.3.2)
@@ -69,41 +69,43 @@ GEM
codemirror-rails (5.3)
railties (>= 3.0, < 5)
coderay (1.1.0)
- coveralls (0.8.2)
+ concurrent-ruby (1.0.0)
+ coveralls (0.8.10)
json (~> 1.8)
rest-client (>= 1.6.8, < 2)
- simplecov (~> 0.10.0)
+ simplecov (~> 0.11.0)
term-ansicolor (~> 1.3)
thor (~> 0.19.1)
- crack (0.4.2)
+ tins (~> 1.6.0)
+ crack (0.4.3)
safe_yaml (~> 1.0.0)
crass (1.0.2)
cssmin (1.0.3)
- daemons (1.2.2)
+ daemons (1.2.3)
dalli (2.7.4)
- database_cleaner (1.4.1)
+ database_cleaner (1.5.1)
debug_inspector (0.0.2)
- delayed_job (4.0.6)
+ delayed_job (4.1.1)
activesupport (>= 3.0, < 5.0)
- delayed_job_active_record (4.0.3)
- activerecord (>= 3.0, < 5.0)
- delayed_job (>= 3.0, < 4.1)
+ delayed_job_active_record (4.1.0)
+ activerecord (>= 3.0, < 5)
+ delayed_job (>= 3.0, < 5)
docile (1.1.5)
- domain_name (0.5.24)
+ domain_name (0.5.25)
unf (>= 0.0.5, < 1.0.0)
erubis (2.7.0)
escape_utils (1.1.0)
- execjs (2.5.2)
- faker (1.4.3)
+ execjs (2.6.0)
+ faker (1.6.1)
i18n (~> 0.5)
flog (4.3.2)
ruby_parser (~> 3.1, > 3.1.0)
sexp_processor (~> 4.4)
- font-awesome-rails (4.3.0.0)
+ font-awesome-rails (4.5.0.0)
railties (>= 3.2, < 5.0)
- globalid (0.3.5)
+ globalid (0.3.6)
activesupport (>= 4.1.0)
- haml (4.0.6)
+ haml (4.0.7)
tilt
hoptoad_notifier (2.4.11)
activesupport
@@ -116,7 +118,7 @@ GEM
activerecord (>= 4.1.0)
jquery-datatables-rails (1.12.2)
jquery-rails
- jquery-rails (4.0.4)
+ jquery-rails (4.0.5)
rails-dom-testing (~> 1.0)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
@@ -126,44 +128,44 @@ GEM
kaminari (0.16.3)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
- kgio (2.9.3)
- loofah (2.0.2)
+ kgio (2.10.0)
+ loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
metaclass (0.0.4)
method_source (0.8.2)
middleware (0.1.0)
- mime-types (2.6.2)
- mini_portile (0.6.2)
- minitest (5.8.0)
+ mime-types (1.25.1)
+ mini_portile2 (2.0.0)
+ minitest (5.8.3)
minitest-fail-fast (0.1.0)
minitest (~> 5)
- minitest-reporters (1.1.3)
+ minitest-reporters (1.1.7)
ansi
builder
minitest (>= 5.0)
ruby-progressbar
mocha (1.1.0)
metaclass (~> 0.0.1)
- multi_json (1.11.1)
- mysql2 (0.3.19)
- netrc (0.10.3)
- nokogiri (1.6.6.2)
- mini_portile (~> 0.6.0)
+ multi_json (1.11.2)
+ mysql2 (0.4.2)
+ netrc (0.11.0)
+ nokogiri (1.6.7)
+ mini_portile2 (~> 2.0.0)
nokogumbo (1.4.1)
nokogiri
- parser (2.2.2.6)
+ parser (2.2.3.0)
ast (>= 1.1, < 3.0)
pkg-config (1.1.6)
- poltergeist (1.6.0)
+ poltergeist (1.8.1)
capybara (~> 2.1)
cliver (~> 0.3.1)
multi_json (~> 1.0)
websocket-driver (>= 0.2.0)
- power_assert (0.2.3)
+ power_assert (0.2.6)
powerpack (0.1.1)
- pry (0.10.1)
+ pry (0.10.3)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
@@ -172,20 +174,20 @@ GEM
rack (1.6.4)
rack-test (0.6.3)
rack (>= 1.0)
- rails (4.2.2)
- actionmailer (= 4.2.2)
- actionpack (= 4.2.2)
- actionview (= 4.2.2)
- activejob (= 4.2.2)
- activemodel (= 4.2.2)
- activerecord (= 4.2.2)
- activesupport (= 4.2.2)
+ rails (4.2.5)
+ actionmailer (= 4.2.5)
+ actionpack (= 4.2.5)
+ actionview (= 4.2.5)
+ activejob (= 4.2.5)
+ activemodel (= 4.2.5)
+ activerecord (= 4.2.5)
+ activesupport (= 4.2.5)
bundler (>= 1.3.0, < 2.0)
- railties (= 4.2.2)
+ railties (= 4.2.5)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
- rails-dom-testing (1.0.6)
+ rails-dom-testing (1.0.7)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
@@ -193,13 +195,13 @@ GEM
loofah (~> 2.0)
rails_tokeninput (1.7.0)
railties (>= 3.1.0)
- railties (4.2.2)
- actionpack (= 4.2.2)
- activesupport (= 4.2.2)
+ railties (4.2.5)
+ actionpack (= 4.2.5)
+ activesupport (= 4.2.5)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rainbow (2.0.0)
- raindrops (0.13.0)
+ raindrops (0.15.0)
rake (10.4.2)
rdoc (4.2.0)
redcarpet (3.3.3)
@@ -210,30 +212,31 @@ GEM
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
riddle (1.5.12)
- rubocop (0.33.0)
+ rubocop (0.35.1)
astrolabe (~> 1.3)
- parser (>= 2.2.2.5, < 3.0)
+ parser (>= 2.2.3.0, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
- ruby-progressbar (~> 1.4)
+ ruby-progressbar (~> 1.7)
+ tins (<= 1.6.0)
ruby-ldap (0.9.17)
ruby-progressbar (1.7.5)
- ruby_parser (3.7.0)
+ ruby_parser (3.7.2)
sexp_processor (~> 4.1)
safe_yaml (1.0.4)
sanitize (4.0.0)
crass (~> 1.0.2)
nokogiri (>= 1.4.4)
nokogumbo (= 1.4.1)
- sass (3.4.14)
- sass-rails (5.0.3)
+ sass (3.4.19)
+ sass-rails (5.0.4)
railties (>= 4.0.0, < 5.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
- tilt (~> 1.1)
+ tilt (>= 1.1, < 3)
sexp_processor (4.6.0)
- simplecov (0.10.0)
+ simplecov (0.11.1)
docile (~> 1.1.0)
json (~> 1.8)
simplecov-html (~> 0.10.0)
@@ -241,16 +244,17 @@ GEM
single_test (0.6.0)
rake
slop (3.6.0)
- sprite-factory (1.6.2)
- sprockets (3.2.0)
- rack (~> 1.0)
- sprockets-rails (2.3.1)
+ sprite-factory (1.7.1)
+ sprockets (3.5.1)
+ concurrent-ruby (~> 1.0)
+ rack (> 1, < 3)
+ sprockets-rails (2.3.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
term-ansicolor (1.3.2)
tins (~> 1.0)
- test-unit (3.1.2)
+ test-unit (3.1.5)
power_assert
thinking-sphinx (3.1.4)
activerecord (>= 3.1.0)
@@ -262,24 +266,24 @@ GEM
thor (0.19.1)
thread_safe (0.3.5)
tilt (1.4.1)
- timecop (0.7.4)
+ timecop (0.8.0)
tins (1.6.0)
tzinfo (1.2.2)
thread_safe (~> 0.1)
- uglifier (2.7.1)
+ uglifier (2.7.2)
execjs (>= 0.3.0)
json (>= 1.8.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.1)
- unicorn (4.9.0)
+ unicorn (5.0.1)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
unicorn-rails (2.2.0)
rack
unicorn
- web-console (2.1.3)
+ web-console (2.2.1)
activemodel (>= 4.0)
binding_of_caller (>= 0.7.2)
railties (>= 4.0)
@@ -287,7 +291,7 @@ GEM
webmock (1.21.0)
addressable (>= 2.3.6)
crack (>= 0.3.2)
- websocket-driver (0.5.4)
+ websocket-driver (0.6.3)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
xmlhash (1.3.6)
@@ -326,7 +330,7 @@ DEPENDENCIES
jquery-rails
jquery-ui-rails (~> 4.2.1)
kaminari
- minitest (= 5.8.0)
+ minitest (= 5.8.3)
minitest-fail-fast
minitest-reporters
mocha (> 0.13.0)
@@ -357,3 +361,6 @@ DEPENDENCIES
webmock (>= 1.18.0)
xmlhash (>= 1.3.6)
yajl-ruby
+
+BUNDLED WITH
+ 1.10.6
diff --git a/src/api/app/controllers/webui/monitor_controller.rb b/src/api/app/controllers/webui/monitor_controller.rb
index 51000d1b016..4030dbbb2d5 100644
--- a/src/api/app/controllers/webui/monitor_controller.rb
+++ b/src/api/app/controllers/webui/monitor_controller.rb
@@ -140,6 +140,6 @@ def require_settings
@interval_steps = 1
@max_color = 240
@time_now = Time.now
- @dead_line = 1.hours.ago
+ @dead_line = 1.hour.ago
end
end
diff --git a/src/api/app/controllers/webui/package_controller.rb b/src/api/app/controllers/webui/package_controller.rb
index d0ee40785aa..617403c1b93 100644
--- a/src/api/app/controllers/webui/package_controller.rb
+++ b/src/api/app/controllers/webui/package_controller.rb
@@ -844,7 +844,7 @@ def update_build_log
begin
@log_chunk = get_log_chunk( @project, @package, @repo, @arch, @offset, @offset + @maxsize)
- if ( @log_chunk.length == 0 )
+ if @log_chunk.length == 0
@finished = true
else
@offset += ActiveXML::backend.last_body_length
diff --git a/src/api/app/models/owner.rb b/src/api/app/models/owner.rb
index 5912088a3b8..724e905aac7 100644
--- a/src/api/app/models/owner.rb
+++ b/src/api/app/models/owner.rb
@@ -296,7 +296,7 @@ def self.lookup_package_owner(rootproject, pkg, owner, limit, devel, filter, dee
m = self.extract_maintainer(rootproject, p.resolve_devel_package, filter, owner) if devel == true
m = self.extract_maintainer(rootproject, p, filter, owner) unless m
- break unless deepest if m
+ break if m and not deepest
end
# found entry
diff --git a/src/api/app/models/package.rb b/src/api/app/models/package.rb
index 07dcb51d674..2745d517a5a 100644
--- a/src/api/app/models/package.rb
+++ b/src/api/app/models/package.rb
@@ -379,8 +379,8 @@ def sources_changed(opts = {})
update_activity
# mark the backend infos "dirty"
BackendPackage.where(package_id: self.id).delete_all
- if dir_xml
- dir_xml = dir_xml.body if dir_xml.is_a? Net::HTTPSuccess
+ if dir_xml.is_a? Net::HTTPSuccess
+ dir_xml = dir_xml.body
else
dir_xml = source_file(nil)
end
@@ -951,6 +951,8 @@ def _add_channel(mode, channel_binary, message)
return if mode == :skip_disabled and not channel_binary.channel_binary_list.channel.is_active?
cpkg = channel_binary.create_channel_package_into(self.project, message)
return unless cpkg
+ # be sure that the object exists or a background job get launched
+ cpkg.backend_package
# add and enable repos
return if mode == :add_disabled and not channel_binary.channel_binary_list.channel.is_active?
cpkg.channels.first.add_channel_repos_to_project(cpkg, mode)
@@ -1008,7 +1010,11 @@ def branch_from(origin_project, origin_package, rev = nil, missingok = nil, comm
# just make sure the backend_package is there
def update_if_dirty
- self.backend_package
+ begin
+ self.backend_package
+ rescue Mysql2::Error
+ # the delayed job might have jumped in and created the entry just before us
+ end
end
def linking_packages
diff --git a/src/api/app/models/user_ldap_strategy.rb b/src/api/app/models/user_ldap_strategy.rb
index 8a471ba80c2..2cdef5f0e71 100644
--- a/src/api/app/models/user_ldap_strategy.rb
+++ b/src/api/app/models/user_ldap_strategy.rb
@@ -483,7 +483,9 @@ def self.find_with_ldap(login, password)
ldap_info[1] = login
end
- Rails.cache.write(key, [Digest::MD5.digest(password), ldap_info[0], ldap_info[1]], :expires_in => 2.minute)
+ Rails.cache.write(key,
+ [Digest::MD5.digest(password), ldap_info[0], ldap_info[1]],
+ :expires_in => 2.minutes)
Rails.logger.debug("login success for checking with ldap server")
ldap_info
end
diff --git a/src/api/app/views/models/_project.xml.builder b/src/api/app/views/models/_project.xml.builder
index 0031683f60c..530c7deb5ef 100644
--- a/src/api/app/views/models/_project.xml.builder
+++ b/src/api/app/views/models/_project.xml.builder
@@ -41,9 +41,9 @@ xml.project(project_attributes) do
params = {arch: download_repository.arch, url: download_repository.url, repotype: download_repository.repotype}
xml_repository.download(params) do |xml_download|
xml_download.archfilter download_repository.archfilter if download_repository.archfilter
- if download_repository.masterurl
+ unless download_repository.masterurl.blank?
params = {url: download_repository.masterurl}
- params[:sslfingerprint] = download_repository.mastersslfingerprint if download_repository.mastersslfingerprint
+ params[:sslfingerprint] = download_repository.mastersslfingerprint
xml_download.master(params)
end
xml_download.pubkey download_repository.pubkey if download_repository.pubkey
diff --git a/src/api/test/functional/attributes_test.rb b/src/api/test/functional/attributes_test.rb
index ee47dccbaa6..41dff6b0788 100644
--- a/src/api/test/functional/attributes_test.rb
+++ b/src/api/test/functional/attributes_test.rb
@@ -366,8 +366,10 @@ def test_create_attributes_package
assert_response :success
get "/source/kde4/kdelibs/_attribute/OBS:Maintained"
assert_response :success
- assert_equal({"attribute"=>[{"name"=>"Maintained", "namespace"=>"OBS"},
- {"name"=>"Maintained", "namespace"=>"OBS", "binary"=>"kdelibs-devel"}]}, Xmlhash.parse(@response.body))
+ assert_equal({"attribute" => [{"name"=>"Maintained", "namespace"=>"OBS"},
+ {"name"=>"Maintained", "namespace"=>"OBS", "binary"=>"kdelibs-devel"}
+ ]},
+ Xmlhash.parse(@response.body))
get "/source/kde4/kdelibs/kdelibs-devel/_attribute"
assert_response :success
get "/source/kde4/kdelibs/kdelibs-devel/_attribute/OBS:Maintained"
diff --git a/src/api/test/functional/source_controller_test.rb b/src/api/test/functional/source_controller_test.rb
index cf6e63c1364..1e40797ab04 100644
--- a/src/api/test/functional/source_controller_test.rb
+++ b/src/api/test/functional/source_controller_test.rb
@@ -1506,8 +1506,8 @@ def test_read_file_sourceaccess_proj
end
def add_file_to_package (url1, asserttag1, url2, assertresp2,
- assertselect2, assertselect2rev,
- assertresp3, asserteq3, assertresp4)
+ assertselect2, assertselect2rev,
+ assertresp3, asserteq3, assertresp4)
get url1
# before md5
assert_xml_tag asserttag1 if asserttag1
diff --git a/src/api/test/functional/status_controller_test.rb b/src/api/test/functional/status_controller_test.rb
index 26b89fdbaad..414d674b423 100644
--- a/src/api/test/functional/status_controller_test.rb
+++ b/src/api/test/functional/status_controller_test.rb
@@ -82,7 +82,7 @@ def test_history
Timecop.freeze(2010, 7, 12) do
day_before_yesterday = Time.now.to_i - 2.days
- yesterday = Time.now.to_i - 1.days
+ yesterday = Time.now.to_i - 1.day
1.times do |i|
StatusHistory.create(time: day_before_yesterday + i, key: 'squeue_low_aarch64', value: i)
end
diff --git a/src/api/test/functional/webui/add_repo_test.rb b/src/api/test/functional/webui/add_repo_test.rb
index 37663610d89..1803483ab05 100644
--- a/src/api/test/functional/webui/add_repo_test.rb
+++ b/src/api/test/functional/webui/add_repo_test.rb
@@ -15,7 +15,7 @@ def test_add_default
page.must_have_text('KIWI image build')
- find('#submitrepos')['disabled'].must_equal 'disabled'
+ find('#submitrepos')['disabled'].must_equal true
check 'repo_Base_repo'
check 'repo_images'
diff --git a/src/api/test/models/status_history_test.rb b/src/api/test/models/status_history_test.rb
index 12e2da82892..fec5e9e83cf 100644
--- a/src/api/test/models/status_history_test.rb
+++ b/src/api/test/models/status_history_test.rb
@@ -33,7 +33,7 @@ def teardown
test "history_by_key_and_hours" do
Timecop.freeze(2010, 7, 12) do
day_before_yesterday = Time.now.to_i - 2.days
- yesterday = Time.now.to_i - 1.days
+ yesterday = Time.now.to_i - 1.day
StatusHistory.transaction do
10.times do |i|
StatusHistory.create time: day_before_yesterday + i, key: 'squeue_low_aarch64', value: i
diff --git a/src/api/test/test_helper.rb b/src/api/test/test_helper.rb
index 4f9fccffc2c..3ebca38f983 100644
--- a/src/api/test/test_helper.rb
+++ b/src/api/test/test_helper.rb
@@ -41,7 +41,7 @@
require 'capybara/poltergeist'
require 'capybara/rails'
-Capybara.default_wait_time = 6
+Capybara.default_max_wait_time = 6
Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, debug: false, timeout: 30)
diff --git a/src/api/test/unit/code_quality_test.rb b/src/api/test/unit/code_quality_test.rb
index d7d53d74494..f41949f2d12 100644
--- a/src/api/test/unit/code_quality_test.rb
+++ b/src/api/test/unit/code_quality_test.rb
@@ -70,7 +70,7 @@ def setup
'BsRequest#webui_actions' => 130.13,
'BsRequest::new_from_xml' => 113.77,
'BsRequestAction#check_action_permission!' => 117.71,
- 'BsRequestAction#check_action_permission_target!' => 94.3,
+ 'BsRequestAction#check_action_permission_target!' => 89.68,
'BsRequestAction#create_expand_package' => 443.16,
'BsRequestAction#default_reviewers' => 141.02,
'BsRequestAction#store_from_xml' => 88.01,