packs 0.0.3 → 0.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f911f00f2059f8b472edbfbe099fe0ee0586bb8426c8593d002fb7a0f4e9924
4
- data.tar.gz: fc62651af9566195f83822938122f418ed7dd5cab115a3a27ee91fb4416724f9
3
+ metadata.gz: 7080a6fa5987fd5e6526b429e393cf5a8c0880f949dc5ebcd7a151479f1b3683
4
+ data.tar.gz: bd4c0fe1047832ba6ecd4277368f7b3effd5f1f97143155ff0f2b3f0d472816d
5
5
  SHA512:
6
- metadata.gz: 4a39af86905f7d639e98938eb83fd45d898a60991cae834d48365da60785dd1dc75b935eced72fa02da1f766382c5cbf817e4337047fbc7b5df66a1ca4853326
7
- data.tar.gz: d66b67aa6a4b35bccf554390aa5dc23d9ac109dfba0fffe0100ac7d35152afbc6974034c3bbde61d6bcf3278e2a05f28266ea1f3d44614659629beb381704983
6
+ metadata.gz: 6ee749052a37b250094beba396462274948e7a8964267eccbd76a256390a50af7ee3be33b1e1bf391ace03b2007175b51a35a4d99e6f3c407c354ff889ac2803
7
+ data.tar.gz: adeb079802b6711e84f6b9860d3d128aee2d805c801f09c26eeed9d8836e8216302c0d03abb7a2f201ee96556c0c717af294e270ea72cc4d67b68bb742286d2b
@@ -4,20 +4,21 @@ module Packs
4
4
  module Private
5
5
  class Configuration < T::Struct
6
6
  extend T::Sig
7
+ CONFIGURATION_PATHNAME = T.let(Pathname.new('packs.yml'), Pathname)
8
+
7
9
  DEFAULT_PACK_PATHS = T.let([
8
- 'packs/*',
9
- 'packs/*/*',
10
- ], T::Array[String])
10
+ 'packs/*',
11
+ 'packs/*/*'
12
+ ], T::Array[String])
11
13
 
12
14
  prop :pack_paths, T::Array[String]
13
15
 
14
16
  sig { returns(Configuration) }
15
17
  def self.fetch
16
- configuration_path = Pathname.new('packs.yml')
17
- config_hash = configuration_path.exist? ? YAML.load_file('packs.yml') : {}
18
+ config_hash = CONFIGURATION_PATHNAME.exist? ? YAML.load_file(CONFIGURATION_PATHNAME) : {}
18
19
 
19
20
  new(
20
- pack_paths: pack_paths(config_hash),
21
+ pack_paths: pack_paths(config_hash)
21
22
  )
22
23
  end
23
24
 
data/lib/packs.rb CHANGED
@@ -7,7 +7,6 @@ require 'packs/private'
7
7
 
8
8
  module Packs
9
9
  PACKAGE_FILE = T.let('package.yml'.freeze, String)
10
- ROOTS = T.let(%w[packs components], T::Array[String])
11
10
 
12
11
  class << self
13
12
  extend T::Sig
@@ -45,6 +44,11 @@ module Packs
45
44
 
46
45
  sig { params(blk: T.proc.params(arg0: Private::Configuration).void).void }
47
46
  def configure(&blk)
47
+ # If packs.yml is being used, then ignore direct configuration.
48
+ # This is only a stop-gap to permit Stimpack users to more easily migrate
49
+ # to packs.yml
50
+ return if Private::Configuration::CONFIGURATION_PATHNAME.exist?
51
+
48
52
  yield(config)
49
53
  end
50
54
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: packs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gusto Engineers