Class: Batali::Source::Git
- Inherits:
-
Path
- Object
- Grimoire::Utility
- Utility
- Batali::Source
- Path
- Batali::Source::Git
- Includes:
- Git, Bogo::Memoization
- Defined in:
- lib/batali/source/git.rb
Overview
Path based source
Constant Summary
Constants inherited from Path
Path::DEFAULT_IGNORE, Path::IGNORE_FILE
Instance Attribute Summary
Attributes inherited from Batali::Source
Instance Method Summary collapse
-
#asset ⇒ String
Directory containing contents.
-
#to_json(*args) ⇒ Object
Overload to remove non-relevant attributes.
Methods included from Git
#base_path, #clone_repository, included, #ref_dup
Methods inherited from Batali::Source
#==, build, #clean_asset, #diff, #initialize, #unit_dependencies, #unit_version
Constructor Details
This class inherits a constructor from Batali::Source
Instance Method Details
#asset ⇒ String
Returns directory containing contents.
18 19 20 21 22 23 24 25 |
# File 'lib/batali/source/git.rb', line 18 def asset clone_repository clone_path = ref_dup self.path = File.join(*[ref_dup, subdirectory].compact) result = super self.path = clone_path result end |
#to_json(*args) ⇒ Object
Overload to remove non-relevant attributes
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/batali/source/git.rb', line 28 def to_json(*args) MultiJson.dump( Smash.new( :url => url, :ref => ref, :type => self.class.name, :subdirectory => subdirectory ), *args ) end |