danger-spec_postfix 0.0.7 → 0.0.8
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 +4 -4
- data/lib/spec_postfix/gem_version.rb +1 -1
- data/lib/spec_postfix/plugin.rb +12 -12
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e94dcdaa6eb52bb583fdef4533f843d29ccc832f09ab8730d9c4f3c6ceeb780
|
4
|
+
data.tar.gz: e532443dfd5b7badf64345f986aa6e8e05f7ab3925ba0bb0298ba929fd724223
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1295e07b4d9b57469dd87d26c7adb599bd4488108a7a46f746f98d02ca42ac37857de295e8993c4f99b8a2f8d57ee6ca0c4872b8f332f57ead04ebce4093bb9e
|
7
|
+
data.tar.gz: b2d937ab25d4680814d103ee61402e969929f3644fd55172fa08b05f6472e4741dff4360ecaa08a8c3466b288b282d9a2ecd9cabbe3853fcacfa6e8d92601136
|
data/lib/spec_postfix/plugin.rb
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Danger
|
4
|
-
# Lints files (or directories) naming.
|
5
|
-
# Generates a `string` with warning.
|
6
|
-
#
|
7
|
-
# @param [Array<String>] files
|
8
|
-
# A globbed string which should return the files that you want to lint, defaults to nil.
|
9
|
-
# if nil, modified and added files from the diff will be used.
|
10
|
-
# @param include_path [Regexp] Scope of check
|
11
|
-
# @param match [Regexp] Pattern to match
|
12
|
-
# @param message [String] Warn message
|
13
|
-
# @param exclude_path [Regexp] Not required. In case you want to have some directories or files exceptions.
|
14
|
-
# @return [void]
|
15
|
-
#
|
16
4
|
class DangerSpecPostfix < Plugin
|
5
|
+
# Lints files (or directories) naming.
|
6
|
+
# Generates a `string` with warning.
|
7
|
+
#
|
8
|
+
# @param files [Array<String>]
|
9
|
+
# A globbed string which should return the files that you want to lint, defaults to nil.
|
10
|
+
# if nil, modified and added files from the diff will be used.
|
11
|
+
# @param include_path [Regexp] Scope of check
|
12
|
+
# @param match [Regexp] Pattern to match
|
13
|
+
# @param message [String] Warn message
|
14
|
+
# @param exclude_path [Regexp] Not required. In case you want to have some directories or files exceptions.
|
15
|
+
# @return [void]
|
16
|
+
#
|
17
17
|
def lint(include_path:, match:, message:, exclude_path: nil)
|
18
18
|
wrong_files = changed_files.select { |f| f.match?(include_path) }.reject { |f| f.match?(match) }
|
19
19
|
wrong_files = wrong_files.reject { |f| f.match?(exclude_path) } if exclude_path
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-spec_postfix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Udalov
|
@@ -204,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
204
204
|
- !ruby/object:Gem::Version
|
205
205
|
version: '0'
|
206
206
|
requirements: []
|
207
|
-
rubygems_version: 3.
|
207
|
+
rubygems_version: 3.3.26
|
208
208
|
signing_key:
|
209
209
|
specification_version: 4
|
210
210
|
summary: Danger plugin to validate files (or directories) naming.
|