ascii_binder 0.1.15.3 → 0.2.3

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
- SHA1:
3
- metadata.gz: bc01789783fe028afe52c42c2e7d224bcaf9b638
4
- data.tar.gz: 13fa9863c7b492468fc9b3f5cc2343fa0bb53a15
2
+ SHA256:
3
+ metadata.gz: ea737534633232eae04d4210d6898488aa16833da1b6e0300ee7bd5a343bcdad
4
+ data.tar.gz: 6b14f4acc528b4bfb7d3170c0b80831ffb8475f7c8a7f5f41f9fb0aa78ef3ff1
5
5
  SHA512:
6
- metadata.gz: 4aaae00d7d9a643442177a08a27463d3c05e19100e7cdc355b2ad14263aa8cedcd2952538329385241f000c21e09ec31de99be7700e0eaf956d80659bf39911c
7
- data.tar.gz: b8c5df7a27b5184c3671fb110bd6892ed24269162cf055ce8b97cc0f35701299b61c7d544c4100b1c3666b88c230063b8511cdb13dd735ea2972ef9b2c16ae1d
6
+ metadata.gz: ff840bec755cf9124dfc6c16845b92ac2af3cb3bebd6fe812adae4b1888b2bb31af577d797f41f326c3511b79dd4f5f1f80e06b133e000167c8b50c137384573
7
+ data.tar.gz: 74c3b5c8e7c03073473987bba0607974299fd3e243c292e7e6c4371a6c8e0d9c5c71664574ac820c63c51aeb6d9af8f1d95bfa46165cd755606b326542efd4d7
data/ascii_binder.gemspec CHANGED
@@ -18,13 +18,14 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_development_dependency "bundler", "~> 1.7"
21
+ spec.add_development_dependency "bundler"
22
22
  spec.add_development_dependency "cucumber", "~> 2.3.3"
23
23
  spec.add_development_dependency "diff_dirs", "~> 0.1.2"
24
24
  spec.add_dependency "rake", "~> 12.3.3"
25
25
 
26
- spec.add_dependency 'asciidoctor', '~> 1.5.6'
27
- spec.add_dependency 'asciidoctor-diagram', '~> 1.5.5'
26
+ spec.add_dependency 'asciidoctor', '~> 2.0.10'
27
+ spec.add_dependency 'asciidoctor-diagram', '~> 2.0.2'
28
+ spec.add_dependency 'rouge', '~> 3.18.0'
28
29
  spec.add_dependency 'git'
29
30
  spec.add_dependency 'guard'
30
31
  spec.add_dependency 'guard-shell'
data/bin/ascii_binder CHANGED
@@ -1 +1 @@
1
- asciibinder
1
+ bin/asciibinder
data/bin/asciibinder CHANGED
@@ -183,11 +183,9 @@ Description:
183
183
  ...except that the Guardfile automatically detects and runs this as
184
184
  you work.
185
185
 
186
- This is meant to be used in conjunction with a web browser that is
187
- running a LiveReload plugin. If you are viewing the output HTML page
188
- in a browser where LiveReload is active, then every time you save a
189
- new version of the .adoc file, the new HTML is automatically
190
- regenerated and your page view is automatically refreshed.
186
+ This is meant to be used in conjunction with a web browser that is viewing the
187
+ output HTML page. Every time you save a new version of the .adoc file, you can
188
+ manually refresh your page to view the newly-generated HTML.
191
189
  EOF
192
190
  opt :log_level, "Set the logging output level for this operation.", :default => 'warn'
193
191
  end
@@ -302,7 +300,7 @@ if cmd == 'clone'
302
300
  Dir.chdir(docs_basedir)
303
301
  puts "Tracking branch setup:"
304
302
  cloned_map.distro_branches.each do |doc_branch|
305
- next if doc_branch == 'master'
303
+ next if doc_branch == 'main'
306
304
  puts "- #{doc_branch}"
307
305
  system("git branch #{doc_branch} origin/#{doc_branch}")
308
306
  end
@@ -299,9 +299,9 @@ module Helpers
299
299
  end
