Class: OfflineDeployer::Maker

Inherits:
Object
  • Object
show all
Defined in:
lib/offline_deployer/maker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from_tag = nil, to_tag = nil, destination = nil) ⇒ Maker

Returns a new instance of Maker.



3
4
5
6
7
8
# File 'lib/offline_deployer/maker.rb', line 3

def initialize(from_tag = nil, to_tag = nil, destination = nil)
  @from_tag = from_tag.presence || default_from_tag
  @to_tag = to_tag.presence || default_to_tag
  @destination = destination || default_destination
  @long_name = from_tag.present?
end

Instance Attribute Details

#destinationObject (readonly)

Returns the value of attribute destination.



10
11
12
# File 'lib/offline_deployer/maker.rb', line 10

def destination
  @destination
end

#from_tagObject (readonly)

Returns the value of attribute from_tag.



10
11
12
# File 'lib/offline_deployer/maker.rb', line 10

def from_tag
  @from_tag
end

#long_nameObject (readonly)

Returns the value of attribute long_name.



10
11
12
# File 'lib/offline_deployer/maker.rb', line 10

def long_name
  @long_name
end

#to_tagObject (readonly)

Returns the value of attribute to_tag.



10
11
12
# File 'lib/offline_deployer/maker.rb', line 10

def to_tag
  @to_tag
end

Instance Method Details

#callObject



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

def call
  pull_and_bundle unless Rails.env.development?
  write_update_info_and_deleted_files
  add_files_to_archive
  handle_gems
  move_archive_to_destination
  print_release_info
  return_file_path_and_name
end