Module: Awshucks

Defined in:
lib/awshucks/gemspec.rb,
lib/awshucks.rb,
lib/awshucks/cli.rb,
lib/awshucks/config.rb,
lib/awshucks/command.rb,
lib/awshucks/scanner.rb,
lib/awshucks/version.rb,
lib/awshucks/file_info.rb,
lib/awshucks/file_store.rb,
lib/awshucks/commands/help.rb,
lib/awshucks/commands/list.rb,
lib/awshucks/specification.rb,
lib/awshucks/commands/backup.rb,
lib/awshucks/commands/backups.rb,
lib/awshucks/commands/restore.rb,
lib/awshucks/commands/new_config.rb,
lib/awshucks/commands/reset_metadata_cache.rb

Overview

The Gem Specification plus some extras for awshucks.

Defined Under Namespace

Classes: BackupCommand, BackupsCommand, CLI, Command, CommandError, Config, ExecutionError, FileInfo, FileStore, HelpCommand, ListCommand, NewConfigCommand, RequiredConfigError, ResetMetadataCacheCommand, RestoreCommand, Scanner, Specification, UnknownBackupError, UnknownCommandError, UnknownFileError, Version

Constant Summary collapse

ROOT_DIR =
File.expand_path(File.join(File.dirname(__FILE__),".."))
LIB_DIR =
File.join(ROOT_DIR,"lib").freeze
RESOURCE_DIR =
File.join(ROOT_DIR,"resources").freeze
SPEC =
Awshucks::Specification.new do |spec|
    spec.name               = "awshucks"
    spec.version            = Awshucks::VERSION
    spec.rubyforge_project  = "awshucks"
    spec.author             = "Nathan Witmer"
    spec.email              = "[email protected]"
    spec.homepage           = "http://awshucks.rubyforge.org/"

    spec.summary            = "A Summary of awshucks."
    spec.description        = <<-DESC
TODO: A longer more detailed description of awshucks.
    DESC

    spec.extra_rdoc_files   = FileList["[A-Z]*"]
    spec.has_rdoc           = true
    spec.rdoc_main          = "README"
    spec.rdoc_options       = [ "--line-numbers" , "--inline-source" ]

    spec.test_files         = FileList["spec/**/*.rb", "test/**/*.rb"]
    spec.executable         = spec.name
    spec.files              = spec.test_files + spec.extra_rdoc_files + 
                     FileList["lib/**/*.rb", "resources/**/*"]

    # add dependencies
    # spec.add_dependency("somegem", ">= 0.4.2")
    spec.add_dependency("aws-s3", ">= 0.4.0")
    # spec.add_dependency("main", ">= 0.2.0")
    
    spec.platform           = Gem::Platform::RUBY

    spec.local_rdoc_dir     = "doc/rdoc"
    spec.remote_rdoc_dir    = "#{spec.name}/rdoc"
    spec.local_coverage_dir = "doc/coverage"
    spec.remote_coverage_dir= "#{spec.name}/coverage"

    spec.remote_site_dir    = "#{spec.name}/"

end
VERSION =
Version.to_s

Class Method Summary collapse

Class Method Details

.require_all_libs_relative_to(fname) ⇒ Object

Utility method to require all files ending in .rb in the directory with the same name as this file minus .rb



11
12
13
14
15
16
17
18
19
20
# File 'lib/awshucks.rb', line 11

def require_all_libs_relative_to(fname)
    prepend   = File.basename(fname,".rb")
    search_me = File.join(File.dirname(fname),prepend)
 
    Dir.entries(search_me).each do |rb|
        if File.extname(rb) == ".rb" then
            require "#{prepend}/#{File.basename(rb,".rb")}"
        end
    end
end