bhook 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/bhook/theme.rb CHANGED
@@ -13,8 +13,10 @@ module Bhook
13
13
  @after_h1_strategy = T.let(strategy, T.proc.params(binding_instance: Binding).returns(String))
14
14
  end
15
15
 
16
- sig { params(md: String, src_file_sha: T.nilable(String),
17
- src_file_date: T.nilable(String), file_url: T.nilable(String)).returns(String) }
16
+ sig do
17
+ params(md: String, src_file_sha: T.nilable(String),
18
+ src_file_date: T.nilable(String), file_url: T.nilable(String)).returns(String)
19
+ end
18
20
  def render_page(md, src_file_sha, src_file_date, file_url)
19
21
  src_title = T.let('', String)
20
22
 
@@ -5,17 +5,19 @@ module Bhook
5
5
  class ThemeGenerator
6
6
  extend T::Sig
7
7
 
8
- sig {params(output_path: String).void}
8
+ sig { params(output_path: String).void }
9
9
  def initialize(output_path)
10
10
  @output_path = T.let(File.join(output_path, 'theme'), String)
11
11
  @template_files = T.let([Bhook::PAGE_TEMPLATE_PATH,
12
- Bhook::AFTER_H1_TEMPLATE_PATH], T::Array[String])
12
+ Bhook::AFTER_H1_TEMPLATE_PATH], T::Array[String])
13
13
  end
14
14
 
15
- sig {void}
15
+ sig { void }
16
16
  def generate!
17
- FileUtils.mkdir_p(@output_path, verbose: true)
18
- FileUtils.cp(@template_files, @output_path, verbose: true)
17
+ FileUtils.mkdir_p(@output_path)
18
+ L.debug("mkdir: #{@output_path}")
19
+ FileUtils.cp(@template_files, @output_path)
20
+ L.debug("cp: #{@template_files.join(' ')} #{@output_path}")
19
21
  end
20
22
  end
21
23
  end
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.1.4'
5
+ VERSION = '0.2.0'
6
6
  end
@@ -4,7 +4,7 @@
4
4
  module Bhook
5
5
  class Workspace
6
6
  extend T::Sig
7
-
7
+
8
8
  sig { params(src_path: String, out_path: String, theme_path: String).void }
9
9
  def initialize(src_path, out_path, theme_path)
10
10
  @src_path = T.let(Pathname.new(src_path).expand_path, Pathname)
@@ -13,9 +13,9 @@ module Bhook
13
13
  end
14
14
 
15
15
  sig { void }
16
- def process!
16
+ def process!
17
17
  root_dir.write!(@theme)
18
- L.info "Done!"
18
+ L.info 'Done!'
19
19
  end
20
20
 
21
21
  sig { void }
@@ -24,7 +24,7 @@ module Bhook
24
24
 
25
25
  L.info "Watching: #{@src_path} for changes..."
26
26
  listener = Listen.to(@src_path.to_s, File.join(@src_path.to_s, '.git')) do |_modified, _added, _removed|
27
- L.info "Detected changes..."
27
+ L.info 'Detected changes...'
28
28
  process!
29
29
  end
30
30
  listener.start
@@ -35,8 +35,9 @@ module Bhook
35
35
  def all_md_files
36
36
  root_dir.all_md_files
37
37
  end
38
-
39
- private
38
+
39
+ private
40
+
40
41
  sig { returns(Bhook::Directory) }
41
42
  def root_dir
42
43
  Directory.new_root_directory(@src_path, @out_path)
@@ -7,9 +7,10 @@
7
7
  #
8
8
  # https://github.com/sorbet/sorbet-typed/new/master?filename=lib/bhook/all/bhook.rbi
9
9
  #
10
- # bhook-0.1.0
10
+ # bhook-0.2.0
11
11
 
12
12
  module Bhook
13
+ extend T::Sig
13
14
  end
14
15
  class Bhook::Error < StandardError
15
16
  end
