turn-again-reporter 0.0.2 → 1.0.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: 33527d89ec72f5cab5ddb42dd34f6c75f64af807
4
- data.tar.gz: f326a8167830748b581b51aabdec1f4a251729b9
3
+ metadata.gz: 968225fdfcb2e87c69f9b310bc938426610398b4
4
+ data.tar.gz: 4ad55c5b840f8ef438439255dc66aec7aea0f872
5
5
  SHA512:
6
- metadata.gz: 93a8d5dbc9c57c102f80c5d37134d423cc9b35408574b73e5ba7db62db84b772ce2045a9e9407325de7a0f9989f0e8fbe220515737cb674c1096d8779a071e58
7
- data.tar.gz: cdadfbb9c3872d81b3381280c9e21b4714ae78011ebcde8de290d44ed41ce768b193a4fbb38e6bda3dc24e857c201511281eead48d66b995482d1f2b627a070a
6
+ metadata.gz: 7d68946da7fe2038a2a4385856fec784cece4e802a3894272fbf101d2011cae7f64dd6f2b290e4aae911d0208d01d2067ffee878ec72e2604d602e49683a89ed
7
+ data.tar.gz: 0cc1564a0aff0f1a55f11af77b0fe7e8d0f9eb75575e2c126598869e29851992454a2c179bb512061840554f0488b49f0fa6d3b63c52a20e58eabfb5ee5bad0e
data/.gitignore CHANGED
@@ -12,3 +12,4 @@
12
12
  *.o
13
13
  *.a
14
14
  mkmf.log
15
+ *.gem
data/README.md CHANGED
@@ -1,31 +1,61 @@
1
- # Turn::Again::Reporter
1
+ # A Turn-like Minitest Reporter (Again)
2
2
 
3
- TODO: Write a gem description
3
+ One of my favorite aspects of the now-abandoned [turn gem](https://github.com/turn-project/turn)'s was how the status banners for each test (i.e. PASS, FAIL, ERROR, SKIP) lined up nicely on the right side, providing a comfy, at-a-glance view.
4
4
 
5
- ## Installation
5
+ These days I'm using the [minitest-reporters](https://github.com/kern/minitest-reporters) gem everywhere, but I've felt a little picky about the SpecReporter's claims to be "Turn-like". Also, placing the status banners on the right side, after each test, has the undesirable effect of limiting the length of my test names.
6
+
7
+ **Q: Do I really need tests with 60-character names?**
8
+ *A: Yes, sometimes. And it's none of your business!*
9
+
10
+ This might be better off included in the minitest-reporters gem itself, but it varies so minimally/cosmetically from its parent that I can't bring myself to bother the wonderful [Alex Kern](https://github.com/kern) about it with a pull request. It's really just an easy way for me to spread this code across all my projects without copy-pasting it. If someone else out there enjoys this formatting, I'm glad to hear it.
6
11
 
7
- Add this line to your application's Gemfile:
12
+ ## Usage and Features (so-called)
13
+
14
+ In your `test_helper.rb` file, or equivalent where you `require 'minitest-reporters'`, just follow it up with:
8
15
 
9
16
  ```ruby
10
- gem 'turn-again-reporter'
17
+ require 'minitest/reporters'
18
+
19
+ Minitest::Reporters.use! Minitest::Reporters::TurnAgainReporter.new
20
+ ```
21
+
22
+ TurnAgainReporter's initializer will pass on all existing Minitest::Reporters::Base keyword argments, such as `color: true` but uses two of its own for some customization:
23
+
24
+ 1. The `indent` keyword can specify the indentation from the left of the console when running. The default is 4 to faithfully mimic turn itself.
25
+ 2. *Unlike turn*, the duration measurements in next to the test status do not include hours, because the vast majority of tests do not require a whole hour for a single test case. However, hours can be re-enabled by passing the `:hours` keyword as `true`.
26
+
27
+ An example of these options:
28
+
29
+ ```ruby
30
+
31
+ Minitest::Reporters.use!(
32
+ Minitest::Reporters::TurnAgainReporter.new(
33
+ color: true, hours: true, indent: 2
34
+ ))
11
35
  ```
12
36
 
13
- And then execute:
37
+ ## Installation
14
38
 
15
- $ bundle
39
+ The usual gem installation applies:
16
40
 
17
- Or install it yourself as:
41
+ ```ruby
42
+ gem install 'turn-again-reporter'
43
+ ```
18
44
 
19
- $ gem install turn-again-reporter
45
+ Or in your Gemfile:
20
46
 
21
- ## Usage
47
+ ```ruby
48
+ gem 'turn-again-reporter'
49
+ ```
22
50
 
23
- TODO: Write usage instructions here
51
+ and run
52
+
53
+ ```bash
54
+ $ bundle install
55
+ ```
24
56
 
25
57
  ## Contributing
26
58
 
27
- 1. Fork it ( https://github.com/[my-github-username]/turn-again-reporter/fork )
28
- 2. Create your feature branch (`git checkout -b my-new-feature`)
29
- 3. Commit your changes (`git commit -am 'Add some feature'`)
30
- 4. Push to the branch (`git push origin my-new-feature`)
31
- 5. Create a new Pull Request
59
+ Fork away, but I can't imaginee there's much to contribute.
60
+
61
+ That said, I would be interested to see how one might test the output of a test library? Play with redirecting STDOUT and write a few test cases for Fixnum or something? I would normally shy away from releasing untested code, but *honestly?!* This gem is just two `sprintf` statements and a re-arrangement of `puts` statements.
data/lib/version.rb CHANGED
@@ -4,7 +4,7 @@ require "minitest/reporters/turn_again_reporter"
4
4
  module Minitest
5
5
  module Reporters
6
6
  class TurnAgainReporter
7
- VERSION = "0.0.2"
7
+ VERSION = "1.0.0"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turn-again-reporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Kwiatkowski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-28 00:00:00.000000000 Z
11
+ date: 2015-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -76,7 +76,6 @@ files:
76
76
  - Rakefile
77
77
  - lib/minitest/reporters/turn_again_reporter.rb
78
78
  - lib/version.rb
79
- - turn-again-reporter-0.0.1.gem
80
79
  - turn-again-reporter.gemspec
81
80
  homepage: https://github.com/swifthand/turn-again-reporter
82
81
  licenses:
Binary file