danger-istanbul 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/istanbul/gem_version.rb +1 -1
- data/lib/istanbul/plugin.rb +6 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d2e389b98c3eb6e270501582866a456785b73e9
|
4
|
+
data.tar.gz: 4b9704e89dba91d48c47c5627795a2d6931dfeba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3750c1c98ae5e24181f845fea0984b5a186eb928b8bff03a960144511f45ae715edd81c9c92a959da667bf725801f7953328894ba52fda86272314018e30ea73
|
7
|
+
data.tar.gz: b92016c119c5d33eafa29273437f37dfbc39e7b78425d968b83af3dc6d8d4e756074032423768389f280b7e3a9e7ef60f447a3feec89e7065d201d1e1042c686
|
data/lib/istanbul/gem_version.rb
CHANGED
data/lib/istanbul/plugin.rb
CHANGED
@@ -48,7 +48,7 @@ module Danger
|
|
48
48
|
total_operators = results.map{|a| a[:total_lines]}.inject(0){|sum,x| sum + x }
|
49
49
|
num_coverage_operators = results.map{|a| a[:lines_coverage]}.inject(0){|sum,x| sum + x }
|
50
50
|
project_coverage = num_coverage_operators / total_operators
|
51
|
-
data = {
|
51
|
+
@data = {
|
52
52
|
total_operators: total_operators,
|
53
53
|
num_coverage_operators: num_coverage_operators,
|
54
54
|
coverage: round(num_coverage_operators / total_operators) * 100,
|
@@ -57,13 +57,16 @@ module Danger
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def check_coverage(verbose = false)
|
60
|
+
|
61
|
+
`export LC_ALL=C.UTF-8`
|
62
|
+
`export LANG=en_US.UTF-8`
|
63
|
+
`export LANGUAGE=en_US.UTF-8`
|
60
64
|
|
61
65
|
php_files = git.modified_files.select{|a| a[/\.php/] && a[/src\//] && !a[/\.spec/] && !a['migrations'] }
|
62
66
|
|
63
67
|
puts "Verificando o se coverage total do Projeto e superior a #{min_coverage_project}" if verbose
|
64
|
-
p 'veio'
|
65
68
|
if data[:coverage] < min_coverage_project
|
66
|
-
fail("Coverage do projeto
|
69
|
+
fail("Coverage do projeto está abaixo de #{min_coverage_project}%. Coverage atual: #{data[:coverage]}%")
|
67
70
|
end
|
68
71
|
|
69
72
|
puts 'Verificando se tem testes para os arquivos modificados no pull request' if verbose
|