report_factory-rspec 0.1.0 → 0.2.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/README.md +6 -1
- data/lib/report_factory/rspec/api.rb +6 -1
- data/lib/report_factory/rspec/configuration.rb +3 -1
- data/lib/report_factory/rspec/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f27f2b44c67c675e1c63e0e629123214504c709f
|
4
|
+
data.tar.gz: '0494a00db5b0cf6a21a4e8dbdcec315c7d80c566'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 663392713af137dddba93c8ceacf4fbc2b98e8aff88552f3d8b5d8303e799bfcd402c85c973e84f111799246896e53b0e5bb10a46d6c69daa2dc67803f36d62d
|
7
|
+
data.tar.gz: 5a448e8b1b6970e0ac76351564c9b7194f35df18d61ee29d3209c49dc368be396edfeb69be93d72f993d9ac64087688c20ff66abbaa9671e043aba313dbaf913
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -3,9 +3,13 @@
|
|
3
3
|
*ReportFactory* helps you save each of your test runs so that they are always available for reports and analytics.
|
4
4
|
It consists of three parts:
|
5
5
|
1. A [rails server](https://github.com/igor-starostenko/report_factory) that provides an interface via JSON API and saves your test runs in a DB;
|
6
|
-
2. A web
|
6
|
+
2. A [web dashboard](https://github.com/igor-starostenko/report_factory-web) which gives you an easy way to configure your test projects and reports;
|
7
7
|
3. And a test formatter that automatically sends reports to the server after each test run. This repo is the formatter for RSpec.
|
8
8
|
|
9
|
+
## Getting Started
|
10
|
+
|
11
|
+
Follow these [instructions](https://github.com/igor-starostenko/report_factory/blob/master/setup/INSTRUCTIONS.md) to get *Report Factory* running with *Docker*. The configuration is ready for production.
|
12
|
+
|
9
13
|
## Installation
|
10
14
|
|
11
15
|
Add this line to your application's Gemfile:
|
@@ -38,6 +42,7 @@ and configure:
|
|
38
42
|
ReportFactory::RSpec.configure do |config|
|
39
43
|
config.url = "The url of the ReportFactory server. It's 'http://0.0.0.0:3000' if you're running locally"
|
40
44
|
config.project_name = "The name of the project that you are testing. Needs to be previously created in ReportFactory"
|
45
|
+
config.tags = ['Tags', 'to', 'help', 'you', 'group', 'your', 'reports']
|
41
46
|
config.auth_token = "Your user X_API_KEY. Can be found in ReportFactory in your user information"
|
42
47
|
end
|
43
48
|
```
|
@@ -25,10 +25,11 @@ module ReportFactory
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def self.format_payload(report_hash)
|
28
|
+
attributes = { tags: tags }.merge(report_hash)
|
28
29
|
{
|
29
30
|
data: {
|
30
31
|
type: 'rspec_report',
|
31
|
-
attributes:
|
32
|
+
attributes: attributes
|
32
33
|
}
|
33
34
|
}
|
34
35
|
end
|
@@ -45,6 +46,10 @@ module ReportFactory
|
|
45
46
|
ReportFactory::Rspec.project_name
|
46
47
|
end
|
47
48
|
|
49
|
+
def self.tags
|
50
|
+
ReportFactory::Rspec.tags
|
51
|
+
end
|
52
|
+
|
48
53
|
def self.create_report_url
|
49
54
|
URI.parse("#{base_url}/api/v1/projects/#{project_name}/reports/rspec")
|
50
55
|
end
|
@@ -4,7 +4,7 @@ module ReportFactory
|
|
4
4
|
module Rspec
|
5
5
|
# Defines all configurable attributes of ReportFactory::RSpec
|
6
6
|
module Configuration
|
7
|
-
VALID_CONFIG_KEYS = %i[url project_name auth_token].freeze
|
7
|
+
VALID_CONFIG_KEYS = %i[url project_name tags auth_token].freeze
|
8
8
|
|
9
9
|
DEFAULT_URL = 'http://0.0.0.0:3000'
|
10
10
|
|
@@ -12,6 +12,8 @@ module ReportFactory
|
|
12
12
|
|
13
13
|
DEFAULT_AUTH_TOKEN = nil
|
14
14
|
|
15
|
+
DEFAULT_TAGS = [].freeze
|
16
|
+
|
15
17
|
VALID_CONFIG_KEYS.each { |key| attr_accessor key }
|
16
18
|
|
17
19
|
# Make sure the default values are set when the module is 'extended'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: report_factory-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Starostenko
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -102,5 +102,5 @@ rubyforge_project:
|
|
102
102
|
rubygems_version: 2.6.12
|
103
103
|
signing_key:
|
104
104
|
specification_version: 4
|
105
|
-
summary: report_factory-rspec_0.
|
105
|
+
summary: report_factory-rspec_0.2.0
|
106
106
|
test_files: []
|