Class: Tug::Deployer

Inherits:
Object
  • Object
show all
Defined in:
lib/tug/deployment/deployer.rb

Direct Known Subclasses

Hockeyapp, Testflight

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Deployer

Returns a new instance of Deployer.



10
11
12
13
14
15
16
# File 'lib/tug/deployment/deployer.rb', line 10

def initialize(options)
  @file       = options[:file]
  @api_token  = options[:api_token]
  @notify     = options[:notify]
  @dsym       = options[:dsym]
  @notes      = options[:release_notes]
end

Instance Attribute Details

#api_tokenObject (readonly)

Returns the value of attribute api_token.



6
7
8
# File 'lib/tug/deployment/deployer.rb', line 6

def api_token
  @api_token
end

#dsymObject (readonly)

Returns the value of attribute dsym.



5
6
7
# File 'lib/tug/deployment/deployer.rb', line 5

def dsym
  @dsym
end

#fileObject (readonly)

Returns the value of attribute file.



4
5
6
# File 'lib/tug/deployment/deployer.rb', line 4

def file
  @file
end

#notesObject (readonly)

Returns the value of attribute notes.



7
8
9
# File 'lib/tug/deployment/deployer.rb', line 7

def notes
  @notes
end

#notifyObject (readonly)

Returns the value of attribute notify.



8
9
10
# File 'lib/tug/deployment/deployer.rb', line 8

def notify
  @notify
end

Instance Method Details

#deployObject



18
19
20
21
22
# File 'lib/tug/deployment/deployer.rb', line 18

def deploy
  IO.popen("curl #{url} -X POST -# #{params}") do |pipe|
    puts pipe.read
  end
end