rspec_numbered_documentation 0.2.1

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
+ SHA1:
3
+ metadata.gz: d393c3f152a79d32d109d78cc3c7e7f4f1d659d2
4
+ data.tar.gz: 95fbd141b3a01ada11bec94ac172f3b3651ffdfd
5
+ SHA512:
6
+ metadata.gz: 3ae749f07c5493b4e4e87f7eb2a15da3192664283071595058b882aaee30d9cbc64794f2786d2b43c7ae87f0ca8f7984ad45e55f2b0407d039f34ddb79f9b702
7
+ data.tar.gz: 12019c9913c1d04f67ef06c057b3601aeac8d9947b927b06b7117eddece8ac94b7b838e00ceec876b5d926db31437bb74225ddcd8ea34d9194fbde9a45470099
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1 @@
1
+ # workaround for https://github.com/backus/rubocop-rspec/issues/236
data/.travis.yml ADDED
@@ -0,0 +1,14 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2
4
+ - 2.3.1
5
+ before_install:
6
+ - gem install bundler rake
7
+ - if [ -z "$_COMMAND" ]; then export _COMMAND=rspec; fi
8
+ script: rake $_COMMAND
9
+ matrix:
10
+ include:
11
+ - env: _COMMAND=rubocop
12
+ rvm: 2.3.1
13
+ - env: _COMMAND=rspec_lint
14
+ rvm: 2.3.1
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in rspec_numbered_documentation.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) [2016] [Alexander Todorov]
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,50 @@
1
+ # RSpec Numbered Documentation
2
+
3
+ [![Build Status](https://travis-ci.org/MrSenko/rspec_numbered_documentation.svg?branch=master)](https://travis-ci.org/MrSenko/rspec_numbered_documentation)
4
+
5
+ Rspec formatter which prefixes the documentation formatter with line numbers
6
+ indicating the order of test execution. This is useful when reading large
7
+ log files and debugging flaky tests.
8
+
9
+
10
+ ## Installation
11
+
12
+ Add this line to your application's Gemfile:
13
+
14
+ ```ruby
15
+ gem 'rspec_numbered_documentation'
16
+ ```
17
+
18
+ And then execute:
19
+
20
+ $ bundle
21
+
22
+ Or install it yourself as:
23
+
24
+ $ gem install rspec_numbered_documentation
25
+
26
+ ## Usage
27
+
28
+ ```bash
29
+ bundle exec rspec -f RspecNumberedDocumentation::Formatter
30
+ ```
31
+
32
+ ## Changelog
33
+
34
+ * 0.2.1 (Dec 18th 2016)
35
+ - first release
36
+
37
+ ## Development
38
+
39
+ After checking out the repo, run `bin/setup` to install dependencies.
40
+ You can also run `bin/console` for an interactive prompt that will allow you to experiment.
41
+
42
+ To install this gem onto your local machine, run `bundle exec rake install`.
43
+ To release a new version, update the version number in `version.rb`, and then run
44
+ `bundle exec rake release`, which will create a git tag for the version,
45
+ push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
46
+
47
+ ## Contributing
48
+
49
+ Bug reports and pull requests are welcome on GitHub at https://github.com/MrSenko/rspec_numbered_documentation.
50
+
data/Rakefile ADDED
@@ -0,0 +1,16 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rubocop/rake_task'
3
+
4
+ task default: :spec
5
+
6
+ RuboCop::RakeTask.new do |task|
7
+ task.requires << 'rubocop-rspec'
8
+ end
9
+
10
+ task :rspec do
11
+ sh 'bundle exec rspec -f RspecNumberedDocumentation::Formatter'
12
+ end
13
+
14
+ task :rspec_lint do
15
+ sh 'rspec-lint spec/'
16
+ end
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'rspec_numbered_documentation'
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require 'irb'
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,6 @@
1
+ require 'rspec_numbered_documentation/version'
2
+ require 'rspec_numbered_documentation/formatter'
3
+
4
+ # Note the module name capitalization!
5
+ module RspecNumberedDocumentation
6
+ end
@@ -0,0 +1,20 @@
1
+ require 'rspec/core/formatters/documentation_formatter'
2
+
3
+ module RspecNumberedDocumentation
4
+ # Rspec formatter which prefixes the documentation formatter
5
+ # with line numbers indicating the order of test execution.
6
+ class Formatter < RSpec::Core::Formatters::DocumentationFormatter
7
+ RSpec::Core::Formatters.register self,
8
+ :example_started
9
+
10
+ def initialize(output)
11
+ super(output)
12
+ @example_number = 0
13
+ end
14
+
15
+ def example_started(_notification)
16
+ @example_number += 1
17
+ output.print "#{@example_number}: "
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,3 @@
1
+ module RspecNumberedDocumentation
2
+ VERSION = '0.2.1'.freeze
3
+ end
@@ -0,0 +1,31 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'rspec_numbered_documentation/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'rspec_numbered_documentation'
8
+ spec.version = RspecNumberedDocumentation::VERSION
9
+ spec.authors = ['Alexander Todorov']
10
+ spec.email = ['atodorov@MrSenko.com']
11
+ spec.homepage = 'https://github.com/MrSenko/rspec_numbered_documentation'
12
+ spec.license = 'MIT'
13
+ spec.summary = 'Prefix the Rspec documentation formatter with line numbers'
14
+ spec.description = <<-DESCRIPTION
15
+ Rspec formatter which prefixes the documentation formatter with line numbers indicating
16
+ the order of test execution. Useful when reading large log files and debugging flaky tests!
17
+ DESCRIPTION
18
+ spec.files = `git ls-files -z`.split("\x0").reject { |f|
19
+ f.match(%r{^(test|spec|features)/})
20
+ }
21
+ spec.bindir = 'exe'
22
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
+ spec.require_paths = ['lib']
24
+ spec.add_development_dependency 'bundler'
25
+ spec.add_development_dependency 'rake'
26
+ spec.add_development_dependency 'rspec'
27
+ spec.add_development_dependency 'pry'
28
+ spec.add_development_dependency 'rubocop'
29
+ spec.add_development_dependency 'rubocop-rspec'
30
+ spec.add_development_dependency 'rspec-lint'
31
+ end
metadata ADDED
@@ -0,0 +1,158 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rspec_numbered_documentation
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.1
5
+ platform: ruby
6
+ authors:
7
+ - Alexander Todorov
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2016-12-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry
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
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop-rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec-lint
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ description: |
112
+ Rspec formatter which prefixes the documentation formatter with line numbers indicating
113
+ the order of test execution. Useful when reading large log files and debugging flaky tests!
114
+ email:
115
+ - atodorov@MrSenko.com
116
+ executables: []
117
+ extensions: []
118
+ extra_rdoc_files: []
119
+ files:
120
+ - ".gitignore"
121
+ - ".rspec"
122
+ - ".rubocop.yml"
123
+ - ".travis.yml"
124
+ - Gemfile
125
+ - LICENSE
126
+ - README.md
127
+ - Rakefile
128
+ - bin/console
129
+ - bin/setup
130
+ - lib/rspec_numbered_documentation.rb
131
+ - lib/rspec_numbered_documentation/formatter.rb
132
+ - lib/rspec_numbered_documentation/version.rb
133
+ - rspec_numbered_documentation.gemspec
134
+ homepage: https://github.com/MrSenko/rspec_numbered_documentation
135
+ licenses:
136
+ - MIT
137
+ metadata: {}
138
+ post_install_message:
139
+ rdoc_options: []
140
+ require_paths:
141
+ - lib
142
+ required_ruby_version: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - ">="
145
+ - !ruby/object:Gem::Version
146
+ version: '0'
147
+ required_rubygems_version: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ requirements: []
153
+ rubyforge_project:
154
+ rubygems_version: 2.4.5
155
+ signing_key:
156
+ specification_version: 4
157
+ summary: Prefix the Rspec documentation formatter with line numbers
158
+ test_files: []