fanciful 0.0.2

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6d381b892ca2833933a49c9186a874e21ee03274589c268925bce28f4b57b9b3
4
+ data.tar.gz: b66c39c507fc8971c5eaf77d5a1d2077f9f690dc7c96121de7525ccd07c14820
5
+ SHA512:
6
+ metadata.gz: 4859a41e3dd0ee4fd751c782e8254377f7cf7a28664f79d989b495ef5cea3e0fb472cd894177536f2d8d6da4a737518aaa471c6917b84bc07f76e5f55ba3a118
7
+ data.tar.gz: 010b3e2b87a95cd09d6cdb0aa7ea55805552e30d07410bde8efce9e0273121bd82da30d0d62481db16b51728f43fd7cbb6eaaf0394055eba47e16dd31a891cb5
data/.gitignore ADDED
@@ -0,0 +1,50 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+
13
+ # Used by dotenv library to load environment variables.
14
+ # .env
15
+
16
+ ## Specific to RubyMotion:
17
+ .dat*
18
+ .repl_history
19
+ build/
20
+ *.bridgesupport
21
+ build-iPhoneOS/
22
+ build-iPhoneSimulator/
23
+
24
+ ## Specific to RubyMotion (use of CocoaPods):
25
+ #
26
+ # We recommend against adding the Pods directory to your .gitignore. However
27
+ # you should judge for yourself, the pros and cons are mentioned at:
28
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
29
+ #
30
+ # vendor/Pods/
31
+
32
+ ## Documentation cache and generated files:
33
+ /.yardoc/
34
+ /_yardoc/
35
+ /doc/
36
+ /rdoc/
37
+
38
+ ## Environment normalization:
39
+ /.bundle/
40
+ /vendor/bundle
41
+ /lib/bundler/man/
42
+
43
+ # for a library or gem, you might want to ignore these files since the code is
44
+ # intended to run in multiple environments; otherwise, check them in:
45
+ # Gemfile.lock
46
+ # .ruby-version
47
+ # .ruby-gemset
48
+
49
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
50
+ .rvmrc
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "colorize"
data/Gemfile.lock ADDED
@@ -0,0 +1,13 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ colorize (0.8.1)
5
+
6
+ PLATFORMS
7
+ ruby
8
+
9
+ DEPENDENCIES
10
+ colorize
11
+
12
+ BUNDLED WITH
13
+ 1.15.4
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2017 Conor Landry
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,2 @@
1
+ # fanciful
2
+ Fancy colored output for go test
data/bin/fanciful ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'fanciful'
4
+
5
+ Fanciful.new(ARGF.read.each_line)
data/fanciful.gemspec ADDED
@@ -0,0 +1,12 @@
1
+ Gem::Specification.new do |gem|
2
+ gem.name = %q{fanciful}
3
+ gem.author = %q{Conor Landry}
4
+ gem.email = %q{clandry94@gmail.com}
5
+ gem.homepage = %q{http://github.com/clandry94/fanciful/}
6
+ gem.licenses = %q{MIT}
7
+ gem.version = "0.0.2"
8
+ gem.date = %q{2017-11-09}
9
+ gem.files = `git ls-files`.split($\)
10
+ gem.summary = %q{Fancy colors for go test output!}
11
+ gem.executables = ["fanciful"]
12
+ end
data/lib/fanciful.rb ADDED
@@ -0,0 +1 @@
1
+ require_relative "fanciful/fanciful"
@@ -0,0 +1,50 @@
1
+ require 'colorize'
2
+
3
+ module TestColorizer
4
+ PASS_IDENT = 'PASS'
5
+ FAIL_IDENT = 'FAIL'
6
+ RUN_IDENT = '=== RUN'
7
+
8
+ def TestColorizer.colorize_failure(line)
9
+ if line.include?(FAIL_IDENT)
10
+ colored = line.match(FAIL_IDENT).to_s.colorize(:red)
11
+ return line.gsub!(FAIL_IDENT, colored)
12
+ end
13
+ line
14
+ end
15
+
16
+ def TestColorizer.colorize_success(line)
17
+ if line.include?(PASS_IDENT)
18
+ colored = line.match(PASS_IDENT).to_s.colorize(:green)
19
+ return line.gsub!(PASS_IDENT, colored)
20
+ end
21
+ line
22
+ end
23
+
24
+ def TestColorizer.colorize_run(line)
25
+ if line.include?(RUN_IDENT)
26
+ colored = line.match(RUN_IDENT).to_s.colorize(:white)
27
+ return line.gsub!(RUN_IDENT, colored)
28
+ end
29
+ line
30
+ end
31
+ end
32
+
33
+ class Fanciful
34
+ include TestColorizer
35
+
36
+ class << self
37
+ def new(input)
38
+ input.each do |line|
39
+ line = TestColorizer::colorize_run(line)
40
+ line = TestColorizer::colorize_failure(line)
41
+ line = TestColorizer::colorize_success(line)
42
+ puts line
43
+ end
44
+ end
45
+ end
46
+
47
+ end
48
+
49
+
50
+
metadata ADDED
@@ -0,0 +1,53 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fanciful
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Conor Landry
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-11-09 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email: clandry94@gmail.com
15
+ executables:
16
+ - fanciful
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - ".gitignore"
21
+ - Gemfile
22
+ - Gemfile.lock
23
+ - LICENSE
24
+ - README.md
25
+ - bin/fanciful
26
+ - fanciful.gemspec
27
+ - lib/fanciful.rb
28
+ - lib/fanciful/fanciful.rb
29
+ homepage: http://github.com/clandry94/fanciful/
30
+ licenses:
31
+ - MIT
32
+ metadata: {}
33
+ post_install_message:
34
+ rdoc_options: []
35
+ require_paths:
36
+ - lib
37
+ required_ruby_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ required_rubygems_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ requirements: []
48
+ rubyforge_project:
49
+ rubygems_version: 2.7.2
50
+ signing_key:
51
+ specification_version: 4
52
+ summary: Fancy colors for go test output!
53
+ test_files: []