Class: Rhohub::Build

Inherits:
Base show all
Defined in:
lib/build/rhohub/build.rb

Class Method Summary collapse

Methods inherited from Base

catch_all, check, login

Class Method Details

.create(options, data) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/build/rhohub/build.rb', line 3

def self.create(options,data)
  catch_all do
    raise Exception.new "missing target_device" unless data[:build]['target_device']
    raise Exception.new "missing version_tag" unless data[:build]['version_tag']
    raise Exception.new "missing rhodes_version"  unless data[:build]['rhodes_version']
    raise Exception.new "missing app_id" unless options[:app_id]
    super(options,data,'builds')
  end
end

.delete(options) ⇒ Object

options = => build_id



14
15
16
17
18
19
20
# File 'lib/build/rhohub/build.rb', line 14

def self.delete(options)
  catch_all do
    raise Exception.new "id must be passed to show ex: {:id => build_id}" unless options[:id]
    raise Exception.new "app_id must be passed to show ex: {:app_id => app_id}" unless options[:app_id]
    super(options,'builds')
  end
end

.list(options) ⇒ Object

options = => app_id



23
24
25
26
27
28
# File 'lib/build/rhohub/build.rb', line 23

def self.list(options)
  catch_all do
    raise Exception.new "app_id must be passed to show ex: {:app_id => app_id}" unless options[:app_id]
    super(options,'builds')
  end
end

.platformsObject



39
40
41
42
43
# File 'lib/build/rhohub/build.rb', line 39

def self.platforms
  catch_all do
    super({},'platforms')
  end
end

.show(options) ⇒ Object

options = => build_id



31
32
33
34
35
36
37
# File 'lib/build/rhohub/build.rb', line 31

def self.show(options)
  catch_all do
    raise Exception.new "id must be passed to show ex: {:id => build_id}" unless options[:id]
    raise Exception.new "app_id must be passed to show ex: {:app_id => app_id}" unless options[:app_id]
    super(options,'builds')
  end
end

.supported_gemsObject



45
46
47
48
49
# File 'lib/build/rhohub/build.rb', line 45

def self.supported_gems
  catch_all do
    super({},'supported_gems')
  end
end

.user_statusObject



51
52
53
54
55
# File 'lib/build/rhohub/build.rb', line 51

def self.user_status
  catch_all do 
    super({},'user_status')
  end
end