fast_ignore 0.12.1 → 0.15.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ class FastIgnore
4
+ class UnmatchableRule
5
+ class << self
6
+ def squash(_)
7
+ self
8
+ end
9
+
10
+ def squashable_type
11
+ 5
12
+ end
13
+
14
+ def component_rules_count
15
+ 1
16
+ end
17
+
18
+ def dir_only?
19
+ false
20
+ end
21
+
22
+ def file_only?
23
+ false
24
+ end
25
+
26
+ def shebang?
27
+ false
28
+ end
29
+
30
+ # :nocov:
31
+ def inspect
32
+ '#<UnmatchableRule>'
33
+ end
34
+ # :nocov:
35
+
36
+ def match?(_relative_path, _full_path, _filename, _content)
37
+ false
38
+ end
39
+ end
40
+ end
41
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class FastIgnore
4
- VERSION = '0.12.1'
4
+ VERSION = '0.15.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fast_ignore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.15.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dana Sherson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-24 00:00:00.000000000 Z
11
+ date: 2020-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.2.2
33
+ version: 0.4.0
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 0.2.2
40
+ version: 0.4.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: pry
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -86,28 +86,28 @@ dependencies:
86
86
  requirements:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 0.74.0
89
+ version: 0.93.1
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: 0.74.0
96
+ version: 0.93.1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rubocop-rspec
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: '1'
103
+ version: 1.44.1
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
- version: '1'
110
+ version: 1.44.1
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: simplecov
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -143,35 +143,23 @@ executables: []
143
143
  extensions: []
144
144
  extra_rdoc_files: []
145
145
  files:
146
- - ".gitignore"
147
- - ".leftovers.yml"
148
- - ".rspec"
149
- - ".rubocop.yml"
150
- - ".simplecov"
151
- - ".spellr.yml"
152
- - ".spellr_wordlists/english.txt"
153
- - ".spellr_wordlists/ruby.txt"
154
- - ".spellr_wordlists/shell.txt"
155
- - ".travis.yml"
156
146
  - CHANGELOG.md
157
- - Gemfile
158
147
  - LICENSE.txt
159
148
  - README.md
160
- - Rakefile
161
- - bin/console
162
- - bin/ls
163
- - bin/ls_seconds
164
- - bin/setup
165
- - bin/time
166
- - fast_ignore.gemspec
167
149
  - lib/fast_ignore.rb
168
150
  - lib/fast_ignore/backports.rb
169
- - lib/fast_ignore/fn_match_to_re.rb
151
+ - lib/fast_ignore/file_root.rb
152
+ - lib/fast_ignore/gitignore_include_rule_builder.rb
153
+ - lib/fast_ignore/gitignore_rule_builder.rb
154
+ - lib/fast_ignore/gitignore_rule_regexp_builder.rb
155
+ - lib/fast_ignore/gitignore_rule_scanner.rb
156
+ - lib/fast_ignore/global_gitignore.rb
170
157
  - lib/fast_ignore/rule.rb
171
158
  - lib/fast_ignore/rule_builder.rb
172
159
  - lib/fast_ignore/rule_set.rb
173
- - lib/fast_ignore/rule_set_builder.rb
160
+ - lib/fast_ignore/rule_sets.rb
174
161
  - lib/fast_ignore/shebang_rule.rb
162
+ - lib/fast_ignore/unmatchable_rule.rb
175
163
  - lib/fast_ignore/version.rb
176
164
  homepage: https://github.com/robotdana/fast_ignore
177
165
  licenses:
@@ -179,16 +167,16 @@ licenses:
179
167
  metadata:
180
168
  homepage_uri: https://github.com/robotdana/fast_ignore
181
169
  source_code_uri: https://github.com/robotdana/fast_ignore
182
- changelog_uri: https://github.com/robotdana/fast_ignore/blob/master/CHANGELOG.md
170
+ changelog_uri: https://github.com/robotdana/fast_ignore/blob/main/CHANGELOG.md
183
171
  post_install_message:
184
172
  rdoc_options: []
185
173
  require_paths:
186
174
  - lib
187
175
  required_ruby_version: !ruby/object:Gem::Requirement
188
176
  requirements:
189
- - - "~>"
177
+ - - ">="
190
178
  - !ruby/object:Gem::Version
191
- version: '2.4'
179
+ version: 2.4.0
192
180
  required_rubygems_version: !ruby/object:Gem::Requirement
193
181
  requirements:
