fix 0.9.1 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +4 -2
- data/VERSION.semver +1 -1
- data/checksum/fix-0.9.1.gem.sha512 +1 -0
- data/fix.gemspec +2 -2
- data/lib/fix/helpers/it_helper.rb +4 -1
- data/lib/fix/report.rb +32 -6
- data/lib/fix/test.rb +4 -4
- metadata +7 -6
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eae82f600d8eeae1817987ea21a0d4377ffda7da
|
4
|
+
data.tar.gz: de7db5c010702f6e1623275f0d7e2f294582ca43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: defc73b6383bcfb2607e5b842ac1490dcffadfd1429f250459721b64c52b6e48f7f0b37c021cbde0d777abced316128f859a57ed962eb5d3695000b35086a583
|
7
|
+
data.tar.gz: 0bff3242e83234ab17e743f16776ead4ded7b2fd8753f92ebc6f5d3c2e87a4012efb79d2b09419ad2e7ab25ce19c60a396d6bcec26584273228df3aeddd4e896
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
data/VERSION.semver
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.10.0
|
@@ -0,0 +1 @@
|
|
1
|
+
c1529ea230a72517e4d15da268661f0c06c0294f456e2bec9dcb455fd85febda7de4237466414d02a662e3a2b370471d20852138f45fc3fbb5d8fef270d9e356
|
data/fix.gemspec
CHANGED
@@ -15,13 +15,13 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.require_paths = ['lib']
|
16
16
|
|
17
17
|
spec.add_dependency 'defi', '~> 1.1.0'
|
18
|
-
spec.add_dependency 'spectus', '~> 2.
|
18
|
+
spec.add_dependency 'spectus', '~> 2.7.0'
|
19
19
|
|
20
20
|
spec.add_development_dependency 'bundler', '~> 1.10'
|
21
21
|
spec.add_development_dependency 'rake', '~> 10.4'
|
22
22
|
spec.add_development_dependency 'yard', '~> 0.8'
|
23
23
|
spec.add_development_dependency 'simplecov', '~> 0.10'
|
24
|
-
spec.add_development_dependency 'rubocop', '~> 0.
|
24
|
+
spec.add_development_dependency 'rubocop', '~> 0.34'
|
25
25
|
|
26
26
|
spec.cert_chain = ['certs/gem-fixrb-public_cert.pem']
|
27
27
|
private_key = File.expand_path('~/.ssh/gem-fixrb-private_key.pem')
|
data/lib/fix/report.rb
CHANGED
@@ -40,7 +40,7 @@ module Fix
|
|
40
40
|
|
41
41
|
# @private
|
42
42
|
def alerts
|
43
|
-
test.results.reject { |r| r.
|
43
|
+
test.results.reject { |r| r.to_sym.equal?(:success) }
|
44
44
|
end
|
45
45
|
|
46
46
|
# @private
|
@@ -51,7 +51,19 @@ module Fix
|
|
51
51
|
# @private
|
52
52
|
def results_banner
|
53
53
|
alerts.map.with_index(1) do |r, i|
|
54
|
-
"#{i}. #{r.message}\n" + maybe_backtrace(r)
|
54
|
+
s = "#{i}. #{r.message}\n" + maybe_backtrace(r)
|
55
|
+
|
56
|
+
next s unless @test.configuration.fetch(:color)
|
57
|
+
|
58
|
+
if r.to_sym.equal?(:success)
|
59
|
+
"\e[32m#{s}\e[0m"
|
60
|
+
elsif r.to_sym.equal?(:info)
|
61
|
+
"\e[33m#{s}\e[0m"
|
62
|
+
elsif r.to_sym.equal?(:failure)
|
63
|
+
"\e[35m#{s}\e[0m"
|
64
|
+
else
|
65
|
+
"\e[31m#{s}\e[0m"
|
66
|
+
end
|
55
67
|
end
|
56
68
|
end
|
57
69
|
|
@@ -62,10 +74,24 @@ module Fix
|
|
62
74
|
|
63
75
|
# @private
|
64
76
|
def statistics_banner
|
65
|
-
"#{test.statistics.fetch(:pass_percent)}% compliant - " \
|
66
|
-
|
67
|
-
|
68
|
-
|
77
|
+
s = "#{test.statistics.fetch(:pass_percent)}% compliant - " \
|
78
|
+
"#{test.statistics.fetch(:total_infos)} infos, " \
|
79
|
+
"#{test.statistics.fetch(:total_failures)} failures, " \
|
80
|
+
"#{test.statistics.fetch(:total_errors)} errors\n"
|
81
|
+
|
82
|
+
return s unless @test.configuration.fetch(:color)
|
83
|
+
|
84
|
+
stats = test.statistics
|
85
|
+
|
86
|
+
if stats.fetch(:total_errors) > 0
|
87
|
+
"\e[31m#{s}\e[0m"
|
88
|
+
elsif stats.fetch(:total_failures) > 0
|
89
|
+
"\e[35m#{s}\e[0m"
|
90
|
+
elsif stats.fetch(:total_infos) > 0
|
91
|
+
"\e[33m#{s}\e[0m"
|
92
|
+
else
|
93
|
+
"\e[32m#{s}\e[0m"
|
94
|
+
end
|
69
95
|
end
|
70
96
|
end
|
71
97
|
end
|
data/lib/fix/test.rb
CHANGED
@@ -13,7 +13,7 @@ module Fix
|
|
13
13
|
# @param options [Hash] Some options.
|
14
14
|
# @param specs [Proc] The specs to test against the object.
|
15
15
|
def initialize(front_object, options = {}, &specs)
|
16
|
-
@configuration = { verbose: true }
|
16
|
+
@configuration = { verbose: true, color: false }
|
17
17
|
@configuration.update(options)
|
18
18
|
|
19
19
|
start_time = Time.now
|
@@ -46,9 +46,9 @@ module Fix
|
|
46
46
|
def statistics
|
47
47
|
{
|
48
48
|
pass_percent: pass_percent,
|
49
|
-
total_infos: results.count { |r| r.
|
50
|
-
total_failures: results.count { |r| r.
|
51
|
-
total_errors: results.count { |r| r.
|
49
|
+
total_infos: results.count { |r| r.to_sym.equal?(:info) },
|
50
|
+
total_failures: results.count { |r| r.to_sym.equal?(:failure) },
|
51
|
+
total_errors: results.count { |r| r.to_sym.equal?(:error) }
|
52
52
|
}
|
53
53
|
end
|
54
54
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyril Wack
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
dzJvWzQ1+dJU6WQv75E9ddSkaQrK3nhdgQVu+/wgvGSrsMvOGNz+LXaSDxQqZuwX
|
31
31
|
0KNQFuIukfrdk8URwRnHoAnvx4U93iUw
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2015-09-
|
33
|
+
date: 2015-09-13 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: defi
|
@@ -52,14 +52,14 @@ dependencies:
|
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 2.
|
55
|
+
version: 2.7.0
|
56
56
|
type: :runtime
|
57
57
|
prerelease: false
|
58
58
|
version_requirements: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 2.
|
62
|
+
version: 2.7.0
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
64
|
name: bundler
|
65
65
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,14 +122,14 @@ dependencies:
|
|
122
122
|
requirements:
|
123
123
|
- - "~>"
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: '0.
|
125
|
+
version: '0.34'
|
126
126
|
type: :development
|
127
127
|
prerelease: false
|
128
128
|
version_requirements: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
130
|
- - "~>"
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: '0.
|
132
|
+
version: '0.34'
|
133
133
|
description: Specing framework for Ruby.
|
134
134
|
email:
|
135
135
|
- contact@cyril.email
|
@@ -153,6 +153,7 @@ files:
|
|
153
153
|
- checksum/fix-0.7.0.gem.sha512
|
154
154
|
- checksum/fix-0.8.0.gem.sha512
|
155
155
|
- checksum/fix-0.9.0.gem.sha512
|
156
|
+
- checksum/fix-0.9.1.gem.sha512
|
156
157
|
- fix.gemspec
|
157
158
|
- lib/fix.rb
|
158
159
|
- lib/fix/helpers/it_helper.rb
|
metadata.gz.sig
CHANGED
Binary file
|