stream-ci-ruby-rspec 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/stream_ci/ruby/rspec/runner.rb +16 -17
- data/lib/stream_ci/ruby/rspec/version.rb +1 -1
- data/lib/tasks/stream_ci.rake +1 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 566e8d7c43b14120ca2d778786ae71522db9a42f21ac08afb63a1a2571555236
|
4
|
+
data.tar.gz: 9c633db71689e6e21c0ba939694b6633db95d8a5ec307e6feee2c50f256d2200
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d9569bdeb1e2d4bb7b7f5bd9a88aca535af4d05eb44a30c63247265e18f14c7e2c3c6718ad744ae2104fc53fafb0b072bb8f5ef0bb856ccba766e515423c9b3
|
7
|
+
data.tar.gz: 47064202f7e818e7640ae5a31c6b099b872cb5bc70626a4716934143b0e8fb17ae3ba415b96e81f3103f97ad7793854da964833ed7018d4bd29843808c5c02d6
|
data/Gemfile.lock
CHANGED
@@ -10,6 +10,14 @@ module StreamCi
|
|
10
10
|
@configuration.output_stream = out if @configuration.output_stream == $stdout
|
11
11
|
@options.configure(@configuration)
|
12
12
|
|
13
|
+
root_path = StreamCi::Ruby::Rspec.root
|
14
|
+
test_manifest = Dir["#{root_path}/**/*_spec.rb"].map do |fp|
|
15
|
+
fp.gsub("#{root_path}/", '')
|
16
|
+
end
|
17
|
+
|
18
|
+
opts = { query: { api_key: '12345', branch: 'test', build: '1', test_manifest: test_manifest } }
|
19
|
+
HTTParty.post('https://api.streamci.com/v1/tests/next', opts)
|
20
|
+
|
13
21
|
# TODO
|
14
22
|
# * What do these commands do / mean?
|
15
23
|
#
|
@@ -27,22 +35,19 @@ module StreamCi
|
|
27
35
|
|
28
36
|
@no_failures = true
|
29
37
|
|
30
|
-
|
31
|
-
|
32
|
-
#
|
38
|
+
opts = { query: { api_key: '12345', branch: 'test', build: '1' } }
|
39
|
+
response = HTTParty.get('https://api.streamci.com/v1/tests/next', opts)
|
33
40
|
|
34
|
-
|
35
|
-
response = HTTParty.get('https://api.streamci.com/v1/results', opts)
|
36
|
-
|
37
|
-
# until (file_path = open(stream_ci_url).read) == '>>done<<' do
|
38
|
-
until response.code == 204 do
|
41
|
+
until response.code == 204 || response.code >= 300 do
|
39
42
|
# should we clear the world / example groups before each one?
|
40
43
|
# will that mess up reporting?
|
41
44
|
#
|
42
45
|
# does this need to be the full path or just spec/some/spec/path ?
|
43
|
-
|
44
|
-
|
45
|
-
@
|
46
|
+
if response.code == 200
|
47
|
+
load response.body
|
48
|
+
unless @world.example_groups.last.run(reporter)
|
49
|
+
@no_failures = false
|
50
|
+
end
|
46
51
|
end
|
47
52
|
end
|
48
53
|
|
@@ -52,12 +57,6 @@ module StreamCi
|
|
52
57
|
|
53
58
|
success ? 0 : @configuration.failure_exit_code
|
54
59
|
end
|
55
|
-
|
56
|
-
private
|
57
|
-
|
58
|
-
def stream_ci_url
|
59
|
-
|
60
|
-
end
|
61
60
|
end
|
62
61
|
end
|
63
62
|
end
|
data/lib/tasks/stream_ci.rake
CHANGED
@@ -5,8 +5,7 @@ namespace :stream_ci do
|
|
5
5
|
namespace :rspec do
|
6
6
|
desc 'Run and report on RSpec specs via StreamCI'
|
7
7
|
task :run, [:rspec_args] do |_, args|
|
8
|
-
|
9
|
-
# StreamCi::Ruby::Rspec::Runner.run(args[:rspec_args])
|
8
|
+
StreamCi::Ruby::Rspec::Runner.run(args[:rspec_args])
|
10
9
|
end
|
11
10
|
end
|
12
11
|
end
|