@@ -0,0 +1,36 @@
1
+ # This file is autogenerated. Do not edit it by hand. Regenerate it with:
2
+ # srb rbi gems
3
+
4
+ # typed: strict
5
+ #
6
+ # If you would like to make changes to this file, great! Please create the gem's shim here:
7
+ #
8
+ # https://github.com/sorbet/sorbet-typed/new/master?filename=lib/docile/all/docile.rbi
9
+ #
10
+ # docile-1.4.0
11
+
12
+ module Docile
13
+ def dsl_eval(dsl, *args, &block); end
14
+ def dsl_eval_immutable(dsl, *args, &block); end
15
+ def dsl_eval_with_block_return(dsl, *args, &block); end
16
+ def self.dsl_eval(dsl, *args, &block); end
17
+ def self.dsl_eval_immutable(dsl, *args, &block); end
18
+ def self.dsl_eval_with_block_return(dsl, *args, &block); end
19
+ extend Docile::Execution
20
+ end
21
+ module Docile::Execution
22
+ def exec_in_proxy_context(dsl, proxy_type, *args, &block); end
23
+ def self.exec_in_proxy_context(dsl, proxy_type, *args, &block); end
24
+ end
25
+ class Docile::FallbackContextProxy
26
+ def initialize(receiver, fallback); end
27
+ def instance_variables; end
28
+ def method_missing(method, *args, &block); end
29
+ end
30
+ class Docile::ChainingFallbackContextProxy < Docile::FallbackContextProxy
31
+ def method_missing(method, *args, &block); end
32
+ end
33
+ module Docile::BacktraceFilter
34
+ def backtrace; end
35
+ def backtrace_locations; end
36
+ end
@@ -7,7 +7,7 @@
7
7
  #
8
8
  # https://github.com/sorbet/sorbet-typed/new/master?filename=lib/git/all/git.rbi
9
9
  #
10
- # git-1.10.2
10
+ # git-1.11.0
11
11
 
12
12
  module Git
13
13
  def config(name = nil, value = nil); end
@@ -7,7 +7,7 @@
7
7
  #
8
8
  # https://github.com/sorbet/sorbet-typed/new/master?filename=lib/kramdown/all/kramdown.rbi
9
9
  #
10
- # kramdown-2.3.1
10
+ # kramdown-2.4.0
11
11
 
12
12
  module Kramdown
13
13
  def self.data_dir; end
@@ -7,7 +7,7 @@
7
7
  #
8
8
  # https://github.com/sorbet/sorbet-typed/new/master?filename=lib/parallel/all/parallel.rbi
9
9
  #
10
- # parallel-1.21.0
10
+ # parallel-1.22.1
11
11
 
12
12
  module Parallel
13
13
  def self.add_progress_bar!(job_factory, options); end
@@ -21,6 +21,8 @@ module Parallel
21
21
  def self.flat_map(*args, &block); end
22
22
  def self.in_processes(options = nil, &block); end
23
23
  def self.in_threads(options = nil); end
24
+ def self.instrument_finish(item, index, result, options); end
25
+ def self.instrument_start(item, index, options); end
24
26
  def self.map(source, options = nil, &block); end
25
27
  def self.map_with_index(array, options = nil, &block); end
26
28
  def self.process_incoming_jobs(read, write, job_factory, options, &block); end
@@ -28,6 +30,7 @@ module Parallel
28
30
  def self.with_instrumentation(item, index, options); end
29
31
  def self.work_direct(job_factory, options, &block); end
30
32
  def self.work_in_processes(job_factory, options, &blk); end
33
+ def self.work_in_ractors(job_factory, options); end
31
34
  def self.work_in_threads(job_factory, options, &block); end
32
35
  def self.worker(job_factory, options, &block); end
33
36
  def self.worker_number; end
@@ -7,7 +7,7 @@
7
7
  #
8
8
  # https://github.com/sorbet/sorbet-typed/new/master?filename=lib/parser/all/parser.rbi
9
9
  #
10
- # parser-3.1.0.0
10
+ # parser-3.1.2.0
11
11
 
12
12
  module Parser
13
13
  end