dogespec 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3a0f0031d8eaa9ebf3a41e1b08924d0b6953b023
4
+ data.tar.gz: 5dcc9ac26951eafcc55a09351488810e3cfb653f
5
+ SHA512:
6
+ metadata.gz: 3dd921e8a2b5ac8b1b4ef5e9d4d83c0d8d2948a75521478d28308766b7617c616cbb776d355b1515b1c04b14615c9b25879b298c8c93b50a69668bc922ebea5d
7
+ data.tar.gz: 8204fed7c13ab2649cb94ae1e0c520c6b0ca1dd630494c6896b1b7f7a48ed96277271aab60003ea7d89d0ccc0df4b2b01d0485be4e6782526682fdbb90d07082
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format Dogespec::Formatter
2
+ --color
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in dogespec.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Brent Ertz
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,38 @@
1
+ # DogeSpec
2
+
3
+ A dogified RSpec formatter that that spices up your specs with doge speak!
4
+
5
+ such gem. wow.
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ gem 'dogespec'
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install dogespec
20
+
21
+ ## Usage
22
+
23
+ Run your specs using the following syntax:
24
+
25
+ rspec --format Dogespec::Formatter --color spec
26
+
27
+ Or if you would like to make it your default RSpec formatter, create a `.rspec` file in your project root directory with the following contents:
28
+
29
+ --format Dogespec::Formatter
30
+ --color
31
+
32
+ ## Contributing
33
+
34
+ 1. Fork it ( http://github.com/brentertz/dogespec/fork )
35
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
36
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
37
+ 4. Push to the branch (`git push origin my-new-feature`)
38
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,5 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+ task default: :spec
data/dogespec.gemspec ADDED
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'dogespec/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "dogespec"
8
+ spec.version = Dogespec::VERSION
9
+ spec.authors = ["Brent Ertz"]
10
+ spec.email = ["brent.ertz@gmail.com"]
11
+ spec.summary = %q{A dogeified RSpec formatter that spices up your specs with doge speak.}
12
+ spec.description = %q{such gem. wow.}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency "rspec", "~> 2.14.1"
22
+ spec.add_dependency "dogeify", "~> 1.0.0"
23
+
24
+ spec.add_development_dependency "bundler", "~> 1.5"
25
+ spec.add_development_dependency "rake"
26
+ end
data/lib/dogespec.rb ADDED
@@ -0,0 +1,2 @@
1
+ require "dogespec/version"
2
+ require "dogespec/formatter"
@@ -0,0 +1,32 @@
1
+ require "rspec/core/formatters/documentation_formatter"
2
+ require "dogeify"
3
+
4
+ module Dogespec
5
+ class Formatter < RSpec::Core::Formatters::DocumentationFormatter
6
+ def initialize(output)
7
+ super(output)
8
+ @dogeifier = Dogeify.new
9
+ end
10
+
11
+ def passed_output(example)
12
+ msg = dogeify(example.description.strip)
13
+ success_color("#{current_indentation}#{msg}")
14
+ end
15
+
16
+ def pending_output(example, message)
17
+ msg = "#{dogeify(example.description.strip)} (PENDING: #{dogeify(message)})"
18
+ pending_color("#{current_indentation}#{msg}")
19
+ end
20
+
21
+ def failure_output(example, exception)
22
+ msg = "#{dogeify(example.description.strip)} (FAILED: #{next_failure_index})"
23
+ failure_color("#{current_indentation}#{msg}")
24
+ end
25
+
26
+ private
27
+
28
+ def dogeify(such)
29
+ @dogeifier.process(such)
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,3 @@
1
+ module Dogespec
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,30 @@
1
+ require "spec_helper"
2
+
3
+ describe Dogespec do
4
+ let(:output) { StringIO.new }
5
+ let(:formatter) { Dogespec::Formatter.new(@output) }
6
+ let(:example) { RSpec::Core::ExampleGroup.describe.example }
7
+
8
+ describe "examples" do
9
+ context "passed" do
10
+ it "dogeifies the example" do
11
+ formatter.should_receive(:dogeify)
12
+ formatter.example_passed(example)
13
+ end
14
+ end
15
+
16
+ context "pending" do
17
+ it "dogeifies the example" do
18
+ formatter.should_receive(:dogeify).twice
19
+ formatter.example_pending(example)
20
+ end
21
+ end
22
+
23
+ context "failed" do
24
+ it "dogeifies the example" do
25
+ formatter.should_receive(:dogeify)
26
+ formatter.example_failed(example)
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1 @@
1
+ require "dogespec"
metadata ADDED
@@ -0,0 +1,114 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dogespec
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Brent Ertz
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-03-03 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: 2.14.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 2.14.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: dogeify
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 1.0.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 1.0.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.5'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.5'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: such gem. wow.
70
+ email:
71
+ - brent.ertz@gmail.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - ".gitignore"
77
+ - ".rspec"
78
+ - Gemfile
79
+ - LICENSE.txt
80
+ - README.md
81
+ - Rakefile
82
+ - dogespec.gemspec
83
+ - lib/dogespec.rb
84
+ - lib/dogespec/formatter.rb
85
+ - lib/dogespec/version.rb
86
+ - spec/lib/dogespec_spec.rb
87
+ - spec/spec_helper.rb
88
+ homepage: ''
89
+ licenses:
90
+ - MIT
91
+ metadata: {}
92
+ post_install_message:
93
+ rdoc_options: []
94
+ require_paths:
95
+ - lib
96
+ required_ruby_version: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
101
+ required_rubygems_version: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ requirements: []
107
+ rubyforge_project:
108
+ rubygems_version: 2.2.1
109
+ signing_key:
110
+ specification_version: 4
111
+ summary: A dogeified RSpec formatter that spices up your specs with doge speak.
112
+ test_files:
113
+ - spec/lib/dogespec_spec.rb
114
+ - spec/spec_helper.rb