fluff 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2228e74e64c9513968c16272c53c7328b1c434df
4
- data.tar.gz: 5d5abd50bfa3153939aed808450d9879937177ec
3
+ metadata.gz: c68a2896c0383d4c52519e1532b334b5f5d4e01f
4
+ data.tar.gz: 749d47d55c3ad7c0a8dd970db00044cdd1069a08
5
5
  SHA512:
6
- metadata.gz: ae565838b259c17c407213d35dd088dead5163b17ed025d3e98fa7b067a134d85afc14e416adfb08911cf94fff3e13cab6fe8868ef50b11139ac0811aa3c74ca
7
- data.tar.gz: 640a12c0852d4623300efff8c5d9820ea4b416d465fd33cadeabb98a03048a37376a54bd040b75042329609c66aef92698a1733f7ec2d0042f496c1279020e4c
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-display](https://github.com/bagilevi/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
- system(cmd)
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.each { |thr| thr.join }
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
@@ -1,3 +1,3 @@
1
1
  module Fluff
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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-04-30 00:00:00.000000000 Z
11
+ date: 2017-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler