parse_packwerk 0.19.0 → 0.19.2
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 +4 -4
- data/lib/parse_packwerk/package.rb +4 -0
- data/lib/parse_packwerk.rb +8 -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: 83b58f930302d8a8c665a0308ab701ead4df9c44746dd5beda267e1c3ee7f8f8
|
4
|
+
data.tar.gz: 2151555e3ff73a42c1945cfcb08528ce312479129b4d19602d2e8c90523f58c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c1750166fa4c3e6676b295a3e31de05bcac13647b3cbcdfd90501124db728047723d9eb6fe44c65a1a338503d5219129fc6c2c849a24bbe6538821baaecdcc4
|
7
|
+
data.tar.gz: 2935097a35a353f7a57e4a7e09c27f337967a28cf6d9b06d4c5a21abdd5b7e8274724370a1e79ce965d9626d73104067a8f585aa0892874f88e9ac1ad66c8646
|
@@ -15,6 +15,10 @@ module ParsePackwerk
|
|
15
15
|
sig { params(pathname: Pathname).returns(Package) }
|
16
16
|
def self.from(pathname)
|
17
17
|
package_loaded_yml = YAML.load_file(pathname)
|
18
|
+
if package_loaded_yml.nil? || package_loaded_yml == false
|
19
|
+
message = "Failed to parse `#{pathname}`. Please fix any issues with this package.yml OR add its containing folder to packwerk.yml `exclude`"
|
20
|
+
raise PackageParseError.new(message)
|
21
|
+
end
|
18
22
|
package_name = pathname.dirname.cleanpath.to_s
|
19
23
|
|
20
24
|
new(
|
data/lib/parse_packwerk.rb
CHANGED
@@ -3,6 +3,11 @@
|
|
3
3
|
require 'sorbet-runtime'
|
4
4
|
require 'yaml'
|
5
5
|
require 'pathname'
|
6
|
+
|
7
|
+
# fileutils is loaded by a development gem dependency, but requiring here so clients
|
8
|
+
# do not get `uninitialized constant ParsePackwerk::FileUtils`
|
9
|
+
require 'fileutils'
|
10
|
+
|
6
11
|
require 'parse_packwerk/constants'
|
7
12
|
require 'parse_packwerk/violation'
|
8
13
|
require 'parse_packwerk/package_todo'
|
@@ -12,6 +17,9 @@ require 'parse_packwerk/package_set'
|
|
12
17
|
require 'parse_packwerk/extensions'
|
13
18
|
|
14
19
|
module ParsePackwerk
|
20
|
+
class PackageParseError < StandardError
|
21
|
+
end
|
22
|
+
|
15
23
|
class MissingConfiguration < StandardError
|
16
24
|
extend T::Sig
|
17
25
|
|
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.19.
|
4
|
+
version: 0.19.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gusto Engineers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sorbet-runtime
|