code_manifest 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/code_manifest/manifest.rb +7 -6
- data/lib/code_manifest/rule.rb +2 -5
- data/lib/code_manifest/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85dc605af26d3707bb98d61bf27ff898bb8582c5a11220b3b5d54bf17fc1f824
|
4
|
+
data.tar.gz: 856aa8f8a5e703e076aedfa4c4676245e6786eaa7ad834f967bfa8864b00ecee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d36a050c65f13dac20af4a540007ad8ef5c8c396492c93a51541bcdffee3ec8413ce0e78d8b62e2c9c821f7a073817bad96f380058c4f5c2f02cc507c60269b0
|
7
|
+
data.tar.gz: 597149b71d2a7514989de7843e75621124b15e883a7d5e8bb62e935b3a834f514fedb2cf00f78b13fcfa86790efa6c1e8dd428dd0f50ddbd92c12ead27a8c560
|
@@ -27,7 +27,7 @@ module CodeManifest
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def matches(paths)
|
30
|
-
result_paths = paths.select do |path|
|
30
|
+
result_paths = Array(paths).select do |path|
|
31
31
|
inclusion_rules.any? { |rule| rule.match?(path) }
|
32
32
|
end
|
33
33
|
result_paths.reject! do |path|
|
@@ -56,12 +56,13 @@ module CodeManifest
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def files_with_relative_path(files)
|
59
|
-
|
60
|
-
pathname = Pathname.new(file)
|
61
|
-
next if pathname.directory?
|
59
|
+
prefix = File.join(CodeManifest.root, "/")
|
62
60
|
|
63
|
-
|
64
|
-
|
61
|
+
files.filter_map do |file|
|
62
|
+
next if File.directory?(file)
|
63
|
+
|
64
|
+
file.delete_prefix(prefix)
|
65
|
+
end
|
65
66
|
end
|
66
67
|
end
|
67
68
|
end
|
data/lib/code_manifest/rule.rb
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'pathname'
|
4
|
-
|
5
3
|
module CodeManifest
|
6
4
|
class Rule
|
7
5
|
attr_reader :exclude, :glob
|
@@ -26,10 +24,9 @@ module CodeManifest
|
|
26
24
|
end
|
27
25
|
|
28
26
|
def match?(file)
|
29
|
-
file =
|
30
|
-
file = @root.join(file) unless file.absolute?
|
27
|
+
file = File.join(@root, file) unless File.absolute_path?(file)
|
31
28
|
|
32
|
-
File.fnmatch?(glob, file
|
29
|
+
File.fnmatch?(glob, file, Manifest::GLOB_OPTIONS)
|
33
30
|
end
|
34
31
|
end
|
35
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: code_manifest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gusto Engineers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -41,7 +41,7 @@ licenses: []
|
|
41
41
|
metadata:
|
42
42
|
homepage_uri: https://github.com/rubyatscale/code_manifest
|
43
43
|
source_code_uri: https://github.com/rubyatscale/code_manifest
|
44
|
-
changelog_uri: https://github.com/rubyatscale/code_manifest/
|
44
|
+
changelog_uri: https://github.com/rubyatscale/code_manifest/releases
|
45
45
|
post_install_message:
|
46
46
|
rdoc_options: []
|
47
47
|
require_paths:
|