croaky-rspec 0.1.0 → 0.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96cc773958ccf61a6ec8d239e0bf8b8842cf3e4c4298304984f5ef5a1da42238
4
- data.tar.gz: d53e758996c2e3341e75c1d7d6773e6d074bc8801063081b6d9b1537d81dd197
3
+ metadata.gz: e9b40aca9ee81c3bdec2f4f7e0e6897fff9b5a9fcf3589d086716089d3b67fa8
4
+ data.tar.gz: 6664d2e782b19ced2ab7e7149b6caf0925954eac998f1780ebda7871d7e7b4e6
5
5
  SHA512:
6
- metadata.gz: 7a3f5f511c6cbb5d9ab79c1ffdb1544d8bb9db700d34454b9967ad3baea2b6990c0036da47d3a212fa9186a9608f02b69cb2e0af75e05a468e6ebe243db2ed3a
7
- data.tar.gz: 32c5aaea9381c390cbcd9e60305f250a12fec543d34735bf964e55967c8abce18c4bc4682f390b04bda88cf23b924bb1abd27a4aef80806ca92f2d430d5857ba
6
+ metadata.gz: a4db00879f3bb750293f3b59617470a895e7fa35d630ada1519293f2b10c77736d204380b64d3fb344e20f473ed8ea1723595f4df9dc16bdb317a79980cc8154
7
+ data.tar.gz: 4262baa0d0e0bb1afbdd56fa0a99428f2b9b9470642809ea901abae7bc6141f970177673626a40ea96eb6902d3cd51edd05685ec4590ae4dd899f2592f35aaff
data/Gemfile CHANGED
@@ -8,6 +8,6 @@ gemspec
8
8
  group :test, :development do
9
9
  gem 'rake', '~> 12.0'
10
10
  gem 'rspec', '~> 3.0'
11
- gem 'rubocop'
11
+ gem 'rubocop', '= 0.89.1'
12
12
  gem 'simplecov'
13
13
  end
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- croaky-rspec (0.1.0)
4
+ croaky-rspec (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -55,7 +55,7 @@ DEPENDENCIES
55
55
  croaky-rspec!
56
56
  rake (~> 12.0)
57
57
  rspec (~> 3.0)
58
- rubocop
58
+ rubocop (= 0.89.1)
59
59
  simplecov
60
60
 
61
61
  BUNDLED WITH
data/README.md CHANGED
@@ -1,8 +1,13 @@
1
1
  # Croaky::Rspec
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/croaky/rspec`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ [![Gem Version](https://badge.fury.io/rb/croaky-rspec.svg)](https://badge.fury.io/rb/croaky-rspec)
4
+ [![Build Status](https://travis-ci.org/sayantam/croaky-rspec.svg?branch=master)](https://travis-ci.org/sayantam/croaky-rspec)
4
5
 
5
- TODO: Delete this and the text above, and describe your gem
6
+ RSpec 3.0 formatter that croaks only for failed examples. The formatter captures stdout and stderr during an example
7
+ run, and dumps them for failed examples only. Progress is shown as per progress formatter.
8
+
9
+ It detects a JRuby platform and captures output from Java as well. For example, it will capture console output from a
10
+ logger like ``log4j``, as well as Java IO streams such as ``java.lang.System.out``, and ``java.lang.System.err``.
6
11
 
7
12
  ## Installation
8
13
 
@@ -22,17 +27,27 @@ Or install it yourself as:
22
27
 
23
28
  ## Usage
24
29
 
25
- TODO: Write usage instructions here
30
+ This is meant to be an RSpec >= 3.0 formatter. The fully qualified class name is ``Croaky::RSpec::CroakyFormatter``.
31
+ Use RSpec's ``format`` option to specify this formatter.
32
+
33
+ ```bash
34
+ $ bundle exec rspec -f Croaky::RSpec::CroakyFormatter
35
+ ```
26
36
 
27
37
  ## Development
28
38
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
39
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests.
40
+ You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
41
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
42
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version,
43
+ update the version number in `version.rb`, and then push to origin master. This will trigger a CI flow, that
44
+ will run the specs, and upon success, it will release a new gem to [rubygems.org](https://rubygems.org).
32
45
 
33
46
  ## Contributing
34
47
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/croaky-rspec. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/croaky-rspec/blob/master/CODE_OF_CONDUCT.md).
48
+ Bug reports and pull requests are welcome on GitHub at https://github.com/sayantam/croaky-rspec. This project is
49
+ intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to
50
+ the [code of conduct](https://github.com/[USERNAME]/croaky-rspec/blob/master/CODE_OF_CONDUCT.md).
36
51
 
37
52
 
38
53
  ## License
@@ -41,4 +56,5 @@ The gem is available as open source under the terms of the [MIT License](https:/
41
56
 
42
57
  ## Code of Conduct
43
58
 
44
- Everyone interacting in the Croaky::Rspec project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/croaky-rspec/blob/master/CODE_OF_CONDUCT.md).
59
+ Everyone interacting in the Croaky::Rspec project's codebases, issue trackers, chat rooms and mailing lists is
60
+ expected to follow the [code of conduct](https://github.com/[USERNAME]/croaky-rspec/blob/master/CODE_OF_CONDUCT.md).
@@ -12,8 +12,8 @@ Gem::Specification.new do |spec|
12
12
 
13
13
  spec.summary = 'RSpec formatter that croaks only for failed examples.'
14
14
  spec.description = <<-DESC
15
- Captures stdout and stderr during an example run, and dumps them for failed examples only.
16
- Progress is shown as per progress formatter
15
+ RSpec formatter that captures stdout and stderr during an example run, and dumps them for failed examples only.
16
+ Progress is shown as per progress formatter.
17
17
  DESC
18
18
  spec.homepage = 'https://github.com/sayantam/croaky-rspec'
19
19
  spec.license = 'MIT'
@@ -23,6 +23,12 @@ module Croaky
23
23
  @io_stream = io_stream
24
24
  end
25
25
 
26
+ def start(notification)
27
+ super(notification)
28
+
29
+ io_stream.capture_io
30
+ end
31
+
26
32
  def example_started(_notification)
27
33
  io_stream.capture_io
28
34
  end
@@ -3,5 +3,5 @@
3
3
  require 'croaky'
4
4
 
5
5
  module Croaky
6
- VERSION = '0.1.0'
6
+ VERSION = '0.2.0'
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: croaky-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
  - Sayantam Dey
@@ -11,8 +11,8 @@ cert_chain: []
11
11
  date: 2020-08-28 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
- Captures stdout and stderr during an example run, and dumps them for failed examples only.
15
- Progress is shown as per progress formatter
14
+ RSpec formatter that captures stdout and stderr during an example run, and dumps them for failed examples only.
15
+ Progress is shown as per progress formatter.
16
16
  email:
17
17
  - sayantam@gmail.com
18
18
  executables: []