194
182
  - - ">="
data/.gitignore DELETED
@@ -1,6 +0,0 @@
1
- /.bundle/
2
- /coverage/
3
- /pkg/
4
- .rspec_status
5
- *.gem
6
- Gemfile.lock
@@ -1,5 +0,0 @@
1
- exclude_paths:
2
- - vendor
3
- rules:
4
- - names: allowed? # public api
5
- skip: true
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
@@ -1,216 +0,0 @@
1
- require: rubocop-rspec
2
-
3
- # Reference:
4
- # https://rubocop.readthedocs.io/en/latest/
5
-
6
- # Keep this in alphabetical order.
7
- # Each override should have a comment (even if it's just "default is bad")
8
-
9
- AllCops:
10
- NewCops: enable
11
- Exclude:
12
- - db/schema*
13
- - .bundle/**/*
14
- - tmp/**/*
15
- - vendor/**/*
16
- DisplayCopNames: true
17
- DisplayStyleGuide: true
18
- TargetRubyVersion: 2.4
19
-
20
- # all of our layout customisations are because we prefer indentation to be
21
- # always consistently 2 spaces, for blocks, scopes, multiline expressions, etc
22
- # e.g.
23
- # class Klass
24
- # def method(arg1,
25
- # arg2)
26
- # value = if arg1 == 'value' && arg2 == 'value'
27
- # method2
28
- # .method(arg_a, arg_b,
29
- # arg_c, arg_d, keyword1: true,
30
- # keyword2: true) do
31
- # @last = [
32
- # arg_a, arg_b,
33
- # arg_c, arg_d
34
- # ]
35
- # end
36
- # end
37
- # value
38
- # end
39
- # end
40
-
41
- # to match our preference for consistent indentation
42
- Layout/HashAlignment:
43
- EnforcedLastArgumentHashStyle: always_ignore
44
-
45
- # to match our preference for consistent indentation
46
- Layout/ParameterAlignment:
47
- EnforcedStyle: with_fixed_indentation
48
-
49
- # to match our preference for consistent indentation
50
- Layout/BlockAlignment:
51
- EnforcedStyleAlignWith: start_of_block
52
-
53
- # to match our preference for consistent indentation
54
- Layout/CaseIndentation:
55
- EnforcedStyle: end
56
-
57
- # to match our preference for consistent indentation
58
- Layout/EndAlignment:
59
- EnforcedStyleAlignWith: start_of_line
60
-
61
- # Aligning Assignments, etc makes diffs noisy
62
- Layout/ExtraSpacing:
63
- AllowForAlignment: false
64
-
65
- # to match our preference for consistent indentation
66
- Layout/FirstArrayElementLineBreak:
67
- Enabled: true
68
-
69
- # to match our preference for consistent indentation
70
- Layout/FirstHashElementLineBreak:
71
- Enabled: true
72
-
73
- # to match our preference for consistent indentation
74
- Layout/FirstArgumentIndentation:
75
- EnforcedStyle: consistent
76
-
77
- # to match our preference for consistent indentation
78
- Layout/FirstArrayElementIndentation:
79
- EnforcedStyle: consistent
80
-
81
- # to match our preference for consistent indentation
82
- Layout/FirstHashElementIndentation:
83
- EnforcedStyle: consistent
84
-
85
- Layout/LineLength:
86
- Max: 120
87
-
88
- # to match our preference for consistent indentation
89
- # and hanging assignment looks lost
90
- Layout/MultilineAssignmentLayout:
91
- EnforcedStyle: same_line
92
-
93
- # this changes our preferred:
94
- # value = if thing1 &&
95
- # thing2
96
- # to:
97
- # value = if thing1 &&
98
- # thing2
99
- # even though the IndentationWidth is 2
100
- # but it's right most of the time so I put up with it
101
- Layout/MultilineOperationIndentation:
102
- EnforcedStyle: indented
103
-
104
- Layout/MultilineMethodCallIndentation:
105
- EnforcedStyle: indented
106
-
107
- # Temporarily disable this spec as a recent change has broken it for us:
108
- # https://github.com/rubocop-hq/rubocop/issues/6254
109
- Layout/RescueEnsureAlignment:
110
- Enabled: false
111
-
112
- Metrics:
113
- CountComments: false
114
-
115
- Metrics/BlockLength:
116
- ExcludedMethods:
117
- - configure
118
- - describe
119
- - context
120
- - shared_examples
121
-
122
- Metrics/CyclomaticComplexity:
123
- Enabled: false
124
-
125
- Metrics/PerceivedComplexity:
126
- Enabled: false
127
-
128
- RSpec:
129
- Enabled: true
130
- Include:
131
- - 'spec/**/*.rb'
132
-
133
- RSpec/DescribeClass:
134
- Enabled: false
135
-
136
- # I misuse matchers often
137
- RSpec/ExpectActual:
138
- Enabled: false
139
-
140
- RSpec/FilePath:
141
- Enabled: false
142
-
143
- # Multiple expectations are useful
144
- # checking you've partially achieved something on the way to completely achieving it is useful for debugging failures
145
- RSpec/MultipleExpectations:
146
- Enabled: false
147
-
148
- # It should be obvious from context. Chill out rubocop
149
- RSpec/NamedSubject:
150
- Enabled: false
151
-
152
- RSpec/NestedGroups:
153
- Max: 7
154
-
155
- # This matches the style we've been using all along (ever so slightly more frequently)
156
- Style/Alias:
157
- EnforcedStyle: prefer_alias_method
158
-
159
- Style/CollectionMethods:
160
- Enabled: true
161
-
162
- # we don't rdoc
163
- Style/Documentation:
164
- Enabled: false
165
-
166
- # this can mess with the balance of symmetric cases
167
- Style/IfInsideElse:
168
- Enabled: false
169
-
170
- # [a, b].include?(x) is more unclear than a == x || b == x
171
- Style/MultipleComparison:
172
- Enabled: false
173
-
174
- # it's microscopically faster
175
- Style/Not:
176
- Enabled: false
177
-
178
- # we use %w{} pretty frequently
179
- Style/PercentLiteralDelimiters:
180
- PreferredDelimiters:
181
- default: '{}'
182
- '%w': '{}'
183
- '%W': '{}'
184
- '%i': '{}'
185
- '%I': '{}'
186
- '%r': '{}'
187
-
188
- # We want this to warn to force consistency within the codebase.
189
- Style/SafeNavigation:
190
- Enabled: true
191
-
192
- # different methods calls that do exactly the same thing are a smell, regardless of semantics
193
- Style/SignalException:
194
- EnforcedStyle: only_raise
195
-
196
- # this wants less descriptive names
197
- Style/SingleLineBlockParams:
198
- Enabled: false
199
-
200
- Style/SymbolArray:
201
- Enabled: false
202
-
203
- Style/WordArray:
204
- Enabled: false
205
-
206
- Style/HashEachMethods:
207
- Enabled: true
208
-
209
- Style/HashTransformKeys:
210
- Enabled: true
211
-
212
- Style/HashTransformValues:
213
- Enabled: true
214
-
215
- Style/CommentedKeyword:
216
- Enabled: false
data/.simplecov DELETED
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- SimpleCov.start do
4
- add_filter '/backports'
5
- add_filter '/spec/'
6
- if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.5')
7
- enable_coverage(:branch)
8
- minimum_coverage line: 100, branch: 100
9
- else
10
- minimum_coverage 100
11
- end
12
- end
@@ -1,5 +0,0 @@
1
- excludes:
2
- - vendor
3
- languages:
4
- english:
5
- locale: [US, AU]
@@ -1,62 +0,0 @@
1
- argv
2
- backports
3
- baz
4
- changelog
5
- codebase
6
- config
7
- cov
8
- cyclomatic
9
- enoent
10
- enumerables
11
- env
12
- errno
13
- esque
14
- excludesfile
15
- extensionless
16
- fancyignore
17
- filesystem
18
- fnmatch
19
- frotz
20
- gemfile
21
- gitconfig
22
- github
23
- gitignore
24
- gitkeep
25
- hashbang
26
- includefile
27
- janky
28
- jruby
29
- klass
30
- llo
31
- memoize
32
- nocov
33
- noninfringement
34
- params
35
- pathspec
36
- pwd
37
- rdoc
38
- regexp
39
- rspec
40
- rubo
41
- rubocop
42
- rubygems
43
- rubyish
44
- rulesets
45
- rvm
46
- sherson
47
- simplecov
48
- stdin
49
- subdir
50
- substring
51
- sudo
52
- symlinks
53
- tmp
54
- toplevel
55
- txt
56
- unrecursive
57
- upcase
58
- usr
59
- webpack
60
- xconfig
61
- xdg
62
- zsh