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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 99f8061be2d4748bb726f5c3d82fc5227a1114b1
4
- data.tar.gz: a11ae46c7e7e1b06261860a8a6bbc4da51cd4856
3
+ metadata.gz: f27f2b44c67c675e1c63e0e629123214504c709f
4
+ data.tar.gz: '0494a00db5b0cf6a21a4e8dbdcec315c7d80c566'
5
5
  SHA512:
6
- metadata.gz: 6493ed54f04c27eddfb9e45dc73142f6113dff8562c5f18b63f3e4631b08a92caae280ed8326cf2f648cf40edd806c677968b03ba64e135cde7e0b71688417e3
7
- data.tar.gz: afad6732a00c255d919c7c60611d32b790eff327922cd1b510a8487d07a8d13d66b512cc8652fed581cfca396f914f90f9230245a0453d0804da29bd21d80fd6
6
+ metadata.gz: 663392713af137dddba93c8ceacf4fbc2b98e8aff88552f3d8b5d8303e799bfcd402c85c973e84f111799246896e53b0e5bb10a46d6c69daa2dc67803f36d62d
7
+ data.tar.gz: 5a448e8b1b6970e0ac76351564c9b7194f35df18d61ee29d3209c49dc368be396edfeb69be93d72f993d9ac64087688c20ff66abbaa9671e043aba313dbaf913
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- report_factory-rspec (0.1.0)
4
+ report_factory-rspec (0.2.0)
5
5
  rspec (~> 3.5)
6
6
 
7
7
  GEM
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 application which gives you an easy way to configure your test projects and reports (Currently in development);
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: report_hash
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'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ReportFactory
4
4
  module Rspec
5
- VERSION = '0.1.0'
5
+ VERSION = '0.2.0'
6
6
  end
7
7
  end
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.1.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: 2017-11-19 00:00:00.000000000 Z
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.1.0
105
+ summary: report_factory-rspec_0.2.0
106
106
  test_files: []