Class: Bones::Release

Inherits:
Object show all
Defined in:
lib/bones/release.rb

Direct Known Subclasses

VersionedRelease

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(original_destination, release_destination) ⇒ Release

Create new release



7
8
9
10
# File 'lib/bones/release.rb', line 7

def initialize(original_destination, release_destination)
  @original_destination = original_destination
  @release_destination  = release_destination
end

Instance Attribute Details

#original_destinationObject

Returns the value of attribute original_destination.



3
4
5
# File 'lib/bones/release.rb', line 3

def original_destination
  @original_destination
end

#release_destinationObject

Returns the value of attribute release_destination.



4
5
6
# File 'lib/bones/release.rb', line 4

def release_destination
  @release_destination
end

Instance Method Details

#copy_public_directoriesObject

Copies all public directories to the new release directory



22
23
24
25
26
# File 'lib/bones/release.rb', line 22

def copy_public_directories
  Bones.public_directories.each do |src|
    FileUtils.copy_entry Bones.root / 'public' / src, destination / src
  end
end

#destinationObject

Accessor for release destination



13
14
15
# File 'lib/bones/release.rb', line 13

def destination
  @release_destination
end