* tring out the screenshot gem
This commit is contained in:
parent
f0bf0545cd
commit
53a0a0a91f
|
|
@ -0,0 +1,36 @@
|
|||
class ArtifactsController < ApplicationController
|
||||
|
||||
def versioncheck
|
||||
|
||||
# the reported client version
|
||||
client_version = params[:ver]
|
||||
|
||||
# the name of the client
|
||||
product = params[:product]
|
||||
|
||||
# the os (Win32/MacOSX/Unix)
|
||||
os = params[:os]
|
||||
|
||||
product = "#{product}/#{os}"
|
||||
|
||||
unless ArtifactUpdate::PRODUCTS.include? product
|
||||
render :text => "Unknown product type"
|
||||
return
|
||||
end
|
||||
|
||||
@artifact = ArtifactUpdate.find_by_product_and_environment(product, ArtifactUpdate::DEFAULT_ENVIRONMENT)
|
||||
|
||||
if @artifact.nil?
|
||||
@log.error "no product was found for #{product} and environment: #{ArtifactUpdate::DEFAULT_ENVIRONMENT}"
|
||||
render :text => "No product available"
|
||||
return
|
||||
elsif @artifact.version == client_version
|
||||
render :text => "You have the latest version."
|
||||
return
|
||||
else
|
||||
render :layout => false
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<!-- modeled after dialog in original client -->
|
||||
<table style="background: #262626; color: #000000; font-family: Raleway, Arial, Helvetica, sans-serif;">
|
||||
<tr>
|
||||
<td width=70><%= image_tag "logo.png" %></td>
|
||||
<td><h1>New version available</h1>
|
||||
|
||||
<p>Version <%= @artifact.version %> is now released on Jamkazam.com<br/>
|
||||
Please <a href="<%= @artifact.uri %>">download directly</a> from here.</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
Loading…
Reference in New Issue