Sha256: 4c82ff5af09e9c18d8030a27a6ee95946d4735dd36da4a149171c5d1f2a068ee

Contents?: true

Size: 1.31 KB

Versions: 3

Compression:

Stored size: 1.31 KB

Contents

- commits = stats.general_stats.commits
- age = ((stats.general_stats.last_commit - stats.general_stats.first_commit + 86399) / 86400).to_i
- active = stats.general_stats.days
- block(:general) do
  .blocktable
    %table.simpletable
      %tbody
        %tr
          %th Generation time
          %td&= Time.now.to_s
        %tr
          %th Authors
          %td= '%d (average %.1f commits per author)' % [stats.num_authors, commits / stats.num_authors]
        %tr
          %th Commits
          %td= '%d (average %.1f commits per active day, %.1f per all days)' % [commits, commits / active, commits / age]
        %tr
          %th Files
          %td= '%d (%d added, %d deleted)' % [stats.general_stats.files, stats.general_stats.files_added, stats.general_stats.files_deleted]
        %tr
          %th Lines
          %td= '%d (%d added, %d deleted)' % [stats.general_stats.lines, stats.general_stats.lines_added, stats.general_stats.lines_deleted]
        %tr
          %th Size
          %td= '%d bytes' % stats.file_stats.size
        %tr
          %th First commit
          %td= stats.general_stats.first_commit.to_s
        %tr
          %th Last commit
          %td= stats.general_stats.last_commit.to_s
        %tr
          %th Age
          %td= '%d / %d active days (%.2f%%)' % [active, age, active * 100.0 / age.to_f]

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
gitstats-rb-2.0.0 template/gnuplot/partials/general.haml
gitstats-ruby-1.0.1 template/partials/general.haml
gitstats-ruby-1.0.0 template/partials/general.haml