Skip to content

Commit 4faa7ca

Browse files
authored
Merge pull request #1974 from NicholasBHubbard/fixup-some-comments
Minor comment cleanup
2 parents e69cdca + b63dbdc commit 4faa7ca

File tree

5 files changed

+18
-19
lines changed

5 files changed

+18
-19
lines changed

lib/fpm/command.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ def load_options(path)
673673
option.of(self).take(value)
674674
end
675675
end
676-
end
676+
end # def load_options
677677

678678
# A simple flag validator
679679
#
@@ -757,4 +757,4 @@ def messages
757757

758758
public(:initialize, :ok?, :messages)
759759
end # class Validator
760-
end # class FPM::Program
760+
end # class FPM::Command

lib/fpm/package.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def convert(klass)
226226
def converted_from(origin)
227227
# nothing to do by default. Subclasses may implement this.
228228
# See the RPM package class for an example.
229-
end # def converted
229+
end # def converted_from
230230

231231
# Add a new source to this package.
232232
# The exact behavior depends on the kind of package being managed.
@@ -324,7 +324,7 @@ def files
324324

325325
def template_dir
326326
File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "templates"))
327-
end
327+
end # def template_dir
328328

329329
def template(path)
330330
template_path = File.join(template_dir, path)
@@ -437,7 +437,7 @@ def option(flag, param, help, options={}, &block)
437437

438438
help = "(#{type} only) #{help}"
439439
@options << [flag, param, help, options, block]
440-
end # def options
440+
end # def option
441441

442442
# Apply the options for this package on the clamp command
443443
#
@@ -510,7 +510,7 @@ def write_scripts
510510
File.chmod(0755, out)
511511
end
512512
end
513-
end
513+
end # def write_scripts
514514

515515
# Get the contents of the script by a given name.
516516
#
@@ -547,7 +547,7 @@ def provides=(value)
547547
else
548548
@provides = value
549549
end
550-
end
550+
end # def provides=
551551

552552
# General public API
553553
public(:type, :initialize, :convert, :input, :output, :to_s, :cleanup, :files,

lib/fpm/package/cpan.rb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ def input(package)
4646
#"me know by filing an issue: " \
4747
#"https://github.com/jordansissel/fpm/issues"
4848
#end
49-
#require "ftw" # for http access
5049
require "net/http"
5150
require "json"
5251

@@ -299,7 +298,7 @@ def input(package)
299298
self.architecture = "native"
300299
end
301300
end
302-
end
301+
end # def input
303302

304303
def unpack(tarball)
305304
directory = build_path("module")
@@ -308,7 +307,7 @@ def unpack(tarball)
308307
%q{--transform=s,[./]*[^/]*/,,} ]
309308
safesystem("tar", *args)
310309
return directory
311-
end
310+
end # def unpack
312311

313312
def download(metadata, cpan_version=nil)
314313
distribution = metadata["distribution"]
@@ -383,7 +382,7 @@ def search(package)
383382
data = response.body
384383
metadata = JSON.parse(data)
385384
return metadata
386-
end # def metadata
385+
end # def search
387386

388387
def cap_name(name)
389388
return "perl(" + name.gsub("-", "::") + ")"
@@ -411,7 +410,7 @@ def httpfetch(url)
411410
when Net::HTTPRedirection; return httpfetch(response["location"])
412411
else; response.error!
413412
end
414-
end
413+
end # def httpfetch
415414

416415
def httppost(url, body)
417416
uri = URI.parse(url)
@@ -428,7 +427,7 @@ def httppost(url, body)
428427
when Net::HTTPRedirection; return httppost(response["location"])
429428
else; response.error!
430429
end
431-
end
430+
end # def httppost
432431

433432
public(:input)
434-
end # class FPM::Package::NPM
433+
end # class FPM::Package::CPAN

lib/fpm/package/gem.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ def detect_source_date_from_changelog(installdir)
381381
logger.debug("Gem %s did not have changelog with recognized name" % [name])
382382
# FIXME: check rubygems.org?
383383
end
384-
end # detect_source_date_from_changelog
384+
end # def detect_source_date_from_changelog
385385

386386
public(:input, :output)
387387
end # class FPM::Package::Gem

lib/fpm/util.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def default_shell
3838
shell = ENV["SHELL"]
3939
return "/bin/sh" if shell.nil? || shell.empty?
4040
return shell
41-
end
41+
end # def default_shell
4242

4343
############################################################################
4444
# execmd([env,] cmd [,opts])
@@ -259,7 +259,7 @@ def ar_cmd
259259
def ar_cmd_deterministic?
260260
ar_cmd if not defined? @@ar_cmd_deterministic
261261
return @@ar_cmd_deterministic
262-
end
262+
end # def ar_cmd_deterministic?
263263

264264
# Get the recommended 'tar' command for this platform.
265265
def tar_cmd
@@ -306,7 +306,7 @@ def tar_cmd
306306
def tar_cmd_supports_sort_names_and_set_mtime?
307307
tar_cmd if not defined? @@tar_cmd_deterministic
308308
return @@tar_cmd_deterministic
309-
end
309+
end # def tar_cmd_supports_sort_names_and_set_mtime?
310310

311311
def copy_metadata(source, destination)
312312
source_stat = File::lstat(source)
@@ -452,7 +452,7 @@ def erbnew(template_code)
452452
# Ruby 3.1.0 and newer
453453
return ERB.new(template_code, trim_mode: "-")
454454
end
455-
end
455+
end # def erbnew
456456
end # module FPM::Util
457457

458458
require 'fpm/util/tar_writer'

0 commit comments

Comments
 (0)