packwerk 1.3.1 → 1.3.2

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: 4bd8ccbf44a3bfe1eb5a0afb97fce3740ae641d1f8e938ad8bc8351d4ff8f74b
4
- data.tar.gz: 697369e81f54c8130844d4de6bcee75c328eeda1de8b24e04736acd5bbe1ed2a
3
+ metadata.gz: 5bd7c65bd8c7e2c9448f0c0ab3dffc69291c0a379d7da46b7deb7a70e87b805f
4
+ data.tar.gz: ddfeb4e7d17a5deba8ab1319897adefe77462d64f088e3ae8ddfbfa0ecefa1d0
5
5
  SHA512:
6
- metadata.gz: ac77bcba32e7e15a2c61aae6b90d76ef2dcae8c3d408a9e5b9746ea268c14a7421aabf082ac63148a1d53fb74b7ab3780c8145e50a9868a67472ad09294718e6
7
- data.tar.gz: 3c1819b3cf5417add105c1755856033dbc5339ed093450c45f241dd9aeb4828000fa67633f2a402f43634ea61af29d0f23d1244ea9049811714aab10f23fdd59
6
+ metadata.gz: 784b0938aae086fc90d362542b3b372fa235790f40983be1172c3563be4c82f13052642638447496043c94e68e72dcdb8adc344ee8336130e2130b92afb9bccc
7
+ data.tar.gz: e464eb8f88b8827cace5a7c38a4cf653d686bd19327e1b1123a6828d075be8919f9a73cbca57413a8ed859225525d9b64e57406b9d4b25ebac3f5b3c91703b03
data/Gemfile.lock CHANGED
@@ -87,7 +87,7 @@ GIT
87
87
  PATH
88
88
  remote: .
89
89
  specs:
90
- packwerk (1.3.1)
90
+ packwerk (1.3.2)
91
91
  activesupport (>= 5.2)
92
92
  ast
93
93
  better_html
@@ -233,6 +233,7 @@ GEM
233
233
 
234
234
  PLATFORMS
235
235
  ruby
236
+ x86_64-darwin
236
237
  x86_64-darwin-20
237
238
 
238
239
  DEPENDENCIES
@@ -254,4 +255,4 @@ DEPENDENCIES
254
255
  tapioca
255
256
 
256
257
  BUNDLED WITH
257
- 2.2.15
258
+ 2.2.22
data/USAGE.md CHANGED
@@ -231,7 +231,7 @@ After enforcing the boundary checks for a package, you may execute:
231
231
 
232
232
  Packwerk will check the entire codebase for any new or stale violations.
233
233
 
234
- You can also specify folders or packages for a shorter run time:
234
+ You can also specify folders for a shorter run time:
235
235
 
236
236
  packwerk check components/your_package
237
237
 
@@ -35,9 +35,9 @@ module Packwerk
35
35
  end
36
36
 
37
37
  def check_autoload_path_cache
38
- expected = @application_load_paths
39
- actual = @configuration.load_paths
40
- if expected.sort == actual.sort
38
+ expected = Set.new(@application_load_paths)
39
+ actual = Set.new(@configuration.load_paths)
40
+ if expected == actual
41
41
  Result.new(true)
42
42
  else
43
43
  Result.new(
@@ -45,7 +45,7 @@ module Packwerk
45
45
  @root_path = File.expand_path(root)
46
46
  @package_paths = configs["package_paths"] || "**/"
47
47
  @custom_associations = configs["custom_associations"] || []
48
- @load_paths = configs["load_paths"] || []
48
+ @load_paths = (configs["load_paths"] || []).uniq
49
49
  @inflections_file = File.expand_path(configs["inflections_file"] || "config/inflections.yml", @root_path)
50
50
  @parallel = configs.key?("parallel") ? configs["parallel"] : true
51
51
 
@@ -100,10 +100,17 @@ module Packwerk
100
100
  sig { returns(Hash) }
101
101
  def deprecated_references
102
102
  @deprecated_references ||= if File.exist?(@filepath)
103
- YAML.load_file(@filepath) || {}
103
+ load_yaml(@filepath)
104
104
  else
105
105
  {}
106
106
  end
107
107
  end
108
+
109
+ sig { params(filepath: String).returns(Hash) }
110
+ def load_yaml(filepath)
111
+ YAML.load_file(filepath) || {}
112
+ rescue Psych::Exception
113
+ {}
114
+ end
108
115
  end
109
116
  end
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Packwerk
5
- VERSION = "1.3.1"
5
+ VERSION = "1.3.2"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: packwerk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-15 00:00:00.000000000 Z
11
+ date: 2021-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport