Sha256: 6316662caa35388fd0b8b729c2680e61576ea701f38e9757e706ad9fc0f7202c

Contents?: true

Size: 1.01 KB

Versions: 11

Compression:

Stored size: 1.01 KB

Contents

module Marty::Diagnostic; class Version < Base
  def self.generate
    pack do
      begin
        message = `cd #{Rails.root.to_s}; git describe --tags --always;`.strip
      rescue
        message = error("Failed accessing git")
      end
      rbv = "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} (#{RUBY_PLATFORM})"
      {
        'Marty'                   => Marty::VERSION,
        'Delorean'                => Delorean::VERSION,
        'Mcfly'                   => Mcfly::VERSION,
        'Git'                     => message,
        'Rails'                   => Rails.version,
        'Netzke Core'             => Netzke::Core::VERSION,
        'Netzke Basepack'         => Netzke::Basepack::VERSION,
        'Ruby'                    => rbv,
        'RubyGems'                => Gem::VERSION,
        'Database Schema Version' => db_schema,
        'Environment'             => Rails.env,
      }
    end
  end

  def self.db_schema
    begin
      Database.db_schema
    rescue => e
      error(e.message)
    end
  end
end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
marty-1.2.9 other/marty/diagnostic/version.rb
marty-1.2.8 other/marty/diagnostic/version.rb
marty-1.2.7 other/marty/diagnostic/version.rb
marty-1.2.6 other/marty/diagnostic/version.rb
marty-1.2.5 other/marty/diagnostic/version.rb
marty-1.2.4 other/marty/diagnostic/version.rb
marty-1.2.3 other/marty/diagnostic/version.rb
marty-1.2.2 other/marty/diagnostic/version.rb
marty-1.2.1 app/models/marty/diagnostic/version.rb
marty-1.2.0 app/models/marty/diagnostic/version.rb
marty-1.1.9 app/models/marty/diagnostic/version.rb