Class: Proxy::Omaha::Distribution::Coreos
- Defined in:
- lib/smart_proxy_omaha/distribution.rb
Instance Method Summary collapse
- #identifier ⇒ Object
- #prefix ⇒ Object
- #releases(track, architecture) ⇒ Object
- #update_filename ⇒ Object
- #update_upstream(architecture, version) ⇒ Object
- #upstream(track, architecture, version) ⇒ Object
Instance Method Details
#identifier ⇒ Object
26 27 28 |
# File 'lib/smart_proxy_omaha/distribution.rb', line 26 def identifier :coreos end |
#prefix ⇒ Object
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_filename ⇒ Object
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 |