simplecov-html 0.3.9 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,5 +1,6 @@
1
1
  .rvmrc
2
2
  .bundle
3
+ Gemfile.lock
3
4
 
4
5
  ## MAC OS
5
6
  .DS_Store
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ source :rubygems
2
+
3
+ gemspec
4
+
5
+ group :development do
6
+ # Develop against git master if required - just uncomment this line:
7
+ gem 'simplecov'# , :git => 'git://github.com/colszowka/simplecov.git'
8
+ end
data/Rakefile CHANGED
@@ -1,22 +1,5 @@
1
- require 'rubygems'
2
- require 'rake'
3
-
4
- begin
5
- require 'jeweler'
6
- Jeweler::Tasks.new do |gem|
7
- gem.name = "simplecov-html"
8
- gem.summary = %Q{HTML formatter for SimpleCov code coverage tool for ruby 1.9+}
9
- gem.description = %Q{HTML formatter for SimpleCov code coverage tool for ruby 1.9+}
10
- gem.email = "christoph at olszowka.de"
11
- gem.homepage = "http://github.com/colszowka/simplecov-html"
12
- gem.authors = ["Christoph Olszowka"]
13
- gem.add_development_dependency "shoulda", "2.10.3"
14
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
15
- end
16
- Jeweler::GemcutterTasks.new
17
- rescue LoadError
18
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
19
- end
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
20
3
 
21
4
  require 'rake/testtask'
22
5
  Rake::TestTask.new(:test) do |test|
@@ -25,16 +8,11 @@ Rake::TestTask.new(:test) do |test|
25
8
  test.verbose = true
26
9
  end
27
10
 
28
- task :test => :check_dependencies
29
-
30
11
  task :default => :test
31
12
 
32
13
  require 'rake/rdoctask'
33
14
  Rake::RDocTask.new do |rdoc|
34
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
35
-
36
15
  rdoc.rdoc_dir = 'rdoc'
37
- rdoc.title = "simplecov-html #{version}"
38
16
  rdoc.rdoc_files.include('README*')
39
17
  rdoc.rdoc_files.include('lib/**/*.rb')
40
- end
18
+ end
@@ -1,3 +1,6 @@
1
+ require 'bundler'
2
+ Bundler.setup(:default)
3
+
1
4
  require 'erb'
2
5
  require 'cgi'
3
6
  require 'fileutils'
@@ -7,14 +10,13 @@ require 'time'
7
10
  unless defined?(SimpleCov)
8
11
  raise RuntimeError, "simplecov-html is now the default formatter of simplecov. Please update your test helper and gemfile to require 'simplecov' instead of 'simplecov-html'!"
9
12
  end
13
+
10
14
  # Ensure we are using an compatible version of SimpleCov
11
- if Gem::Version.new(SimpleCov::VERSION) < Gem::Version.new("0.3.2")
15
+ if Gem::Version.new(SimpleCov::VERSION) < Gem::Version.new("0.4.0")
12
16
  raise RuntimeError, "The version of SimpleCov you are using is too old. Please update with 'gem install simplecov'"
13
17
  end
14
18
 
15
19
  class SimpleCov::Formatter::HTMLFormatter
16
- VERSION = File.read(File.join(File.dirname(__FILE__), '../VERSION')).strip.chomp
17
-
18
20
  def format(result)
19
21
  Dir[File.join(File.dirname(__FILE__), '../assets/*')].each do |path|
20
22
  FileUtils.cp_r(path, asset_output_path)
@@ -23,7 +25,7 @@ class SimpleCov::Formatter::HTMLFormatter
23
25
  File.open(File.join(output_path, "index.html"), "w+") do |file|
24
26
  file.puts template('layout').result(binding)
25
27
  end
26
- puts "Coverage report generated for #{result.command_name} to #{output_path}"
28
+ puts "Coverage report generated for #{result.command_name} to #{output_path}. #{result.covered_percent.round(2)}% covered."
27
29
  end
28
30
 
29
31
  private
@@ -106,4 +108,7 @@ class SimpleCov::Formatter::HTMLFormatter
106
108
  def link_to_source_file(source_file)
107
109
  %Q(<a href="##{id source_file}" class="src_link" title="#{shortened_filename source_file}">#{shortened_filename source_file}</a>)
108
110
  end
109
- end
111
+ end
112
+
113
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__)))
114
+ require 'simplecov-html/version'
@@ -0,0 +1,7 @@
1
+ module SimpleCov
2
+ module Formatter
3
+ class HTMLFormatter
4
+ VERSION = "0.4.3"
5
+ end
6
+ end
7
+ end
@@ -1,102 +1,23 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
1
  # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require 'simplecov-html/version'
