semaphore_test_boosters 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/rspec_booster +5 -1
- data/lib/test_boosters/insights_uploader.rb +21 -0
- data/lib/test_boosters/rspec_booster.rb +2 -0
- data/lib/test_boosters/version.rb +1 -1
- data/lib/test_boosters.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ecef37c40d654424df9f099343e0c2533049369d
|
4
|
+
data.tar.gz: bb39ced89d7afdc98ba669a645ea34f16a2bbbff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d86ed628bbbbf169b9cde1918084d56a94ec670c58c5f95f97b966127b278dd02360b486d9213692c50d1c5fe82653367fd025614a2436c061fc37866f6886f
|
7
|
+
data.tar.gz: 8d29a0e68562a94dabda9b1c93c30e6c1f845a297a2611dcf14fad85b6f4b00305299d947088c8cb3d5b02793466a1736780e1c4c23a95e0ebcc64a99d80c601
|
data/exe/rspec_booster
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require
|
3
|
+
require 'test_boosters'
|
4
4
|
|
5
5
|
cli_options = Semaphore::parse
|
6
6
|
thread_index = cli_options[:index] - 1
|
7
7
|
rspec_booster = Semaphore::RspecBooster.new(thread_index)
|
8
8
|
exit_status = rspec_booster.run
|
9
|
+
|
10
|
+
report_path = rspec_booster.report_path
|
11
|
+
Semaphore::InsightsUploader.new.upload("rspec", report_path)
|
12
|
+
|
9
13
|
exit(exit_status)
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Semaphore
|
2
|
+
module_function
|
3
|
+
|
4
|
+
class InsightsUploader
|
5
|
+
def initialize
|
6
|
+
@project_hash_id = ENV["SEMAPHORE_PROJECT_UUID"]
|
7
|
+
@build_hash_id = ENV["SEMAPHORE_EXECUTABLE_UUID"]
|
8
|
+
@job_hash_id = ENV["SEMAPHORE_JOB_UUID"]
|
9
|
+
end
|
10
|
+
|
11
|
+
def upload(booster_type, file)
|
12
|
+
url = "https://insights-receiver.semaphoreci.com/job_reports" +
|
13
|
+
"?job_hash_id=#{@job_hash_id}" +
|
14
|
+
"&build_hash_id=#{@build_hash_id}" +
|
15
|
+
"&project_hash_id=#{@project_hash_id}"
|
16
|
+
cmd = "http POST '#{url}' #{booster_type}:=@#{file}"
|
17
|
+
|
18
|
+
Semaphore.execute(cmd)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -7,6 +7,8 @@ module Semaphore
|
|
7
7
|
require "test_boosters/leftover_files"
|
8
8
|
|
9
9
|
class RspecBooster
|
10
|
+
attr_reader :report_path
|
11
|
+
|
10
12
|
def initialize(thread_index)
|
11
13
|
@thread_index = thread_index
|
12
14
|
@rspec_split_configuration_path = ENV["RSPEC_SPLIT_CONFIGURATION_PATH"] || "#{ENV["HOME"]}/rspec_split_configuration.json"
|
data/lib/test_boosters.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: semaphore_test_boosters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MAINTAINER Rendered Text
|
@@ -105,6 +105,7 @@ files:
|
|
105
105
|
- lib/test_boosters/cucumber_booster.rb
|
106
106
|
- lib/test_boosters/display_files.rb
|
107
107
|
- lib/test_boosters/executor.rb
|
108
|
+
- lib/test_boosters/insights_uploader.rb
|
108
109
|
- lib/test_boosters/leftover_files.rb
|
109
110
|
- lib/test_boosters/logger.rb
|
110
111
|
- lib/test_boosters/rspec_booster.rb
|