Class: Proxy::Omaha::Distribution::Flatcar
- 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
54 55 56 |
# File 'lib/smart_proxy_omaha/distribution.rb', line 54 def identifier :flatcar end |
#prefix ⇒ Object
58 59 60 |
# File 'lib/smart_proxy_omaha/distribution.rb', line 58 def prefix 'flatcar' end |
#releases(track, architecture) ⇒ Object
74 75 76 77 78 |
# File 'lib/smart_proxy_omaha/distribution.rb', line 74 def releases(track, architecture) feed_data = http_request.get("https://www.flatcar-linux.org/releases-json/releases-#{track}.json") json_feed = JSON.parse(feed_data) json_feed.select { |_, release| release['architectures'].include?(architecture.split('-').first) }.keys - ['current'] end |
#update_filename ⇒ Object
62 63 64 |
# File 'lib/smart_proxy_omaha/distribution.rb', line 62 def update_filename 'flatcar_production_update.gz' end |
#update_upstream(architecture, version) ⇒ Object
70 71 72 |
# File 'lib/smart_proxy_omaha/distribution.rb', line 70 def update_upstream(architecture, version) "https://update.release.flatcar-linux.net/#{architecture}/#{version}" end |
#upstream(track, architecture, version) ⇒ Object
66 67 68 |
# File 'lib/smart_proxy_omaha/distribution.rb', line 66 def upstream(track, architecture, version) "https://#{track}.release.flatcar-linux.net/#{architecture}/#{version}" end |