* VRFS-586 - adding version info to jam-admin (not hidden like it is in jam-web

This commit is contained in:
Seth Call 2013-08-29 13:48:54 +00:00
parent 9af9600f72
commit c932a0920c
7 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,4 @@
.version-info {
font-size:small;
color:lightgray;
}

View File

@ -0,0 +1,7 @@
module MetaHelper
def version()
"web=#{::JamAdmin::VERSION} lib=#{JamRuby::VERSION} db=#{JamDb::VERSION}"
end
end

View File

@ -12,5 +12,6 @@
<p class="alert"><%= alert %></p>
<%= yield %>
<div class="version-info"><%= version %></div>
</body>
</html>

7
build
View File

@ -41,6 +41,13 @@ if [ -n "$PACKAGE" ]; then
exit 1
fi
cat > lib/jam_web/version.rb << EOF
module JamWeb
VERSION = "0.1.$BUILD_NUMBER"
end
EOF
type -P dpkg-architecture > /dev/null

View File

@ -24,7 +24,7 @@ module JamAdmin
# -- all .rb files in that directory are automatically loaded.
# Custom directories with classes and modules you want to be autoloadable.
# config.autoload_paths += %W(#{config.root}/extras)
config.autoload_paths += %W(#{config.root}/lib)
# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named.

View File

@ -1,3 +1,11 @@
class Footer < ActiveAdmin::Component
def build
super(id: "footer")
para "version info: web=#{::JamAdmin::VERSION} lib=#{JamRuby::VERSION} db=#{JamDb::VERSION}"
end
end
ActiveAdmin.setup do |config|
# == Site Title
@ -149,4 +157,6 @@ ActiveAdmin.setup do |config|
#
# Set the CSV builder options (default is {})
# config.csv_options = {}
config.view_factory.footer = Footer
end

3
lib/jam_admin/version.rb Normal file
View File

@ -0,0 +1,3 @@
module JamAdmin
VERSION = "0.0.1"
end