fast_ignore 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 58d10e2bb7f504f6ff41d4ad3fbea902df56aa785d45a78e160a40ea5795a1a0
4
- data.tar.gz: 16a77bf6dbdbb76f8e8f08793dd5a81d21147dcf9d77e72c4403de377025d4f3
3
+ metadata.gz: 02257f4f18a12cf4bae69ef8d4aa79c617f765726ae76a03bccf5391d920031e
4
+ data.tar.gz: 79fc7d4960118dbff36a42a6fae04d69890011842a2bb94c35966e7b9b1f8651
5
5
  SHA512:
6
- metadata.gz: 1de15ac6a8ce01bd18077bc402026cddbfeae82e33bbbd1e0e587d1ff3d898ac0fa43abc211bcf007cf2cec7c1fe00c2b60375760a767818330efc4164b2bf67
7
- data.tar.gz: 7daed034a210e0f56be064400e7264c182f3abaeda13cd857b9d81f5fc6dc8c397195d087dc539a03f21787f65f24e39e87c4a5d182c419c80b00e5848148756
6
+ metadata.gz: be65dc38c204c7b1bfabd9cb61379a3516658c14bdbc242b396da79a247a1663e5d866194118f9da200410815f9888e946d9ac716e59ca9df9892cafede71da2
7
+ data.tar.gz: a6a4178e53e44c46f952e38aa66e7d5b92b90d449bacf449638afded35c82549c543ccd9aeebe1e53f505d0847f585c9be9fd0c13fcfa3f1344990f2faeee57d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # v0.8.1
2
+ - `include_shebang:` can be given non array value
3
+
1
4
  # v0.8.0
2
5
  - drop support for ruby 2.3. My plan is to only support supported ruby versions
3
6
  - add coverage to the pipeline. removed some methods, added some tests, and now we have 100% test coverage
@@ -71,11 +71,13 @@ class FastIgnore
71
71
 
72
72
  rule_set = ::FastIgnore::RuleSet.new(project_root: root, allow: allow, and_no_ext: and_no_ext)
73
73
 
74
- rules.each_with_object(rule_set) do |rule_string, set|
75
- rule_string.each_line do |rule_line|
76
- parse_rules(rule_line, rule_set: set, allow: allow, root: root, expand_path: expand_path)
74
+ rules.each do |rule_string|
75
+ rule_string.to_s.each_line do |rule_line|
76
+ parse_rules(rule_line, rule_set: rule_set, allow: allow, root: root, expand_path: expand_path)
77
77
  end
78
78
  end
79
+
80
+ rule_set
79
81
  end
80
82
 
81
83
  def self.parse_rules(rule_line, rule_set:, allow: false, root: Dir.pwd, expand_path: false)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class FastIgnore
4
- VERSION = '0.8.0'
4
+ VERSION = '0.8.1'
5
5
  end
data/lib/fast_ignore.rb CHANGED
@@ -118,8 +118,8 @@ class FastIgnore
118
118
  end
119
119
 
120
120
  def prepare_shebang_pattern(rules)
121
- return if !rules || rules.empty?
121
+ return if !rules || (rules = Array(rules)).empty?
122
122
 
123
- /\A#!.*\b(?:#{rules.map { |s| Regexp.escape(s.to_s) }.join('|')})\b/.freeze
123
+ /\A#!.*\b(?:#{rules.flat_map { |s| s.to_s.split("\n") }.map { |s| Regexp.escape(s.to_s) }.join('|')})\b/.freeze
124
124
  end
125
125
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fast_ignore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dana Sherson