cuke_linter 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/README.md +7 -1
- data/cuke_linter.gemspec +2 -0
- data/lib/cuke_linter/version.rb +1 -1
- data/testing/cucumber/features/linters/default_linters.feature +21 -0
- data/testing/cucumber/step_definitions/action_steps.rb +1 -0
- data/testing/cucumber/step_definitions/setup_steps.rb +4 -0
- data/testing/cucumber/step_definitions/verification_steps.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07f2dd742bac2e9218abe46eed4c60d925c9735cb36e416b247f351f5318edd9
|
4
|
+
data.tar.gz: cd3cbe140a04bb6fcb372ef4637ea567b83693f716808a3d157aad50c9212a1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d6c601cebde0cf6adbb604368266b454060dc7bd1469f49a9504210f4197530455f08218ba5e0a95ea18aec3e2735dd41c9f41165ced06926081b861a1bc9eb
|
7
|
+
data.tar.gz: b852cc1f217e681e5d0c23a2f05ca19d54027700d4b30db5845977d0c9c29aa8416128430d34f37ab77dc7d8d623838cee406fabe190c487a1b1cbe17197ebe2
|
data/CHANGELOG.md
CHANGED
@@ -8,6 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
8
8
|
|
9
9
|
Nothing yet...
|
10
10
|
|
11
|
+
## [0.3.1] - 2019-04-13
|
12
|
+
|
13
|
+
### Added
|
14
|
+
- Now declaring required Ruby version. It's always been 2.x but now the gem actually says it officially.
|
15
|
+
|
11
16
|
## [0.3.0] - 2019-04-07
|
12
17
|
|
13
18
|
### Added
|
@@ -28,7 +33,8 @@ Nothing yet...
|
|
28
33
|
- Custom linters, formatters, and command line usability
|
29
34
|
|
30
35
|
|
31
|
-
[Unreleased]: https://github.com/enkessler/cuke_linter/compare/v0.3.
|
36
|
+
[Unreleased]: https://github.com/enkessler/cuke_linter/compare/v0.3.1...HEAD
|
37
|
+
[0.3.1]: https://github.com/enkessler/cuke_linter/compare/v0.3.0...v0.3.1
|
32
38
|
[0.3.0]: https://github.com/enkessler/cuke_linter/compare/v0.2.0...v0.3.0
|
33
39
|
[0.2.0]: https://github.com/enkessler/cuke_linter/compare/v0.1.0...v0.2.0
|
34
40
|
[0.1.0]: https://github.com/enkessler/cuke_linter/compare/2bbd3f29f4eb45b6e9ea7d47c5bb47182bf4fde7...v0.1.0
|
data/README.md
CHANGED
@@ -134,8 +134,14 @@ model_tree_root = CukeModeler::Directory.new(Dir.pwd)
|
|
134
134
|
CukeLinter.lint(linters: [linter], formatters: [[formatter], [formatter, output_path]], model_tree: model_tree_root)
|
135
135
|
```
|
136
136
|
|
137
|
+
### Configuration
|
137
138
|
|
138
|
-
|
139
|
+
Rather than using the default linters or providing a custom set of of modified linters every time linting occurs, which linters to use and any linter specific modifications can be configured in a more static manner via a configuration file or setting the configuration directly in code. See [documentation](#documentation) for specifics.
|
140
|
+
|
141
|
+
|
142
|
+
### <a id="documentation"></a>Everything Else
|
143
|
+
|
144
|
+
For more detailed examples of usage, see the documentation [here](https://app.cucumber.pro/projects/cuke_linter).
|
139
145
|
|
140
146
|
|
141
147
|
## Development
|
data/cuke_linter.gemspec
CHANGED
@@ -23,6 +23,8 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
24
|
spec.require_paths = ["lib"]
|
25
25
|
|
26
|
+
spec.required_ruby_version = '~> 2.0'
|
27
|
+
|
26
28
|
spec.add_runtime_dependency 'cuke_modeler', '~> 1.5'
|
27
29
|
|
28
30
|
spec.add_development_dependency "bundler", "< 3.0"
|
data/lib/cuke_linter/version.rb
CHANGED
@@ -12,3 +12,24 @@ Feature: Default Linters
|
|
12
12
|
| FeatureWithoutScenariosLinter |
|
13
13
|
| OutlineWithSingleExampleRowLinter |
|
14
14
|
| TestWithTooManyStepsLinter |
|
15
|
+
|
16
|
+
Scenario: Registering new linters
|
17
|
+
Given no linters are currently registered
|
18
|
+
When the following code is used:
|
19
|
+
"""
|
20
|
+
linter_object = <code_to_generate_a_new_linter_instance>
|
21
|
+
|
22
|
+
CukeLinter.register_linter(linter: linter_object, name: 'MyNewLinter')
|
23
|
+
"""
|
24
|
+
Then the following linters are registered
|
25
|
+
| MyNewLinter |
|
26
|
+
|
27
|
+
Scenario: Unregistering existing linters
|
28
|
+
Given a linter registered as "SomeLinter"
|
29
|
+
When the following code is used:
|
30
|
+
"""
|
31
|
+
linter_object = <code_to_generate_a_new_linter_instance>
|
32
|
+
|
33
|
+
CukeLinter.unregister_linter('SomeLinter')
|
34
|
+
"""
|
35
|
+
Then the linter "SomeLinter" is no longer registered
|
@@ -22,6 +22,7 @@ end
|
|
22
22
|
|
23
23
|
And(/^the following code is used:$/) do |code|
|
24
24
|
code.sub!('<path_to>', @root_test_directory)
|
25
|
+
code.sub!('<code_to_generate_a_new_linter_instance>', 'CukeLinter::LinterFactory.generate_fake_linter')
|
25
26
|
|
26
27
|
if @working_directory
|
27
28
|
Dir.chdir(@working_directory) do
|
@@ -62,3 +62,7 @@ end
|
|
62
62
|
Given(/^a directory "([^"]*)"$/) do |directory_name|
|
63
63
|
@test_directory = CukeLinter::FileHelper.create_directory(directory: @root_test_directory, name: directory_name)
|
64
64
|
end
|
65
|
+
|
66
|
+
Given(/^no linters are currently registered$/) do
|
67
|
+
CukeLinter.clear_registered_linters
|
68
|
+
end
|
@@ -14,7 +14,7 @@ Then(/^an error is reported$/) do |table|
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
Then(/^the following linters are registered by default
|
17
|
+
Then(/^the following linters are registered(?: by default)?$/) do |linter_names|
|
18
18
|
expect(CukeLinter.registered_linters.keys).to match_array(linter_names.raw.flatten)
|
19
19
|
end
|
20
20
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cuke_linter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Kessler
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cuke_modeler
|
@@ -224,9 +224,9 @@ require_paths:
|
|
224
224
|
- lib
|
225
225
|
required_ruby_version: !ruby/object:Gem::Requirement
|
226
226
|
requirements:
|
227
|
-
- - "
|
227
|
+
- - "~>"
|
228
228
|
- !ruby/object:Gem::Version
|
229
|
-
version: '0'
|
229
|
+
version: '2.0'
|
230
230
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
231
231
|
requirements:
|
232
232
|
- - ">="
|