parse_packwerk 0.12.1 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/parse_packwerk/constants.rb +2 -0
- data/lib/parse_packwerk/package.rb +7 -0
- data/lib/parse_packwerk.rb +7 -0
- 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: bb8eaf8cf0d7746244d7eb4ac00cf61c194d6b676e0abe2d7b1abc87ebb17cad
|
4
|
+
data.tar.gz: bbebdb76de0afa935b311783d33f4aa4f3a70dfc390f6f2004f16644b8e365da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd3ce9a3d6377d2263cc783389d7c0323fd05fb83b54cb74ae6df5e6e93ce82cc83e0f7892d2b2ccf2de85d0147900f72ac163297d6277cb58c3da9c06eafaee
|
7
|
+
data.tar.gz: 96d3ac65cd313847f836ad14878702bf7f944d6a949bd077b650fcca2f39857bb1b4ec869e385c988c781c99058c4761481e85867b06e1697373c5e6b6ac533d
|
@@ -7,6 +7,7 @@ module ParsePackwerk
|
|
7
7
|
DEPRECATED_REFERENCES_YML_NAME = T.let('deprecated_references.yml'.freeze, String)
|
8
8
|
ENFORCE_DEPENDENCIES = T.let('enforce_dependencies'.freeze, String)
|
9
9
|
ENFORCE_PRIVACY = T.let('enforce_privacy'.freeze, String)
|
10
|
+
PUBLIC_PATH = T.let('public_path'.freeze, String)
|
10
11
|
METADATA = T.let('metadata'.freeze, String)
|
11
12
|
DEPENDENCIES = T.let('dependencies'.freeze, String)
|
12
13
|
|
@@ -18,4 +19,5 @@ module ParsePackwerk
|
|
18
19
|
|
19
20
|
DEFAULT_EXCLUDE_GLOBS = T.let(["{bin,node_modules,script,tmp,vendor}/**/*"], T::Array[String])
|
20
21
|
DEFAULT_PACKAGE_PATHS = T.let(['**/'], T::Array[String])
|
22
|
+
DEFAULT_PUBLIC_PATH = T.let('app/public', String)
|
21
23
|
end
|
@@ -7,6 +7,7 @@ module ParsePackwerk
|
|
7
7
|
const :name, String
|
8
8
|
const :enforce_dependencies, T::Boolean
|
9
9
|
const :enforce_privacy, T::Boolean
|
10
|
+
const :public_path, String, default: DEFAULT_PUBLIC_PATH
|
10
11
|
const :metadata, MetadataYmlType
|
11
12
|
const :dependencies, T::Array[String]
|
12
13
|
|
@@ -19,6 +20,7 @@ module ParsePackwerk
|
|
19
20
|
name: package_name,
|
20
21
|
enforce_dependencies: package_loaded_yml[ENFORCE_DEPENDENCIES] ? true : false,
|
21
22
|
enforce_privacy: package_loaded_yml[ENFORCE_PRIVACY] ? true : false,
|
23
|
+
public_path: package_loaded_yml[PUBLIC_PATH] || DEFAULT_PUBLIC_PATH,
|
22
24
|
metadata: package_loaded_yml[METADATA] || {},
|
23
25
|
dependencies: package_loaded_yml[DEPENDENCIES] || []
|
24
26
|
)
|
@@ -34,6 +36,11 @@ module ParsePackwerk
|
|
34
36
|
Pathname.new(name).cleanpath
|
35
37
|
end
|
36
38
|
|
39
|
+
sig { returns(Pathname) }
|
40
|
+
def public_directory
|
41
|
+
directory.join(public_path).cleanpath
|
42
|
+
end
|
43
|
+
|
37
44
|
sig { returns(T::Boolean) }
|
38
45
|
def enforces_dependencies?
|
39
46
|
enforce_dependencies
|
data/lib/parse_packwerk.rb
CHANGED
@@ -61,6 +61,13 @@ module ParsePackwerk
|
|
61
61
|
enforce_privacy: #{package.enforces_privacy?}
|
62
62
|
PACKAGEYML
|
63
63
|
|
64
|
+
unless package.public_path == DEFAULT_PUBLIC_PATH
|
65
|
+
public_path = <<~PUBLICPATH
|
66
|
+
public_path: #{package.public_path}
|
67
|
+
PUBLICPATH
|
68
|
+
package_yml += public_path
|
69
|
+
end
|
70
|
+
|
64
71
|
if package.dependencies.any?
|
65
72
|
dependencies = <<~STATEDDEPS
|
66
73
|
dependencies:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parse_packwerk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.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-
|
11
|
+
date: 2022-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sorbet-runtime
|