5
4
 
6
5
  Gem::Specification.new do |s|
7
- s.name = %q{simplecov-html}
8
- s.version = "0.3.9"
6
+ s.name = "simplecov-html"
7
+ s.version = SimpleCov::Formatter::HTMLFormatter::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Christoph Olszowka"]
10
+ s.email = ["christoph at olszowka de"]
11
+ s.homepage = "https://github.com/colszowka/simplecov-html"
12
+ s.summary = %Q{Default HTML formatter for SimpleCov code coverage tool for ruby 1.9+}
13
+ s.description = %Q{Default HTML formatter for SimpleCov code coverage tool for ruby 1.9+}
9
14
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Christoph Olszowka"]
12
- s.date = %q{2010-11-06}
13
- s.description = %q{HTML formatter for SimpleCov code coverage tool for ruby 1.9+}
14
- s.email = %q{christoph at olszowka.de}
15
- s.extra_rdoc_files = [
16
- "LICENSE",
17
- "README.rdoc"
18
- ]
19
- s.files = [
20
- ".document",
21
- ".gitignore",
22
- "LICENSE",
23
- "README.rdoc",
24
- "Rakefile",
25
- "VERSION",
26
- "assets/app.js",
27
- "assets/fancybox/blank.gif",
28
- "assets/fancybox/fancy_close.png",
29
- "assets/fancybox/fancy_loading.png",
30
- "assets/fancybox/fancy_nav_left.png",
31
- "assets/fancybox/fancy_nav_right.png",
32
- "assets/fancybox/fancy_shadow_e.png",
33
- "assets/fancybox/fancy_shadow_n.png",
34
- "assets/fancybox/fancy_shadow_ne.png",
35
- "assets/fancybox/fancy_shadow_nw.png",
36
- "assets/fancybox/fancy_shadow_s.png",
37
- "assets/fancybox/fancy_shadow_se.png",
38
- "assets/fancybox/fancy_shadow_sw.png",
39
- "assets/fancybox/fancy_shadow_w.png",
40
- "assets/fancybox/fancy_title_left.png",
41
- "assets/fancybox/fancy_title_main.png",
42
- "assets/fancybox/fancy_title_over.png",
43
- "assets/fancybox/fancy_title_right.png",
44
- "assets/fancybox/fancybox-x.png",
45
- "assets/fancybox/fancybox-y.png",
46
- "assets/fancybox/fancybox.png",
47
- "assets/fancybox/jquery.fancybox-1.3.1.css",
48
- "assets/fancybox/jquery.fancybox-1.3.1.pack.js",
49
- "assets/favicon.png",
50
- "assets/jquery-1.4.2.min.js",
51
- "assets/jquery.dataTables.min.js",
52
- "assets/jquery.timeago.js",
53
- "assets/jquery.url.js",
54
- "assets/loading.gif",
55
- "assets/magnify.png",
56
- "assets/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png",
57
- "assets/smoothness/images/ui-bg_flat_75_ffffff_40x100.png",
58
- "assets/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png",
59
- "assets/smoothness/images/ui-bg_glass_65_ffffff_1x400.png",
60
- "assets/smoothness/images/ui-bg_glass_75_dadada_1x400.png",
61
- "assets/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png",
62
- "assets/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png",
63
- "assets/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png",
64
- "assets/smoothness/images/ui-icons_222222_256x240.png",
65
- "assets/smoothness/images/ui-icons_2e83ff_256x240.png",
66
- "assets/smoothness/images/ui-icons_454545_256x240.png",
67
- "assets/smoothness/images/ui-icons_888888_256x240.png",
68
- "assets/smoothness/images/ui-icons_cd0a0a_256x240.png",
69
- "assets/smoothness/jquery-ui-1.8.4.custom.css",
70
- "assets/stylesheet.css",
71
- "lib/simplecov-html.rb",
72
- "simplecov-html.gemspec",
73
- "test/helper.rb",
74
- "test/test_simple_cov-html.rb",
75
- "views/file_list.erb",
76
- "views/layout.erb",
77
- "views/source_file.erb"
78
- ]
79
- s.homepage = %q{http://github.com/colszowka/simplecov-html}
80
- s.rdoc_options = ["--charset=UTF-8"]
81
- s.require_paths = ["lib"]
82
- s.rubygems_version = %q{1.3.7}
83
- s.summary = %q{HTML formatter for SimpleCov code coverage tool for ruby 1.9+}
84
- s.test_files = [
85
- "test/helper.rb",
86
- "test/test_simple_cov-html.rb"
87
- ]
88
-
89
- if s.respond_to? :specification_version then
90
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
91
- s.specification_version = 3
92
-
93
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
94
- s.add_development_dependency(%q<shoulda>, ["= 2.10.3"])
95
- else
96
- s.add_dependency(%q<shoulda>, ["= 2.10.3"])
97
- end
98
- else
99
- s.add_dependency(%q<shoulda>, ["= 2.10.3"])
100
- end
101
- end
15
+ s.rubyforge_project = "simplecov-html"
16
+
17
+ s.add_development_dependency "shoulda", "2.10.3"
102
18
 
19
+ s.files = `git ls-files`.split("\n")
20
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
21
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
22
+ s.require_paths = ["lib"]
23
+ end
@@ -1,10 +1,10 @@
1
1
  require 'rubygems'
2
+ require 'bundler/setup'
3
+ require 'simplecov'
4
+ require 'simplecov-html'
5
+
2
6
  require 'test/unit'
3
7
  require 'shoulda'
4
8
 
5
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
6
- $LOAD_PATH.unshift(File.dirname(__FILE__))
7
- require 'simple_cov-html'
8
-
9
9
  class Test::Unit::TestCase
10
10
  end
@@ -1,7 +1,8 @@
1
1
  require 'helper'
2
2
 
3
3
  class TestSimpleCovHtml < Test::Unit::TestCase
4
- should "probably rename this file and start testing for real" do
5
- flunk "hey buddy, you should probably rename this file and start testing for real"
4
+ should "be defined" do
5
+ assert defined?(SimpleCov::Formatter::HTMLFormatter)
6
+ assert defined?(SimpleCov::Formatter::HTMLFormatter::VERSION)
6
7
  end
7
8
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
+ - 4
7
8
  - 3
8
- - 9
9
- version: 0.3.9
9
+ version: 0.4.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Christoph Olszowka
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-11-06 00:00:00 +01:00
17
+ date: 2011-02-10 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -32,22 +32,22 @@ dependencies:
32
32
  version: 2.10.3
33
33
  type: :development
34
34
  version_requirements: *id001
35
- description: HTML formatter for SimpleCov code coverage tool for ruby 1.9+
36
- email: christoph at olszowka.de
35
+ description: Default HTML formatter for SimpleCov code coverage tool for ruby 1.9+
36
+ email:
37
+ - christoph at olszowka de
37
38
  executables: []
38
39
 
39
40
  extensions: []
40
41
 
41
- extra_rdoc_files:
42
- - LICENSE
43
- - README.rdoc
42
+ extra_rdoc_files: []
43
+
44
44
  files:
45
45
  - .document
46
46
  - .gitignore
47
+ - Gemfile
47
48
  - LICENSE
48
49
  - README.rdoc
49
50
  - Rakefile
50
- - VERSION
51
51
  - assets/app.js
52
52
  - assets/fancybox/blank.gif
53
53
  - assets/fancybox/fancy_close.png
@@ -94,6 +94,7 @@ files:
94
94
  - assets/smoothness/jquery-ui-1.8.4.custom.css
95
95
  - assets/stylesheet.css
96
96
  - lib/simplecov-html.rb
97
+ - lib/simplecov-html/version.rb
97
98
  - simplecov-html.gemspec
98
99
  - test/helper.rb
99
100
  - test/test_simple_cov-html.rb
@@ -101,12 +102,12 @@ files:
101
102
  - views/layout.erb
102
103
  - views/source_file.erb
103
104
  has_rdoc: true
104
- homepage: http://github.com/colszowka/simplecov-html
105
+ homepage: https://github.com/colszowka/simplecov-html
105
106
  licenses: []
106
107
 
107
108
  post_install_message:
108
- rdoc_options:
109
- - --charset=UTF-8
109
+ rdoc_options: []
110
+
110
111
  require_paths:
111
112
  - lib
112
113
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -127,11 +128,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
128
  version: "0"
128
129
  requirements: []
129
130
 
130
- rubyforge_project:
131
+ rubyforge_project: simplecov-html
131
132
  rubygems_version: 1.3.7
132
133
  signing_key:
133
134
  specification_version: 3
134
- summary: HTML formatter for SimpleCov code coverage tool for ruby 1.9+
135
+ summary: Default HTML formatter for SimpleCov code coverage tool for ruby 1.9+
135
136
  test_files:
136
137
  - test/helper.rb
137
138
  - test/test_simple_cov-html.rb
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.3.9