metanorma-cli 1.4.11 → 1.4.13

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aeb21455a422e9fc84f03e659169cd95001d69516aada298a170cab52fac0e7c
4
- data.tar.gz: 7fd3811aa62df6c6a87297688d427d43de441fca1df504e5486b38deca3ea3bb
3
+ metadata.gz: 9d970059361b835cee83ac9cf99d7876552536a656db299fddaab7f1b66586a4
4
+ data.tar.gz: f98918779ead848b3f60d683b931bb9b9b0074102aabb02aa89c9824695871d4
5
5
  SHA512:
6
- metadata.gz: 06aa13679a522ba032a957a53cbd7897f47c16aa0372625c0f3594770eb2f8d8296582ce71838655d1721e552103f94dec2c6ac0d9305ed4f801b44778f2edf0
7
- data.tar.gz: ae662917ddb624ba7b85924abbc11ffd5302cdcc437e77483f496b9559a24245d25c0807f7daf4d45bf074c865a0631aab2cb71504c6d0df6843fe77d2644aa3
6
+ metadata.gz: 662c3d0ef7dff9526feed6e91d54d79b4e1b16e12783a817ee6f42e3bd3fb1f210e9054592a59817e2b26b6919df3f2035949fc47985902e4ab588644f826658
7
+ data.tar.gz: 87379dc1184a7760aeac5ba59bbb8ed315973d14299262054d3588efbff6f5c3e803a362e96ae250f7f5f34008b430d79036dad23ce76a44cad87a50fba91758
data/README.adoc CHANGED
@@ -185,7 +185,7 @@ are `ietf`, `iso`, `gb`, `csd`, `csand`, `m3d` and `rsd`.
185
185
 
186
186
  This functionality compiles collections of Metanorma documents. It compiles
187
187
  the individual documents comprising the collection; then it compiles a document
188
- acting as a container for those collections. See
188
+ acting as a container for those collections. See
189
189
  https://github.com/metanorma/metanorma/wiki/Metanorma-collections[],
190
190
  https://github.com/metanorma/metanorma-cli/blob/master/spec/fixtures/collection1.yml[]
191
191
 
@@ -199,7 +199,7 @@ which contains:
199
199
  * Content to put at the ending of the collection container
200
200
 
201
201
  Documents within a collection
202
- may cross-reference each other using the syntax
202
+ may cross-reference each other using the syntax
203
203
  `* [[[myanchor,repo:(current-metanorma-collection/mydoc)]]]`,
204
204
  as proposed in https://github.com/metanorma/metanorma/issues/57, where
205
205
  `mydoc` is be the value of docref/identifier corresponding to the target document,
@@ -324,6 +324,21 @@ the site generation process. You can check more details here: link:./spec/fixtur
324
324
  metanorma site generate SOURCE_PATH -o OUTPUT_PATH -c metanorma.yml
325
325
  ----
326
326
 
327
+ === Using with proxy
328
+
329
+ The `metanorma` command can read proxy settings from the following
330
+ environment variables:
331
+
332
+ * `HTTP_PROXY` for HTTPS and HTTP proxies
333
+ * `SOCKS_PROXY` for SOCKS proxies
334
+
335
+ Please refer to our https://www.metanorma.org/blog/2021-07-20/metanorma-with-proxies/[announcement on proxy support] for details.
336
+
337
+ NOTE: Since `metanorma` uses Git for templates (and fonts via Fontist, which also relies on Git),
338
+ Git must also be configured to use proxies. Please refer to
339
+ https://gist.github.com/evantoli/f8c23a37eb3558ab8765[this Gist by evantoli] for details.
340
+
341
+
327
342
  == Credits
328
343
 
329
344
  This gem is developed, maintained and funded by https://www.metanorma.com/docs/getting-started/[Ribose Inc.]
data/exe/metanorma CHANGED
@@ -11,10 +11,31 @@ $:.unshift File.expand_path("../../lib", bin_file)
11
11
  # Fixes https://github.com/rubygems/rubygems/issues/1420
12
12
  require "rubygems/specification"
13
13
 
14
- class Gem::Specification
15
- def this; self; end
14
+ module Gem
15
+ class Specification
16
+ def this; self; end
17
+ end
16
18
  end
17
19
 
18
20
  # start up the CLI
19
21
  require "metanorma/cli"
20
- Metanorma::Cli.start(ARGV)
22
+ metanorma_cli = proc { Metanorma::Cli.start(ARGV) }
23
+ if ENV["SOCKS_PROXY"]
24
+ require "socksify"
25
+ require "uri"
26
+ begin
27
+ proxy = URI.parse(ENV["SOCKS_PROXY"])
28
+ if proxy.userinfo
29
+ user, pass = proxy.userinfo.split(":")
30
+ TCPSocket::socks_username = user
31
+ TCPSocket::socks_password = pass
32
+ end
33
+ Socksify::proxy(proxy.host, proxy.port, &metanorma_cli)
34
+ rescue URI::InvalidURIError
35
+ warn "Value of ENV.SOCKS_PROXY=#{ENV['SOCKS_PROXY']} is invalid! Droping it"
36
+ ENV.delete("SOCKS_PROXY")
37
+ metanorma_cli.call
38
+ end
39
+ else
40
+ metanorma_cli.call
41
+ end
@@ -10,16 +10,15 @@ module Metanorma
10
10
 
11
11
  def remove!