300
300
  system("cd #{working_dir} && git add . > /dev/null && git commit -am 'test commit' > /dev/null")
301
301
  if multiple_distros
302
- system("cd #{working_dir} && git checkout -b branch1 > /dev/null 2>&1 && git checkout -b branch2 > /dev/null 2>&1 && git checkout master > /dev/null 2>&1")
302
+ system("cd #{working_dir} && git checkout -b branch1 > /dev/null 2>&1 && git checkout -b branch2 > /dev/null 2>&1 && git checkout main > /dev/null 2>&1")
303
303
  end
304
- set_initial_working_branch('master')
304
+ set_initial_working_branch('main')
305
305
  end
306
306
  working_dir
307
307
  end
@@ -325,7 +325,7 @@ module Helpers
325
325
  if run_command('create',[],remote_dir)[:status].exitstatus == 0
326
326
  clone_map = File.join(gem_root,'features','support','_clone_distro_map.yml')
327
327
  FileUtils.cp(clone_map,File.join(remote_dir,'_distro_map.yml'))
328
- system("cd #{remote_dir} && git add . > /dev/null && git commit -am 'remote commit' > /dev/null && git checkout -b branch1 > /dev/null 2>&1 && git checkout master > /dev/null 2>&1")
328
+ system("cd #{remote_dir} && git add . > /dev/null && git commit -am 'remote commit' > /dev/null && git checkout -b branch1 > /dev/null 2>&1 && git checkout main > /dev/null 2>&1")
329
329
  else
330
330
  puts "ERROR: Could not initialize remote repo"
331
331
  exit 1
@@ -238,8 +238,7 @@ module AsciiBinder
238
238
 
239
239
  def asciidoctor_page_attrs(more_attrs=[])
