Commit 28934d756038f96c323599d1ebf7b27cd278b0ec
- Date: Sun Mar 30 13:15:34 +0000 2008
- Committer: Johan Sørensen (johan@johansorensen.com)
- Author: Johan Sørensen (johan@johansorensen.com)
- Commit SHA1: 28934d756038f96c323599d1ebf7b27cd278b0ec
- Tree SHA1: 3d8552d3e6f0d1d22476dcce689f4d128c41d0e0
- vendor/plugins/gruff/assets/city_scene/background/0600.png 0
- vendor/plugins/gruff/Manifest.txt 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/init.rb 2 ++
- vendor/plugins/gruff/lib/gruff/mini/pie.rb 36 ++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/test/test_scene.rb 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/assets/city_scene/sky/0200.png 0
- vendor/plugins/gruff/assets/city_scene/sky/0600.png 0
- vendor/plugins/gruff/assets/plastik/red.png 0
- vendor/plugins/gruff/lib/gruff/bar_conversion.rb 46 ++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/assets/plastik/blue.png 0
- vendor/plugins/gruff/assets/city_scene/number_sample/default.png 0
- vendor/plugins/gruff/assets/city_scene/sky/1000.png 0
- vendor/plugins/gruff/assets/city_scene/sky/1400.png 0
- lib/gitorious/graphs/commits_builder.rb 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/rails_generators/gruff/templates/functional_test.rb 24 ++++++++++++++++++++++++
- vendor/plugins/gruff/lib/gruff/bar.rb 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/lib/gruff/scene.rb 209 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- public/stylesheets/base.css 10 -+++++++++
- vendor/plugins/gruff/Rakefile 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/assets/city_scene/background/0000.png 0
- vendor/plugins/gruff/assets/city_scene/sky/0000.png 0
- vendor/plugins/gruff/assets/city_scene/sky/1700.png 0
- vendor/plugins/gruff/test/test_net.rb 230 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/test/test_bar.rb 283 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/lib/gruff/area.rb 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- lib/gitorious/graphs/commits_by_author_builder.rb 40 ++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/lib/gruff/spider.rb 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/assets/city_scene/clouds/partly_cloudy.png 0
- vendor/plugins/gruff/test/test_mini_bar.rb 32 ++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/test/test_legend.rb 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/test/test_area.rb 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/test/test_accumulator_bar.rb 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/rails_generators/gruff/templates/controller.rb 32 ++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/assets/pc306715.jpg 0
- vendor/plugins/gruff/assets/bubble.png 0
- vendor/plugins/gruff/lib/gruff/photo_bar.rb 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/test/test_spider.rb 216 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/assets/city_scene/sky/1500.png 0
- vendor/plugins/gruff/lib/gruff/mini/bar.rb 32 ++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/lib/gruff/stacked_bar.rb 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
- .gitignore 1 +
- vendor/plugins/gruff/lib/gruff/mini/side_bar.rb 35 +++++++++++++++++++++++++++++++++++
- script/graph_generator 26 ++++++++++++++++++++++++++
- vendor/plugins/gruff/assets/city_scene/grass/default.png 0
- vendor/plugins/gruff/test/test_photo.rb 41 +++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/test/test_line.rb 513 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/lib/gruff/accumulator_bar.rb 27 +++++++++++++++++++++++++++
- vendor/plugins/gruff/lib/gruff/net.rb 142 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/lib/gruff/side_bar.rb 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/test/gruff_test_case.rb 123 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- app/models/repository.rb 6 -+++++
- vendor/plugins/gruff/lib/gruff.rb 27 +++++++++++++++++++++++++++
- vendor/plugins/gruff/assets/city_scene/background/2000.png 0
- vendor/plugins/gruff/assets/city_scene/sky/0400.png 0
- vendor/plugins/gruff/assets/city_scene/sky/0800.png 0
- vendor/plugins/gruff/test/test_side_bar.rb 12 ++++++++++++
- vendor/plugins/gruff/assets/city_scene/sky/1200.png 0
- vendor/plugins/gruff/assets/city_scene/number_sample/1.png 0
- vendor/plugins/gruff/README.txt 40 ++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/test/test_sidestacked_bar.rb 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/lib/gruff/stacked_area.rb 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/lib/gruff/bullet.rb 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/assets/city_scene/sky/2000.png 0
- vendor/plugins/gruff/History.txt 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/assets/city_scene/clouds/cloudy.png 0
- vendor/plugins/gruff/assets/city_scene/haze/true.png 0
- vendor/plugins/gruff/rails_generators/gruff/gruff_generator.rb 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/assets/plastik/green.png 0
- vendor/plugins/gruff/lib/gruff/pie.rb 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/lib/gruff/side_stacked_bar.rb 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/lib/gruff/mini/legend.rb 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/test/test_stacked_bar.rb 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/test/test_bullet.rb 26 ++++++++++++++++++++++++++
- vendor/plugins/gruff/lib/gruff/stacked_mixin.rb 23 +++++++++++++++++++++++
- vendor/plugins/gruff/assets/city_scene/clouds/stormy.png 0
- vendor/plugins/gruff/test/test_pie.rb 154 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/MIT-LICENSE 21 +++++++++++++++++++++
- vendor/plugins/gruff/assets/city_scene/number_sample/2.png 0
- vendor/plugins/gruff/test/test_mini_side_bar.rb 37 +++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/test/test_mini_pie.rb 20 ++++++++++++++++++++
- app/helpers/application_helper.rb 45 ------------------------------------+++++++++
- spec/helpers/application_helper_spec.rb 21 -------------++++++++
- vendor/plugins/gruff/lib/gruff/line.rb 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/lib/gruff/base.rb 1073 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- lib/gitorious/graphs/builder.rb 38 ++++++++++++++++++++++++++++++++++++++
- vendor/plugins/gruff/test/test_base.rb 8 ++++++++
- app/views/logs/show.html.erb 2 -+
- vendor/plugins/gruff/lib/gruff/deprecated.rb 39 +++++++++++++++++++++++++++++++++++++++
Commit diff
- Diff rendering mode:
- inline
- side by side
.gitignore
|   | ||
| 2 | 2 | .DS_Store |
| 3 | 3 | coverage/* |
| 4 | 4 | public/cache/* |
| 5 | public/images/graphs/* | |
| 5 | 6 | config/database.yml |
| 6 | 7 | config/gitorious.yml |
| 7 | 8 | config/ultrasphinx/development.conf |
| toggle raw diff | ||
app/helpers/application_helper.rb
|   | ||
| 86 | 86 | flash.map { |type, content| content_tag(:div, content_tag(:p, content), :class => "flash_message #{type}")} |
| 87 | 87 | end |
| 88 | 88 | |
| 89 | ||
| 90 | ||
| 91 | ||
| 92 | ||
| 93 | ||
| 94 | ||
| 95 | ||
| 96 | ||
| 97 | ||
| 89 | def commit_graph_tag(repository, ref = "master") | |
| 90 | filename = "#{repository.project.slug}_#{repository.name}_#{h(ref)}_commit_count.png" | |
| 91 | if File.exist?(File.join(Gitorious::Graphs::Builder.graph_dir, filename)) | |
| 92 | image_tag("graphs/#{filename}") | |
| 98 | 93 | end |
| 99 | ||
| 100 | ||
| 101 | ||
| 102 | ||
| 103 | ||
| 104 | ||
| 105 | ||
| 106 | ||
| 107 | ||
| 108 | ||
| 109 | ||
| 110 | ||
| 111 | ||
| 112 | ||
| 113 | ||
| 114 | 94 | end |
| 115 | 95 | |
| 116 | ||
| 117 | ||
| 118 | ||
| 119 | ||
| 120 | ||
| 121 | ||
| 122 | ||
| 123 | ||
| 124 | ||
| 125 | ||
| 126 | ||
| 127 | ||
| 96 | def commit_graph_by_author_tag(repository, ref = "master") | |
| 97 | filename = "#{repository.project.slug}_#{repository.name}_#{h(ref)}_commit_count_by_author.png" | |
| 98 | if File.exist?(File.join(Gitorious::Graphs::Builder.graph_dir, filename)) | |
| 99 | image_tag("graphs/#{filename}") | |
| 100 | end | |
| 128 | 101 | end |
| 129 | 102 | end |
| toggle raw diff | ||
app/models/repository.rb
|   | ||
| 206 | 206 | data << others_v.last |
| 207 | 207 | end |
| 208 | 208 | |
| 209 | ||
| 209 | #[labels, data] | |
| 210 | labels.inject({}) do |hash, label| | |
| 211 | hash[label] = data[labels.index(label)] | |
| 212 | hash | |
| 213 | end | |
| 210 | 214 | end |
| 211 | 215 | |
| 212 | 216 | protected |
| toggle raw diff | ||
app/views/logs/show.html.erb
|   | ||
| 14 | 14 | |
| 15 | 15 | <% if @commits.current_page == 1 -%> |
| 16 | 16 | <div class="commits_by_author_graph"> |
| 17 | ||
| 17 | <%= commit_graph_by_author_tag(@repository, params[:id]) %> | |
| 18 | 18 | </div> |
| 19 | 19 | <% end -%> |
| 20 | 20 | <h2>Commits in "<%=h params[:id] -%>"</h2> |
| toggle raw diff | ||
lib/gitorious/graphs/builder.rb
|   | ||
| 1 | require "gruff" | |
| 2 | ||
| 3 | Gruff::Base::TITLE_MARGIN = 2.0 | |
| 4 | ||
| 5 | module Gitorious | |
| 6 | module Graphs | |
| 7 | class Builder | |
| 8 | def self.generate_all_for(repository) | |
| 9 | CommitsBuilder.generate_for(repository) | |
| 10 | CommitsByAuthorBuilder.generate_for(repository) | |
| 11 | end | |
| 12 | ||
| 13 | def self.graph_dir | |
| 14 | File.join(RAILS_ROOT, "public/images/graphs/") | |
| 15 | end | |
| 16 | ||
| 17 | def self.default_theme | |
| 18 | { | |
| 19 | :colors => [ | |
| 20 | '#acd64f', | |
| 21 | '#bcde71', | |
| 22 | '#cce692', | |
| 23 | '#dceeb4', | |
| 24 | '#ecf6d6', | |
| 25 | ], | |
| 26 | :marker_color => '#aea9a9', # Grey | |
| 27 | :font_color => 'black', | |
| 28 | :background_colors => 'white' | |
| 29 | } | |
| 30 | end | |
| 31 | ||
| 32 | def write | |
| 33 | dest = File.join(self.class.graph_dir, construct_filename) | |
| 34 | @graph.write(dest) | |
| 35 | end | |
| 36 | end | |
| 37 | end | |
| 38 | end | |
| toggle raw diff | ||
lib/gitorious/graphs/commits_builder.rb
|   | ||
| 1 | module Gitorious | |
| 2 | module Graphs | |
| 3 | ||
| 4 | class CommitsBuilder < Gitorious::Graphs::Builder | |
| 5 | def self.generate_for(repository) | |
| 6 | if repository.has_commits? | |
| 7 | builder = new(repository, repository.head_candidate.name) | |
| 8 | builder.build | |
| 9 | builder.write | |
| 10 | end | |
| 11 | end | |
| 12 | ||
| 13 | def initialize(repository, branch) | |
| 14 | @repository = repository | |
| 15 | @branch = branch | |
| 16 | @graph = Gruff::Area.new("650x150") | |
| 17 | @graph.title = "Commits by week (24 week period)" | |
| 18 | #@graph.x_axis_label = 'Commits by week (24 week period)' | |
| 19 | #@graph.y_axis_label = "Commits" | |
| 20 | @graph.theme = self.class.default_theme | |
| 21 | @graph.hide_legend = true | |
| 22 | @graph.title_font_size = 12.5 | |
| 23 | @graph.marker_font_size = 12 | |
| 24 | @graph.top_margin = 1 | |
| 25 | @graph.bottom_margin = 1 | |
| 26 | end | |
| 27 | ||
| 28 | def build | |
| 29 | week_numbers, commits_by_week = @repository.commit_graph_data(@branch) | |
| 30 | ||
| 31 | @graph.y_axis_increment = commits_by_week.max# / 3 | |
| 32 | @graph.data("Commits", commits_by_week) | |
| 33 | @graph.labels = build_labels(week_numbers) | |
| 34 | end | |
| 35 | ||
| 36 | def construct_filename | |
| 37 | "#{@repository.project.slug}_#{@repository.name}_#{@branch}_commit_count.png" | |
| 38 | end | |
| 39 | ||
| 40 | private | |
| 41 | def build_labels(week_numbers) | |
| 42 | label_names = {} | |
| 43 | week_numbers.each_with_index do |week, index| | |
| 44 | if (index % 5) == 0 | |
| 45 | label_names[index] = "Week #{week}" | |
| 46 | end | |
| 47 | end | |
| 48 | label_names[week_numbers.index(week_numbers.last)] = "Week #{week_numbers.last}" | |
| 49 | label_names | |
| 50 | end | |
| 51 | end | |
| 52 | ||
| 53 | end | |
| 54 | end | |
| toggle raw diff | ||
lib/gitorious/graphs/commits_by_author_builder.rb
|   | ||
| 1 | module Gitorious | |
| 2 | module Graphs | |
| 3 | ||
| 4 | class CommitsByAuthorBuilder < Gitorious::Graphs::Builder | |
| 5 | def self.generate_for(repository) | |
| 6 | if repository.has_commits? | |
| 7 | repository.git.heads.each do |head| | |
| 8 | builder = new(repository, head.name) | |
| 9 | builder.build | |
| 10 | builder.write | |
| 11 | end | |
| 12 | end | |
| 13 | end | |
| 14 | ||
| 15 | def initialize(repository, branch) | |
| 16 | @repository = repository | |
| 17 | @branch = branch | |
| 18 | @graph = Gruff::Mini::Pie.new(250) | |
| 19 | @graph.theme_pastel | |
| 20 | @graph.marker_font_size = 32 | |
| 21 | @graph.legend_font_size = 32 | |
| 22 | @graph.top_margin = 1 | |
| 23 | @graph.bottom_margin = 1 | |
| 24 | end | |
| 25 | ||
| 26 | def build | |
| 27 | commits_by_author = @repository.commit_graph_data_by_author(@branch) | |
| 28 | ||
| 29 | commits_by_author.each do |author, count| | |
| 30 | @graph.data(author, count) | |
| 31 | end | |
| 32 | end | |
| 33 | ||
| 34 | def construct_filename | |
| 35 | "#{@repository.project.slug}_#{@repository.name}_#{@branch}_commit_count_by_author.png" | |
| 36 | end | |
| 37 | end | |
| 38 | ||
| 39 | end | |
| 40 | end | |
| toggle raw diff | ||
public/stylesheets/base.css
|   | ||
| 438 | 438 | |
| 439 | 439 | .commit_list .commit_item { |
| 440 | 440 | clear:left; |
| 441 | ||
| 441 | margin-bottom: 15px; | |
| 442 | 442 | } |
| 443 | 443 | |
| 444 | 444 | .commit_message, .commit_message p { |
| … | … | |
| 447 | 447 | font: 95%/105% "Bitstream Vera Sans Mono", Monaco, "Courier New", Courier, monospace; |
| 448 | 448 | } |
| 449 | 449 | |
| 450 | .commit_list .commit_item .commit_message { | |
| 451 | margin-left: 40px; | |
| 452 | } | |
| 453 | ||
| 450 | 454 | small.commit_message { |
| 451 | 455 | margin: 0; |
| 452 | 456 | font: 85%/95% "Bitstream Vera Sans Mono", Monaco, "Courier New", Courier, monospace; |
| … | … | |
| 474 | 474 | margin-right: 5px; |
| 475 | 475 | } |
| 476 | 476 | |
| 477 | .commit_list .commit_item .gravatar { | |
| 478 | margin-top: 5px; | |
| 479 | } | |
| 480 | ||
| 477 | 481 | ul.project_list li { |
| 478 | 482 | padding-bottom: 1em; |
| 479 | 483 | margin-bottom: 1em; |
| toggle raw diff | ||
script/graph_generator
|   | ||
| 1 | #!/usr/bin/env ruby | |
| 2 | ||
| 3 | ENV["RAILS_ENV"] ||= "production" | |
| 4 | require File.dirname(__FILE__) + "/../config/environment" | |
| 5 | ||
| 6 | log = Logger.new(File.join(RAILS_ROOT, "log", "graph_generator.log")) | |
| 7 | log.formatter = Logger::Formatter.new | |
| 8 | log.level = Logger::INFO | |
| 9 | log.formatter.datetime_format = "%Y-%m-%d %H:%M:%S" | |
| 10 | ||
| 11 | Repository.find(:all).each_with_index do |repository, index| | |
| 12 | begin | |
| 13 | Gitorious::Graphs::Builder.generate_all_for(repository) | |
| 14 | if index % 5 == 0 | |
| 15 | # GC every five cycles | |
| 16 | GC.start | |
| 17 | end | |
| 18 | sleep(0.1) | |
| 19 | rescue => e | |
| 20 | log.fatal "Error generating graphs for repo##{repository.id}" | |
| 21 | exception_backtrace_string = "#{e.class.name} #{e.message}\n#{e.backtrace.join("\n ")}" | |
| 22 | log.fatal exception_backtrace_string | |
| 23 | $stderr.puts exception_backtrace_string | |
| 24 | # exit(1) | |
| 25 | end | |
| 26 | end | |
| toggle raw diff | ||
spec/helpers/application_helper_spec.rb
|   | ||
| 44 | 44 | end |
| 45 | 45 | |
| 46 | 46 | |
| 47 | ||
| 48 | ||
| 49 | ||
| 50 | ||
| 51 | ||
| 52 | ||
| 53 | ||
| 47 | it "should generate a blank commit graph url if the graph isn't there" do | |
| 48 | File.should_receive(:exist?).and_return(false) | |
| 49 | url = commit_graph_tag(repositories(:johans)) | |
| 50 | url.should == nil | |
| 54 | 51 | end |
| 55 | 52 | |
| 56 | ||
| 57 | ||
| 58 | ||
| 53 | it "should generate a blank url for commit graph by author if the graph isn't there" do | |
| 54 | File.should_receive(:exist?).and_return(false) | |
| 59 | 55 | |
| 60 | ||
| 61 | ||
| 62 | ||
| 56 | url = commit_graph_by_author_tag(repositories(:johans)) | |
| 57 | url.should == nil | |
| 63 | 58 | end |
| 64 | 59 | end |
| toggle raw diff | ||
vendor/plugins/gruff/History.txt
|   | ||
| 1 | == 0.3.2 | |
| 2 | ||
| 3 | * Include init.rb for use as a Rails plugin. | |
| 4 | ||
| 5 | ||
| 6 | == 0.3.1 | |
| 7 | ||
| 8 | * Fixed missing bullet graph bug (experimental, will be in a future release). | |
| 9 | ||
| 10 | == 0.3.0 | |
| 11 | ||
| 12 | * Fixed bug where pie graphs weren't drawing their label correctly. | |
| 13 | ||
| 14 | == 0.2.9 | |
| 15 | ||
| 16 | * Patch to make SideBar accurate instead of stacked [Marik] | |
| 17 | * Will be extracting net, pie, stacked, and side-stacked to separate gem | |
| 18 | in next release. | |
| 19 | ||
| 20 | == 0.2.8 | |
| 21 | ||
| 22 | * New accumulator bar graph (experimental) | |
| 23 | * Better mini graphs | |
| 24 | * Bug fixes | |
| 25 | ||
| 26 | == 0.2.7 | |
| 27 | ||
| 28 | * Regenerated Manifest.txt | |
| 29 | * Added scene sample to package | |
| 30 | * Added mini side_bar (EXPERIMENTAL) | |
| 31 | * Added @zero_degree option to Gruff::Pie so first slice can start somewhere other than 3 o'clock | |
| 32 | * Increased size of numbers in Gruff::Mini::Pie | |
| 33 | * Added legend_box_size accessor | |
| 34 | ||
| 35 | == 0.2.6 | |
| 36 | ||
| 37 | * Fixed missing side_bar.rb in Manifest.txt | |
| 38 | ||
| 39 | == 0.2.5 | |
| 40 | ||
| 41 | * New mini graph types (Experimental) | |
| 42 | * Marker lines can be different color than text labels | |
| 43 | * Theme definition cleanup | |
| 44 | ||
| 45 | == 0.2.4 | |
| 46 | ||
| 47 | * Added option to hide line numbers | |
| 48 | * Fixed code that was causing warnings | |
| 49 | ||
| 50 | == 0.2.3 | |
| 51 | ||
| 52 | * Cleaned up measurements so the graph expands to fill the available space | |
| 53 | * Added x-axis and y-axis label options | |
| 54 | ||
| 55 | == 0.1.2 | |
| 56 | ||
| 57 | * minimum_value and maximum_value can be set after data() to manually scale the graph | |
| 58 | * Fixed infinite loop bug when values are all equal | |
| 59 | * Added experimental net and spider graphs | |
| 60 | * Added non-linear scene graph for a simple interface to complex layered graphs | |
| 61 | * Initial refactoring of tests | |
| 62 | * A host of other bug fixes | |
| 63 | ||
| 64 | == 0.0.8 | |
| 65 | ||
| 66 | * NEW Sidestacked Bar Graphs. [Alun Eyre] | |
| 67 | * baseline_value larger than data will now show correctly. [Mike Perham] | |
| 68 | * hide_dots and hide_lines are now options for line graphs. | |
| 69 | ||
| 70 | == 0.0.6 | |
| 71 | ||
| 72 | * Fixed hang when no data is passed. | |
| 73 | ||
| 74 | == 0.0.4 | |
| 75 | ||
| 76 | * Added bar graphs | |
| 77 | * Added area graphs | |
| 78 | * Added pie graphs | |
| 79 | * Added render_image_background for using images as background on a theme | |
| 80 | * Fixed small size legend centering issue | |
| 81 | * Added initial line marker rounding to significant digits (Christian Winkler) | |
| 82 | * Line graphs line width is scaled with number of points being drawn (Christian Winkler) | |
| 83 | ||
| 84 | == 0.0.3 | |
| 85 | ||
| 86 | * Added option to draw line graphs without the lines (points only), thanks to Eric Hodel | |
| 87 | * Removed font-minimum check so graphs look better at 300px width | |
| 88 | ||
| 89 | == 0.0.2 | |
| 90 | ||
| 91 | * Fixed to_blob (thanks to Carlos Villela) | |
| 92 | * Added bar graphs (initial functionality...will be enhanced) | |
| 93 | * Removed rendered test output from gem | |
| 94 | ||
| 95 | == 0.0.1 | |
| 96 | ||
| 97 | * Initial release. | |
| 98 | * Line graphs only. Other graph styles coming soon. | |
| toggle raw diff | ||
vendor/plugins/gruff/MIT-LICENSE
|   | ||
| 1 | Copyright (c) 2005 Geoffrey Grosenbach boss@topfunky.com | |
| 2 | ||
| 3 | Permission is hereby granted, free of charge, to any person obtaining | |
| 4 | a copy of this software and associated documentation files (the | |
| 5 | "Software"), to deal in the Software without restriction, including | |
| 6 | without limitation the rights to use, copy, modify, merge, publish, | |
| 7 | distribute, sublicense, and/or sell copies of the Software, and to | |
| 8 | permit persons to whom the Software is furnished to do so, subject to | |
| 9 | the following conditions: | |
| 10 | ||
| 11 | The above copyright notice and this permission notice shall be | |
| 12 | included in all copies or substantial portions of the Software. | |
| 13 | ||
| 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
| 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
| 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
| 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
| 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
| 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
| 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
| 21 | ||
| toggle raw diff | ||
vendor/plugins/gruff/Manifest.txt
|   | ||
| 1 | History.txt | |
| 2 | MIT-LICENSE | |
| 3 | Manifest.txt | |
| 4 | README.txt | |
| 5 | Rakefile | |
| 6 | assets/bubble.png | |
| 7 | assets/city_scene/background/0000.png | |
| 8 | assets/city_scene/background/0600.png | |
| 9 | assets/city_scene/background/2000.png | |
| 10 | assets/city_scene/clouds/cloudy.png | |
| 11 | assets/city_scene/clouds/partly_cloudy.png | |
| 12 | assets/city_scene/clouds/stormy.png | |
| 13 | assets/city_scene/grass/default.png | |
| 14 | assets/city_scene/haze/true.png | |
| 15 | assets/city_scene/number_sample/1.png | |
| 16 | assets/city_scene/number_sample/2.png | |
| 17 | assets/city_scene/number_sample/default.png | |
| 18 | assets/city_scene/sky/0000.png | |
| 19 | assets/city_scene/sky/0200.png | |
| 20 | assets/city_scene/sky/0400.png | |
| 21 | assets/city_scene/sky/0600.png | |
| 22 | assets/city_scene/sky/0800.png | |
| 23 | assets/city_scene/sky/1000.png | |
| 24 | assets/city_scene/sky/1200.png | |
| 25 | assets/city_scene/sky/1400.png | |
| 26 | assets/city_scene/sky/1500.png | |
| 27 | assets/city_scene/sky/1700.png | |
| 28 | assets/city_scene/sky/2000.png | |
| 29 | assets/pc306715.jpg | |
| 30 | assets/plastik/blue.png | |
| 31 | assets/plastik/green.png | |
| 32 | assets/plastik/red.png | |
| 33 | init.rb | |
| 34 | lib/gruff.rb | |
| 35 | lib/gruff/accumulator_bar.rb | |
| 36 | lib/gruff/area.rb | |
| 37 | lib/gruff/bar.rb | |
| 38 | lib/gruff/bar_conversion.rb | |
| 39 | lib/gruff/base.rb | |
| 40 | lib/gruff/deprecated.rb | |
| 41 | lib/gruff/line.rb | |
| 42 | lib/gruff/mini/bar.rb | |
| 43 | lib/gruff/mini/legend.rb | |
| 44 | lib/gruff/mini/pie.rb | |
| 45 | lib/gruff/mini/side_bar.rb | |
| 46 | lib/gruff/net.rb | |
| 47 | lib/gruff/photo_bar.rb | |
| 48 | lib/gruff/pie.rb | |
| 49 | lib/gruff/scene.rb | |
| 50 | lib/gruff/side_bar.rb | |
| 51 | lib/gruff/side_stacked_bar.rb | |
| 52 | lib/gruff/spider.rb | |
| 53 | lib/gruff/stacked_area.rb | |
| 54 | lib/gruff/stacked_bar.rb | |
| 55 | lib/gruff/stacked_mixin.rb | |
| 56 | rails_generators/gruff/gruff_generator.rb | |
| 57 | rails_generators/gruff/templates/controller.rb | |
| 58 | rails_generators/gruff/templates/functional_test.rb | |
| 59 | test/gruff_test_case.rb | |
| 60 | test/test_accumulator_bar.rb | |
| 61 | test/test_area.rb | |
| 62 | test/test_bar.rb | |
| 63 | test/test_base.rb | |
| 64 | test/test_legend.rb | |
| 65 | test/test_line.rb | |
| 66 | test/test_mini_bar.rb | |
| 67 | test/test_mini_pie.rb | |
| 68 | test/test_mini_side_bar.rb | |
| 69 | test/test_net.rb | |
| 70 | test/test_photo.rb | |
| 71 | test/test_pie.rb | |
| 72 | test/test_scene.rb | |
| 73 | test/test_side_bar.rb | |
| 74 | test/test_sidestacked_bar.rb | |
| 75 | test/test_spider.rb | |
| 76 | test/test_stacked_bar.rb | |
| toggle raw diff | ||
vendor/plugins/gruff/README.txt
|   | ||
| 1 | == Gruff Graphs | |
| 2 | ||
| 3 | A library for making beautiful graphs. | |
| 4 | ||
| 5 | == Samples | |
| 6 | ||
| 7 | http://nubyonrails.com/pages/gruff | |
| 8 | ||
| 9 | == Documentation | |
| 10 | ||
| 11 | http://gruff.rubyforge.org | |
| 12 | ||
| 13 | See the test suite in test/line_test.rb for examples. | |
| 14 | ||
| 15 | == Rails Plugin | |
| 16 | ||
| 17 | Gruff is easy to use with Rails. | |
| 18 | ||
| 19 | gem install gruff | |
| 20 | cd vendor/plugins && gem unpack gruff | |
| 21 | ||
| 22 | == WARNING | |
| 23 | ||
| 24 | This is beta-quality software. It works well according to my tests, but the API may change and other features will be added. | |
| 25 | ||
| 26 | == Source | |
| 27 | ||
| 28 | The source for this project is now kept at GitHub: | |
| 29 | ||
| 30 | http://github.com/topfunky/gruff/tree/master | |
| 31 | ||
| 32 | == CONTRIBUTE | |
| 33 | ||
| 34 | Patches appreciated, especially if they are in Git format (with metadata so your name shows up in the commit logs). | |
