chutney 3.8.1 → 3.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 06e7bafb2c4fb8f14e168e16a2f83a5aaf958f6a4d3430678f9f0c9da954835e
4
- data.tar.gz: 07c8004a2cbd18de1ed90ab634df369c9548b1b7e952f8d111890924ccb77b67
3
+ metadata.gz: 8fb7860cfd94d79eb4aae1f69269c7aa0178d81cb155844dac4b67905e5caf55
4
+ data.tar.gz: 710d27816dfa2226e9b5384e88c7cd568a6096bea8e9078bd1898ee4eab5f218
5
5
  SHA512:
6
- metadata.gz: 1904c405fb2f33997023ee7628ad5371c9f5b621850c193dd09c7d057b5d5e9f7a8dabdad98ef3ee24b40cb71348d5fa8f51ee2e7ef8154e069319237f2bd430
7
- data.tar.gz: 9add005095ab65e1ec8d858379ac231d8457b0ff99f7b55f5518772e8255dccfa0145d02325a9f3b52e5641caf7052cf48c722b591dc14798cba1eed44231ba2
6
+ metadata.gz: a7d58d734669f76a342c4a570c1cca7ae179d1439f0426b256f673f48772a3709bec4e327ca6ee5e198493d4e5951ab4158e68d4bb333f70ce6def94f7aa0acf
7
+ data.tar.gz: e71d49b4ef0d6a6acbb21e601d8cd6ec55b100bcc63ac87199b8aace0b43e28d53279f68c9a38f6f620f30511d22dc86b48f1e70decec3e898f32038bea742de
data/chutney.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  'files. ' \
23
23
  'It supports any spoken language Cucumber supports.'
24
24
 
25
- spec.homepage = 'https://billyruffian.github.io/chutney/'
25
+ spec.homepage = 'https://www.usechutney.com/'
26
26
  spec.license = 'MIT'
27
27
 
28
28
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
data/docs/index.md CHANGED
@@ -5,6 +5,9 @@ nav_order: 1
5
5
  permalink: /
6
6
  ---
7
7
 
8
+ # These docs are deprecated
9
+ ## Please visit [usechutney.com](https://www.usechutney.com/) for the latest documentation
10
+
8
11
  # Best practice for Cucumber
9
12
  {: .fs-9 }
10
13
 
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Chutney
4
+ # service class to lint for too many tags
5
+ class AvoidCommaInTags < Linter
6
+ def lint
7
+ scenarios do |feature, scenario|
8
+ tags = tags_for(feature) + tags_for(scenario)
9
+ next unless tags.any? { |tag| tag.include?(',') }
10
+
11
+ add_issue(
12
+ I18n.t('linters.avoid_comma_in_tags'),
13
+ feature
14
+ )
15
+ end
16
+ end
17
+ end
18
+ end
@@ -8,7 +8,7 @@ module Chutney
8
8
  def lint
9
9
  filled_scenarios do |feature, scenario|
10
10
  characters = scenario.steps.map { |step| step.text.length }.inject(0, :+)
11
- next if characters < 400
11
+ next if characters <= 400
12
12
 
