stream-ci-ruby-rspec 0.6.0 → 0.7.0

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
  SHA256:
3
- metadata.gz: d15228efc19c4edd519a4799a714a6a6990793e8dded2d93597559f5e901560f
4
- data.tar.gz: cdce01dd32532436a0544aff0e7797d32739c4c485d198652a6716852cfcb9b1
3
+ metadata.gz: 566e8d7c43b14120ca2d778786ae71522db9a42f21ac08afb63a1a2571555236
4
+ data.tar.gz: 9c633db71689e6e21c0ba939694b6633db95d8a5ec307e6feee2c50f256d2200
5
5
  SHA512:
6
- metadata.gz: 066071e1cba917b5a450819e1b920808cb7d52f6c04f21bda9b69b3a7b01e5e3f416114729b68d14a2100b3d68e83a7ba955be2e4871cf78b4330ba3d060e1f3
7
- data.tar.gz: 7a482b31166299769c07cb99ebc3e1a0c4fad16bb6cd13c4aa0406a17251e0c226f5159ce0fed8b00e605b7d2b19bff88b65967beb1b41113e9f23b885b269c4
6
+ metadata.gz: 1d9569bdeb1e2d4bb7b7f5bd9a88aca535af4d05eb44a30c63247265e18f14c7e2c3c6718ad744ae2104fc53fafb0b072bb8f5ef0bb856ccba766e515423c9b3
7
+ data.tar.gz: 47064202f7e818e7640ae5a31c6b099b872cb5bc70626a4716934143b0e8fb17ae3ba415b96e81f3103f97ad7793854da964833ed7018d4bd29843808c5c02d6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- stream-ci-ruby-rspec (0.4.0)
4
+ stream-ci-ruby-rspec (0.6.0)
5
5
  httparty (~> 0.16.2)
6
6
  rake (~> 12.3, >= 12.3.1)
7
7
  rspec (~> 3.7)
@@ -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
- # until the return status code is 204, keep pulling data
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
- opts = { query: { api_key: '12345' } } # need to include other params as well
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
- load response.body
44
- unless @world.example_groups.last.run(reporter)
45
- @no_failures = false
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
@@ -1,7 +1,7 @@
1
1
  module StreamCi
2
2
  module Ruby
3
3
  module Rspec
4
- VERSION = '0.6.0'
4
+ VERSION = '0.7.0'
5
5
  end
6
6
  end
7
7
  end
@@ -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
- puts "Ran with: #{args[:rspec_args]}"
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stream-ci-ruby-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Conant