Class: Marionetta::Manipulators::Debloyer

Inherits:
Object
  • Object
show all
Defined in:
lib/marionetta/manipulators/debloyer.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(server) ⇒ Debloyer

Returns a new instance of Debloyer.



20
21
22
23
24
# File 'lib/marionetta/manipulators/debloyer.rb', line 20

def initialize(server)
  @server = server
  server[:logger].warn('You should try Marionetta::Manipulators::Deployer')
  server[:logger].warn('Debloyer (thats Deb) is now deprecated and will be removed in v0.5.x')
end

Instance Attribute Details

#cmd=(value) ⇒ Object

Sets the attribute cmd

Parameters:

  • value

    the value to set the attribute cmd to.



18
19
20
# File 'lib/marionetta/manipulators/debloyer.rb', line 18

def cmd=(value)
  @cmd = value
end

Class Method Details

.tasksObject



14
15
16
# File 'lib/marionetta/manipulators/debloyer.rb', line 14

def self.tasks()
  [:deploy]
end

Instance Method Details

#can?Boolean

Returns:

  • (Boolean)


26
27
28
29
30
31
32
33
34
# File 'lib/marionetta/manipulators/debloyer.rb', line 26

def can?()
  d = server[:debloyer]
  
  if d.has_key?(:from) and d.has_key?(:to)
    return true
  else
    return false
  end
end

#deployObject



36
37
38
39
40
41
# File 'lib/marionetta/manipulators/debloyer.rb', line 36

def deploy()
  deb_path = create_deb_path
  build_deb(deb_path)
  send_deb(deb_path)
  apply_deb(deb_path)
end