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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 90521640ce67d31a8e080b88cb860559033426b3afc55f1a03d09d42d0a415c5
4
- data.tar.gz: f10067505bfdaa6c8e6bc4892340bd07d6937c0882b5472772f815705ca463ec
3
+ metadata.gz: 1e5a2ce989dc5f18be7fe40f71b3c2afbec926f43a8abd417a40b9b738af1075
4
+ data.tar.gz: 6f20fc641d2c96deaf22a6def9547b8da373ceeec507f96ef92542ae110397ec
5
5
  SHA512:
6
- metadata.gz: ee03d8c7ea7a5e39db17acbf3638dcf53c3d2f37a55b897e6800ca24a0dde2efd4037806619438ea8097781a7c75e15de6a5a34bb25c7693cdd1b98f069f4193
7
- data.tar.gz: 94bf726b2a6a3afb8490f172a01f992ea8bfd063a54ed2143b3ace48c644c15b93c5b5faf2a68f110b0a04a79bbed7b167846a60ec44e7bb206c1d24e5d5cfb3
6
+ metadata.gz: 91851c0792324aa103da6c6c157b64924187afe33901566f004d808e12437821598502e0bb487bd449b3e154d030734a3c81641156f02b12200926c77855b5b5
7
+ data.tar.gz: 78c3ebb19723089cd939ed8de447343240fd9ae5c4389b89185fdb65c6a8a06cbe55759f88ee5d210ec49c6638e8b6a0aaab5429d7a3c9b78d861007a90f9a71
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bhook (0.3.0)
4
+ bhook (0.3.1)
5
5
  git (~> 1.10)
6
6
  kramdown (~> 2.3)
7
7
  listen (~> 3.7)
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 `bhook.yml` config file set up that describes all the sources.
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
 
@@ -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, Config::BHOOK_CONFIG_FILE)
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']
@@ -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::Config).void }
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::Config).void }
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)
@@ -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::Config.new(src_path))
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 Config
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
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Bhook
5
- VERSION = '0.3.0'
5
+ VERSION = '0.3.1'
6
6
  end
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/config'
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'
@@ -28,7 +28,7 @@ class Bhook::ArgsParser::Options
28
28
  def self.members(); end
29
29
  end
30
30
 
31
- class Bhook::Config
31
+ class Bhook::SourceConfig
32
32
  extend ::T::Private::Methods::MethodHooks
33
33
  extend ::T::Private::Methods::SingletonMethodHooks
34
34
  end
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.0
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-01 00:00:00.000000000 Z
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