minitest-glitch 1.0.0 → 1.0.1

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: 884a8d42c2fb28ab9cf0060a6a50dffe99309776
4
- data.tar.gz: 4c46e6890d2375c928cc9c5d4db91071bcf36dd8
3
+ metadata.gz: f72f06eb70957c870c5723d1c9e0f42ec396c58e
4
+ data.tar.gz: 4fe65c1c40a0a9d90c851bf6dc152b0cdfd7a1ea
5
5
  SHA512:
6
- metadata.gz: 1cbb820e6d9029dc7bc528c5bac036a4e915b314a7de93ba4ac4e8fbfece9df715bdb4548cd34c1bf94477e50258451eb5364505227f87f6221b593e52a2985d
7
- data.tar.gz: 3a6d978882072c7e82427e461af2c3b191548b0767d1c7dd528cf133a8fb3d19d4a71d3b7d6ae8ce1619fe6e33cb64616ab92b53e8cdf1c0359c6a438f0a129a
6
+ metadata.gz: 0c72e0e7246184dc23bcd459c8c0a54e00b4b80654e0a2516032726d35274ba7b44f39287224f55c40a10d74d2048efa762ed9f1131ad1d370afda2a378d579e
7
+ data.tar.gz: 4002506d3bcb00d739d012c0af50829f59e40f48881ca4ed807c4b414e19fd1d0a25265c0d0efc731532cadddf891a8eb0a38f42e7ff8a34f01129070763b238
data/.autotest ADDED
@@ -0,0 +1,8 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'autotest/restart'
4
+
5
+ Autotest.add_hook :initialize do |at|
6
+ at.testlib = 'minitest/autorun'
7
+ at.find_directories = ARGV unless ARGV.empty?
8
+ end
data/CHANGELOG.rdoc ADDED
@@ -0,0 +1,5 @@
1
+ === 1.0.1 / 2015-11-13
2
+ * Bug fixes
3
+ === 1.0.0 / 2015-11-13
4
+
5
+ * 1st release
data/Manifest.txt ADDED
@@ -0,0 +1,8 @@
1
+ .autotest
2
+ CHANGELOG.rdoc
3
+ Manifest.txt
4
+ README.rdoc
5
+ Rakefile
6
+ lib/minitest/glitch.rb
7
+ lib/minitest/glitch_plugin.rb
8
+ test/test_minitest_glitch.rb
data/README.rdoc ADDED
@@ -0,0 +1,71 @@
1
+ = minitest-glitch
2
+
3
+ * http://github.com/heavysixer/minitest-glitch
4
+
5
+ == DESCRIPTION:
6
+
7
+ Print out glitch for your test passes, fails, and skips
8
+
9
+ Inspired by https://github.com/tenderlove/minitest-emoji
10
+
11
+ == FEATURES/PROBLEMS:
12
+
13
+ * See description
14
+
15
+ == SYNOPSIS:
16
+
17
+ require 'minitest/autorun'
18
+ require 'minitest/glitch'
19
+
20
+ describe 'my amazing tests' do
21
+ # generate many glitches!
22
+ 50.times do |i|
23
+ it "must #{i}" do
24
+ 100.must_equal 100
25
+ end
26
+ end
27
+
28
+ # generate some more glitches!
29
+ 2.times do |i|
30
+ it "compares #{i} to #{i + 1}" do
31
+ i.must_equal i + 1
32
+ end
33
+ end
34
+
35
+ it 'skips things!!' do
36
+ skip "don't care!"
37
+ end
38
+ end
39
+
40
+ == REQUIREMENTS:
41
+
42
+ * minitest
43
+
44
+ == INSTALL:
45
+
46
+ * gem install minitest-glitch
47
+
48
+ == LICENSE:
49
+
50
+ (The MIT License)
51
+
52
+ Copyright (c) 2015 Mark Daggett
53
+
54
+ Permission is hereby granted, free of charge, to any person obtaining
55
+ a copy of this software and associated documentation files (the
56
+ 'Software'), to deal in the Software without restriction, including
57
+ without limitation the rights to use, copy, modify, merge, publish,
58
+ distribute, sublicense, and/or sell copies of the Software, and to
59
+ permit persons to whom the Software is furnished to do so, subject to
60
+ the following conditions:
61
+
62
+ The above copyright notice and this permission notice shall be
63
+ included in all copies or substantial portions of the Software.
64
+
65
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
66
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
67
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
68
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
69
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
70
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
71
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,19 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'hoe'
5
+
6
+ Hoe.plugins.delete :rubyforge
7
+ Hoe.plugin :minitest
8
+ Hoe.plugin :gemspec # `gem install hoe-gemspec`
9
+ Hoe.plugin :git # `gem install hoe-git`
10
+
11
+ Hoe.spec 'minitest-glitch' do
12
+ developer('Mark Daggett', 'mark@humansized.com')
13
+ self.readme_file = 'README.rdoc'
14
+ self.history_file = 'CHANGELOG.rdoc'
15
+ self.extra_rdoc_files = FileList['*.rdoc']
16
+ self.license "MIT"
17
+ end
18
+
19
+ # vim: syntax=ruby
@@ -0,0 +1,68 @@
1
+ #!/bin/env ruby
2
+ # encoding: utf-8
3
+ require 'minitest'
4
+
5
+ module Minitest
6
+
7
+ # Start an escape sequence
8
+ ESC = "\e["
9
+ # End the escape sequence
10
+ NND = "#{ESC}0m"
11
+
12
+ def self.plugin_glitch_options opts, options # :nodoc:
13
+ opts.on "-e", "--glitch", "Show Glitch instead of dots" do
14
+ Glitch.glitch!
15
+ end
16
+ end
17
+
18
+ def self.plugin_glitch_init options # :nodoc:
19
+ if Glitch.glitch? then
20
+ io = Glitch.new options[:io]
21
+
22
+ self.reporter.reporters.grep(Minitest::Reporter).each do |rep|
23
+ rep.io = io
24
+ end
25
+ end
26
+ end
27
+
28
+ class Glitch
29
+
30
+ VERSION = '1.0.1'
31
+
32
+ attr_reader :io
33
+
34
+ def self.glitch!
35
+ @glitch = true
36
+ end
37
+
38
+ def self.glitch?
39
+ @glitch ||= false
40
+ end
41
+
42
+ def initialize io
43
+ @io = io
44
+ end
45
+
46
+ def char
47
+ %w(
48
+ Ȋ̷͗ͯ̌͂̈̅́ͭ̋̎ͭ̈̑́̀͏͓̥̟ ̢̢̏̈ͩ͋͏̖̝͇̘̹̤lͪ̓̃͗̄̑ͤ̉̌́ͤͬ̋̆͛͑ͣ͝͏̥̠͖͈̙̼̲̞̯͉͎̰̖̳͖͙͠ͅí̛̦̤̦͇̫̥͚̙͒̄́͆͛̅̋̀͌͒́͠ͅk̶͗͌̑ͭ͒͐́̓̉̂͌̅̚͏̻͚͙̥̥̳̮̖̙̰̯̲̲e̶̛͈̣͖̥̼̭͍̝̤͎͈̤̊ͣ̐ͬ̅ͣ͐ͬ̈̓̄ͫ͋̽͜ͅ ̛̫͉͈̖̪̬͎̟̥͇ͪ̄ͩ̏̑́ę̛̯͈̮̬͇̥̻͉ͧͥ͐̒̐͒̃̈̿̓́͂͒ͥͦm̡̧͕̰͎͓͓̱̪̘͓͚̼̮̤̭͎͉͖͕̃̿ͣ̅͊ͪ͛̀ͤͮ̌̐ͨ͒̊o̼͇̱͕̖̜̥̻̲̥̘̔̍̀͐̈̀̆̾ͩ̀̄̋̃ͤ̀̚͠j̡̻̼̪̠͚̝̣͈̘̜̬̥̘̮̻̞̪̮͛̈́̑̃̆̏̐͛ͯ̏͊ͮ̄̍͐ͧ͆̑̏͘ͅi̷͎͇͔̱̖͛̾͂͊̋̃̅̑̋ͧ͊̄ͤͮ̋́'̔͗ͦ͒̔ͪ̍̊̊́̋ͥ̐̈́̕͜͏̶͏̼̩̳̟̗͍̲͔̲̖̳ͅͅͅs͊͐ͩ̑̇̌̓͐͐̑ͥ̾ͥ̄̽͏̸̳̞͉̫͝,̛̞͍͓̈́́̾̊̃͢ ̶̢ͥ̃͌̑͒ͤͫ̿͋̀̚̚͜͠͏̦̝̫̬ͅtͯ̃́ͥ͐̿͏̨̨̛̱͔̻͖̬̯̩̝̟̠̣̬̯̼̀h̟͕͉͔̠̬͇̝̼̤̝̖̪͚͈͚̪̱ͥͫͪͣ̎ͮͤ͌ͩ͆̊̿͘͟ȇ̷̓̃̎̆ͯ̀̃̆̌ͨͫ̋͛̑҉̸̥̳̰͎̦̥͈͕͍͜͜y̶̢̮̙̪͙̏̓͗̂̊ͥ̐͠͞'ͭ͆ͮ̈̍҉̟͎̞̱̟̥̻̯̖̯̘̱̮̬̺̩̙͟r̹͖͎̘̯̻̠̘͔͈̍́ͫ̆̾͛͂ͤͤ̓̓ͯ͢͢ͅȩ̶̷̯̩͍͙̗͇̝̳͍̦̭͎̺̖̣͍ͬͥ̀͋ͨ̂ͤ͑̓̐̒͋͆ͬ͆͛̓̓̀̚͡ ̸̵̵̩̳͙̘͕̥̲͇̥̘̻̤̹͕̗̩̪̊ͤ̊ͭ̍̄̈́̒͢ͅc̡̲͓̜̓̔̏͗̎̀̃̃͊̀͜͟ͅo̖̩͈̞̝̟̗̬̩̝͕͕̎͐ͫ͆͌ͤͣ́ͨͩͪ͛ͯͥͨ́̀o̢̟̩̰̗͓̠̳̣̲͔̐̃͛̊ͯ̌̆͞͝ľ̷͛̿͋̏͌́̾̅̉͆ͫͩ͟҉͜͏̠̞͓̹͕̗͖̼͖̱̪̱̞̘̰!̶̖͖̤̘̠̮̙̺̱̽̿̇ͮ̑ͦ̃͑ͥ͒̎͌ͨ͋̽͌̓̆̀̀̀
49
+ ).sample()
50
+ end
51
+
52
+ def print o
53
+ case o
54
+ when "." then
55
+ io.print char
56
+ when "E", "F" then
57
+ io.print "#{ESC}41m#{ESC}37m#{char}#{NND}"
58
+ else
59
+ io.print char
60
+ end
61
+ end
62
+
63
+ def method_missing msg, *args
64
+ return super unless io.respond_to? msg
65
+ io.send(msg, *args)
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,28 @@
1
+ require 'minitest/autorun'
2
+ require 'minitest/glitch'
3
+
4
+ describe 'my amazing tests' do
5
+ # generate many glitches!
6
+ 50.times do |i|
7
+ it "must #{i}" do
8
+ 100.must_equal 100
9
+ end
10
+ end
11
+
12
+ # generate some more glitches!
13
+ 2.times do |i|
14
+ it "compares #{i} to #{i + 1}" do
15
+ i.must_equal i + 1
16
+ end
17
+ end
18
+
19
+ it 'skips things!!' do
20
+ skip "don't care!"
21
+ end
22
+
23
+ 3.times do
24
+ it "errors" do
25
+ raise "ru roh"
26
+ end
27
+ end
28
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-glitch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Daggett
@@ -9,20 +9,78 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2015-11-13 00:00:00.000000000 Z
12
- dependencies: []
13
- description: Glitch output all over your tests
14
- email: mark@humansized.ocm
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: minitest
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '5.8'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '5.8'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rdoc
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '4.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '4.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: hoe
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '3.14'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '3.14'
55
+ description: |-
56
+ Print out glitch for your test passes, fails, and skips
57
+
58
+ Inspired by https://github.com/tenderlove/minitest-emoji
59
+ email:
60
+ - mark@humansized.com
15
61
  executables: []
