bhook 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/bhook/args_parser.rb +1 -1
- data/lib/bhook/directory.rb +1 -1
- data/lib/bhook/md_file.rb +1 -1
- data/lib/bhook/root_directory.rb +1 -1
- data/lib/bhook/{config.rb → source_config.rb} +2 -2
- data/lib/bhook/version.rb +1 -1
- data/lib/bhook.rb +1 -1
- data/sorbet/rbi/hidden-definitions/hidden.rbi +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e5a2ce989dc5f18be7fe40f71b3c2afbec926f43a8abd417a40b9b738af1075
|
4
|
+
data.tar.gz: 6f20fc641d2c96deaf22a6def9547b8da373ceeec507f96ef92542ae110397ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91851c0792324aa103da6c6c157b64924187afe33901566f004d808e12437821598502e0bb487bd449b3e154d030734a3c81641156f02b12200926c77855b5b5
|
7
|
+
data.tar.gz: 78c3ebb19723089cd939ed8de447343240fd9ae5c4389b89185fdb65c6a8a06cbe55759f88ee5d210ec49c6638e8b6a0aaab5429d7a3c9b78d861007a90f9a71
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -45,7 +45,7 @@ Here's an example `.bhook.yml` [config file](https://gitlab.com/india-startups/w
|
|
45
45
|
|
46
46
|
### n-to-1 mode
|
47
47
|
|
48
|
-
This requires the destination directory to have a
|
48
|
+
This requires the destination directory to have a `.bhook.yml` config file set up that describes all the sources.
|
49
49
|
|
50
50
|
➜ kaiwren.github.com git:(main) ✗ bhook -w -v
|
51
51
|
|
data/lib/bhook/args_parser.rb
CHANGED
@@ -38,7 +38,7 @@ module Bhook
|
|
38
38
|
private
|
39
39
|
|
40
40
|
def detect_and_read_mount_args_from_config_in_pwd
|
41
|
-
bhook_config_path = File.join(Dir.pwd,
|
41
|
+
bhook_config_path = File.join(Dir.pwd, SourceConfig::BHOOK_CONFIG_FILE)
|
42
42
|
return unless File.exist?(bhook_config_path)
|
43
43
|
|
44
44
|
YAML.safe_load(File.read(bhook_config_path))['mount']
|
data/lib/bhook/directory.rb
CHANGED
@@ -13,7 +13,7 @@ module Bhook
|
|
13
13
|
RootDirectory.new(src_path, out_path)
|
14
14
|
end
|
15
15
|
|
16
|
-
sig { params(src_path: Pathname, out_path: Pathname, git: Git::Base, config: Bhook::
|
16
|
+
sig { params(src_path: Pathname, out_path: Pathname, git: Git::Base, config: Bhook::SourceConfig).void }
|
17
17
|
def initialize(src_path, out_path, git, config)
|
18
18
|
@src_path = src_path
|
19
19
|
@out_path = T.let(build_out_path(src_path, out_path), Pathname)
|
data/lib/bhook/md_file.rb
CHANGED
@@ -17,7 +17,7 @@ module Bhook
|
|
17
17
|
sig { returns(String) }
|
18
18
|
attr_reader :md
|
19
19
|
|
20
|
-
sig { params(src_file_path: Pathname, out_path: Pathname, git: Git::Base, config: Bhook::
|
20
|
+
sig { params(src_file_path: Pathname, out_path: Pathname, git: Git::Base, config: Bhook::SourceConfig).void }
|
21
21
|
def initialize(src_file_path, out_path, git, config)
|
22
22
|
L.debug "Reading: #{src_file_path}"
|
23
23
|
@md = T.let(File.read(src_file_path), String)
|
data/lib/bhook/root_directory.rb
CHANGED
@@ -7,7 +7,7 @@ module Bhook
|
|
7
7
|
|
8
8
|
sig { params(src_path: Pathname, out_path: Pathname).void }
|
9
9
|
def initialize(src_path, out_path)
|
10
|
-
super(src_path, out_path, Git.open(src_path), Bhook::
|
10
|
+
super(src_path, out_path, Git.open(src_path), Bhook::SourceConfig.new(src_path))
|
11
11
|
end
|
12
12
|
|
13
13
|
private
|
@@ -8,7 +8,7 @@ module Bhook
|
|
8
8
|
# - link to place in the footer
|
9
9
|
# - exclude
|
10
10
|
# - list of .md file paths relative to config files
|
11
|
-
class
|
11
|
+
class SourceConfig
|
12
12
|
extend T::Sig
|
13
13
|
BHOOK_CONFIG_FILE = T.let('.bhook.yml', String)
|
14
14
|
WEBSITE_KEY = T.let('website', String)
|
@@ -40,7 +40,7 @@ module Bhook
|
|
40
40
|
|
41
41
|
sig { params(excluded_files: T::Array[String]).returns(T::Array[Pathname]) }
|
42
42
|
def parse_excluded_files(excluded_files)
|
43
|
-
excluded_files.map { |file_path| @root_dir_path.join(file_path) }
|
43
|
+
excluded_files.map { |file_path| @root_dir_path.join(file_path) if file_path }.compact
|
44
44
|
end
|
45
45
|
|
46
46
|
sig do
|
data/lib/bhook/version.rb
CHANGED
data/lib/bhook.rb
CHANGED
@@ -27,7 +27,7 @@ end
|
|
27
27
|
require_relative 'bhook/version'
|
28
28
|
require_relative 'bhook/logger'
|
29
29
|
require_relative 'bhook/args_parser'
|
30
|
-
require_relative 'bhook/
|
30
|
+
require_relative 'bhook/source_config'
|
31
31
|
require_relative 'bhook/theme_generator'
|
32
32
|
require_relative 'bhook/theme'
|
33
33
|
require_relative 'bhook/converter/html'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bhook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sidu Ponnappa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: git
|
@@ -197,12 +197,12 @@ files:
|
|
197
197
|
- bin/bhook
|
198
198
|
- lib/bhook.rb
|
199
199
|
- lib/bhook/args_parser.rb
|
200
|
-
- lib/bhook/config.rb
|
201
200
|
- lib/bhook/converter/html.rb
|
202
201
|
- lib/bhook/directory.rb
|
203
202
|
- lib/bhook/logger.rb
|
204
203
|
- lib/bhook/md_file.rb
|
205
204
|
- lib/bhook/root_directory.rb
|
205
|
+
- lib/bhook/source_config.rb
|
206
206
|
- lib/bhook/theme.rb
|
207
207
|
- lib/bhook/theme/_after_h1.erb
|
208
208
|
- lib/bhook/theme/page.erb
|