love_formatter 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +22 -0
  3. data/README.md +10 -0
  4. data/lib/love_formatter.rb +25 -0
  5. metadata +65 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 823b6799b6386b9e410e90cdb57ac6f2a6707121
4
+ data.tar.gz: f1b7637abf23d7737be09246942b13c42391a936
5
+ SHA512:
6
+ metadata.gz: 7fa23a93cd5c8178bbd9352935d8fe93f24b20ed005202ac78894cc80f474d4528c98e6c2812a2e27f814d159301701b6d9ec3c7c13e3730a19a2b6413e26ce3
7
+ data.tar.gz: 027df69964da6d8c124a0e75a7678be3623d83462630e5ce7ba7727a94c9fdac1811ecf4cfb3b8928e5ba493059027bd7427f1985644366bdf6bdf3220f39c80
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Nikolay Norkin
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.
22
+
data/README.md ADDED
@@ -0,0 +1,10 @@
1
+ # love_formatter
2
+ Lovely formatter for RSpec
3
+
4
+ # Usage
5
+ Install gem or add it to you Gemfile. Then run RSpec with option
6
+ ```
7
+ --format LoveFormatter
8
+ ```
9
+
10
+ That's all! Now you should be covered with love and tenderness!
@@ -0,0 +1,25 @@
1
+ require 'rspec'
2
+ require 'rspec/core/formatters/base_text_formatter'
3
+ require 'ruby-progressbar'
4
+
5
+ # Main formatter class
6
+ class LoveFormatter < RSpec::Core::Formatters::BaseTextFormatter
7
+ RSpec::Core::Formatters.register self, :example_passed, :example_pending,
8
+ :example_failed, :start_dump
9
+
10
+ def example_passed(_notification)
11
+ output.print RSpec::Core::Formatters::ConsoleCodes.wrap(' 💚 ', :success)
12
+ end
13
+
14
+ def example_pending(_notification)
15
+ output.print RSpec::Core::Formatters::ConsoleCodes.wrap(' 💛 ', :pending)
16
+ end
17
+
18
+ def example_failed(_notification)
19
+ output.print RSpec::Core::Formatters::ConsoleCodes.wrap(' 💔 ', :failure)
20
+ end
21
+
22
+ def start_dump(_notification)
23
+ output.puts
24
+ end
25
+ end
metadata ADDED
@@ -0,0 +1,65 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: love_formatter
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
5
+ platform: ruby
6
+ authors:
7
+ - Nikolay Norkin
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-08-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rspec
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.0'
27
+ description: lovely rspec formatter
28
+ email:
29
+ - n.e.norkin@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files:
33
+ - README.md
34
+ - LICENSE
35
+ files:
36
+ - LICENSE
37
+ - README.md
38
+ - lib/love_formatter.rb
39
+ homepage: https://github.com/duderman/love_formatter
40
+ licenses:
41
+ - MIT
42
+ metadata: {}
43
+ post_install_message:
44
+ rdoc_options:
45
+ - "--charset"
46
+ - UTF-8
47
+ require_paths:
48
+ - lib
49
+ required_ruby_version: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
59
+ requirements: []
60
+ rubyforge_project:
61
+ rubygems_version: 2.2.2
62
+ signing_key:
63
+ specification_version: 4
64
+ summary: lovely rspec formatter
65
+ test_files: []