240
240
  [
241
- 'source-highlighter=coderay',
242
- 'coderay-css=style',
241
+ 'source-highlighter=rouge',
243
242
  'linkcss!',
244
243
  'icons=font',
245
244
  'idprefix=',
@@ -452,7 +451,7 @@ module AsciiBinder
452
451
 
453
452
  def configure_and_generate_page(topic,branch_config,navigation)
454
453
  distro = branch_config.distro
455
- topic_adoc = File.open(topic.source_path,'r').read
454
+ # topic_adoc = File.open(topic.source_path,'r').read
456
455
 
457
456
  page_attrs = asciidoctor_page_attrs([
458
457
  "imagesdir=#{File.join(topic.parent.source_path,'images')}",
@@ -460,61 +459,71 @@ module AsciiBinder
460
459
  "product-title=#{branch_config.distro_name}",
461
460
  "product-version=#{branch_config.name}",
462
461
  "product-author=#{branch_config.distro_author}",
463
- "repo_path=#{topic.repo_path}"
462
+ "repo_path=#{topic.repo_path}",
463
+ "allow-uri-read="
464
464
  ])
465
465
 
466
- doc = without_warnings { Asciidoctor.load topic_adoc, :header_footer => false, :safe => :unsafe, :attributes => page_attrs }
467
- article_title = doc.doctitle || topic.name
468
-
469
- topic_html = doc.render
470
-
471
- # This is logic bridges newer arbitrary-depth-tolerant code to
472
- # older depth-limited code. Truly removing depth limitations will
473
- # require changes to page templates in user docs repos.
474
- breadcrumb = topic.breadcrumb
475
- group_title = breadcrumb[0][:name]
476
- group_id = breadcrumb[0][:id]
477
- topic_title = breadcrumb[-1][:name]
478
- topic_id = breadcrumb[-1][:id]
479
- subgroup_title = nil
480
- subgroup_id = nil
481
- if breadcrumb.length == 3
482
- subgroup_title = breadcrumb[1][:name]
483
- subgroup_id = breadcrumb[1][:id]
484
- end
485
- dir_depth = '../' * topic.breadcrumb[-1][:id].split('::').length
486
- dir_depth = '' if dir_depth.nil?
466
+ File.open topic.source_path, 'r' do |topic_file|
467
+
468
+ doc = without_warnings { Asciidoctor.load topic_file, :header_footer => false, :safe => :unsafe, :attributes => page_attrs, :base_dir => "." }
469
+ article_title = doc.doctitle || topic.name
470
+
471
+ topic_html = doc.render
472
+
473
+ # This is logic bridges newer arbitrary-depth-tolerant code to
474
+ # older depth-limited code. Truly removing depth limitations will
475
+ # require changes to page templates in user docs repos.
476
+ breadcrumb = topic.breadcrumb
477
+ group_title = breadcrumb[0][:name]
478
+ group_id = breadcrumb[0][:id]
479
+ topic_title = breadcrumb[-1][:name]
480
+ topic_id = breadcrumb[-1][:id]
481
+ subgroup_title = nil
482
+ subgroup_id = nil
483
+ if breadcrumb.length == 3
484
+ subgroup_title = breadcrumb[1][:name]
485
+ subgroup_id = breadcrumb[1][:id]
486
+ end
487
+ dir_depth = '../' * topic.breadcrumb[-1][:id].split('::').length
488
+ dir_depth = '' if dir_depth.nil?
489
+
490
+ preview_path = topic.preview_path(distro.id,branch_config.dir)
491
+ topic_publish_url = topic.topic_publish_url(distro.site.url,branch_config.dir)
492
+
493
+ page_args = {
494
+ :distro_key => distro.id,
495
+ :distro => branch_config.distro_name,
496
+ :branch => branch_config.id,
497
+ :site_name => distro.site.name,
498
+ :site_url => distro.site.url,
499
+ :topic_url => preview_path,
500
+ :topic_publish_url => topic_publish_url,
501
+ :version => branch_config.name,
502
+ :group_title => group_title,
503
+ :subgroup_title => subgroup_title,
504
+ :topic_title => topic_title,
505
+ :article_title => article_title,
506
+ :content => topic_html,
507
+ :navigation => navigation,
508
+ :group_id => group_id,
509
+ :subgroup_id => subgroup_id,
510
+ :topic_id => topic_id,
511
+ :css_path => "#{dir_depth}#{branch_config.dir}/#{STYLESHEET_DIRNAME}/",
512
+ :javascripts_path => "#{dir_depth}#{branch_config.dir}/#{JAVASCRIPT_DIRNAME}/",
513
+ :images_path => "#{dir_depth}#{branch_config.dir}/#{IMAGE_DIRNAME}/",
514
+ :site_home_path => "#{dir_depth}index.html",
515
+ :template_path => template_dir,
516
+ :repo_path => topic.repo_path,
517
+ }
518
+ full_file_text = page(page_args)
519
+
520
+
521
+ File.open(preview_path, 'w') { |file| file.write(full_file_text) }
522
+
523
+
524
+ # File.write(preview_path,full_file_text)
487
525
 
488
- preview_path = topic.preview_path(distro.id,branch_config.dir)
489
- topic_publish_url = topic.topic_publish_url(distro.site.url,branch_config.dir)
490
-
491
- page_args = {
492
- :distro_key => distro.id,
493
- :distro => branch_config.distro_name,
494
- :branch => branch_config.id,
495
- :site_name => distro.site.name,
496
- :site_url => distro.site.url,
497
- :topic_url => preview_path,
498
- :topic_publish_url => topic_publish_url,
499
- :version => branch_config.name,
500
- :group_title => group_title,
501
- :subgroup_title => subgroup_title,
502
- :topic_title => topic_title,
503
- :article_title => article_title,
504
- :content => topic_html,
505
- :navigation => navigation,
506
- :group_id => group_id,
507
- :subgroup_id => subgroup_id,
508
- :topic_id => topic_id,
509
- :css_path => "#{dir_depth}#{branch_config.dir}/#{STYLESHEET_DIRNAME}/",
510
- :javascripts_path => "#{dir_depth}#{branch_config.dir}/#{JAVASCRIPT_DIRNAME}/",
511
- :images_path => "#{dir_depth}#{branch_config.dir}/#{IMAGE_DIRNAME}/",
512
- :site_home_path => "#{dir_depth}index.html",
513
- :template_path => template_dir,
514
- :repo_path => topic.repo_path,
515
- }
516
- full_file_text = page(page_args)
517
- File.write(preview_path,full_file_text)
526
+ end
518
527
  end
519
528
 
520
529
  # package_docs
@@ -7,7 +7,7 @@ module AsciiBinder
7
7
  @name = distro.site.name
8
8
  @url = distro.site.url
9
9
  @distros = {}
10
- @branches = ['master']
10
+ @branches = ['main']
11
11
  add_distro(distro)
12
12
  end
13
13
 
@@ -1,3 +1,3 @@
1
1
  module AsciiBinder
2
- VERSION = "0.1.15.3"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ascii_binder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.15.3
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - N. Harrison Ripps
@@ -9,25 +9,25 @@ authors:
9
9
  - Carlos Munoz
10
10
  - Brian Exelbierd
11
11
  - Vikram Goyal
12
- autorequire:
12
+ autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2020-03-17 00:00:00.000000000 Z
15
+ date: 2021-07-27 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: bundler
19
19
  requirement: !ruby/object:Gem::Requirement
20
20
  requirements:
21
- - - "~>"
21
+ - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: '1.7'
23
+ version: '0'
24
24
  type: :development
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
- - - "~>"
28
+ - - ">="
29
29
  - !ruby/object:Gem::Version
30
- version: '1.7'
30
+ version: '0'
31
31
  - !ruby/object:Gem::Dependency
32
32
  name: cucumber
33
33
  requirement: !ruby/object:Gem::Requirement
@@ -76,28 +76,42 @@ dependencies:
76
76
  requirements:
77
77
  - - "~>"
78
78
  - !ruby/object:Gem::Version
79
- version: 1.5.6
79
+ version: 2.0.10
80
80
  type: :runtime
81
81
  prerelease: false
82
82
  version_requirements: !ruby/object:Gem::Requirement
83
83
  requirements:
84
84
  - - "~>"
85
85
  - !ruby/object:Gem::Version
86
- version: 1.5.6
86
+ version: 2.0.10
87
87
  - !ruby/object:Gem::Dependency
88
88
  name: asciidoctor-diagram
89
89
  requirement: !ruby/object:Gem::Requirement
90
90
  requirements:
91
91
  - - "~>"
92
92
  - !ruby/object:Gem::Version
93
- version: 1.5.5
93
+ version: 2.0.2
94
+ type: :runtime
95
+ prerelease: false
96
+ version_requirements: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - "~>"
99
+ - !ruby/object:Gem::Version
100
+ version: 2.0.2
101
+ - !ruby/object:Gem::Dependency
102
+ name: rouge
103
+ requirement: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - "~>"
106
+ - !ruby/object:Gem::Version
107
+ version: 3.18.0
94
108
  type: :runtime
95
109
  prerelease: false
96
110
  version_requirements: !ruby/object:Gem::Requirement
97
111
  requirements:
98
112
  - - "~>"
99
113
  - !ruby/object:Gem::Version
100
- version: 1.5.5
114
+ version: 3.18.0
101
115
  - !ruby/object:Gem::Dependency
102
116
  name: git
103
117
  requirement: !ruby/object:Gem::Requirement
@@ -337,7 +351,7 @@ homepage: https://github.com/redhataccess/ascii_binder
337
351
  licenses:
338
352
  - MIT
339
353
  metadata: {}
340
- post_install_message:
354
+ post_install_message:
341
355
  rdoc_options: []
342
356
  require_paths:
343
357
  - lib
@@ -352,9 +366,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
352
366
  - !ruby/object:Gem::Version
353
367
  version: '0'
354
368
  requirements: []
355
- rubyforge_project:
356
- rubygems_version: 2.5.2.3
357
- signing_key:
369
+ rubygems_version: 3.2.3
370
+ signing_key:
358
371
  specification_version: 4
359
372
  summary: AsciiBinder is an AsciiDoc-based system for authoring and publishing closely
360
373
  related documentation sets from a single source.