schmurfy-bacon 1.4.9 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bacon.gemspec +1 -0
- data/lib/bacon.rb +9 -5
- data/lib/bacon/version.rb +1 -1
- data/lib/output/better_output.rb +4 -2
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a528245ce5236bc7d393a4fcc2814b25e887e539
|
4
|
+
data.tar.gz: 6e30b927e619f4d3e97d00649126e79729ed22a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4f0c06669923e989e26bf802e7412cbcd5527fd93f068c3e4c6d3cea0ff234b3fdbdb44d0dbea1f580f0274a17d7e23926e62ad377d97389948f9b53ffd7f63
|
7
|
+
data.tar.gz: 486e17393476b8b902ab9ce63189cda45f5c693b00412ff03cb292aae8b648ff00a8a2b31b7d7dd6bf1ede4658804ae9ac04f60798162282784c33f45f25c63f
|
data/bacon.gemspec
CHANGED
data/lib/bacon.rb
CHANGED
@@ -7,6 +7,8 @@
|
|
7
7
|
# Bacon is freely distributable under the terms of an MIT-style license.
|
8
8
|
# See COPYING or http://www.opensource.org/licenses/mit-license.php.
|
9
9
|
|
10
|
+
require 'hitimes'
|
11
|
+
|
10
12
|
module Bacon
|
11
13
|
Counter = Hash.new(0)
|
12
14
|
ErrorLog = ""
|
@@ -109,17 +111,19 @@ module Bacon
|
|
109
111
|
end
|
110
112
|
|
111
113
|
def run_requirement(description, spec)
|
112
|
-
Bacon.handle_requirement description do
|
114
|
+
Bacon.handle_requirement description do |timing|
|
113
115
|
begin
|
114
116
|
Counter[:depth] += 1
|
115
117
|
rescued = false
|
116
118
|
begin
|
117
119
|
prev_req = nil
|
118
120
|
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
121
|
+
timing << Hitimes::Interval.measure do
|
122
|
+
execute_spec do
|
123
|
+
@before.each { |block| instance_eval(&block) }
|
124
|
+
prev_req = Counter[:requirements]
|
125
|
+
instance_eval(&spec)
|
126
|
+
end
|
123
127
|
end
|
124
128
|
rescue Object => e
|
125
129
|
rescued = true
|
data/lib/bacon/version.rb
CHANGED
data/lib/output/better_output.rb
CHANGED
@@ -13,14 +13,16 @@ module BetterOutput
|
|
13
13
|
|
14
14
|
def handle_requirement(description)
|
15
15
|
print "#{spaces} ~ #{description}"
|
16
|
-
|
16
|
+
timing = []
|
17
|
+
error_type, err = yield(timing)
|
17
18
|
|
18
19
|
# goto beginning of line
|
19
20
|
print "\e[G\e[K"
|
20
21
|
|
21
22
|
case error_type
|
22
23
|
when ""
|
23
|
-
|
24
|
+
duration = (timing[0] * 1000).to_i
|
25
|
+
puts "#{spaces} #{Color.green}✔#{Color.reset} #{description} [#{duration} ms]"
|
24
26
|
|
25
27
|
when :failed
|
26
28
|
puts "#{spaces} #{Color.red}✘#{Color.reset} #{description}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schmurfy-bacon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Neukirchen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: term-ansicolor
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: hitimes
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.2.2
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.2.2
|
27
41
|
description: |
|
28
42
|
Bacon is a small RSpec clone weighing less than 350 LoC but
|
29
43
|
nevertheless providing all essential features.
|