Parent

Warbler::Traits::NoGemspec

The NoGemspec trait is used when no gemspec file is found for a jar project. It assumes a standard layout including bin and lib directories.

Public Class Methods

detect?() click to toggle source
# File lib/warbler/traits/nogemspec.rb, line 17
def self.detect?
  Jar.detect? && !Gemspec.detect?
end

Public Instance Methods

after_configure() click to toggle source
# File lib/warbler/traits/nogemspec.rb, line 25
def after_configure
  if File.directory?("lib")
    add_init_load_path(config.pathmaps.application.inject("lib") {|pm,x| pm.pathmap(x)})
  end
end
before_configure() click to toggle source
# File lib/warbler/traits/nogemspec.rb, line 21
def before_configure
  config.dirs = ['.']
end
default_executable() click to toggle source
# File lib/warbler/traits/nogemspec.rb, line 35
def default_executable
  exes = Dir['bin/*']
  exe = exes.grep(/#{config.jar_name}/).first || exes.first
  raise "No executable script found" unless exe
  exe
end
update_archive(jar) click to toggle source
# File lib/warbler/traits/nogemspec.rb, line 31
def update_archive(jar)
  add_main_rb(jar, apply_pathmaps(config, default_executable, :application))
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.