packs 0.0.45 → 0.1.0

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: ad12cf46cbfafc5f4b3b2d785f2ec2f3f67ed34cb8322bba6929a7ae584d06e1
4
- data.tar.gz: 8712c08b31b3457b403d3814764496f3c4d46e53867f88760cadd10083e38a63
3
+ metadata.gz: cedac59e21e3cfabcc0e70369a37f099d917c6092c75a9415e4935a9bec705af
4
+ data.tar.gz: 36307b5c6d741d2145e73b827ea66ace06cffa0123101443f4b0d2b30e09a5e9
5
5
  SHA512:
6
- metadata.gz: bad96e8500d53692f4930cb08ae0ed1be99b8b0524283027d424a05094d23039b5ed9bd646d94db4e67de158ca5af480288c05e799af0a82e6c46cc2c4190fc0
7
- data.tar.gz: ed7ebf9ed287b16336187500dc1ebfb833ce569039f7ad9775e9cf84fee53be47f6326fd8b7a4f3abc61d922080dc9ae2ab8e3049583bf8165871b7a4e763ffb
6
+ metadata.gz: 9478f4344cdb4dc234abb52da988b9e63033234a78289d9bdcbdacb738f911c6fb98050b0c699d19157f100df7a0139ff0a4be453776bdefc0aafd140a71d9e8
7
+ data.tar.gz: 718c24457bc7b6f5d0b471f2954dbff83ebbbbb0602a32295fb8ffc6d0e9cfea44a8e49c3a9d26c938b78e34d1d67d774502b8db1b659e5a3f88cd3f7071802d
data/README.md CHANGED
@@ -15,6 +15,11 @@ pack_paths:
15
15
  - gems/* # gems can be packs too!
16
16
  ```
17
17
 
18
+ To customize the README template, include a `README_TEMPLATE.md` file in the root of your project. If you want to use a custom path for your README template, you can specify it in the `packs.yml` file in the root of your project:
19
+ ```yml
20
+ readme_template_path: my_folder/README_STUFF.md
21
+ ```
22
+
18
23
  # Ecosystem
19
24
  The rest of the [rubyatscale](https://github.com/rubyatscale) ecosystem is intended to help make using packs and improving the boundaries between them more clear.
20
25
 
@@ -7,6 +7,9 @@ module Packs
7
7
  class Configuration
8
8
  extend T::Sig
9
9
 
10
+ CONFIGURATION_PATHNAME = T.let(Pathname.new('packs.yml'), Pathname)
11
+ DEFAULT_README_TEMPLATE_PATHNAME = T.let(Pathname.new('README_TEMPLATE.md'), Pathname)
12
+
10
13
  sig { params(enforce_dependencies: T::Boolean).void }
11
14
  attr_writer :enforce_dependencies
12
15
 
@@ -45,6 +48,18 @@ module Packs
45
48
  def default_enforce_dependencies
46
49
  true
47
50
  end
51
+
52
+ sig { returns(Pathname) }
53
+ def readme_template_pathname
54
+ config_hash = CONFIGURATION_PATHNAME.exist? ? YAML.load_file(CONFIGURATION_PATHNAME) : {}
55
+
56
+ specified_readme_template_path = config_hash['readme_template_path']
57
+ if specified_readme_template_path.nil?
58
+ DEFAULT_README_TEMPLATE_PATHNAME
59
+ else
60
+ Pathname.new(specified_readme_template_path)
61
+ end
62
+ end
48
63
  end
49
64
 
50
65
  class << self
@@ -148,6 +148,11 @@ module Packs
148
148
 
149
149
  sig { params(pack_name: String).returns(String) }
150
150
  def on_create_readme_todo(pack_name)
151
+ readme_template_pathname = Packs.config.readme_template_pathname
152
+ readme_template = readme_template_pathname.read if readme_template_pathname.exist?
153
+
154
+ return readme_template unless readme_template.nil?
155
+
151
156
  <<~MSG
152
157
  Welcome to `#{pack_name}`!
153
158
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: packs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.45
4
+ version: 0.1.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: 2024-10-30 00:00:00.000000000 Z
11
+ date: 2024-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bigdecimal
@@ -344,7 +344,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
344
344
  - !ruby/object:Gem::Version
345
345
  version: '0'
346
346
  requirements: []
347
- rubygems_version: 3.5.16
347
+ rubygems_version: 3.5.22
348
348
  signing_key:
349
349
  specification_version: 4
350
350
  summary: Provides CLI tools for working with ruby packs.