fluff 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/exe/fluff +19 -3
- data/lib/fluff/rspec/formatter.rb +3 -1
- data/lib/fluff/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c68a2896c0383d4c52519e1532b334b5f5d4e01f
|
4
|
+
data.tar.gz: 749d47d55c3ad7c0a8dd970db00044cdd1069a08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48c6826e8a9049a9ba571308dec7bfa9a2f230bc7f8b5f3de4a6d6bbfc3d5c692f69d48f261040ea48c04452b6b3203ab472e96fab9e83de39d6ed61f234f39d
|
7
|
+
data.tar.gz: dc5723c1d64a0f30fb5cdb2d3752b283d548cb260478a6dfec3713363278e731b38883b141e3d32c40ac2ef530fbf6ddd20955899663b0a9838cefadc2d0234f
|
data/README.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
Runs RSpec in parallel and optionally displays the results on a web UI.
|
4
4
|
|
5
|
+
![screenshot](https://github.com/bagilevi/fluff-web-ui/raw/master/docs/screenshot.png "Screenshot")
|
6
|
+
|
5
7
|
## Installation
|
6
8
|
|
7
9
|
Add this line to your application's Gemfile:
|
@@ -18,7 +20,7 @@ Or install it yourself as:
|
|
18
20
|
|
19
21
|
$ gem install fluff
|
20
22
|
|
21
|
-
For instructions to install the Web UI, see: [fluff-
|
23
|
+
For instructions to install the Web UI, see: [fluff-web-ui](https://github.com/bagilevi/fluff-web-ui#installation).
|
22
24
|
|
23
25
|
## Usage
|
24
26
|
|
data/exe/fluff
CHANGED
@@ -9,7 +9,7 @@ RUNNERS = ENV.fetch('FLUFF_PARALLELISM', 2).to_i
|
|
9
9
|
DB_URL_TEMPLATE = ENV.fetch('FLUFF_DB_URL_TEMPLATE')
|
10
10
|
|
11
11
|
case command
|
12
|
-
when 'setup'
|
12
|
+
when '--setup'
|
13
13
|
puts "Preparing #{RUNNERS} DBs..."
|
14
14
|
|
15
15
|
(1 .. RUNNERS).map do |runner_num|
|
@@ -38,6 +38,7 @@ else
|
|
38
38
|
|
39
39
|
redis.publish "fluff_shouts", JSON.generate(type: 'start_run', run_uuid: run_uuid) if redis
|
40
40
|
|
41
|
+
puts "[#{Time.current.to_s}]"
|
41
42
|
puts "Starting #{groups.size} runners..."
|
42
43
|
|
43
44
|
threads = (1 .. groups.size).map do |runner_num|
|
@@ -54,13 +55,28 @@ else
|
|
54
55
|
cmd << "--format progress " if !redis
|
55
56
|
cmd << "--format Fluff::Rspec::Formatter " if redis
|
56
57
|
cmd << "#{spec_files.join(' ')}"
|
57
|
-
|
58
|
+
|
59
|
+
require 'open3'
|
60
|
+
Open3.popen3(cmd) do |stdin, stdout, stderr, thread|
|
61
|
+
puts "One thread finished with exit status #{thread.value.exitstatus}"
|
62
|
+
thread.value.exitstatus
|
63
|
+
end
|
58
64
|
end
|
59
65
|
end
|
60
66
|
|
61
|
-
threads.
|
67
|
+
exit_codes = threads.map { |thr| thr.value }
|
68
|
+
puts "All threads finished."
|
62
69
|
|
63
70
|
redis.publish "fluff_shouts", JSON.generate(type: 'end_run', run_uuid: run_uuid) if redis
|
71
|
+
|
72
|
+
puts "[#{Time.current.to_s}]"
|
73
|
+
if exit_codes.any? { |c| c != 0 }
|
74
|
+
puts "\e[31m\nTest suite FAILED.\e[0m"
|
75
|
+
puts
|
76
|
+
exit(1)
|
77
|
+
else
|
78
|
+
puts "\e[32m\nTest suite PASSED.\e[0m"
|
79
|
+
end
|
64
80
|
end
|
65
81
|
|
66
82
|
puts
|
@@ -19,7 +19,9 @@ module Fluff
|
|
19
19
|
def start(notification)
|
20
20
|
emit(
|
21
21
|
:type => 'start',
|
22
|
-
:version => RSpec::Core::Version::STRING
|
22
|
+
:version => RSpec::Core::Version::STRING,
|
23
|
+
:project_path => (defined?(Rails) ? Rails.root.to_s : Dir.pwd),
|
24
|
+
:lib_paths => Gem.loaded_specs.map { |gem_name, gem_spec| [gem_name, gem_spec.full_gem_path] }
|
23
25
|
)
|
24
26
|
end
|
25
27
|
|
data/lib/fluff/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Levente Bagi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|