Module: Pakman

Defined in:
lib/pakman.rb,
lib/pakman/utils.rb,
lib/pakman/copier.rb,
lib/pakman/finder.rb,
lib/pakman/cli/ctx.rb,
lib/pakman/fetcher.rb,
lib/pakman/version.rb,
lib/pakman/cli/opts.rb,
lib/pakman/manifest.rb,
lib/pakman/template.rb,
lib/pakman/templater.rb,
lib/pakman/cli/runner.rb,
lib/pakman/cli/helpers.rb,
lib/pakman/cli/commands/gen.rb,
lib/pakman/cli/commands/list.rb,
lib/pakman/cli/commands/fetch.rb

Defined Under Namespace

Modules: ManifestHelper Classes: Copier, Ctx, Fetch, Fetcher, Finder, Gen, List, Manifest, Opts, Runner, Template, Templater

Constant Summary collapse

VERSION =
'0.5.0'

Class Method Summary collapse

Class Method Details



43
44
45
# File 'lib/pakman.rb', line 43

def self.banner
  "pakman #{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
end

.mainObject



51
52
53
# File 'lib/pakman.rb', line 51

def self.main
  Runner.new.run(ARGV)
end

.pakname_from_file(path) ⇒ Object

downcase and remove .txt (if anywhere in name) e.g. welcome.quick.txt becomes welcome.quick

welcome.txt.quick becomse welcome.quick
s6blank.txt becomes s6blank


9
10
11
# File 'lib/pakman/utils.rb', line 9

def self.pakname_from_file( path )
  File.basename( path ).downcase.gsub( '.txt', '' )
end

.rootObject



47
48
49
# File 'lib/pakman.rb', line 47

def self.root
  "#{File.expand_path( File.dirname(File.dirname(__FILE__)) )}"
end