3 class MainController < ApplicationController
5 verify :only => :ymp, :params => [:project, :repository, :arch, :binary],
8 # these pages are completely static:
9 caches_page :index, :developer
15 render :template => "main/old_#{dist}.rhtml"
17 @message = "No old page found for dist #{dist}"
18 render :template => "error", :status => 404
22 def ymp_with_arch_and_version
23 path = "/published/#{params[:project]}/#{params[:repository]}/#{params[:arch]}/#{params[:binary]}?view=ymp"
24 res = get_from_api(path)
25 render :text => res.body, :content_type => res.content_type
28 def ymp_without_arch_and_version
29 path = "/published/#{params[:project]}/#{params[:repository]}/#{params[:package]}?view=ymp"
30 res = get_from_api(path)
31 render :text => res.body, :content_type => res.content_type
36 @directory = "http://download.opensuse.org/distribution/11.2-RC1"
37 @isos["lang-32"] = "Addon-Lang-Build0331-i586"
38 @isos["lang-64"] = "Addon-Lang-Build0332-x86_64"
39 @isos["nonoss"] = "Addon-NonOss-BiArch-Build0335-i586-x86_64"
40 @isos["kde-64"] = "KDE4-LiveCD-Build0336-x86_64"
41 @isos["kde-32"] = "KDE4-LiveCD-Build0336-i686"
42 @isos["gnome-64"] = "GNOME-LiveCD-Build0336-x86_64"
43 @isos["gnome-32"] = "GNOME-LiveCD-Build0336-i686"
44 @isos["dvd-64"] = "DVD-Build0334-x86_64"
45 @isos["dvd-32"] = "DVD-Build0331-i586"
46 @isos["net-32"] = "NET-Build0331-i586"
47 @isos["net-64"] = "NET-Build0331-x86_64"
49 @releasenotes = "http://www.suse.de/relnotes/i386/openSUSE/11.2/RELEASE-NOTES.en.html"
50 @releasename = "openSUSE 11.2-RC1"
51 @repourl = "http://download.opensuse.org/distribution/11.2"
56 render :template => "main/developer"
61 render :template => "main/developer2"
66 def get_from_api(path)
67 req = Net::HTTP::Get.new(path)
68 req['x-username'] = "obs_read_only"
70 host, port = API_HOST.split(/:/)
72 res = Net::HTTP.new(host, port).start do |http|