Class: Katello::Resources::CDN::Utils

Inherits:
Object
  • Object
show all
Defined in:
app/lib/katello/resources/cdn.rb

Class Method Summary collapse

Class Method Details

.parse_version(releasever) ⇒ Object

takes releasever from contentUrl (e.g. 6Server, 6.0, 6.1) returns hash e.g. => 6, :minor => “6.1” used to be able to make hierarchial view for RH repos



8
9
10
11
12
13
14
# File 'app/lib/katello/resources/cdn.rb', line 8

def self.parse_version(releasever)
  if releasever.to_s =~ /^\d/
    {:major => releasever[/^\d+/].to_i, :minor => releasever }
  else
    {}
  end
end