Skip to content

Commit

Permalink
Add app revision and link to the footer
Browse files Browse the repository at this point in the history
  • Loading branch information
kigster committed May 13, 2024
1 parent dd45613 commit 4a9a9f2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.1
1.0.2
15 changes: 7 additions & 8 deletions app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,11 @@
Crafted with ♡ in San Francisco — © CFAEA 2010-#{Date.current.strftime('%Y')}
All rights reserved.
%br
App Version #{TicketBooth::Application::VERSION},
Rails
= Rails.version
, Ruby
= RUBY_VERSION
, In
= Rails.env
mode
App Version #{TicketBooth::Application::VERSION}
| Revision
%a{href: "https://github.com/fnf-org/TicketBooth/commit/#{TicketBooth::Application::REVISION}", target: "_blank" }
= TicketBooth::Application::REVISION
| Rails #{Rails.version}
| Ruby #{RUBY_VERSION}
| #{Rails.env.to_s.capitalize} Env

13 changes: 11 additions & 2 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,16 @@ def xmlschema; end
module TicketBooth
class Application < Rails::Application
# Application Version
VERSION = File.read('.version').freeze
VERSION = File.read('.version').freeze

# Read the latest revision
REVISION = if File.exist?('REVISION')
File.read('REVISION').strip
elsif Dir.exist?('.git')
`git rev-parse --short HEAD`.strip
else
VERSION
end

# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 7.1
Expand Down Expand Up @@ -76,6 +85,6 @@ class Application < Rails::Application
config.active_job.queue_adapter = ActiveJob::QueueAdapters::AsyncAdapter.new \
min_threads: 1,
max_threads: 3,
idletime: 30.seconds
idletime: 30.seconds
end
end

0 comments on commit 4a9a9f2

Please sign in to comment.