specjour 2.0.0.rc1 → 2.0.0.rc2
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/History.markdown +18 -0
- data/lib/specjour/configuration.rb +1 -0
- data/lib/specjour/formatter.rb +0 -1
- data/lib/specjour/listener.rb +24 -16
- data/lib/specjour/protocol.rb +0 -1
- data/lib/specjour.rb +1 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25c6007ab5a18e0e75c6b75121fe1c4a1c08792e
|
4
|
+
data.tar.gz: b754110e3ba182341e0cf88fc3a9b0aeb7c76ed6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f46ab3c33f34934a834adc13fd4a8b0c76f4bf1840c7beb2ec266310328d7fea663a5ec99489628d4f757733cd04c735e3deaeab6e3f877cf2ec73d976dfdca6
|
7
|
+
data.tar.gz: 3d26b413944d6c04bfb5615db696bc197ef15ee6d3b1a130340cc8990b8085b6a67700f5be0da48ea73f4b40739087e6277a2996a580ad0a8da4961788d6d1c9
|
data/History.markdown
CHANGED
@@ -1,6 +1,24 @@
|
|
1
1
|
History
|
2
2
|
=======
|
3
3
|
|
4
|
+
2.0.0 (v2)
|
5
|
+
----------
|
6
|
+
* Specjour always starts a listener daemon unless one is already running. This means you're always sharing your cores by default.
|
7
|
+
* `specjour stop` stops the daemon running for the current project
|
8
|
+
* Your machine will share half available cores when running tests for a remote machine. This enables you to continue working while sharing your cpu.
|
9
|
+
* The listener can be run in the foreground with `specjour -f listen`.
|
10
|
+
* A constant number of workers can be set by the `-w` flag. Use this to set up a daemon on a machine devoted to specjour: `nohup specjour listen -w 4`
|
11
|
+
* Failing tests will be rerun after the suite completes. Disable with: `Specjour.configuration.rspec_rerun = false`
|
12
|
+
* The bonjour register/browse design has been flipped. Now, the listeners synchronously browse while the printer asynchronously advertises. This allows a listener to join the workers midway through a test run.
|
13
|
+
* You can run specjour on a single file, wherein all examples in the file will be distributed.
|
14
|
+
* Rspec and Rails are now treated as plugins. The plugins system is still a little rough, but should allow for adapting specjour to other testin frameworks like minitest and cucumber.
|
15
|
+
* Specjour uses its own formatter, instead of reusing an rspec formatter. The formatter is configurable which allows plugin authors to create the fomatter which best suits them.
|
16
|
+
* Specjour now launches a separate listener per project. This supports running specjour on two or more projects that have different Ruby versions.
|
17
|
+
* Removed the dependency on DRB.
|
18
|
+
* Removed the dependency on thor.
|
19
|
+
* Introduce a global specjour directory ($HOME/.specjour) to hold the lock file and daemon pids
|
20
|
+
|
21
|
+
|
4
22
|
0.7.1 / (master)
|
5
23
|
---------------------------
|
6
24
|
* [fixed] printer exit\_status returns false if there are no reporters
|
data/lib/specjour/formatter.rb
CHANGED
data/lib/specjour/listener.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
module Specjour
|
2
2
|
class Listener
|
3
3
|
require 'dnssd'
|
4
|
+
require 'fileutils'
|
4
5
|
Thread.abort_on_exception = true
|
5
6
|
|
6
7
|
LOCK_FILE = "listener.lock"
|
@@ -37,7 +38,7 @@ module Specjour
|
|
37
38
|
|
38
39
|
def config_directory
|
39
40
|
return @config_directory if @config_directory
|
40
|
-
@config_directory =
|
41
|
+
@config_directory = Specjour.configuration.global_path
|
41
42
|
FileUtils.mkdir_p @config_directory
|
42
43
|
@config_directory
|
43
44
|
end
|
@@ -69,25 +70,32 @@ module Specjour
|
|
69
70
|
end
|
70
71
|
end
|
71
72
|
|
73
|
+
def resolve(reply)
|
74
|
+
Timeout.timeout(2) do
|
75
|
+
DNSSD.resolve!(reply.name, reply.type, reply.domain, flags=0, reply.interface) do |resolved|
|
76
|
+
log "Bonjour discovered #{resolved.target} #{resolved.text_record.inspect}"
|
77
|
+
if resolved.text_record && resolved.text_record['version'] == Specjour::VERSION
|
78
|
+
if available_for?(resolved.text_record['project_alias'].to_s)
|
79
|
+
resolved_ip = ip_from_hostname(resolved.target)
|
80
|
+
uri = URI::Generic.build :host => resolved_ip, :port => resolved.port
|
81
|
+
add_printer(name: resolved.name, uri: uri, ip: resolved_ip)
|
82
|
+
else
|
83
|
+
$stderr.puts "Found #{resolved.target} but not listening to project alias: #{resolved.text_record['project_alias']}. Skipping..."
|
84
|
+
end
|
85
|
+
else
|
86
|
+
$stderr.puts "Found #{resolved.target} but its version doesn't match v#{Specjour::VERSION}. Skipping..."
|
87
|
+
end
|
88
|
+
break
|
89
|
+
end
|
90
|
+
end
|
91
|
+
rescue TimeoutError
|
92
|
+
end
|
93
|
+
|
72
94
|
def gather
|
73
95
|
@dnssd_service = DNSSD.browse!('_specjour._tcp') do |reply|
|
74
96
|
log ['reply', reply.name, reply.service_name, reply.domain,reply.flags, reply.interface]
|
75
97
|
if reply.flags.add?
|
76
|
-
|
77
|
-
log "Bonjour discovered #{resolved.target} #{resolved.text_record.inspect}"
|
78
|
-
if resolved.text_record && resolved.text_record['version'] == Specjour::VERSION
|
79
|
-
if available_for?(resolved.text_record['project_alias'].to_s)
|
80
|
-
resolved_ip = ip_from_hostname(resolved.target)
|
81
|
-
uri = URI::Generic.build :host => resolved_ip, :port => resolved.port
|
82
|
-
add_printer(name: resolved.name, uri: uri, ip: resolved_ip)
|
83
|
-
else
|
84
|
-
$stderr.puts "Found #{resolved.target} but not listening to project alias: #{resolved.text_record['project_alias']}. Skipping..."
|
85
|
-
end
|
86
|
-
else
|
87
|
-
$stderr.puts "Found #{resolved.target} but its version doesn't match v#{Specjour::VERSION}. Skipping..."
|
88
|
-
end
|
89
|
-
break
|
90
|
-
end
|
98
|
+
resolve(reply)
|
91
99
|
break if printer
|
92
100
|
else
|
93
101
|
log "REMOVING #{reply.name} #{reply}"
|
data/lib/specjour/protocol.rb
CHANGED
data/lib/specjour.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'tmpdir'
|
2
|
-
|
3
1
|
autoload :URI, 'uri'
|
4
2
|
autoload :Forwardable, 'forwardable'
|
5
3
|
autoload :Timeout, 'timeout'
|
@@ -35,7 +33,7 @@ module Specjour
|
|
35
33
|
autoload :Cucumber, 'specjour/cucumber'
|
36
34
|
autoload :RSpec, 'specjour/rspec'
|
37
35
|
|
38
|
-
VERSION ||= "2.0.0.
|
36
|
+
VERSION ||= "2.0.0.rc2"
|
39
37
|
HOOKS_PATH ||= "./.specjour/hooks.rb"
|
40
38
|
PROGRAM_NAME ||= $PROGRAM_NAME # keep a reference of the original program name
|
41
39
|
Time = Time.dup
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: specjour
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sandro Turriate
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dnssd
|
@@ -160,3 +160,4 @@ signing_key:
|
|
160
160
|
specification_version: 4
|
161
161
|
summary: Distribute your spec suite amongst your LAN via Bonjour.
|
162
162
|
test_files: []
|
163
|
+
has_rdoc:
|