ascii_binder 0.1.13 → 0.1.14
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/ascii_binder.gemspec +2 -3
- data/features/command_help.feature +1 -1
- data/features/command_version.feature +1 -1
- data/features/repo_build.feature +1 -1
- data/features/repo_clone.feature +5 -5
- data/features/repo_create.feature +2 -2
- data/features/step_definitions/steps.rb +2 -2
- data/lib/ascii_binder/engine.rb +25 -23
- data/lib/ascii_binder/topic_entity.rb +4 -0
- data/lib/ascii_binder/topic_map.rb +1 -1
- data/lib/ascii_binder/version.rb +1 -1
- metadata +7 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 212faa11c6800de991285d33ab3e538a3dda1e19
|
4
|
+
data.tar.gz: 22ea55e36faa743586e736de2c8eb862a6ee04b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '076619a219d12c97890f8dfee5ee97574b78d9cab9af8979a75b93061df651a53752ecff217ee69f037ec2759efc5aa5f6ad5d7f43e8fc398a18e8fd1fa72375'
|
7
|
+
data.tar.gz: 6fbffc6bc4aa5be720e995fdce8cd7e72ea5afef70da9362c0b129c9ea48ba4295139ebd413c64e73841541de196269ec2406949aa70bdc0c45bcd750bc5ab1b
|
data/ascii_binder.gemspec
CHANGED
@@ -6,8 +6,8 @@ require 'ascii_binder/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "ascii_binder"
|
8
8
|
spec.version = AsciiBinder::VERSION
|
9
|
-
spec.authors = ["N. Harrison Ripps", "Jason Frey"]
|
10
|
-
spec.email = ["nhr@redhat.com", "jfrey@redhat.com"]
|
9
|
+
spec.authors = ["N. Harrison Ripps", "Jason Frey", "Carlos Munoz", "Brian Exelbierd"]
|
10
|
+
spec.email = ["nhr@redhat.com", "jfrey@redhat.com", "chavo16@hotmail.com", "bex@pobox.com"]
|
11
11
|
spec.summary = %q{AsciiBinder is an AsciiDoc-based system for authoring and publishing closely related documentation sets from a single source.}
|
12
12
|
spec.description = spec.summary
|
13
13
|
spec.homepage = "http://asciibinder.org/"
|
@@ -31,7 +31,6 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.add_dependency 'guard-livereload'
|
32
32
|
spec.add_dependency 'haml'
|
33
33
|
spec.add_dependency 'json'
|
34
|
-
spec.add_dependency 'pandoc-ruby'
|
35
34
|
spec.add_dependency 'sitemap_generator', '~> 5.1.0'
|
36
35
|
spec.add_dependency 'trollop', '~> 2.1.2'
|
37
36
|
spec.add_dependency 'yajl-ruby', '~> 1.3.0'
|
@@ -3,6 +3,6 @@ Feature: asciibinder help
|
|
3
3
|
Displays help information for the asciibinder utility
|
4
4
|
|
5
5
|
Scenario: A user wants to see help information for the utility
|
6
|
-
Given a
|
6
|
+
Given a nonexistent repo directory
|
7
7
|
When the user runs `asciibinder help` on that repo directory
|
8
8
|
Then the program displays help information
|
@@ -3,6 +3,6 @@ Feature: asciibinder version
|
|
3
3
|
This command returns the version of the installed utility
|
4
4
|
|
5
5
|
Scenario: A user wants to display the version of the asciibinder utility
|
6
|
-
Given a
|
6
|
+
Given a nonexistent repo directory
|
7
7
|
When the user runs `asciibinder version` on that repo directory
|
8
8
|
Then the program prints the current version of the utility
|
data/features/repo_build.feature
CHANGED
@@ -13,7 +13,7 @@ Feature: asciibinder build
|
|
13
13
|
When the user runs `asciibinder build` on that repo directory
|
14
14
|
Then the program generates preview content for all distros in the current branch
|
15
15
|
|
16
|
-
Scenario: A user wants to do a build in a repo with alias that points to a
|
16
|
+
Scenario: A user wants to do a build in a repo with alias that points to a nonexistent topic
|
17
17
|
Given a valid AsciiBinder docs repo with an invalid alias
|
18
18
|
When the user runs `asciibinder build` on that repo directory
|
19
19
|
Then the program exits with a warning
|
data/features/repo_clone.feature
CHANGED
@@ -3,9 +3,9 @@ Feature: asciibinder clone
|
|
3
3
|
This command clones a remote docs repo to a local directory and
|
4
4
|
sets up tracking branches for each branch listed in the distro map
|
5
5
|
|
6
|
-
Scenario: A user tries to clone a
|
7
|
-
Given a
|
8
|
-
And a
|
6
|
+
Scenario: A user tries to clone a nonexistent remote repo
|
7
|
+
Given a nonexistent remote repo
|
8
|
+
And a nonexistent repo directory
|
9
9
|
When the user runs `asciibinder clone` on that repo directory
|
10
10
|
Then the program exits with a warning
|
11
11
|
|
@@ -15,8 +15,8 @@ Feature: asciibinder clone
|
|
15
15
|
When the user runs `asciibinder clone` on that repo directory
|
16
16
|
Then the program exits with a warning
|
17
17
|
|
18
|
-
Scenario: A user tries to clone a remote repo into a
|
18
|
+
Scenario: A user tries to clone a remote repo into a nonexistent directory
|
19
19
|
Given an existing remote repo
|
20
|
-
And a
|
20
|
+
And a nonexistent repo directory
|
21
21
|
When the user runs `asciibinder clone` on that repo directory
|
22
22
|
Then the program clones the remote repo into the local directory
|
@@ -7,7 +7,7 @@ Feature: asciibinder create
|
|
7
7
|
When the user runs `asciibinder create` on that repo directory
|
8
8
|
Then the program exits with a warning
|
9
9
|
|
10
|
-
Scenario: A user tries to create a repo in a
|
11
|
-
Given a
|
10
|
+
Scenario: A user tries to create a repo in a nonexistent directory
|
11
|
+
Given a nonexistent repo directory
|
12
12
|
When the user runs `asciibinder create` on that repo directory
|
13
13
|
Then the program generates a new base docs repo
|
@@ -8,7 +8,7 @@ Given(/^an existing repo directory$/) do
|
|
8
8
|
Dir.mkdir(working_dir)
|
9
9
|
end
|
10
10
|
|
11
|
-
Given(/^a
|
11
|
+
Given(/^a nonexistent repo directory$/) do
|
12
12
|
working_dir
|
13
13
|
end
|
14
14
|
|
@@ -66,7 +66,7 @@ Given(/^the docs repo contains no generated content$/) do
|
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
|
-
Given(/^a
|
69
|
+
Given(/^a nonexistent remote repo$/) do
|
70
70
|
@remote_repo_url = 'http://example.com/repo.git'
|
71
71
|
end
|
72
72
|
|
data/lib/ascii_binder/engine.rb
CHANGED
@@ -10,7 +10,6 @@ require 'asciidoctor-diagram'
|
|
10
10
|
require 'fileutils'
|
11
11
|
require 'find'
|
12
12
|
require 'git'
|
13
|
-
require 'pandoc-ruby'
|
14
13
|
require 'pathname'
|
15
14
|
require 'sitemap_generator'
|
16
15
|
require 'trollop'
|
@@ -134,7 +133,7 @@ module AsciiBinder
|
|
134
133
|
next if src_path.split('/').length < 3
|
135
134
|
file_list << src_path
|
136
135
|
end
|
137
|
-
file_list.map{ |path| File.join(File.dirname(path),File.basename(path,'.adoc')) }
|
136
|
+
file_list.map{ |path| File.join(File.dirname(path),File.basename(path,'.adoc'))[1..-1] }
|
138
137
|
end
|
139
138
|
|
140
139
|
def remove_found_topic_files(branch,branch_topic_map,branch_topic_files)
|
@@ -489,29 +488,32 @@ module AsciiBinder
|
|
489
488
|
end
|
490
489
|
|
491
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
492
|
|
493
493
|
page_args = {
|
494
|
-
:distro_key
|
495
|
-
:distro
|
496
|
-
:
|
497
|
-
:
|
498
|
-
:
|
499
|
-
:
|
500
|
-
:
|
501
|
-
:
|
502
|
-
:
|
503
|
-
:
|
504
|
-
:
|
505
|
-
:
|
506
|
-
:
|
507
|
-
:
|
508
|
-
:
|
509
|
-
:
|
510
|
-
:
|
511
|
-
:
|
512
|
-
:
|
513
|
-
:
|
514
|
-
:
|
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,
|
515
517
|
}
|
516
518
|
full_file_text = page(page_args)
|
517
519
|
File.write(preview_path,full_file_text)
|
@@ -59,6 +59,10 @@ module AsciiBinder
|
|
59
59
|
File.join(preview_dir,distro_key,branch_dir,repo_path_html)
|
60
60
|
end
|
61
61
|
|
62
|
+
def topic_publish_url(distro_url,branch_dir)
|
63
|
+
File.join(distro_url,branch_dir,repo_path_html)
|
64
|
+
end
|
65
|
+
|
62
66
|
def package_path(site_id,branch_dir)
|
63
67
|
File.join(package_dir,site_id,branch_dir,repo_path_html)
|
64
68
|
end
|
@@ -96,7 +96,7 @@ module AsciiBinder
|
|
96
96
|
end
|
97
97
|
next if valid_url?(alias_map[:redirect_path])
|
98
98
|
if not distro_paths.include?(alias_map[:redirect_path])
|
99
|
-
errors << "Topic alias '#{alias_map[:alias_path]}' points to a
|
99
|
+
errors << "Topic alias '#{alias_map[:alias_path]}' points to a nonexistent topic '#{alias_map[:redirect_path]}' for distro '#{distro_key}'"
|
100
100
|
end
|
101
101
|
end
|
102
102
|
end
|
data/lib/ascii_binder/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ascii_binder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- N. Harrison Ripps
|
8
8
|
- Jason Frey
|
9
|
+
- Carlos Munoz
|
10
|
+
- Brian Exelbierd
|
9
11
|
autorequire:
|
10
12
|
bindir: bin
|
11
13
|
cert_chain: []
|
12
|
-
date: 2017-
|
14
|
+
date: 2017-12-21 00:00:00.000000000 Z
|
13
15
|
dependencies:
|
14
16
|
- !ruby/object:Gem::Dependency
|
15
17
|
name: bundler
|
@@ -179,20 +181,6 @@ dependencies:
|
|
179
181
|
- - ">="
|
180
182
|
- !ruby/object:Gem::Version
|
181
183
|
version: '0'
|
182
|
-
- !ruby/object:Gem::Dependency
|
183
|
-
name: pandoc-ruby
|
184
|
-
requirement: !ruby/object:Gem::Requirement
|
185
|
-
requirements:
|
186
|
-
- - ">="
|
187
|
-
- !ruby/object:Gem::Version
|
188
|
-
version: '0'
|
189
|
-
type: :runtime
|
190
|
-
prerelease: false
|
191
|
-
version_requirements: !ruby/object:Gem::Requirement
|
192
|
-
requirements:
|
193
|
-
- - ">="
|
194
|
-
- !ruby/object:Gem::Version
|
195
|
-
version: '0'
|
196
184
|
- !ruby/object:Gem::Dependency
|
197
185
|
name: sitemap_generator
|
198
186
|
requirement: !ruby/object:Gem::Requirement
|
@@ -254,6 +242,8 @@ description: AsciiBinder is an AsciiDoc-based system for authoring and publishin
|
|
254
242
|
email:
|
255
243
|
- nhr@redhat.com
|
256
244
|
- jfrey@redhat.com
|
245
|
+
- chavo16@hotmail.com
|
246
|
+
- bex@pobox.com
|
257
247
|
executables:
|
258
248
|
- ascii_binder
|
259
249
|
- asciibinder
|
@@ -359,7 +349,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
359
349
|
version: '0'
|
360
350
|
requirements: []
|
361
351
|
rubyforge_project:
|
362
|
-
rubygems_version: 2.6.
|
352
|
+
rubygems_version: 2.6.14
|
363
353
|
signing_key:
|
364
354
|
specification_version: 4
|
365
355
|
summary: AsciiBinder is an AsciiDoc-based system for authoring and publishing closely
|