Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/fpm/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ def load_options(path)
option.of(self).take(value)
end
end
end
end # def load_options

# A simple flag validator
#
Expand Down Expand Up @@ -749,4 +749,4 @@ def messages

public(:initialize, :ok?, :messages)
end # class Validator
end # class FPM::Program
end # class FPM::Command
10 changes: 5 additions & 5 deletions lib/fpm/package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def convert(klass)
def converted_from(origin)
# nothing to do by default. Subclasses may implement this.
# See the RPM package class for an example.
end # def converted
end # def converted_from

# Add a new source to this package.
# The exact behavior depends on the kind of package being managed.
Expand Down Expand Up @@ -325,7 +325,7 @@ def files

def template_dir
File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "templates"))
end
end # def template_dir

def template(path)
template_path = File.join(template_dir, path)
Expand Down Expand Up @@ -438,7 +438,7 @@ def option(flag, param, help, options={}, &block)

help = "(#{type} only) #{help}"
@options << [flag, param, help, options, block]
end # def options
end # def option

# Apply the options for this package on the clamp command
#
Expand Down Expand Up @@ -511,7 +511,7 @@ def write_scripts
File.chmod(0755, out)
end
end
end
end # def write_scripts

# Get the contents of the script by a given name.
#
Expand Down Expand Up @@ -548,7 +548,7 @@ def provides=(value)
else
@provides = value
end
end
end # def provides=

# General public API
public(:type, :initialize, :convert, :input, :output, :to_s, :cleanup, :files,
Expand Down
13 changes: 6 additions & 7 deletions lib/fpm/package/cpan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ def input(package)
#"me know by filing an issue: " \
#"https://github.com/jordansissel/fpm/issues"
#end
#require "ftw" # for http access
require "net/http"
require "json"

Expand Down Expand Up @@ -299,7 +298,7 @@ def input(package)
self.architecture = "native"
end
end
end
end # def input

def unpack(tarball)
directory = build_path("module")
Expand All @@ -308,7 +307,7 @@ def unpack(tarball)
%q{--transform=s,[./]*[^/]*/,,} ]
safesystem("tar", *args)
return directory
end
end # def unpack

def download(metadata, cpan_version=nil)
distribution = metadata["distribution"]
Expand Down Expand Up @@ -383,7 +382,7 @@ def search(package)
data = response.body
metadata = JSON.parse(data)
return metadata
end # def metadata
end # def search

def cap_name(name)
return "perl(" + name.gsub("-", "::") + ")"
Expand Down Expand Up @@ -411,7 +410,7 @@ def httpfetch(url)
when Net::HTTPRedirection; return httpfetch(response["location"])
else; response.error!
end
end
end # def httpfetch

def httppost(url, body)
uri = URI.parse(url)
Expand All @@ -428,7 +427,7 @@ def httppost(url, body)
when Net::HTTPRedirection; return httppost(response["location"])
else; response.error!
end
end
end # def httppost

public(:input)
end # class FPM::Package::NPM
end # class FPM::Package::CPAN
2 changes: 1 addition & 1 deletion lib/fpm/package/gem.rb
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ def detect_source_date_from_changelog(installdir)
logger.debug("Gem %s did not have changelog with recognized name" % [name])
# FIXME: check rubygems.org?
end
end # detect_source_date_from_changelog
end # def detect_source_date_from_changelog

public(:input, :output)
end # class FPM::Package::Gem
8 changes: 4 additions & 4 deletions lib/fpm/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def default_shell
shell = ENV["SHELL"]
return "/bin/sh" if shell.nil? || shell.empty?
return shell
end
end # def default_shell

############################################################################
# execmd([env,] cmd [,opts])
Expand Down Expand Up @@ -257,7 +257,7 @@ def ar_cmd
def ar_cmd_deterministic?
ar_cmd if not defined? @@ar_cmd_deterministic
return @@ar_cmd_deterministic
end
end # def ar_cmd_deterministic?

# Get the recommended 'tar' command for this platform.
def tar_cmd
Expand Down Expand Up @@ -302,7 +302,7 @@ def tar_cmd
def tar_cmd_supports_sort_names_and_set_mtime?
tar_cmd if not defined? @@tar_cmd_deterministic
return @@tar_cmd_deterministic
end
end # def tar_cmd_supports_sort_names_and_set_mtime?

def copy_metadata(source, destination)
source_stat = File::lstat(source)
Expand Down Expand Up @@ -435,7 +435,7 @@ def erbnew(template_code)
# Ruby 3.1.0 and newer
return ERB.new(template_code, trim_mode: "-")
end
end
end # def erbnew
end # module FPM::Util

require 'fpm/util/tar_writer'
Loading