ascii_binder 0.2.2 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Dockerfile +3 -3
- data/ascii_binder.gemspec +1 -1
- data/bin/asciibinder +4 -4
- data/features/support/env.rb +3 -3
- data/lib/ascii_binder/engine.rb +42 -10
- data/lib/ascii_binder/helpers.rb +1 -0
- data/lib/ascii_binder/site_info.rb +1 -1
- data/lib/ascii_binder/topic_map.rb +2 -1
- data/lib/ascii_binder/version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63f08f84ab342165234ea73cf2b25d443b5a4962cdeea861a7f0080b6322153c
|
4
|
+
data.tar.gz: ed6d54234440073f2721ea648d8b1f045cf34d1bf3a2444f93d2ea47b36256e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00435a0b0ed5ff4c32aef83030793be785eb8ade1112f47ca6279be17cc0701b8b46ae0f0f5fcb05b9bc74e1f10d30aeed6529f94baa0a029765402f1e413ac7
|
7
|
+
data.tar.gz: cb56f37d5ab0eae8da6f48a0b68f490429dd7bac79ad529057c85893ac5cf91b53aec6c26b4e8e1d42848f0ed4e7561211529de80d4f562cfda1fdc5fdcc6551
|
data/Dockerfile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
FROM centos/ruby-
|
1
|
+
FROM centos/ruby-23-centos7
|
2
2
|
|
3
|
-
RUN scl enable rh-
|
4
|
-
RUN scl enable rh-
|
3
|
+
RUN scl enable rh-ruby23 -- gem install listen -v 3.0.8
|
4
|
+
RUN scl enable rh-ruby23 -- gem install ascii_binder
|
5
5
|
USER root
|
6
6
|
RUN yum install -y java-1.7.0-openjdk && \
|
7
7
|
yum clean all
|
data/ascii_binder.gemspec
CHANGED
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
|
|
34
34
|
spec.add_dependency 'json'
|
35
35
|
spec.add_dependency 'sitemap_generator', '~> 6.0.1'
|
36
36
|
spec.add_dependency 'trollop', '~> 2.1.2'
|
37
|
-
spec.add_dependency
|
37
|
+
spec.add_dependency "yajl-ruby", ">= 1.4.2"
|
38
38
|
spec.add_dependency 'tilt'
|
39
39
|
|
40
40
|
end
|
data/bin/asciibinder
CHANGED
@@ -31,9 +31,9 @@ def repo_check(docs_basedir)
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
# Either of these must be present
|
34
|
-
unless File.exist?(File.join(docs_basedir, '
|
35
|
-
missing_files = true
|
36
|
-
end
|
34
|
+
# unless File.exist?(File.join("#{docs_basedir}/#{TOPIC_MAP_FOLDER}", '_topic_map.yml'))
|
35
|
+
# missing_files = true
|
36
|
+
# end
|
37
37
|
if missing_files or not in_git_repo(docs_basedir)
|
38
38
|
Trollop::die "The specified docs base directory '#{docs_basedir}' does not appear to be part of an AsciiBinder-compatible repo."
|
39
39
|
end
|
@@ -300,7 +300,7 @@ if cmd == 'clone'
|
|
300
300
|
Dir.chdir(docs_basedir)
|
301
301
|
puts "Tracking branch setup:"
|
302
302
|
cloned_map.distro_branches.each do |doc_branch|
|
303
|
-
next if doc_branch == '
|
303
|
+
next if doc_branch == 'main'
|
304
304
|
puts "- #{doc_branch}"
|
305
305
|
system("git branch #{doc_branch} origin/#{doc_branch}")
|
306
306
|
end
|
data/features/support/env.rb
CHANGED
@@ -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
|
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('
|
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
|
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
|
data/lib/ascii_binder/engine.rb
CHANGED
@@ -78,18 +78,50 @@ module AsciiBinder
|
|
78
78
|
|
79
79
|
# Protip: Don't cache these! The topic map needs to be reread every time we change branches.
|
80
80
|
def topic_map_file
|
81
|
+
|
82
|
+
# new stuff 1/Nov/2021
|
83
|
+
# allow users to break up the topic map into multiple topic maps
|
84
|
+
# load topic maps from a single folder called _topic_maps.
|
85
|
+
# we assume that all files in this folder are correctly formatted topic maps. If not, you will get normal asciibinder errors
|
86
|
+
topic_map_folder = TOPIC_MAP_FOLDER
|
81
87
|
topic_file = TOPIC_MAP_FILENAME
|
82
|
-
|
83
|
-
|
84
|
-
#
|
85
|
-
|
86
|
-
|
87
|
-
#
|
88
|
-
|
88
|
+
|
89
|
+
if !Dir.exist?(File.join(docs_root_dir, topic_map_folder))
|
90
|
+
# if the _topic_maps directory doesn't exist or is empty, see if we can find the topic map in the root folder to maintain backward compatibility
|
91
|
+
|
92
|
+
if !File.exist?(File.join(docs_root_dir, topic_file))
|
93
|
+
# fall back to looking for a _topic_map in the root directory
|
94
|
+
|
95
|
+
topic_file = BUILD_FILENAME # old folders use build_config.yml
|
96
|
+
|
97
|
+
if !File.exist?(File.join(docs_root_dir, topic_file))
|
98
|
+
# Critical error - no topic map file at all.
|
99
|
+
Trollop::die "Could not find a valid topic map file. There is no #{TOPIC_MAP_FOLDER} folder and the fall back files #{TOPIC_MAP_FILENAME} or #{BUILD_FILENAME} in branch '#{git.branch}' were also not found."
|
100
|
+
else
|
101
|
+
t = File.join(docs_root_dir, topic_file) # found build_config
|
102
|
+
end
|
103
|
+
else
|
104
|
+
t = File.join(docs_root_dir, topic_file) # found topic_map in root
|
89
105
|
end
|
90
|
-
|
106
|
+
|
107
|
+
else
|
108
|
+
|
109
|
+
# topic map files are in the _topic_maps folder
|
110
|
+
|
111
|
+
# create a combined temp file with all topic maps
|
112
|
+
tf = Tempfile.new("#{TOPIC_MAP_FILENAME}")
|
113
|
+
|
114
|
+
Dir.glob("#{topic_map_folder}/*.yml").each do |filename|
|
115
|
+
lines = IO.read(filename)
|
116
|
+
tf << lines
|
117
|
+
end
|
118
|
+
|
119
|
+
t = tf.path
|
91
120
|
end
|
92
|
-
|
121
|
+
|
122
|
+
# returns the path to the final file
|
123
|
+
t
|
124
|
+
|
93
125
|
end
|
94
126
|
|
95
127
|
def topic_map
|
@@ -270,7 +302,7 @@ module AsciiBinder
|
|
270
302
|
log_unknown("Building only the #{distro_map.get_distro(build_distro).name} distribution.")
|
271
303
|
end
|
272
304
|
elsif single_page.nil?
|
273
|
-
log_unknown("Building
|
305
|
+
log_unknown("Building every distribution.")
|
274
306
|
end
|
275
307
|
|
276
308
|
# Notify the user of missing local branches
|
data/lib/ascii_binder/helpers.rb
CHANGED
@@ -10,12 +10,13 @@ module AsciiBinder
|
|
10
10
|
attr_reader :list
|
11
11
|
|
12
12
|
def initialize(topic_file,distro_keys)
|
13
|
-
@topic_yaml = YAML.load_stream(open(
|
13
|
+
@topic_yaml = YAML.load_stream(open(topic_file))
|
14
14
|
@distro_keys = distro_keys
|
15
15
|
@list = []
|
16
16
|
@topic_yaml.each do |topic_entity|
|
17
17
|
@list << AsciiBinder::TopicEntity.new(topic_entity,distro_keys)
|
18
18
|
end
|
19
|
+
|
19
20
|
end
|
20
21
|
|
21
22
|
def filepaths
|
data/lib/ascii_binder/version.rb
CHANGED
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.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- N. Harrison Ripps
|
@@ -9,10 +9,10 @@ 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:
|
15
|
+
date: 2022-04-19 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: bundler
|
@@ -228,16 +228,16 @@ dependencies:
|
|
228
228
|
name: yajl-ruby
|
229
229
|
requirement: !ruby/object:Gem::Requirement
|
230
230
|
requirements:
|
231
|
-
- - "
|
231
|
+
- - ">="
|
232
232
|
- !ruby/object:Gem::Version
|
233
|
-
version: 1.
|
233
|
+
version: 1.4.2
|
234
234
|
type: :runtime
|
235
235
|
prerelease: false
|
236
236
|
version_requirements: !ruby/object:Gem::Requirement
|
237
237
|
requirements:
|
238
|
-
- - "
|
238
|
+
- - ">="
|
239
239
|
- !ruby/object:Gem::Version
|
240
|
-
version: 1.
|
240
|
+
version: 1.4.2
|
241
241
|
- !ruby/object:Gem::Dependency
|
242
242
|
name: tilt
|
243
243
|
requirement: !ruby/object:Gem::Requirement
|
@@ -351,7 +351,7 @@ homepage: https://github.com/redhataccess/ascii_binder
|
|
351
351
|
licenses:
|
352
352
|
- MIT
|
353
353
|
metadata: {}
|
354
|
-
post_install_message:
|
354
|
+
post_install_message:
|
355
355
|
rdoc_options: []
|
356
356
|
require_paths:
|
357
357
|
- lib
|
@@ -366,8 +366,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
366
366
|
- !ruby/object:Gem::Version
|
367
367
|
version: '0'
|
368
368
|
requirements: []
|
369
|
-
rubygems_version: 3.
|
370
|
-
signing_key:
|
369
|
+
rubygems_version: 3.0.3
|
370
|
+
signing_key:
|
371
371
|
specification_version: 4
|
372
372
|
summary: AsciiBinder is an AsciiDoc-based system for authoring and publishing closely
|
373
373
|
related documentation sets from a single source.
|