16
62
  extensions: []
17
- extra_rdoc_files: []
63
+ extra_rdoc_files:
64
+ - CHANGELOG.rdoc
65
+ - Manifest.txt
66
+ - README.rdoc
18
67
  files:
68
+ - .autotest
69
+ - CHANGELOG.rdoc
70
+ - Manifest.txt
71
+ - README.rdoc
72
+ - Rakefile
19
73
  - lib/minitest/glitch.rb
20
- homepage: https://github.com/heavysixer/minitest-glitch
74
+ - lib/minitest/glitch_plugin.rb
75
+ - test/test_minitest_glitch.rb
76
+ homepage: http://github.com/heavysixer/minitest-glitch
21
77
  licenses:
22
78
  - MIT
23
79
  metadata: {}
24
80
  post_install_message:
25
- rdoc_options: []
81
+ rdoc_options:
82
+ - --main
83
+ - README.rdoc
26
84
  require_paths:
27
85
  - lib
28
86
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -40,5 +98,5 @@ rubyforge_project:
40
98
  rubygems_version: 2.2.2
41
99
  signing_key:
42
100
  specification_version: 4
43
- summary: Glitch output all over your tests
101
+ summary: Print out glitch for your test passes, fails, and skips Inspired by https://github.com/tenderlove/minitest-emoji
44
102
  test_files: []