rspec-lint 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: cf61ecec3b799f5bb12217d8af28ad090620a74e
4
+ data.tar.gz: c9e7f5118cfddceef1e9b0a5c6ee620fd69b9701
5
+ SHA512:
6
+ metadata.gz: 1a1340380015b46bd7921c9ab7bc7a1326b0a02675ff3cd61dc055c757d0d9deccd1ef06e64611356ccad9a7d95fc8a7c068aa6c29b88da585f85f6705362766
7
+ data.tar.gz: 0d1f0fde56f1cab53794cebf3e3e5a924a44cfeaa722c9dcf034768016ed3e6eb613bc3731e8890dc2a00966ae33f2489138430b7bd88c152aa15e7ee87cff8e
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec name: 'rspec-lint'
4
+
5
+ gem 'rake'
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $LOAD_PATH.unshift('lib')
4
+
5
+ require 'rspec'
6
+ require 'rspec-lint'
7
+
8
+ RSpec::Core::Runner.run(ARGV)
9
+
10
+ RSpec::Strict::Let::DEFINITIONS.each do |definition, name|
11
+ puts "unused let '#{name}' at #{definition}"
12
+ end
@@ -0,0 +1 @@
1
+ require_relative 'rspec/lint'
@@ -0,0 +1,27 @@
1
+ module RSpec
2
+ module Strict
3
+ module Let
4
+ DEFINITIONS = Hash.new
5
+
6
+ def let(name, &block)
7
+ definition = caller.first.dup.freeze
8
+ Let::DEFINITIONS[definition] = name
9
+
10
+ super
11
+
12
+ wrapper =
13
+ Module.new do
14
+ define_method(name) do
15
+ Let::DEFINITIONS.delete(definition)
16
+
17
+ super()
18
+ end
19
+ end
20
+
21
+ prepend(wrapper)
22
+ end
23
+ end
24
+ end
25
+ end
26
+
27
+ RSpec::Core::ExampleGroup.extend(RSpec::Strict::Let)
@@ -0,0 +1,22 @@
1
+
2
+ Gem::Specification.new do |gem|
3
+ gem.name = 'rspec-lint'
4
+ gem.version = '0.0.0'
5
+ gem.authors = ['John Backus']
6
+ gem.email = ['johncbackus@gmail.com']
7
+ gem.description = 'Lint RSpec'
8
+ gem.summary = gem.description
9
+ gem.homepage = 'https://github.com/backus/rspec-lint'
10
+ gem.license = 'MIT'
11
+
12
+ gem.require_paths = %w[lib]
13
+
14
+ gem.files = `git ls-files`.split("\n")
15
+ gem.test_files = `git ls-files -- spec/{unit,integration}`.split("\n")
16
+ gem.extra_rdoc_files = %w[]
17
+ gem.executables = %w[rspec-lint]
18
+
19
+ gem.required_ruby_version = '>= 2.1'
20
+
21
+ gem.add_runtime_dependency('rspec', '~> 3.4')
22
+ end
metadata ADDED
@@ -0,0 +1,64 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rspec-lint
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - John Backus
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-09-16 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.4'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.4'
27
+ description: Lint RSpec
28
+ email:
29
+ - johncbackus@gmail.com
30
+ executables:
31
+ - rspec-lint
32
+ extensions: []
33
+ extra_rdoc_files: []
34
+ files:
35
+ - Gemfile
36
+ - bin/rspec-lint
37
+ - lib/rspec-lint.rb
38
+ - lib/rspec/lint.rb
39
+ - rspec-lint.gemspec
40
+ homepage: https://github.com/backus/rspec-lint
41
+ licenses:
42
+ - MIT
43
+ metadata: {}
44
+ post_install_message:
45
+ rdoc_options: []
46
+ require_paths:
47
+ - lib
48
+ required_ruby_version: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: '2.1'
53
+ required_rubygems_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ requirements: []
59
+ rubyforge_project:
60
+ rubygems_version: 2.6.6
61
+ signing_key:
62
+ specification_version: 4
63
+ summary: Lint RSpec
64
+ test_files: []