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 2150897 commit 6cd2102
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# use the shared Yast defaults
inherit_from:
/usr/share/YaST2/data/devtools/data/rubocop_yast_style.yml
/usr/share/YaST2/data/devtools/data/rubocop-1.24.1_yast_style.yml

Metrics/LineLength:
Max: 100
Expand Down
2 changes: 1 addition & 1 deletion lib/libyui/rake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
end

# load libyui-rake tasks
task_path = File.expand_path("../../tasks", __FILE__)
task_path = File.expand_path("../tasks", __dir__)
Dir["#{task_path}/*.rake"].each do |f|
load f
end
3 changes: 2 additions & 1 deletion lib/libyui/tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module Tasks
# Name of the CMake version file
VERSION_CMAKE = "VERSION.cmake".freeze
# Targets definition
TARGETS_FILE = File.expand_path("../../../data/targets.yml", __FILE__)
TARGETS_FILE = File.expand_path("../../data/targets.yml", __dir__)

# Wrapper to set up packaging tasks
def self.configuration(&block)
Expand All @@ -32,6 +32,7 @@ def self.submit_to(target, file = TARGETS_FILE)
targets = YAML.load_file(file)
config = targets[target]
raise "Not configuration found for #{target}" if config.nil?

Libyui::Tasks.configuration do |conf|
config.each do |meth, val|
conf.public_send("#{meth}=", val)
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/version.rake
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace :version do
spec_v = spec_version(spec_filename)
if cmake_v != spec_v
raise "Version mismatch, #{Libyui::Tasks::VERSION_CMAKE}:#{cmake_v} "\
"#{spec_filename}:#{spec_v}"
"#{spec_filename}:#{spec_v}"
end
end
puts cmake_v if verbose
Expand Down
17 changes: 9 additions & 8 deletions libyui-rake.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Gem::Specification.new do |spec|
# gem name and description
spec.name = "libyui-rake"
spec.version = File.read(File.expand_path("../VERSION", __FILE__)).chomp
spec.version = File.read(File.expand_path("VERSION", __dir__)).chomp
spec.summary = "Rake tasks that provide basic workflow for libyui development"
spec.license = "LGPL-2.1"

Expand All @@ -27,12 +27,12 @@ Gem::Specification.new do |spec|
spec.homepage = "https://github.com/openSUSE/libyui-rake"

spec.summary = "Rake tasks providing basic workflow for libyui development"
spec.description = <<-end
Rake tasks that support the workflow of a libyui developer. It allows packaging
a repo, sending it to the build service, creating a submit request to the
target repo or running the client from the git repo.
Heavily inspired by yast-rake.
end
spec.description = <<~END
Rake tasks that support the workflow of a libyui developer. It allows packaging
a repo, sending it to the build service, creating a submit request to the
target repo or running the client from the git repo.
Heavily inspired by yast-rake.
END

# gem content
spec.files = Dir["lib/**/*.rb", "lib/tasks/*.rake", "data/*", "COPYING", "README.md", "VERSION"]
Expand All @@ -41,7 +41,8 @@ end
spec.require_path = "lib"

# dependencies
spec.add_runtime_dependency("rake", "> 10.0", "< 99")
spec.add_runtime_dependency("packaging_rake_tasks", "~> 1.5")
spec.add_runtime_dependency("rake", "> 10.0", "< 99")
# "~> 1.5" means ">= 1.5 and < 2" (thanks to darix)
spec.metadata["rubygems_mfa_required"] = "true"
end

0 comments on commit 6cd2102

Please sign in to comment.