chutney 3.0.0.beta.1 → 3.0.0.beta.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3eb2bbfa506f0fde529c0365064ffe21e6f102e37d3790e138e09c972c07319d
4
- data.tar.gz: 8951672afdbf61863d949ebce24862f203395a931228bd98a0fe1d401ad1544f
3
+ metadata.gz: c99f32f7cba016b8d419d1867c5005b448e05939565afff74db238c68222f2d9
4
+ data.tar.gz: 9f21a905656a69d4bbfc7288b7abcec37e36e3fb5950c852aa8c6e4183e52cd9
5
5
  SHA512:
6
- metadata.gz: d41e8f3694940cb023fd03192b973a3778366e2745b544e8003f8d2f02c65285de6c7e9b8e254e89ce714732474c0837db8487da0eefbaba77ed405a02cf4f57
7
- data.tar.gz: 1a3f433eb45190171bad88ca533e65f533f59ff5d2c2654a3da41b4f585b3abab3a6814824b0925ea0973ba76e331ce2bb9ab9345cd2f73ae1d242f64641eaff
6
+ metadata.gz: 3a4339e31214900e809bdbdaf968a2d21af9bc7526365cd2f00a17745b10272947114c018e6b182c6679769636ffc127d6880d69dbbbb8dc66f0d5f5762a410d
7
+ data.tar.gz: b755781258f1781e4586a77f639682b7ebb0a584d50aa0c001a7eca5c5e8b0c16487b2d1dd1978e97744c5f7ec163ea169ae8d9c6114e1ed22cda716e3173a34
data/README.md CHANGED
@@ -20,3 +20,7 @@
20
20
  </div>
21
21
 
22
22
  Read the documentation [here](https://billyruffian.github.io/chutney/).
23
+
24
+ ## Notes
25
+
26
+ Chutney 3+ (in beta) has replaced its direct dependency on Cucumber and instead uses the excellent [cuke_modeller](https://github.com/enkessler/cuke_modeler) to parse your feature files.
@@ -15,8 +15,12 @@ Gem::Specification.new do |spec|
15
15
  spec.email = ['nigel@brookes-thomas.co.uk']
16
16
 
17
17
  spec.summary = 'A linter for multi-lingual Gherkin'
18
- spec.description = 'A linter for your Cucumber features. ' \
19
- 'It supports any spoken language Cucumber supports.'
18
+ spec.description = 'A linter for your Cucumber features. ' \
19
+ 'Making sure you have nice, expressible Gherkin is ' \
20
+ 'essential is making sure you have a readable test-base. ' \
21
+ 'Chutney is designed to sniff out smells in your feature ' \
22
+ 'files. ' \
23
+ 'It supports any spoken language Cucumber supports.'
20
24
 
21
25
  spec.homepage = 'https://billyruffian.github.io/chutney/'
22
26
  spec.license = 'MIT'
@@ -46,7 +50,6 @@ Gem::Specification.new do |spec|
46
50
 
47
51
  spec.add_runtime_dependency 'amatch', '~> 0.4.0'
48
52
  spec.add_runtime_dependency 'cuke_modeler', '~> 3.3'
49
- spec.add_runtime_dependency 'gherkin', '>= 5.1.0', '< 9.1'
50
53
  spec.add_runtime_dependency 'i18n', '~> 1.8.2'
51
54
  spec.add_runtime_dependency 'pastel', '~> 0.7'
52
55
  spec.add_runtime_dependency 'tty-pie', '~> 0.3'
@@ -19,6 +19,24 @@ OptionParser.new do |opts|
19
19
 
20
20
  formatters << formatter
21
21
  end
22
+
23
+ opts.on('-l',
24
+ '--linters',
25
+ 'List the linter status by this configuration and exit') do
26
+ pastel = Pastel.new
27
+ chutney_config = Chutney::ChutneyLint.new.configuration
28
+ max_name_length = chutney_config.keys.map(&:length).max + 1
29
+ chutney_config.each do |linter, value|
30
+ print pastel.cyan(linter.ljust(max_name_length))
31
+
32
+ if value['Enabled']
33
+ puts pastel.green('enabled')
34
+ else
35
+ puts pastel.red('disabled')
36
+ end
37
+ end
38
+ exit
39
+ end
22
40
  end.parse!
23
41
 
24
42
  formatters << 'RainbowFormatter' if formatters.empty?
@@ -60,7 +60,7 @@ module Chutney
60
60
  i18n_paths = Dir[File.expand_path(File.join(__dir__, 'config/locales')) + '/*.yml']
61
61
  return if I18n.load_path.include?(i18n_paths)
62
62
 
63
- I18n.load_path << i18n_paths
63
+ I18n.load_path += i18n_paths
64
64
  end
65
65
 
66
66
  def configuration
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
-
3
2
  require 'delegate'
3
+
4
4
  module Chutney
5
5
  # gherkin_lint configuration object
6
6
  class Configuration < SimpleDelegator
@@ -20,7 +20,11 @@ module Chutney
20
20
  end
21
21
 
22
22
  def load_user_configuration
23
- config_file = Dir.glob(File.join(Dir.pwd, '**', '.chutney.yml')).first
23
+ config_files = ['chutney.yml', '.chutney.yml'].map do |fname|
24
+ Dir.glob(File.join(Dir.pwd, '**', fname))
25
+ end.flatten
26
+
27
+ config_file = config_files.first
24
28
  merge_config(config_file) if !config_file.nil? && File.exist?(config_file)
25
29
  end
26
30
 
@@ -18,7 +18,7 @@ module Chutney
18
18
  linter.filter { |l| !l[:issues].empty? }.each do |linter_with_issues|
19
19
 
20
20
  put_linter(linter_with_issues)
21
- linter_with_issues[:issues].each { |i| put_issue(i) }
21
+ linter_with_issues[:issues].each { |i| put_issue(file, i) }
22
22
  end
23
23
  end
24
24
  put_summary
@@ -32,8 +32,9 @@ module Chutney
32
32
  puts @pastel.red(" #{linter[:linter]}")
33
33
  end
34
34
 
35
- def put_issue(issue)
36
- puts " #{@pastel.dim(issue.dig(:location, :line))} #{issue[:message]}"
35
+ def put_issue(file, issue)
36
+ puts " #{issue[:message]}"
37
+ puts " #{@pastel.dim file.to_s}:#{@pastel.dim(issue.dig(:location, :line))}"
37
38
  end
38
39
 
39
40
  def put_summary
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Chutney
4
- VERSION = '3.0.0.beta.1'
4
+ VERSION = '3.0.0.beta.2'
5
5
  end
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.0.0.beta.1
4
+ version: 3.0.0.beta.2
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: 2020-09-02 00:00:00.000000000 Z
14
+ date: 2020-09-17 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: amatch
@@ -41,26 +41,6 @@ dependencies:
41
41
  - - "~>"
42
42
  - !ruby/object:Gem::Version
43
43
  version: '3.3'
44
- - !ruby/object:Gem::Dependency
45
- name: gherkin
46
- requirement: !ruby/object:Gem::Requirement
47
- requirements:
48
- - - ">="
49
- - !ruby/object:Gem::Version
50
- version: 5.1.0
51
- - - "<"
52
- - !ruby/object:Gem::Version
53
- version: '9.1'
54
- type: :runtime
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- version: 5.1.0
61
- - - "<"
62
- - !ruby/object:Gem::Version
63
- version: '9.1'
64
44
  - !ruby/object:Gem::Dependency
65
45
  name: i18n
66
46
  requirement: !ruby/object:Gem::Requirement
@@ -215,8 +195,10 @@ dependencies:
215
195
  - - "~>"
216
196
  - !ruby/object:Gem::Version
217
197
  version: '3.8'
218
- description: A linter for your Cucumber features. It supports any spoken language
219
- Cucumber supports.
198
+ description: A linter for your Cucumber features. Making sure you have nice, expressible
199
+ Gherkin is essential is making sure you have a readable test-base. Chutney is designed
200
+ to sniff out smells in your feature files. It supports any spoken language Cucumber
201
+ supports.
220
202
  email:
221
203
  - nigel@brookes-thomas.co.uk
222
204
  executables: