test_dots 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 +4 -4
- data/README.md +13 -1
- data/lib/test_dots.rb +4 -0
- data/lib/test_dots/api.rb +1 -1
- data/lib/test_dots/configuration.rb +2 -2
- data/lib/test_dots/version.rb +1 -1
- data/test_dots.gemspec +1 -1
- metadata +2 -22
- data/examples/minitest/Gemfile +0 -6
- data/examples/minitest/Gemfile.lock +0 -21
- data/examples/minitest/Rakefile +0 -6
- data/examples/minitest/test/features/feature_example_test.rb +0 -11
- data/examples/minitest/test/test_helper.rb +0 -8
- data/examples/minitest/test/units/unit_example_test.rb +0 -11
- data/examples/minitest_specs/Gemfile +0 -5
- data/examples/minitest_specs/Gemfile.lock +0 -19
- data/examples/minitest_specs/example_test.rb +0 -20
- data/examples/rspec/Gemfile +0 -5
- data/examples/rspec/Gemfile.lock +0 -32
- data/examples/rspec/spec/features/feature_example_spec.rb +0 -11
- data/examples/rspec/spec/spec_helper.rb +0 -10
- data/examples/rspec/spec/units/unit_example_spec.rb +0 -11
- data/examples/rspec_custom_adapter/Gemfile +0 -5
- data/examples/rspec_custom_adapter/Gemfile.lock +0 -32
- data/examples/rspec_custom_adapter/example_spec.rb +0 -37
- data/examples/rspec_full/Gemfile +0 -5
- data/examples/rspec_full/Gemfile.lock +0 -32
- data/examples/rspec_full/example_spec.rb +0 -57
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 22613a9374a0a00f97336369feae7b72b9da50d7
|
|
4
|
+
data.tar.gz: f4a685de0a7edfb82dbf17fe086f24e6959f1bfc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c1349306f73b1c2f8be9ff07f105825b990ee5680418ab94230955c833ffe34d11c2d563ffe0e9e0c608db31abb438b11773b93fcd1425d60188ade34214335e
|
|
7
|
+
data.tar.gz: e14f1eba3829fdd302d850d13b52bec8ad8f0af27ece1d5eff4a276de2fb44e214204a6560c16a487bbe15dfe1f2602599b151593da60e8f4c61ebac4407ef2e
|
data/README.md
CHANGED
|
@@ -18,7 +18,19 @@ end
|
|
|
18
18
|
TestDots.register_rspec_listener
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
**3.**
|
|
21
|
+
**3.** If you are using a tool such as `WebMock` or `VCR` to prevent connections to the internet in your test environment add an exception for Test Dots.
|
|
22
|
+
|
|
23
|
+
```ruby
|
|
24
|
+
VCR.config do |c|
|
|
25
|
+
c.ignore_hosts TestDots.host
|
|
26
|
+
end
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
```ruby
|
|
30
|
+
WebMock.disable_net_connect!(allow: TestDots.host)
|
|
31
|
+
```
|
|
32
|
+
**4.** Configure your API key by setting the `TEST_DOTS_KEY` environment variable in your continuous integration tool.
|
|
33
|
+
|
|
22
34
|
|
|
23
35
|
## Integrating with Test Frameworks
|
|
24
36
|
|
data/lib/test_dots.rb
CHANGED
data/lib/test_dots/api.rb
CHANGED
|
@@ -3,7 +3,7 @@ require 'openssl'
|
|
|
3
3
|
module TestDots
|
|
4
4
|
class Api
|
|
5
5
|
def post(payload)
|
|
6
|
-
http = Net::HTTP.new(TestDots.configuration.
|
|
6
|
+
http = Net::HTTP.new(TestDots.configuration.host, TestDots.configuration.port)
|
|
7
7
|
if TestDots.configuration.use_ssl
|
|
8
8
|
http.use_ssl = true
|
|
9
9
|
http.ca_file = TestDots.configuration.cacert_path
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
module TestDots
|
|
2
2
|
class Configuration
|
|
3
|
-
attr_accessor :enabled, :
|
|
3
|
+
attr_accessor :enabled, :host, :port, :api_key, :endpoint, :use_ssl, :cacert_path, :ci_adapter
|
|
4
4
|
|
|
5
5
|
def initialize
|
|
6
6
|
@enabled = true
|
|
7
|
-
@
|
|
7
|
+
@host = ENV.fetch('TEST_DOTS_HOST', 'testdots.com')
|
|
8
8
|
@port = port = ENV.fetch('TEST_DOTS_PORT', '443')
|
|
9
9
|
@api_key = ENV.fetch('TEST_DOTS_KEY', nil)
|
|
10
10
|
@endpoint = ENV.fetch('TEST_DOTS_ENDPOINT', '/api/v1/builds')
|
data/lib/test_dots/version.rb
CHANGED
data/test_dots.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: test_dots
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Zetter
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-02-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -93,26 +93,6 @@ files:
|
|
|
93
93
|
- Rakefile
|
|
94
94
|
- bin/console
|
|
95
95
|
- bin/setup
|
|
96
|
-
- examples/minitest/Gemfile
|
|
97
|
-
- examples/minitest/Gemfile.lock
|
|
98
|
-
- examples/minitest/Rakefile
|
|
99
|
-
- examples/minitest/test/features/feature_example_test.rb
|
|
100
|
-
- examples/minitest/test/test_helper.rb
|
|
101
|
-
- examples/minitest/test/units/unit_example_test.rb
|
|
102
|
-
- examples/minitest_specs/Gemfile
|
|
103
|
-
- examples/minitest_specs/Gemfile.lock
|
|
104
|
-
- examples/minitest_specs/example_test.rb
|
|
105
|
-
- examples/rspec/Gemfile
|
|
106
|
-
- examples/rspec/Gemfile.lock
|
|
107
|
-
- examples/rspec/spec/features/feature_example_spec.rb
|
|
108
|
-
- examples/rspec/spec/spec_helper.rb
|
|
109
|
-
- examples/rspec/spec/units/unit_example_spec.rb
|
|
110
|
-
- examples/rspec_custom_adapter/Gemfile
|
|
111
|
-
- examples/rspec_custom_adapter/Gemfile.lock
|
|
112
|
-
- examples/rspec_custom_adapter/example_spec.rb
|
|
113
|
-
- examples/rspec_full/Gemfile
|
|
114
|
-
- examples/rspec_full/Gemfile.lock
|
|
115
|
-
- examples/rspec_full/example_spec.rb
|
|
116
96
|
- lib/minitest/test_dots_plugin.rb
|
|
117
97
|
- lib/test_dots.rb
|
|
118
98
|
- lib/test_dots/api.rb
|
data/examples/minitest/Gemfile
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: ../..
|
|
3
|
-
specs:
|
|
4
|
-
test_dots (0.1.0)
|
|
5
|
-
|
|
6
|
-
GEM
|
|
7
|
-
remote: https://rubygems.org/
|
|
8
|
-
specs:
|
|
9
|
-
minitest (5.10.3)
|
|
10
|
-
rake (12.1.0)
|
|
11
|
-
|
|
12
|
-
PLATFORMS
|
|
13
|
-
ruby
|
|
14
|
-
|
|
15
|
-
DEPENDENCIES
|
|
16
|
-
minitest
|
|
17
|
-
rake
|
|
18
|
-
test_dots!
|
|
19
|
-
|
|
20
|
-
BUNDLED WITH
|
|
21
|
-
1.15.4
|
data/examples/minitest/Rakefile
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
require 'rubygems'
|
|
2
|
-
require 'bundler/setup'
|
|
3
|
-
require "minitest/autorun"
|
|
4
|
-
require 'test_dots'
|
|
5
|
-
|
|
6
|
-
TestDots.configure do |config|
|
|
7
|
-
config.use_ssl = false
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
describe 'TestExample' do
|
|
11
|
-
describe "passing" do
|
|
12
|
-
it 'passes' do
|
|
13
|
-
assert_equal true, true
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
it 'fails' do
|
|
18
|
-
assert_equal true, false
|
|
19
|
-
end
|
|
20
|
-
end
|
data/examples/rspec/Gemfile
DELETED
data/examples/rspec/Gemfile.lock
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: ../..
|
|
3
|
-
specs:
|
|
4
|
-
test_dots (0.1.0)
|
|
5
|
-
|
|
6
|
-
GEM
|
|
7
|
-
remote: https://rubygems.org/
|
|
8
|
-
specs:
|
|
9
|
-
diff-lcs (1.3)
|
|
10
|
-
rspec (3.6.0)
|
|
11
|
-
rspec-core (~> 3.6.0)
|
|
12
|
-
rspec-expectations (~> 3.6.0)
|
|
13
|
-
rspec-mocks (~> 3.6.0)
|
|
14
|
-
rspec-core (3.6.0)
|
|
15
|
-
rspec-support (~> 3.6.0)
|
|
16
|
-
rspec-expectations (3.6.0)
|
|
17
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
18
|
-
rspec-support (~> 3.6.0)
|
|
19
|
-
rspec-mocks (3.6.0)
|
|
20
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
21
|
-
rspec-support (~> 3.6.0)
|
|
22
|
-
rspec-support (3.6.0)
|
|
23
|
-
|
|
24
|
-
PLATFORMS
|
|
25
|
-
ruby
|
|
26
|
-
|
|
27
|
-
DEPENDENCIES
|
|
28
|
-
rspec
|
|
29
|
-
test_dots!
|
|
30
|
-
|
|
31
|
-
BUNDLED WITH
|
|
32
|
-
1.15.1
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: ../..
|
|
3
|
-
specs:
|
|
4
|
-
test_dots (0.1.0)
|
|
5
|
-
|
|
6
|
-
GEM
|
|
7
|
-
remote: https://rubygems.org/
|
|
8
|
-
specs:
|
|
9
|
-
diff-lcs (1.3)
|
|
10
|
-
rspec (3.6.0)
|
|
11
|
-
rspec-core (~> 3.6.0)
|
|
12
|
-
rspec-expectations (~> 3.6.0)
|
|
13
|
-
rspec-mocks (~> 3.6.0)
|
|
14
|
-
rspec-core (3.6.0)
|
|
15
|
-
rspec-support (~> 3.6.0)
|
|
16
|
-
rspec-expectations (3.6.0)
|
|
17
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
18
|
-
rspec-support (~> 3.6.0)
|
|
19
|
-
rspec-mocks (3.6.0)
|
|
20
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
21
|
-
rspec-support (~> 3.6.0)
|
|
22
|
-
rspec-support (3.6.0)
|
|
23
|
-
|
|
24
|
-
PLATFORMS
|
|
25
|
-
ruby
|
|
26
|
-
|
|
27
|
-
DEPENDENCIES
|
|
28
|
-
rspec
|
|
29
|
-
test_dots!
|
|
30
|
-
|
|
31
|
-
BUNDLED WITH
|
|
32
|
-
1.16.0
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
require 'rubygems'
|
|
2
|
-
require 'bundler/setup'
|
|
3
|
-
require 'rspec'
|
|
4
|
-
require 'test_dots'
|
|
5
|
-
|
|
6
|
-
class MyAdapter < TestDots::CIAdapters::Base
|
|
7
|
-
def build
|
|
8
|
-
'a-build'
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def branch
|
|
12
|
-
'a-branch'
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def url
|
|
16
|
-
'http://example.com/a-url'
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
TestDots.configure do |config|
|
|
21
|
-
config.use_ssl = false
|
|
22
|
-
config.ci_adapter = MyAdapter.new
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
TestDots.register_rspec_listener
|
|
26
|
-
|
|
27
|
-
RSpec.describe "example" do
|
|
28
|
-
describe 'odd and even' do
|
|
29
|
-
it 'returns true' do
|
|
30
|
-
expect(2.even?).to be(true)
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
it 'returns false' do
|
|
34
|
-
expect(5.even?).to be(false)
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
end
|
data/examples/rspec_full/Gemfile
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: ../..
|
|
3
|
-
specs:
|
|
4
|
-
test_dots (0.1.0)
|
|
5
|
-
|
|
6
|
-
GEM
|
|
7
|
-
remote: https://rubygems.org/
|
|
8
|
-
specs:
|
|
9
|
-
diff-lcs (1.3)
|
|
10
|
-
rspec (3.6.0)
|
|
11
|
-
rspec-core (~> 3.6.0)
|
|
12
|
-
rspec-expectations (~> 3.6.0)
|
|
13
|
-
rspec-mocks (~> 3.6.0)
|
|
14
|
-
rspec-core (3.6.0)
|
|
15
|
-
rspec-support (~> 3.6.0)
|
|
16
|
-
rspec-expectations (3.6.0)
|
|
17
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
18
|
-
rspec-support (~> 3.6.0)
|
|
19
|
-
rspec-mocks (3.6.0)
|
|
20
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
21
|
-
rspec-support (~> 3.6.0)
|
|
22
|
-
rspec-support (3.6.0)
|
|
23
|
-
|
|
24
|
-
PLATFORMS
|
|
25
|
-
ruby
|
|
26
|
-
|
|
27
|
-
DEPENDENCIES
|
|
28
|
-
rspec
|
|
29
|
-
test_dots!
|
|
30
|
-
|
|
31
|
-
BUNDLED WITH
|
|
32
|
-
1.16.0
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
require 'rubygems'
|
|
2
|
-
require 'bundler/setup'
|
|
3
|
-
require 'rspec'
|
|
4
|
-
require 'test_dots'
|
|
5
|
-
|
|
6
|
-
TestDots.configure do |config|
|
|
7
|
-
config.use_ssl = false
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
TestDots.register_rspec_listener
|
|
11
|
-
|
|
12
|
-
RSpec.describe "example" do
|
|
13
|
-
describe 'odd and even' do
|
|
14
|
-
context 'a group of tests' do
|
|
15
|
-
it 'returns true' do
|
|
16
|
-
expect(2.even?).to be(true)
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
it 'returns false' do
|
|
20
|
-
expect(5.even?).to be(false)
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
context 'a different' do
|
|
25
|
-
it 'returns true' do
|
|
26
|
-
expect(3.odd?).to be(true)
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
it 'returns false' do
|
|
30
|
-
expect(6.odd?).to be(false)
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
it 'is failing' do
|
|
36
|
-
expect(true).to be(false)
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
it 'errors' do
|
|
40
|
-
raise 'hi'
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
it 'is intermittent' do
|
|
44
|
-
random = rand
|
|
45
|
-
expect(random).to be > 0.5
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
it 'it is variably slow' do
|
|
49
|
-
sleep(rand * 2)
|
|
50
|
-
expect(true).to be(true)
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
it 'is slow' do
|
|
54
|
-
sleep(1.5)
|
|
55
|
-
expect(true).to be(true)
|
|
56
|
-
end
|
|
57
|
-
end
|