miss_cleo 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/miss_cleo +8 -13
  3. data/lib/miss_cleo/version.rb +1 -1
  4. metadata +12 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d7443ba51e59b7d1941d4ee652e26543136da4d1
4
- data.tar.gz: 5f8c6e24bafa1eafff383a4435fcd25bf45428d6
3
+ metadata.gz: 54464805194c191600f4bc95891b0492f996ee01
4
+ data.tar.gz: 31c3a2a7cc52e4c2449a1f7c6da7958b89785ca6
5
5
  SHA512:
6
- metadata.gz: 05a3e70338e08f3c3ac99397f15def5b6212e76b0d7dd458fd4fc0715d24288db41a078337336aaad4d6c30cedf97ebcca26cf8d424059c08cbabf1e617a3fcc
7
- data.tar.gz: f29c165a827f380f548b10fa62fdc24f08c8ef0220a8a5b2cd1f3c8dfa01b33260a0e62d21239187a10015b29e5ce8c7ae96702f5f1473ece4237d9b478400d1
6
+ metadata.gz: f8c10b9b59515664cee544f2b1103421db8f3c1b8fc4cfd55a48f1a2e1e9428d0b98da862b2735a9c3ba51aef1086bd6ce87c88ceb4633104666367d60572173
7
+ data.tar.gz: eb1f798a844efa01fe5a9bf323a0abd01c20f6e154ea9184ab5d4ee762538ae0c0169d755c447b1be9d431589b5aa354a2dc52ffb90ec20460be91294c75c0e1
data/bin/miss_cleo CHANGED
@@ -49,16 +49,14 @@ def diff before, after
49
49
  end
50
50
  end
51
51
 
52
- def build_coverage_map(cov_diffs)
53
- cov_map = Hash.new { |h, file| h[file] = Hash.new { |i, line| i[line] = [] } }
54
- cov_diffs.each do |args|
55
- if args.length == 4 # for Minitest
56
- desc = args.first(2).join('#')
52
+ def build_coverage_map(cov_map, cov_diffs)
53
+ cov_diffs.each do |test_to_code_map|
54
+ if test_to_code_map.length == 4 # for Minitest
55
+ test_file_and_line = test_to_code_map.first(2).join('#')
57
56
  else # for RSpec
58
- desc = args.first
57
+ desc = test_to_code_map.first
59
58
  end
60
-
61
- before, after = args.last(2)
59
+ before, after = test_to_code_map.last(2)
62
60
 
63
61
  # calculate the per test coverage
64
62
  delta = diff before, after
@@ -76,23 +74,20 @@ def build_coverage_map(cov_diffs)
76
74
  end
77
75
  end
78
76
  end
79
- cov_map
80
77
  end
81
78
 
82
79
  case ARGV.first
83
80
  when "build_deck"
84
81
  filenames = ARGV[1..-1]
85
- coverage_diffs = []
82
+ cov_map = Hash.new { |h, file| h[file] = Hash.new { |i, line| i[line] = [] } }
86
83
  filenames.each do |filename|
87
84
  File.open(filename, "r") do |f|
88
85
  f.read
89
86
  end.tap do |contents|
90
- coverage_diffs += JSON.parse(contents)
87
+ build_coverage_map(cov_map, JSON.parse(contents))
91
88
  end
92
89
  end
93
90
 
94
- coverage_map = build_coverage_map(coverage_diffs)
95
-
96
91
  File.open("total_coverage_map.json", "w") do |f|
97
92
  f.write(JSON.dump(coverage_map))
98
93
  end
@@ -1,3 +1,3 @@
1
1
  module MissCleo
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: miss_cleo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dean Hu
@@ -9,34 +9,34 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-10-23 00:00:00.000000000 Z
12
+ date: 2015-11-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
20
  version: '1.8'
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ~>
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: '1.8'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ~>
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
34
  version: '10.0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ~>
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: '10.0'
42
42
  description: Miss Cleo frees you from having to run your full test suite to be confident
@@ -48,9 +48,9 @@ executables:
48
48
  extensions: []
49
49
  extra_rdoc_files: []
50
50
  files:
51
- - .gitignore
52
- - .rspec
53
- - .travis.yml
51
+ - ".gitignore"
52
+ - ".rspec"
53
+ - ".travis.yml"
54
54
  - CODE_OF_CONDUCT.md
55
55
  - Gemfile
56
56
  - LICENSE.txt
@@ -75,17 +75,17 @@ require_paths:
75
75
  - lib
76
76
  required_ruby_version: !ruby/object:Gem::Requirement
77
77
  requirements:
78
- - - '>='
78
+ - - ">="
79
79
  - !ruby/object:Gem::Version
80
80
  version: '0'
81
81
  required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  requirements:
83
- - - '>='
83
+ - - ">="
84
84
  - !ruby/object:Gem::Version
85
85
  version: '0'
86
86
  requirements: []
87
87
  rubyforge_project:
88
- rubygems_version: 2.2.2
88
+ rubygems_version: 2.4.3
89
89
  signing_key:
90
90
  specification_version: 4
91
91
  summary: Predict your test failures