12
12
  remove_template
13
- return true
13
+ true
14
14
  end
15
15
 
16
16
  def download
17
17
  remove!
18
18
  clone_git_template(options[:repo])
19
-
20
19
  rescue Git::GitExecuteError
21
20
  UI.say("Invalid template reoository!")
22
- return nil
21
+ nil
23
22
  end
24
23
 
25
24
  def find_or_download
@@ -86,7 +85,7 @@ module Metanorma
86
85
  iso: "https://github.com/metanorma/mn-templates-iso",
87
86
  iec: "https://github.com/metanorma/mn-templates-iec",
88
87
  itu: "https://github.com/metanorma/mn-templates-itu",
89
- ietf: "https://github.com/metanorma/mn-templates-ietf"
88
+ ietf: "https://github.com/metanorma/mn-templates-ietf",
90
89
  }
91
90
  end
92
91
 
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Cli
3
- VERSION = "1.4.11".freeze
3
+ VERSION = "1.4.13".freeze
4
4
  end
5
5
  end
@@ -36,15 +36,15 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency "rubocop", "~> 1.5.2"
37
37
  spec.add_development_dependency "sassc"
38
38
 
39
- spec.add_runtime_dependency "metanorma-ietf", "~> 2.3.0"
40
- spec.add_runtime_dependency "metanorma-iso", "~> 1.8.0"
39
+ spec.add_runtime_dependency "metanorma-ietf", "~> 2.4.0"
40
+ spec.add_runtime_dependency "metanorma-iso", "~> 1.9.0"
41
41
  spec.add_runtime_dependency "thor", "~> 1.0"
42
42
  # spec.add_runtime_dependency "metanorma-gb", "~> 1.5.0"
43
43
  spec.add_runtime_dependency "metanorma-cc", "~> 1.7.0"
44
44
  spec.add_runtime_dependency "metanorma-csa", "~> 1.8.0"
45
45
  spec.add_runtime_dependency "metanorma-iec", "~> 1.3.0"
46
46
  # spec.add_runtime_dependency 'metanorma-ribose', "~> 1.6.0"
47
- spec.add_runtime_dependency "metanorma-bipm", "~> 1.1.0"
47
+ spec.add_runtime_dependency "metanorma-bipm", "~> 1.1.5"
48
48
  spec.add_runtime_dependency "metanorma-generic", "~> 1.10.2"
49
49
  spec.add_runtime_dependency "metanorma-m3aawg", "~> 1.7.0"
50
50
  spec.add_runtime_dependency "metanorma-standoc", "~> 1.10.0"
@@ -58,4 +58,6 @@ Gem::Specification.new do |spec|
58
58
  spec.add_runtime_dependency "metanorma-ogc", "~> 1.3.0"
59
59
  spec.add_runtime_dependency "metanorma-un", "~> 0.6.0"
60
60
  spec.add_runtime_dependency "relaton-cli", ">= 0.8.2"
61
+
62
+ spec.add_runtime_dependency "socksify"
61
63
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.11
4
+ version: 1.4.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-07 00:00:00.000000000 Z
11
+ date: 2021-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug
@@ -170,28 +170,28 @@ dependencies:
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: 2.3.0
173
+ version: 2.4.0
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: 2.3.0
180
+ version: 2.4.0
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: metanorma-iso
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: 1.8.0
187
+ version: 1.9.0
188
188
  type: :runtime
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: 1.8.0
194
+ version: 1.9.0
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: thor
197
197
  requirement: !ruby/object:Gem::Requirement
@@ -254,14 +254,14 @@ dependencies:
254
254
  requirements:
255
255
  - - "~>"
256
256
  - !ruby/object:Gem::Version
257
- version: 1.1.0
257
+ version: 1.1.5
258
258
  type: :runtime
259
259
  prerelease: false
260
260
  version_requirements: !ruby/object:Gem::Requirement
261
261
  requirements:
262
262
  - - "~>"
263
263
  - !ruby/object:Gem::Version
264
- version: 1.1.0
264
+ version: 1.1.5
265
265
  - !ruby/object:Gem::Dependency
266
266
  name: metanorma-generic
267
267
  requirement: !ruby/object:Gem::Requirement
@@ -416,6 +416,20 @@ dependencies:
416
416
  - - ">="
417
417
  - !ruby/object:Gem::Version
418
418
  version: 0.8.2
419
+ - !ruby/object:Gem::Dependency
420
+ name: socksify
421
+ requirement: !ruby/object:Gem::Requirement
422
+ requirements:
423
+ - - ">="
424
+ - !ruby/object:Gem::Version
425
+ version: '0'
426
+ type: :runtime
427
+ prerelease: false
428
+ version_requirements: !ruby/object:Gem::Requirement
429
+ requirements:
430
+ - - ">="
431
+ - !ruby/object:Gem::Version
432
+ version: '0'
419
433
  description: Executable to process any Metanorma standard.
420
434
  email:
421
435
  - open.source@ribose.com
@@ -499,7 +513,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
499
513
  - !ruby/object:Gem::Version
500
514
  version: '0'
501
515
  requirements: []
502
- rubygems_version: 3.1.4
516
+ rubyforge_project:
517
+ rubygems_version: 2.7.7
503
518
  signing_key:
504
519
  specification_version: 4
505
520
  summary: Metanorma is the standard of standards; the metanorma gem allows you to create