13
13
  add_issue(
14
14
  I18n.t('linters.too_clumsy', length: characters), feature, scenario
@@ -134,6 +134,8 @@ module Chutney
134
134
  end
135
135
 
136
136
  def to_range(location)
137
+ return { start: { character: 0, line: 0 }, end: { character: 0, line: 0 } } unless location
138
+
137
139
  {
138
140
  start: { character: location.fetch(:column, 1) - 1, line: location.fetch(:line, 1) - 1 },
139
141
  end: { character: 0, line: location.fetch(:line, 1) }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Chutney
4
- VERSION = '3.8.1'
4
+ VERSION = '3.9.0'
5
5
  end
data/lib/chutney.rb CHANGED
@@ -4,6 +4,7 @@ require 'amatch'
4
4
 
5
5
  require 'chutney/configuration'
6
6
  require 'chutney/linter'
7
+ require 'chutney/linter/avoid_comma_in_tags'
7
8
  require 'chutney/linter/avoid_full_stop'
8
9
  require 'chutney/linter/avoid_outline_for_single_example'
9
10
  require 'chutney/linter/avoid_scripting'
@@ -3,6 +3,8 @@
3
3
  # God save the Queen, etc. etc.
4
4
  en:
5
5
  linters:
6
+ avoid_comma_in_tags: >-
7
+ Avoid using commas in tags. Tags should be separated by spaces.
6
8
  avoid_full_stop: >- # https://en.wikipedia.org/wiki/Full_stop
7
9
  Avoid using a full-stop in steps so that it is easier to re-use them.
8
10
  avoid_outline_for_single_example: >-
@@ -74,7 +74,7 @@ masthead_title: # overrides the website title displayed in the masthead, use " "
74
74
  breadcrumbs: # true, false (default)
75
75
  words_per_minute: 200
76
76
  enable_copy_code_button: true # true, false (default)
77
- copyright: # "copyright" name, defaults to site.title
77
+ copyright: Nigel Brookes-Thomas # "copyright" name, defaults to site.title
78
78
  copyright_url: # "copyright" URL, defaults to site.url
79
79
  comments:
80
80
  provider: # false (default), "disqus", "discourse", "facebook", "staticman", "staticman_v2", "utterances", "giscus", "custom"
@@ -159,17 +159,18 @@ author:
159
159
  # url: "https://instagram.com/"
160
160
 
161
161
  # Site Footer
162
- # footer:
163
- # links:
164
- # - label: "Twitter"
165
- # icon: "fab fa-fw fa-twitter-square"
166
- # # url:
167
- # - label: "Facebook"
168
- # icon: "fab fa-fw fa-facebook-square"
169
- # # url:
170
- # - label: "GitHub"
171
- # icon: "fab fa-fw fa-github"
172
- # # url:
162
+ footer:
163
+ links:
164
+ # - label: "Twitter"
165
+ # icon: "fab fa-fw fa-twitter-square"
166
+ # # url:
167
+ # - label: "Facebook"
168
+ # icon: "fab fa-fw fa-facebook-square"
169
+ # # url:
170
+
171
+ - label: "GitHub"
172
+ icon: "fab fa-fw fa-github"
173
+ url: https://github.com/BillyRuffian/chutney
173
174
  # - label: "GitLab"
174
175
  # icon: "fab fa-fw fa-gitlab"
175
176
  # # url:
@@ -216,7 +217,7 @@ paginate_path: /page:num/
216
217
  # for configuration details
217
218
  pagination:
218
219
  # Set enabled to true to use paginate v2
219
- enabled: true
220
+ enabled: false
220
221
  debug: false
221
222
  collection: "posts"
222
223
  per_page: 10
@@ -21,4 +21,8 @@ It will listen for open / close and save events to evaluate the current feature
21
21
 
22
22
  ## Editor integrations
23
23
 
24
- TBD.
24
+ ### VS Code
25
+
26
+ [vscode-chutney](https://github.com/BillyRuffian/vscode-chutney) adds Chutney LSP integration into VS Code,
27
+
28
+ You can install this extension from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=NigelBrookes-Thomas.vscode-chutney).
@@ -0,0 +1,26 @@
1
+ ---
2
+ title: "Avoid Comma in Tags"
3
+ layout: single
4
+ permalink: /docs/rules/avoid-comma-in-tags/
5
+ ---
6
+
7
+ Don't put a comma in tags. It's probably a mistake if you have them from trying write a list of tags but the comma will form part of the name and makes it hard to include or exclude the tag from a Cucumber run.
8
+
9
+
10
+ ## Bad
11
+
12
+ ```gherkin
13
+ @web, @login
14
+ Given I have visited the website
15
+ When I log in.
16
+ Then I will see my account
17
+ ```
18
+
19
+ ## Good
20
+
21
+ ```gherkin
22
+ @web @login
23
+ Given I have visited the website
24
+ When I log in
25
+ Then I will see my account
26
+ ```
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chutney
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.1
4
+ version: 3.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nigel Brookes-Thomas
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2024-09-26 00:00:00.000000000 Z
14
+ date: 2024-11-19 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: amatch
@@ -155,6 +155,7 @@ files:
155
155
  - lib/chutney/formatter/rainbow_formatter.rb
156
156
  - lib/chutney/issue.rb
157
157
  - lib/chutney/linter.rb
158
+ - lib/chutney/linter/avoid_comma_in_tags.rb
158
159
  - lib/chutney/linter/avoid_full_stop.rb
159
160
  - lib/chutney/linter/avoid_outline_for_single_example.rb
160
161
  - lib/chutney/linter/avoid_scripting.rb
@@ -213,6 +214,7 @@ files:
213
214
  - usechutney.com/docs/disabling-rules/index.md
214
215
  - usechutney.com/docs/installing/index.md
215
216
  - usechutney.com/docs/language-server/index.md
217
+ - usechutney.com/docs/rules/avoid-comma-in-tags/index.md
216
218
  - usechutney.com/docs/rules/avoid-full-stops/index.md
217
219
  - usechutney.com/docs/rules/avoid-outline-for-single-example/index.md
218
220
  - usechutney.com/docs/rules/avoid-scripting/index.md
@@ -255,11 +257,11 @@ files:
255
257
  - usechutney.com/pages/404.html
256
258
  - usechutney.com/pages/about/index.md
257
259
  - usechutney.com/pages/index.markdown
258
- homepage: https://billyruffian.github.io/chutney/
260
+ homepage: https://www.usechutney.com/
259
261
  licenses:
260
262
  - MIT
261
263
  metadata:
262
- homepage_uri: https://billyruffian.github.io/chutney/
264
+ homepage_uri: https://www.usechutney.com/
263
265
  source_code_uri: https://github.com/BillyRuffian/chutney
264
266
  changelog_uri: https://github.com/BillyRuffian/chutney/releases
265
267
  post_install_message:
@@ -277,7 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
277
279
  - !ruby/object:Gem::Version
278
280
  version: '0'
279
281
  requirements: []
280
- rubygems_version: 3.5.11
282
+ rubygems_version: 3.5.19
281
283
  signing_key:
282
284
  specification_version: 4
283
285
  summary: A linter for multi-lingual Gherkin