danger-spec_postfix 0.0.5 → 0.0.6

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: f994553adae976417f7e7b521b26896c1268ea3a84b33a0f194bea84cc3b1575
4
- data.tar.gz: 8bd8f8b3c83d9f5cb819e8d903034ae60e5327ead7e8b86a3f456c017b4ad1db
3
+ metadata.gz: acf829f0845c574d42a1fb15cc83470b25574042efd05749ec3b533bde18dcaf
4
+ data.tar.gz: fc48c175541ec881fc91779b353201bfa7556b0a51ec4dd673db0d37724a1478
5
5
  SHA512:
6
- metadata.gz: 7896330e819c4184977dc42df31fccfd4e5ca336b99a76be90eaa0a1cd78888e9ae860ba3b6f3fc3ad4e8ffc393cecbb749820011801acbe1ae09dc1c06fd18d
7
- data.tar.gz: 1e42be75ca36f539a36d73dfc4c40c1237202d0ff38155fdd0beef76f81f606242852b6ddbbb924cafbf74e3445927da1da470fe9c8f1bca2a595c401985d34a
6
+ metadata.gz: 4a629d1298c250bbcfdebb1d117a021de6760d23b6e5081110e9b36e9dc46f480eb2e449ae53fb534ceb286a71456c1ce2d2f76401719ba5df45f2fcf1c86d8d
7
+ data.tar.gz: cd7976ffc6b336ad6293dba8fc7bafe1962d85426b6833d86e245ad014c7bb2e590f07dbb80ff6f2d6263922356410f0f81578236cd79e8681146c21c1cdacbf
data/.gitignore ADDED
@@ -0,0 +1,18 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ usage.rb
7
+ Gemfile.lock
8
+ InstalledFiles
9
+ _yardoc
10
+ coverage
11
+ doc/
12
+ lib/bundler/man
13
+ pkg
14
+ rdoc
15
+ spec/reports
16
+ test/tmp
17
+ test/version_tmp
18
+ tmp
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- danger-spec_postfix (0.0.5)
4
+ danger-spec_postfix (0.0.6)
5
5
  danger-plugin-api (~> 1.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -8,17 +8,22 @@ Danger plugin to validate files (or directories) naming.
8
8
 
9
9
  ## Example of usage
10
10
 
11
- Add to your Dangerfile:
11
+ 1. Add lint to your Dangerfile (specifying what you want to check and how)
12
12
 
13
+ For example in order to make sure that all tests in your 'spec/' folder have required postfix '_spec' (this is the purpose plugin was initially built for) add:
14
+
15
+ ```
13
16
  options = {
14
17
  message: 'Tests should have `_spec` postfix',
15
18
  scope: %r{spec/},
16
19
  match: %r{_spec.rb$}
17
20
  }
18
21
  spec_postfix.lint(options)
22
+ ```
19
23
 
20
24
  You can also pass `exceptions` param in order to skip irrelevant files or directories:
21
25
 
26
+ ```
22
27
  options = {
23
28
  message: 'Tests should have `_spec` postfix',
24
29
  scope: %r{spec/},
@@ -26,6 +31,13 @@ Danger plugin to validate files (or directories) naming.
26
31
  exception: Regexp.union(%r{rails_helper.rb}, %r{rails_helper.rb}, %{spec/factories/}, %r{spec/support/})
27
32
  }
28
33
  spec_postfix.lint(options)
34
+ ```
35
+
36
+ 2. Get warnings:
37
+
38
+ ```
39
+ "Tests should have `_spec` postfix: spec/models/test_without_postfix.rb"
40
+ ```
29
41
 
30
42
  ## Development
31
43
 
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.version = SpecPostfix::VERSION
10
10
  spec.authors = ['Igor Udalov']
11
11
  spec.email = ['i.udalov@rambler-co.ru']
12
- spec.summary = "Danger plugin to validate '_spec' postfix in tests"
12
+ spec.summary = "Danger plugin to validate files (or directories) naming."
13
13
  spec.homepage = 'https://github.com/rambler-digital-solutions/danger-spec_postfix'
14
14
  spec.license = 'MIT'
15
15
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SpecPostfix
4
- VERSION = '0.0.5'
4
+ VERSION = '0.0.6'
5
5
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Danger
4
- # Lints the test files. Will fail if any has no '_spec' postfix.
4
+ # Lints files (or directories) naming.
5
5
  # Generates a `string` with warning.
6
6
  #
7
7
  # @param [Array<String>] files
@@ -10,7 +10,7 @@ module Danger
10
10
  # @param scope [Regexp] Scope of check
11
11
  # @param match [Regexp] Pattern to match
12
12
  # @param message [String] Warn message
13
- # @param exception [Regexp] Not required. In case you get some directories or files out of scope.
13
+ # @param exception [Regexp] Not required. In case you want to get some directories or files out of scope.
14
14
  # @return [void]
15
15
  #
16
16
  class DangerSpecPostfix < Plugin
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-spec_postfix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Udalov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-17 00:00:00.000000000 Z
11
+ date: 2023-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: danger-plugin-api
@@ -171,6 +171,7 @@ executables: []
171
171
  extensions: []
172
172
  extra_rdoc_files: []
173
173
  files:
174
+ - ".gitignore"
174
175
  - Gemfile
175
176
  - Gemfile.lock
176
177
  - Guardfile
@@ -206,7 +207,7 @@ requirements: []
206
207
  rubygems_version: 3.1.6
207
208
  signing_key:
208
209
  specification_version: 4
209
- summary: Danger plugin to validate '_spec' postfix in tests
210
+ summary: Danger plugin to validate files (or directories) naming.
210
211
  test_files:
211
212
  - spec/spec_helper.rb
212
213
  - spec/spec_postfix_spec.rb