lib/gemsmith/rake/tasks.rb in gemsmith-9.6.0 vs lib/gemsmith/rake/tasks.rb in gemsmith-10.0.0
- old
+ new
@@ -29,10 +29,11 @@
@publisher = publisher
end
# rubocop:disable Metrics/AbcSize
# rubocop:disable Metrics/MethodLength
+ # :reek:TooManyStatements
def install
desc "Update README (table of contents)"
task :doc do
builder.doc
end
@@ -44,29 +45,33 @@
task :validate do
builder.validate
end
- desc "Build #{gem_spec.package_file_name} package"
+ desc "Build #{gem_package} package"
task build: %i[clean doc validate] do
builder.build gem_spec
end
- desc "Install #{gem_spec.package_file_name} package"
+ desc "Install #{gem_package} package"
task install: :build do
builder.install gem_spec
end
desc "Build, tag as #{gem_spec.version_label} (#{signed_label}), " \
- "and push #{gem_spec.package_file_name} to RubyGems"
+ "and push #{gem_package} to RubyGems"
task publish: :build do
publisher.publish
end
end
private
attr_reader :gem_spec, :builder, :publisher
+
+ def gem_package
+ gem_spec.package_file_name
+ end
def signed_label
publisher.signed? ? "signed" : "unsigned"
end
end