Class: Syckle::Plugins::Mast

Inherits:
Service
  • Object
show all
Defined in:
lib/plugins/syckle/mast.rb

Overview

Mast Manifest Plugin

Constant Summary collapse

DEFAULT_FILENAME =

Default MANIFEST filename.

'MANIFEST'
DEFAULT_INCLUDE =

Default files/dirs to include.

%w{ bin data etc features lib man meta qed script spec test [A-Z]* }
DEFAULT_EXCLUDE =

Default files/dirs to exclude.

nil
DEFAULT_IGNORE =

Default files/dirs to ignore. Unlike exclude, this work on path basenames, and not full pathnames.

nil

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#excludeObject

Returns the value of attribute exclude.



42
43
44
# File 'lib/plugins/syckle/mast.rb', line 42

def exclude
  @exclude
end

#ignoreObject

Returns the value of attribute ignore.



45
46
47
# File 'lib/plugins/syckle/mast.rb', line 45

def ignore
  @ignore
end

#includeObject

Returns the value of attribute include.



39
40
41
# File 'lib/plugins/syckle/mast.rb', line 39

def include
  @include
end

#outputObject

Returns the value of attribute output.



48
49
50
# File 'lib/plugins/syckle/mast.rb', line 48

def output
  @output
end

Instance Method Details

#cleanObject

Remove MANIFEST. TODO: Currently a noop. Not sure removing manfest is ever a good idea.



79
80
# File 'lib/plugins/syckle/mast.rb', line 79

def clean
end

#generateObject

Generate manifest. TODO: don’t overwrite if it hasn’t changed



62
63
64
65
66
67
68
69
70
# File 'lib/plugins/syckle/mast.rb', line 62

def generate
  if manifest.changed?
    file = manifest.save #update #generate
    report "Updated #{file.to_s.sub(Dir.pwd+'/','')}"
    #report "Updated #{output.to_s.sub(Dir.pwd+'/','')}"
  else
    report "#{output.to_s.sub(Dir.pwd+'/','')} is current"
  end
end

#manifestObject



56
57
58
# File 'lib/plugins/syckle/mast.rb', line 56

def manifest
  @manifest ||= ::Mast::Manifest.new(options)
end

#resetObject

Mark MANIFEST as out-of-date. TODO: Implement reset.



74
75
# File 'lib/plugins/syckle/mast.rb', line 74

def reset
end