flip_spec 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 +7 -0
- data/lib/flip_spec.rb +29 -0
- metadata +44 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 873ae7344272009e56926ebdfb848a37db0f6b36
|
4
|
+
data.tar.gz: eb6d50c36d4a55b3ddcee1fffcf4681206b7766b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6b7d4b8fedb1cd1d0c6769b73c7281d0776b6a4f62f5f646781dc199b0bd7b156261eefa92680ea1ef12dfcf6cd49932e982bf1cfb51a5611f52ae7ec55e09c6
|
7
|
+
data.tar.gz: c4eff8fcce3dfb5125496a50c2e5c36874ecf634528d2849b8001a67cbca3aa6a93d2f81cbf73c284d0b996bbcb5a8faf3614afccf81ccf35dd92d6f52aefa06
|
data/lib/flip_spec.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
class FlipSpec
|
2
|
+
COLOURS = { red: 31, green: 32, blue: 34, magenta: 35, cyan: 36, bold: 1 }
|
3
|
+
METHODS = [:start, :example_failed, :example_passed]
|
4
|
+
|
5
|
+
RSpec::Core::Formatters.register self, *METHODS
|
6
|
+
|
7
|
+
def initialize(output)
|
8
|
+
@output = output
|
9
|
+
end
|
10
|
+
|
11
|
+
def start(*)
|
12
|
+
@output << colour_text('🍰 F 🍰 L 🍰 I 🍰 P - S 🍰 P 🍰 E 🍰 C 🍰', 35)
|
13
|
+
end
|
14
|
+
|
15
|
+
def example_failed(notification)
|
16
|
+
@output << colour_text(' (╯°□°)╯ ︵ ┻━━┻ : ' + notification.example.description.upcase, 31)
|
17
|
+
end
|
18
|
+
|
19
|
+
def example_passed(notification)
|
20
|
+
@output << colour_text('*・゚✧ ┬──┬ ・*゚✧・ : ' + notification.example.description.upcase, 32)
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def colour_text(string, colour)
|
26
|
+
"\033[#{colour}m#{string}\033[0m\n"
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: flip_spec
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Raph
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-03-25 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A very important gem, optically analysing your rspec results
|
14
|
+
email:
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- lib/flip_spec.rb
|
20
|
+
homepage: https://github.com/NULL-OPERATOR/rspec_table_flip
|
21
|
+
licenses:
|
22
|
+
- MIT
|
23
|
+
metadata: {}
|
24
|
+
post_install_message:
|
25
|
+
rdoc_options: []
|
26
|
+
require_paths:
|
27
|
+
- lib
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
34
|
+
requirements:
|
35
|
+
- - ">="
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
requirements: []
|
39
|
+
rubyforge_project:
|
40
|
+
rubygems_version: 2.4.5.1
|
41
|
+
signing_key:
|
42
|
+
specification_version: 4
|
43
|
+
summary: 0 PASSING (╯°□°)╯︵ ┻━┻
|
44
|
+
test_files: []
|