Class: Proxy::Omaha::Distribution::Coreos

Inherits:
Base
  • Object
show all
Defined in:
lib/smart_proxy_omaha/distribution.rb

Instance Method Summary collapse

Instance Method Details

#identifierObject



26
27
28
# File 'lib/smart_proxy_omaha/distribution.rb', line 26

def identifier
  :coreos
end

#prefixObject



30
31
32
# File 'lib/smart_proxy_omaha/distribution.rb', line 30

def prefix
  'coreos'
end

#releases(track, architecture) ⇒ Object



46
47
48
49
50
# File 'lib/smart_proxy_omaha/distribution.rb', line 46

def releases(track, architecture)
  release_data = http_request.get("https://#{track}.release.core-os.net/#{architecture}/")
  xml = Nokogiri::HTML(release_data)
  (xml.xpath('//a/text()').map(&:to_s) - ['current'])
end

#update_filenameObject



34
35
36
# File 'lib/smart_proxy_omaha/distribution.rb', line 34

def update_filename
  'update.gz'
end

#update_upstream(architecture, version) ⇒ Object



42
43
44
# File 'lib/smart_proxy_omaha/distribution.rb', line 42

def update_upstream(architecture, version)
  "https://update.release.core-os.net/#{architecture}/#{version}"
end

#upstream(track, architecture, version) ⇒ Object



38
39
40
# File 'lib/smart_proxy_omaha/distribution.rb', line 38

def upstream(track, architecture, version)
  "https://#{track}.release.core-os.net/#{architecture}/#{version}"
end