Skip to content

Commit

Permalink
Rubocop automatic fixes (-A)
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Apr 8, 2022
1 parent 6cd2102 commit 8279127
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

source "https://rubygems.org"

gemspec
Expand Down
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

#--
# Copyright (C) 2015 SUSE LLC
# This library is free software; you can redistribute it and/or modify
Expand Down
4 changes: 3 additions & 1 deletion lib/libyui/rake.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

#--
# Copyright (C) 2015 SUSE LLC
# This library is free software; you can redistribute it and/or modify
Expand All @@ -23,7 +25,7 @@
include Libyui::Tasks::Helpers

# read package name from spec file name because CWD can have a -branch suffix
main_spec = Dir.glob("package/*.spec").sort.last
main_spec = Dir.glob("package/*.spec").max
conf.package_name = main_spec[/package\/(.*)\.spec$/, 1]

conf.version = cmake_version
Expand Down
6 changes: 4 additions & 2 deletions lib/libyui/tasks.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

#--
# Copyright (C) 2015-2021 SUSE LLC
# This library is free software; you can redistribute it and/or modify
Expand All @@ -19,7 +21,7 @@ module Libyui
# Facilities to write Libyui related rake tasks.
module Tasks
# Name of the CMake version file
VERSION_CMAKE = "VERSION.cmake".freeze
VERSION_CMAKE = "VERSION.cmake"
# Targets definition
TARGETS_FILE = File.expand_path("../../data/targets.yml", __dir__)

Expand Down Expand Up @@ -145,7 +147,7 @@ def bump_spec_so_version(filename = nil)
# @param filename [String, nil] if nil, it uses the shortest spec filename
# @return [String]
def spec_filename(filename)
filename || Dir.glob("package/*.spec").sort.first
filename || Dir.glob("package/*.spec").min
end
end
end
Expand Down
4 changes: 3 additions & 1 deletion lib/tasks/so_version.rake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

#--
# Copyright (C) 2021 SUSE LLC
# This library is free software; you can redistribute it and/or modify
Expand All @@ -24,7 +26,7 @@ namespace :so_version do
filenames = Dir.glob("package/*.spec").sort
filenames.reject! { |f| spec_so_version(f).nil? }

mismatches = filenames.select { |f| spec_so_version(f) != so_version }
mismatches = filenames.reject { |f| spec_so_version(f) == so_version }

if mismatches.any?
messages = ["so version mismatch:"]
Expand Down
2 changes: 2 additions & 0 deletions lib/tasks/test.rake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

#--
# Copyright (C) 2015 SUSE LLC
# This library is free software; you can redistribute it and/or modify
Expand Down
2 changes: 2 additions & 0 deletions lib/tasks/version.rake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

#--
# Copyright (C) 2015 SUSE LLC
# This library is free software; you can redistribute it and/or modify
Expand Down
2 changes: 2 additions & 0 deletions libyui-rake.gemspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

#--
# Copyright (C) 2015 SUSE LLC
# This library is free software; you can redistribute it and/or modify
Expand Down

0 comments on commit 8279127

Please sign in to comment.