giblish 1.0.0.rc2 → 1.0.0

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: 306ffd38e0b46b1da0bde8fbfe13e25edd2271cf3c9e40a0bd595e0bd92ab474
4
- data.tar.gz: 63124dcd57d6bc1a4b11c8b92b4250071b4d6bb1f3068e25e8465759722c2b82
3
+ metadata.gz: '099246634de308661fcac8822d2bbfbee328988aa47f0722fe0aa700881aa0d3'
4
+ data.tar.gz: 1517b52f92efb28048ac6f8b43ddbcbde89667b5e8b351bd2ab9cee274edd636
5
5
  SHA512:
6
- metadata.gz: 5f66a14a039fc925c55aef093b28db11f2aabc585b1dae43cf6ab39c42996c13ec85cfdd5f3c4decdc618caa0dfdaf8b43eb5152e9cf53c5f0e60ba50d1e9a52
7
- data.tar.gz: 575c20796a4d9aef25f90760dd1fd9e1bf7897fe9284951486b214bda56cb28a835c2c6a9c8306c91c50764bfb1c3ca170756a276a45b27b94ffc59c2fe972ad
6
+ metadata.gz: 35275a70f4a98fefc8499325bf5dccf6351b6811cd4e73d672c3536175e72ea6421750a163d0e34aee6e8c5d553e0ce1f097fac2abd1ee5f88a81125253fbc27
7
+ data.tar.gz: f020e55eb9df9fc630a36904d9e6155bbfe53d0ae2c27a29610c1a114aeea249e5caa6e0e756fba82347f8884e24df0e892df507da204c3ffd6d1287d1ca6b22
@@ -2,14 +2,14 @@ name: Giblish CI checks
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [personal/rillbert/svg_index]
5
+ branches: [personal/rillbert/*, main]
6
6
 
7
7
  jobs:
8
8
  test:
9
9
  runs-on: ubuntu-latest
10
10
  strategy:
11
11
  matrix:
12
- ruby-version: ["2.7", "3.0"]
12
+ ruby-version: ["2.7", "3.0", "3.1"]
13
13
 
14
14
  steps:
15
15
  - name: Install binutils
data/Changelog.adoc CHANGED
@@ -3,10 +3,8 @@
3
3
  == Not yet in place
4
4
 
5
5
  * Update docs for giblish.
6
- ** the later part of the trigger_generation doc
7
- ** go through and fix spelling
6
+ ** write detailed instructions on howto setup the doc generation examples
8
7
  * Update the default css for giblish html generation.
9
- * Maybe put some effort into the ConversionInfo hierarchy
10
8
 
11
9
  == v1.0.0
12
10
 
data/README.adoc CHANGED
@@ -36,14 +36,12 @@ IMPORTANT: The examples below are *not* the official documentation for the corre
36
36
  The features of giblish include:
37
37
 
38
38
  * An index page listing all rendered documents with clickable links.
39
- * A (stripped-down but nonetheless useful) text-search of your (html) documents (requires that you view your docs via a web-server.
40
39
  * If the source directory tree is part of a git repository, giblish can generate separate html/pdf trees for branches and/or tags that match a user specified regexp (see examples below).
41
40
  * Document ids - Note: the implementation of this is giblish-specific and thus you need to render your adoc files using giblish to make this work as intended. You can use document ids to:
42
41
  ** Reference one doc in the source tree from another doc without depending on file names or relative paths. The referenced doc can thus be moved within the source tree or change its file name and the reference will still be valid.
43
42
  ** Validate doc id references during document rendering and thus be alerted to any invalid doc id references.
44
43
  ** Let giblish generate a clickable graph of all document references (requires graphviz and the 'dot' tool).
45
-
46
- NOTE: giblish shall be considered stable from a usage perspective, please report bugs to the issue tracker. It's API however, is to be considered alpha, meaning that future versions may break the current usage of cmd line flags, generated artifacts, styling or other functionality.
44
+ * A stripped-down, but nonetheless useful, text-search of your html documents. This requires that you publish your docs to a web-server and setup an application on that same web-server. `giblish` provides most of the scaffolding though.
47
45
 
48
46
  == Dependencies and credits
49
47
 
@@ -55,12 +53,6 @@ Giblish uses the awesome *asciidoctor* and *asciidoctor-pdf* projects under the
55
53
 
56
54
  Want to get started straight away? Go directly to the <<usage_examples>>.
57
55
 
58
- // install script for linux deps to the mathematica gem:
59
- // https://github.com/gjtorikian/mathematical/blob/47041d5492cc7c5f04105031430fb44119406f49/script/install_linux_deps
60
- //
61
- // Graphviz needed for some tests to pass
62
-
63
-
64
56
  === Some caveats
65
57
 
66
58
  When using giblish for generating docs the following applies:
@@ -82,6 +74,8 @@ Pull requests must meet the following to be considered for merging:
82
74
  To develop on giblish, you:
83
75
 
84
76
  . Install ruby on your local machine (rbenv is a good choice for handling ruby installations)
77
+ . Install necessary dependencies to install the ruby 'mathematica' gem, see eg https://github.com/gjtorikian/mathematical/blob/47041d5492cc7c5f04105031430fb44119406f49/script/install_linux_deps
78
+ . Install graphviz
85
79
  . Clone or fork the repository
86
80
  . Run the `bin/setup` script from a bash prompt
87
81
 
@@ -97,8 +91,8 @@ giblish extends the cross reference concept in asciidoc with a _document id_ mec
97
91
 
98
92
  Using doc ids makes it possible for giblish to do two things:
99
93
 
100
- . Make the reference from one document to another work even if one of the documents have been moved within the source tree.
101
- . Produce a clickable 'map' of the generated documents where the different references are clearly seen (this feature require that the 'dot' tool, part of the graphwiz package is installed on the machine where giblish is run).
94
+ . Make references from one document in the tree to another work even if one of the documents have been moved within the document source tree.
95
+ . Produce a clickable 'map' of the generated documents where the different references are clearly seen. This feature require that the 'dot' tool, part of the graphwiz package is installed on the machine where giblish is run.
102
96
 
103
97
  The use of the -d switch makes giblish parse the document twice, once to map up the doc ids and all references to them, once to actually generate the output documentation. Thus, you pay a performance penalty but this should not be a big inconvenience since the generation is quite fast in itself.
104
98
 
@@ -175,15 +169,15 @@ Generate html that can be browsed locally from file:://<my_dst_root>.
175
169
 
176
170
  * convert all .adoc or .ADOC files under the dir `my_src_root` to html and place the resulting files under the `my_dst_root` dir.
177
171
  * generate an index page named `index.html` that contains links and some info about the converted files. The file is placed in the `my_dst_root` dir.
178
- * copy the `css`, `fonts` and `images` directories found under `<working_dir>/path/to/my/resources` to `my_dst_root/web_assets`
179
- * link all generated html files to the css found at `/web_assets/css/mylayout.css`
172
+ * copy everything found under `<working_dir>/path/to/my/resources` to `my_dst_root/web_assets`
173
+ * link all generated html files to the mylayout.css found somewhere under `/web_assets`
180
174
 
181
175
  === Using a custom pdf theme for the generated pdfs
182
176
 
183
177
  giblish -f pdf -r path/to/my/resources -s mylayout my_src_root my_dst_root
184
178
 
185
179
  * convert all .adoc or .ADOC files under the dir `my_src_root` to pdf and place the resulting files under the `my_dst_root` dir. some info about the converted files. The file is placed in the `my_dst_root` dir.
186
- * the generated pdf will use the theme found at `<working_dir>/path/to/my/resources/themes/mylayout.yml`
180
+ * the pdfs will be rendered using the theme file named mylayout.yml found somewhere under `<working_dir>/path/to/my/resources`
187
181
 
188
182
  === Generate html from multiple git branches
189
183
 
@@ -196,72 +190,72 @@ Generate html that can be browsed locally from file:://<my_dst_root>.
196
190
  ** generate an index page named `index.html` that contains links and some info about the converted files. The file is placed in the `my_dst_root/<branch_name` dir.
197
191
  * generate a summary page containing links to a all branches and place it in the `my_dst_root` dir.
198
192
 
199
- === Publish the asciidoctor.org documents with text search
193
+ // === Publish the asciidoctor.org documents with text search
200
194
 
201
- giblish can be used to generate html docs suitable for serving via a web server (e.g. Apache). You can use the cgi script included in the giblish gem to provide text search capabilities.
195
+ // giblish can be used to generate html docs suitable for serving via a web server (e.g. Apache). You can use the cgi script included in the giblish gem to provide text search capabilities.
202
196
 
203
- Here is an example of how to publish the docs in the official asciidoctor.org git repo to a web server, including index pages and text search.
197
+ // Here is an example of how to publish the docs in the official asciidoctor.org git repo to a web server, including index pages and text search.
204
198
 
205
- NOTE: No consideration has been taken to how permissions are set up on the web server. Just running the below commands as-is on e.g.a standard apache set-up will bail out with 'permission denied' errors.
199
+ // NOTE: No consideration has been taken to how permissions are set up on the web server. Just running the below commands as-is on e.g.a standard apache set-up will bail out with 'permission denied' errors.
206
200
 
207
- ==== Generating the html documents
201
+ // ==== Generating the html documents
208
202
 
209
- The example assumes that you have one machine where you generate the documents and another machine that runs a web server to which you have ssh access.
203
+ // The example assumes that you have one machine where you generate the documents and another machine that runs a web server to which you have ssh access.
210
204
 
211
- The generated docs shall be accessible via _www.example.com/adocorg/with_search_
205
+ // The generated docs shall be accessible via _www.example.com/adocorg/with_search_
212
206
 
213
- You need to provide two pieces of deployment info to giblish when generating the documents:
207
+ // You need to provide two pieces of deployment info to giblish when generating the documents:
214
208
 
215
- * the uri path where to access the deployed docs (/adocorg/with_search in this example)
216
- * the path in the local file system on the web server where the search data can be accessed
217
- (/var/www/html/site_1/adocorg/with_search in this example)
209
+ // * the uri path where to access the deployed docs (/adocorg/with_search in this example)
210
+ // * the path in the local file system on the web server where the search data can be accessed
211
+ // (/var/www/html/site_1/adocorg/with_search in this example)
218
212
 
219
- The following commands will generate the asciidoctor.org documentation and deploy the result to the web server.
213
+ // The following commands will generate the asciidoctor.org documentation and deploy the result to the web server.
220
214
 
221
- . Clone the asciidoctor doc repo to your development machine
222
- +
223
- git clone https://github.com/asciidoctor/asciidoctor.org.git
215
+ // . Clone the asciidoctor doc repo to your development machine
216
+ // +
217
+ // git clone https://github.com/asciidoctor/asciidoctor.org.git
224
218
 
225
- . Generate the html documentation with the correct deployment info
226
- +
227
- giblish -j '^.*_include.*' -m -mp /var/www/html/site_1/adocorg/with_search -w /adocorg/with_search -g master --index-basename "myindex" asciidoctor.org/docs ./generated_docs
228
- +
229
- Explanation of the parameters and arguments::
230
- * *pass:[-j '^.*_include.*']* - exclude everything in the __include_ directory. (the
231
- asciidoctor.org repo stores partial docs here).
232
- * *-m* - assemble the necessary search data to support text search and include this data as part of
233
- the generated documents.
234
- * *-mp /var/www/html/site_1/adocorg/with_search* - the file system path on the deployment machine where
235
- the search data is located
236
- * *-w /adocorg/with_search* - the uri path to the deployed docs
237
- * *-g master* - publish all git branches that matches the regexp 'master' (i.e. only the 'master'
238
- branch).
239
- * *--index-basename "myindex"* - change the default name (index) that giblish uses for the generated
240
- index page. This is needed since asciidoctor.org contains an
241
- "index.adoc" file that would otherwise be overwritten by giblish.
242
- * *asciidoctor.org/docs* - the root of the source document tree.
243
- * *./generated_docs* - a temporary storage for the generated html docs on the local system.
244
- +
219
+ // . Generate the html documentation with the correct deployment info
220
+ // +
221
+ // giblish -j '^.*_include.*' -m -mp /var/www/html/site_1/adocorg/with_search -w /adocorg/with_search -g master --index-basename "myindex" asciidoctor.org/docs ./generated_docs
222
+ // +
223
+ // Explanation of the parameters and arguments::
224
+ // * *pass:[-j '^.*_include.*']* - exclude everything in the __include_ directory. (the
225
+ // asciidoctor.org repo stores partial docs here).
226
+ // * *-m* - assemble the necessary search data to support text search and include this data as part of
227
+ // the generated documents.
228
+ // * *-mp /var/www/html/site_1/adocorg/with_search* - the file system path on the deployment machine where
229
+ // the search data is located
230
+ // * *-w /adocorg/with_search* - the uri path to the deployed docs
231
+ // * *-g master* - publish all git branches that matches the regexp 'master' (i.e. only the 'master'
232
+ // branch).
233
+ // * *--index-basename "myindex"* - change the default name (index) that giblish uses for the generated
234
+ // index page. This is needed since asciidoctor.org contains an
235
+ // "index.adoc" file that would otherwise be overwritten by giblish.
236
+ // * *asciidoctor.org/docs* - the root of the source document tree.
237
+ // * *./generated_docs* - a temporary storage for the generated html docs on the local system.
238
+ // +
245
239
 
246
- . Copy the generated files to the web server
240
+ // . Copy the generated files to the web server
247
241
 
248
- scp -r ./generated_docs rillbert@my.web.server.org:/var/www/adocorg/with_search/.
249
- +
242
+ // scp -r ./generated_docs rillbert@my.web.server.org:/var/www/adocorg/with_search/.
243
+ // +
250
244
 
251
245
 
252
- ==== Copy the text search script to the web server
246
+ // ==== Copy the text search script to the web server
253
247
 
254
- This only needs to be done once (or if a new version of giblish breaks the currently used API).
248
+ // This only needs to be done once (or if a new version of giblish breaks the currently used API).
255
249
 
256
- IMPORTANT: The current version of giblish expects the script to be found at the URI path `/cgi-bin/giblish-search.cgi`. This might be customizable in future versions but is currently hard-coded. Thus, if your web-server serves pages at www.mywebsite.com, the search script must be accessible at www.mywebsite.com/cgi-bin/giblish-search.cgi
250
+ // IMPORTANT: The current version of giblish expects the script to be found at the URI path `/cgi-bin/giblish-search.cgi`. This might be customizable in future versions but is currently hard-coded. Thus, if your web-server serves pages at www.mywebsite.com, the search script must be accessible at www.mywebsite.com/cgi-bin/giblish-search.cgi
257
251
 
258
- . Find the server side script that implements text search that is included with giblish
252
+ // . Find the server side script that implements text search that is included with giblish
259
253
 
260
- gem which giblish
261
- +
254
+ // gem which giblish
255
+ // +
262
256
 
263
- In my case this returns `/var/lib/ruby/gems/2.4.0/gems/giblish-0.5.2/lib/giblish.rb`. This means that I will find the script in the same directory, i.e. `/var/lib/ruby/gems/2.4.0/gems/giblish-0.5.2/lib`.
257
+ // In my case this returns `/var/lib/ruby/gems/2.4.0/gems/giblish-0.5.2/lib/giblish.rb`. This means that I will find the script in the same directory, i.e. `/var/lib/ruby/gems/2.4.0/gems/giblish-0.5.2/lib`.
264
258
 
265
- . Copy the server side script to the /cgi-bin dir on the web server. In this example the cgi-bin dir is configured to be `/var/www/cgi-bin`
266
- +
267
- scp /var/lib/ruby/gems/2.4.0/gems/giblish-0.5.2/lib/giblish-search.cgi rillbert@my.web.server.org:/var/www/cgi-bin/giblish-search.cgi
259
+ // . Copy the server side script to the /cgi-bin dir on the web server. In this example the cgi-bin dir is configured to be `/var/www/cgi-bin`
260
+ // +
261
+ // scp /var/lib/ruby/gems/2.4.0/gems/giblish-0.5.2/lib/giblish-search.cgi rillbert@my.web.server.org:/var/www/cgi-bin/giblish-search.cgi
data/giblish.gemspec CHANGED
@@ -58,6 +58,9 @@ Gem::Specification.new do |spec|
58
58
  spec.add_development_dependency "rack-test", "1.1"
59
59
 
60
60
  # Run-time deps
61
+ # 'matrix' needed because of incompatibilities between prawn v2.4
62
+ # and ruby 3.1
63
+ spec.add_runtime_dependency "matrix", "~>0.4"
61
64
  spec.add_runtime_dependency "warning", "~>1.2"
62
65
  spec.add_runtime_dependency "asciidoctor", "~>2.0", ">= 2.0.17"
63
66
  spec.add_runtime_dependency "asciidoctor-diagram", ["~> 2.2"]
@@ -1,3 +1,3 @@
1
1
  module Giblish
2
- VERSION = "1.0.0.rc2".freeze
2
+ VERSION = "1.0.0".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: giblish
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anders Rillbert
@@ -150,6 +150,20 @@ dependencies:
150
150
  - - '='
151
151
  - !ruby/object:Gem::Version
152
152
  version: '1.1'
153
+ - !ruby/object:Gem::Dependency
154
+ name: matrix
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '0.4'
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '0.4'
153
167
  - !ruby/object:Gem::Dependency
154
168
  name: warning
155
169
  requirement: !ruby/object:Gem::Requirement
@@ -370,9 +384,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
370
384
  version: '0'
371
385
  required_rubygems_version: !ruby/object:Gem::Requirement
372
386
  requirements:
373
- - - ">"
387
+ - - ">="
374
388
  - !ruby/object:Gem::Version
375
- version: 1.3.1
389
+ version: '0'
376
390
  requirements: []
377
391
  rubygems_version: 3.2.32
378
392
  signing_key: