Skip to content

Commit 5267a5c

Browse files
authored
Revert spec insert changes (#10717)
* Revert spec insert changes Signed-off-by: Fanit Kolchina <[email protected]> * Configure RuboCop to allow predicate methods for Mustache templates Signed-off-by: Fanit Kolchina <[email protected]> * Disable predicate rule Signed-off-by: Fanit Kolchina <[email protected]> * Change predicate name to method Signed-off-by: Fanit Kolchina <[email protected]> * Add back ambiguous range correction Signed-off-by: Fanit Kolchina <[email protected]> --------- Signed-off-by: Fanit Kolchina <[email protected]>
1 parent 454af56 commit 5267a5c

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

spec-insert/.rubocop.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,7 @@ Style/SingleLineMethods:
2828
Naming/FileName:
2929
Exclude:
3030
- 'lib/jekyll-spec-insert.rb' # For Jekyll to recognize the plugin
31+
32+
# Allow predicate methods without ? for Mustache template compatibility
33+
Naming/PredicateMethod:
34+
Enabled: false

spec-insert/lib/renderers/path_parameters.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def table
1111
ParameterTableRenderer.new(params, @args).render
1212
end
1313

14-
def optional?
14+
def optional
1515
params.none?(&:required)
1616
end
1717

spec-insert/lib/renderers/query_parameters.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def table
1111
ParameterTableRenderer.new(params, @args).render
1212
end
1313

14-
def optional?
14+
def optional
1515
params.none?(&:required)
1616
end
1717

spec-insert/lib/reports/dry_run_report.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def initialize
1717
generate_dry_runs
1818
end
1919

20-
def any_errors?
20+
def any_errors
2121
@errors_report.keys.any?
2222
end
2323

spec-insert/spec/_fixtures/expected_output/url_params_tables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ component: path_parameters
66
-->
77
## Path parameters
88

9-
The following table lists the available path parameters.
9+
The following table lists the available path parameters. All path parameters are optional.
1010

1111
| Parameter | Data type | Description |
1212
| :--- | :--- | :--- |

0 commit comments

Comments
 (0)