simplecov-rcov 0.2.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6729288e3c7bdcaabfab493c16f052c4178ed52d59f244ae4a0b09b3ab1de23b
4
+ data.tar.gz: 8c31bff717562924ac4bfc589b1ed8b9bd466621c47b62de681a737a813a3c96
5
+ SHA512:
6
+ metadata.gz: 402cc9f159e1dd8e3d314491018ce095ebdd1dcda67d8ff39b4eaf42777ee89409462423092539bcac26b25fc7b59cfe49d8a7d650d4fd606278ed58aa063eb4
7
+ data.tar.gz: 2ed2eee9e610b4af1a470884c90de7ebd0e2bee59295ff27855b0dfe535d884818e8452cf9046ae845abe3b37893a3d86b9aae12ce763fa3254094f0a68a0e4d
data/.gitignore CHANGED
@@ -1,5 +1,6 @@
1
1
  .rvmrc
2
2
  .bundle
3
+ /tmp
3
4
 
4
5
  ## MAC OS
5
6
  .DS_Store
@@ -20,6 +21,7 @@ tmtags
20
21
  coverage
21
22
  rdoc
22
23
  pkg
24
+ Gemfile.lock
23
25
 
24
26
  ## PROJECT::SPECIFIC
25
27
 
data/.travis.yml ADDED
@@ -0,0 +1,9 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.2
4
+ - 1.9.3
5
+ - 1.8.7
6
+ - jruby-18mode
7
+ - jruby-19mode
8
+ - rbx-18mode
9
+ - rbx-19mode
data/Gemfile CHANGED
@@ -1,8 +1,2 @@
1
1
  source :rubygems
2
-
3
2
  gemspec
4
-
5
- group :test, :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/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # SimpleCov Rcov Formatter gem
2
2
 
3
+ ![SimpleCov Rcov logo](http://farm7.static.flickr.com/6066/6092747137_965f5816ea_o.gif)
4
+
3
5
  Is a Rcov style formatter for the ruby 1.9+ coverage gem: [SimpleCov](http://github.com/colszowka/simplecov).
4
6
 
5
7
  The target of this formatter is to cheat on **Hudson** so I can use the [Ruby metrics plugin](http://github.com/hudson/rubymetrics-plugin) with **SimpleCov**.
@@ -59,10 +61,6 @@ And require the gems just before use the *SimpleCov* constant, like in the examp
59
61
 
60
62
  If not could be *Uninitialized constant SimpleCov* issues.
61
63
 
62
- ## TODO
63
-
64
- The actual version generates only one simple **/rcov/index.html** file.
65
-
66
64
  ## Credits
67
65
 
68
66
  * Author: [Fernando Guillen](http://fernandoguillen.info)
data/Rakefile CHANGED
@@ -1,16 +1,19 @@
1
+ require 'rake'
2
+ require 'rake/testtask'
1
3
  require 'bundler'
4
+
5
+ include Rake::DSL
6
+
2
7
  Bundler::GemHelper.install_tasks
3
8
 
4
- require 'rake/testtask'
9
+ task :default => :test
5
10
  Rake::TestTask.new(:test) do |test|
6
11
  test.libs << 'lib' << 'test'
7
12
  test.pattern = 'test/**/test_*.rb'
8
13
  test.verbose = true
9
14
  end
10
15
 
11
- task :default => :test
12
-
13
- require 'rake/rdoctask'
16
+ require 'rdoc/task'
14
17
  Rake::RDocTask.new do |rdoc|
15
18
  rdoc.rdoc_dir = 'rdoc'
16
19
  rdoc.rdoc_files.include('README*')
Binary file
@@ -1,8 +1,7 @@
1
1
  module SimpleCov
2
2
  module Formatter
3
3
  class RcovFormatter
4
- VERSION = "0.2.0"
5
- UPSTREAM_URL = "https://github.com/fguillen/simplecov-rcov"
4
+ VERSION = "0.3.1"
6
5
  end
7
6
  end
8
7
  end
@@ -1,16 +1,18 @@
1
- require 'bundler'
2
- Bundler.setup(:default)
3
-
4
1
  require 'erb'
5
2
  require 'cgi'
6
3
  require 'fileutils'
7
4
  require 'time'
5
+ require 'pathname'
6
+
7
+ require File.expand_path( "#{File.dirname(__FILE__)}/simplecov-rcov/version.rb" )
8
8
 
9
9
  unless defined?(SimpleCov)
10
10
  raise RuntimeError, "simplecov-rcov is a formatter for simplecov. Please update your test helper and gemfile to require 'simplecov'!"
11
11
  end
12
12
 
13
13
  class SimpleCov::Formatter::RcovFormatter
14
+ UPSTREAM_URL = "https://github.com/fguillen/simplecov-rcov"
15
+
14
16
  def format( result )
15
17
  Dir[File.join(File.dirname(__FILE__), '../assets/*')].each do |path|
16
18
  FileUtils.cp_r(path, asset_output_path)
@@ -148,5 +150,3 @@ class SimpleCov::Formatter::RcovFormatter
148
150
  end
149
151
  end
150
152
  end
151
-
152
- require 'simplecov-rcov/version'
@@ -8,19 +8,20 @@ Gem::Specification.new do |s|
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Fernando Guillen http://fernandoguillen.info", "Wes Morgan http://github.com/cap10morgan", "Wandenberg Peixoto http://github.com/wandenberg"]
10
10
  s.email = ["fguillen.mail@gmail.com", "cap10morgan@gmail.com"]
11
- s.homepage = %q{http://github.com/fguillen/simplecov-rcov}
12
- s.summary = %q{Rcov style formatter for SimpleCov}
13
- s.description = %q{Rcov style formatter for SimpleCov}
14
- s.date = %q{2011-02-10}
11
+ s.homepage = "http://github.com/fguillen/simplecov-rcov"
12
+ s.summary = "Rcov style formatter for SimpleCov"
13
+ s.description = "Rcov style formatter for SimpleCov"
15
14
 
16
- s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
17
- s.extra_rdoc_files = ["README.md", "lib/simplecov-rcov.rb"]
18
- s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Simplecov-rcov", "--main", "README.md"]
19
- s.rubyforge_project = %q{simplecov-rcov}
20
- s.rubygems_version = %q{1.3.7}
15
+ s.rubyforge_project = "simplecov-rcov"
21
16
 
22
17
  s.files = `git ls-files`.split("\n")
23
18
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
24
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
25
20
  s.require_paths = ["lib"]
21
+
22
+ s.add_dependency 'simplecov', '>= 0.4.1'
23
+
24
+ s.add_development_dependency 'bundler', '>= 1.0.0.rc.6'
25
+ s.add_development_dependency 'mocha'
26
+ s.add_development_dependency 'rake'
26
27
  end
@@ -1,4 +1,4 @@
1
- require "#{File.expand_path(File.dirname(__FILE__))}/helper"
1
+ require File.expand_path( "#{File.dirname(__FILE__)}/helper" )
2
2
 
3
3
  class SimplecovRcovFormatterTest < Test::Unit::TestCase
4
4
  def test_format
metadata CHANGED
@@ -1,41 +1,84 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: simplecov-rcov
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 2
8
- - 0
9
- version: 0.2.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.1
10
5
  platform: ruby
11
- authors:
6
+ authors:
12
7
  - Fernando Guillen http://fernandoguillen.info
13
8
  - Wes Morgan http://github.com/cap10morgan
14
9
  - Wandenberg Peixoto http://github.com/wandenberg
15
- autorequire:
10
+ autorequire:
16
11
  bindir: bin
17
12
  cert_chain: []
18
-
19
- date: 2011-02-10 00:00:00 +01:00
20
- default_executable:
21
- dependencies: []
22
-
13
+ date: 2022-05-03 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: simplecov
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - ">="
20
+ - !ruby/object:Gem::Version
21
+ version: 0.4.1
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ version: 0.4.1
29
+ - !ruby/object:Gem::Dependency
30
+ name: bundler
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: 1.0.0.rc.6
36
+ type: :development
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 1.0.0.rc.6
43
+ - !ruby/object:Gem::Dependency
44
+ name: mocha
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ type: :development
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ - !ruby/object:Gem::Dependency
58
+ name: rake
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ type: :development
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
23
71
  description: Rcov style formatter for SimpleCov
24
- email:
72
+ email:
25
73
  - fguillen.mail@gmail.com
26
74
  - cap10morgan@gmail.com
27
75
  executables: []
28
-
29
76
  extensions: []
30
-
31
- extra_rdoc_files:
32
- - README.md
33
- - lib/simplecov-rcov.rb
34
- files:
35
- - .gitignore
77
+ extra_rdoc_files: []
78
+ files:
79
+ - ".gitignore"
80
+ - ".travis.yml"
36
81
  - Gemfile
37
- - Gemfile.lock
38
- - Manifest
39
82
  - README.md
40
83
  - Rakefile
41
84
  - assets/jquery-1.3.2.min.js
@@ -43,6 +86,7 @@ files:
43
86
  - assets/print.css
44
87
  - assets/rcov.js
45
88
  - assets/screen.css
89
+ - etc/simplecov_rcov_logo.gif
46
90
  - lib/simplecov-rcov.rb
47
91
  - lib/simplecov-rcov/version.rb
48
92
  - simplecov-rcov.gemspec
@@ -57,49 +101,32 @@ files:
57
101
  - test/fixtures/sample.rb
58
102
  - test/fixtures/totals_tr.html
59
103
  - test/helper.rb
60
- - test/simplecov-rcov_test.rb
61
104
  - test/test_simplecov-rcov.rb
62
105
  - views/detail.html.erb
63
106
  - views/index.html.erb
64
- has_rdoc: true
65
107
  homepage: http://github.com/fguillen/simplecov-rcov
66
108
  licenses: []
67
-
68
- post_install_message:
69
- rdoc_options:
70
- - --line-numbers
71
- - --inline-source
72
- - --title
73
- - Simplecov-rcov
74
- - --main
75
- - README.md
76
- require_paths:
109
+ metadata: {}
110
+ post_install_message:
111
+ rdoc_options: []
112
+ require_paths:
77
113
  - lib
78
- required_ruby_version: !ruby/object:Gem::Requirement
79
- none: false
80
- requirements:
114
+ required_ruby_version: !ruby/object:Gem::Requirement
115
+ requirements:
81
116
  - - ">="
82
- - !ruby/object:Gem::Version
83
- segments:
84
- - 0
85
- version: "0"
86
- required_rubygems_version: !ruby/object:Gem::Requirement
87
- none: false
88
- requirements:
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ required_rubygems_version: !ruby/object:Gem::Requirement
120
+ requirements:
89
121
  - - ">="
90
- - !ruby/object:Gem::Version
91
- segments:
92
- - 1
93
- - 2
94
- version: "1.2"
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
95
124
  requirements: []
96
-
97
- rubyforge_project: simplecov-rcov
98
- rubygems_version: 1.3.7
99
- signing_key:
100
- specification_version: 3
125
+ rubygems_version: 3.2.22
126
+ signing_key:
127
+ specification_version: 4
101
128
  summary: Rcov style formatter for SimpleCov
102
- test_files:
129
+ test_files:
103
130
  - test/fixtures/app/controllers/sample.rb
104
131
  - test/fixtures/app/models/airplane.rb
105
132
  - test/fixtures/app/models/dog.rb
@@ -111,5 +138,4 @@ test_files:
111
138
  - test/fixtures/sample.rb
112
139
  - test/fixtures/totals_tr.html
113
140
  - test/helper.rb
114
- - test/simplecov-rcov_test.rb
115
141
  - test/test_simplecov-rcov.rb
data/Gemfile.lock DELETED
@@ -1,18 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- simplecov-rcov (0.1.4)
5
-
6
- GEM
7
- remote: http://rubygems.org/
8
- specs:
9
- simplecov (0.4.1)
10
- simplecov-html (~> 0.4.3)
11
- simplecov-html (0.4.3)
12
-
13
- PLATFORMS
14
- ruby
15
-
16
- DEPENDENCIES
17
- simplecov
18
- simplecov-rcov!
data/Manifest DELETED
@@ -1,19 +0,0 @@
1
- Gemfile
2
- Gemfile.lock
3
- Manifest
4
- README.md
5
- Rakefile
6
- lib/simplecov-rcov.rb
7
- simplecov-rcov.gemspec
8
- test/fixtures/app/controllers/sample.rb
9
- test/fixtures/app/models/airplane.rb
10
- test/fixtures/app/models/dog.rb
11
- test/fixtures/app/models/house.rb
12
- test/fixtures/app/models/robot.rb
13
- test/fixtures/app/models/user.rb
14
- test/fixtures/file_tr.html
15
- test/fixtures/sample.rb
16
- test/fixtures/totals_tr.html
17
- test/helper.rb
18
- test/simplecov-rcov_test.rb
19
- views/index.erb.html
@@ -1,31 +0,0 @@
1
- require "#{File.expand_path(File.dirname(__FILE__))}/helper"
2
-
3
- class SimplecovRcovFormatterTest < Test::Unit::TestCase
4
- def test_format
5
- SimpleCov::Formatter::RcovFormatter.stubs( :path_result ).returns( '/tmp/rcov/coverage_test_index.html' )
6
- if File.exists?( SimpleCov::Formatter::RcovFormatter.path_result )
7
- File.delete( SimpleCov::Formatter::RcovFormatter.path_result )
8
- end
9
-
10
- @original_result = {
11
- source_fixture( 'sample.rb' ) => [nil, 1, 1, 1, nil, 0, 1, 1, nil, nil],
12
- source_fixture( 'app/models/user.rb' ) => [nil, 1, 1, 1, 1, 0, 1, 0, nil, nil],
13
- source_fixture( 'app/models/robot.rb' ) => [1, 1, 1, 1, nil, nil, 1, 0, nil, nil],
14
- source_fixture( 'app/models/house.rb' ) => [nil, nil, nil, nil, nil, nil, nil, nil, nil, nil],
15
- source_fixture( 'app/models/airplane.rb' ) => [0, 0, 0, 0, 0],
16
- source_fixture( 'app/models/dog.rb' ) => [1, 1, 1, 1, 1],
17
- source_fixture( 'app/controllers/sample.rb' ) => [nil, 1, 1, 1, nil, nil, 0, 0, nil, nil]
18
- }
19
-
20
- @result = SimpleCov::Result.new( @original_result )
21
- rcov_result = SimpleCov::Formatter::RcovFormatter.new().format( @result )
22
-
23
- assert_match( File.read( "#{File.dirname(__FILE__)}/fixtures/totals_tr.html"), rcov_result )
24
- assert_match( File.read( "#{File.dirname(__FILE__)}/fixtures/file_tr.html"), rcov_result )
25
- assert( File.exists?( SimpleCov::Formatter::RcovFormatter.path_result ) )
26
- end
27
-
28
- def source_fixture( filename )
29
- File.expand_path( File.join( File.dirname( __FILE__ ), 'fixtures', filename ) )
30
- end
31
- end