rspec_table_formatter 0.1.13 → 0.1.15

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
  SHA256:
3
- metadata.gz: 4f39e2b40a66011610fadf9d63c87bbff51d661a50e43a8ffc8b3570edb9b499
4
- data.tar.gz: 6df8b9788937c4038d304846f4d0df4a9dabe3b09d9daca892650fcb1cc8f261
3
+ metadata.gz: 5c9f9ae1a9b8a9b7e421c6defd38982205358510ca53dac34dc06e53e59e2fb2
4
+ data.tar.gz: 5f143e17c620b098556bb8836f1d5e1e8aa4388101d29078168d5bb079f15907
5
5
  SHA512:
6
- metadata.gz: 3e38a74845c5f7a08ba9aa23fe13e7fd1fc1df0aa2ac72dafc6bd9eab4cb2c7eeb586b005a61489f0b6106a114ab5a69764a8aec123733241748085dc936a28b
7
- data.tar.gz: be4ebd1ad4aa7915a3c27ebb0464c5b96857ec30e2a0f8451bf2859fc73446c54d03ef5d427de3e92f7ca2f028294172d734a7d5dc0fbd084a194f297734700e
6
+ metadata.gz: 168460fadd24dff23eb02e25af1f3a8135fac8bb1044770a75e9fd1ba921aef09c82cc808048c98174b299c777d91ced3d595abed2cfa04e8e64c3e74f6f6697
7
+ data.tar.gz: c4d078cac4e151f0944b1ec9fe6e289615d03b38e24ec26d73dd3d506fc8f2d284813f5f34147e2040ce3afce16f124437f1cacf634e30b1b246d1f415705efc
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rspec_table_formatter (0.1.13)
4
+ rspec_table_formatter (0.1.15)
5
5
  terminal-table (~> 3.0.2)
6
6
 
7
7
  GEM
@@ -1,5 +1,8 @@
1
- module RspecTableFormatter
1
+ require 'singleton'
2
+
3
+ class RspecTableFormatter
2
4
  class Configurations
5
+ include Singleton
3
6
 
4
7
  attr_accessor :passed_message, :failed_message, :pending_message,
5
8
  :test_case_header, :expected_result_header, :status_header,
@@ -21,7 +24,7 @@ module RspecTableFormatter
21
24
  end
22
25
 
23
26
  def headers
24
- [@test_case_header, @expected_result_header, @status_header]
27
+ [ test_case_header, expected_result_header, status_header]
25
28
  end
26
29
  end
27
30
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  class RspecTableFormatter
4
4
  module Version
5
- VERSION = '0.1.13'
5
+ VERSION = '0.1.15'
6
6
  end
7
7
  end
@@ -1,14 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'rspec_table_formatter/version'
4
+
4
5
  require_relative './table_builder'
6
+ require_relative './rspec_table_formatter/configurations'
5
7
 
6
8
  # main class for formatter
7
9
  class RspecTableFormatter
8
10
  class Error < StandardError; end
9
-
10
- @configs = Configurations.new
11
-
12
11
  RSpec::Core::Formatters.register self, :dump_summary
13
12
 
14
13
  def initialize(output)
@@ -17,12 +16,12 @@ class RspecTableFormatter
17
16
 
18
17
  def dump_summary(notification)
19
18
  examples = notification.examples
20
- @output << TableBuilder.new(examples, @configs).generate_table.to_s + "\n"
19
+ @output << TableBuilder.new(examples, Configurations.instance).generate_table.to_s + "\n"
21
20
  end
22
21
 
23
22
  class << self
24
23
  def configure
25
- yield @configs if block_given?
24
+ yield Configurations.instance if block_given?
26
25
  end
27
26
  end
28
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec_table_formatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nijeesh
@@ -50,7 +50,7 @@ files:
50
50
  - bin/console
51
51
  - bin/setup
52
52
  - lib/rspec_table_formatter.rb
53
- - lib/rspec_table_formatter/configuration.rb
53
+ - lib/rspec_table_formatter/configurations.rb
54
54
  - lib/rspec_table_formatter/version.rb
55
55
  - lib/table_builder.rb
56
56
  - rspec_table_formatter.gemspec