Skip to content

Commit

Permalink
Expose some versioning information in the meta tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
bamnet committed Jun 12, 2012
1 parent 26e4a29 commit b1fe79a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ class ApplicationController < ActionController::Base
protect_from_forgery
before_filter :set_locale
before_filter :check_for_initial_install
before_filter :set_version

def set_version
require 'concerto/version'
end

def set_locale
if user_signed_in? && current_user.locale != ""
Expand Down
3 changes: 2 additions & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<html>
<head>
<title><%= yield_for_title(controller.controller_name.titleize) %> - Concerto Panel</title>

<meta name="generator" content="Concerto <%= Concerto::VERSION::STRING %>" />
<meta name="application-name" content="Concerto" />
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "application" %>
Expand Down
10 changes: 10 additions & 0 deletions lib/concerto/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module Concerto
module VERSION
MAJOR = 2
MINOR = 'x'
TINY = 'x'
PRE = nil

STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
end
end

0 comments on commit b1fe79a

Please sign in to comment.