relaton-cli 0.1.4 → 0.1.5

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: acaf3abbad33304c0ab6dfb6be03a86d2d90e7746b494ddbd739c6a30643691d
4
- data.tar.gz: a1c604c89f7543d7b73596384b5d851aa382900e4895ed81bc8c27ad4b83fd59
3
+ metadata.gz: d311f192852ef9e45bca1618e0168cdba18df449e550037a1affba51420f9f36
4
+ data.tar.gz: '085e04682de9b4d968b6976678a8e5a332d18b03d959d3b2dc9f370276d6f0b9'
5
5
  SHA512:
6
- metadata.gz: f11878522fda0aa839d51f9a50407ae94965a67b8dabce4cc36b00601b563da3574ce9d4fda42ffdc2d257ce7e3d7e0159f92f8335928eac14d893c7f3452ae1
7
- data.tar.gz: b618737bbc2bee1605ecc4541ccc6b99edc34e3cbb5668dbe6aca63d6c0e23e47ca519877491b4728f771b13e8b03d9b8be4246f7b3b257fd2870cdab7957695
6
+ metadata.gz: d82f46a6e185caa90229808b8f7468ee0e507775bdf4d07b9f1676f2d27574c17079f90fc265a92d8a6ab77091dacde56936242b64931159d54a0b570ddc6515
7
+ data.tar.gz: 6ab3fcb92bf919c6cbf3d5a448bd1e634aede4bbb8a346b290bef19bbc8c95ea16c7e3e9bce061e116ff010feafa78d2d86f4a4f6f5760eb13db88f8bdb0ae9f
data/Gemfile.lock CHANGED
@@ -11,7 +11,7 @@ GEM
11
11
  specs:
12
12
  addressable (2.5.2)
13
13
  public_suffix (>= 2.0.2, < 4.0)
14
- algoliasearch (1.23.2)
14
+ algoliasearch (1.24.0)
15
15
  httpclient (~> 2.8, >= 2.8.3)
16
16
  json (>= 1.5.1)
17
17
  byebug (10.0.2)
@@ -21,21 +21,21 @@ GEM
21
21
  equivalent-xml (0.6.0)
22
22
  nokogiri (>= 1.4.3)
23
23
  gb-agencies (0.0.5)
24
- gbbib (0.4.1)
24
+ gbbib (0.4.3)
25
25
  cnccs (~> 0.1.1)
26
26
  gb-agencies (~> 0.0.1)
27
27
  iso-bib-item (~> 0.4.2)
28
28
  httpclient (2.8.3)
29
- iecbib (0.2.1)
29
+ iecbib (0.2.2)
30
30
  addressable
31
31
  iso-bib-item (~> 0.4.2)
32
- ietfbib (0.4.3)
32
+ ietfbib (0.4.5)
33
33
  iso-bib-item (~> 0.4.2)
34
- iso-bib-item (0.4.3)
34
+ iso-bib-item (0.4.4)
35
35
  isoics (~> 0.1.6)
36
36
  nokogiri (~> 1.8.4)
37
37
  ruby_deep_clone (~> 0.8.0)
38
- isobib (0.4.1)
38
+ isobib (0.4.2)
39
39
  algoliasearch
40
40
  iecbib (~> 0.2.1)
41
41
  iso-bib-item (~> 0.4.2)
@@ -44,15 +44,15 @@ GEM
44
44
  liquid (4.0.1)
45
45
  method_source (0.9.2)
46
46
  mini_portile2 (2.3.0)
47
- mixlib-shellout (2.4.0)
47
+ mixlib-shellout (2.4.2)
48
48
  nokogiri (1.8.5)
49
49
  mini_portile2 (~> 2.3.0)
50
50
  pry (0.12.2)
51
51
  coderay (~> 1.1.0)
52
52
  method_source (~> 0.9.0)
53
53
  public_suffix (3.0.3)
54
- rake (12.3.1)
55
- relaton (0.3.0)
54
+ rake (12.3.2)
55
+ relaton (0.3.1)
56
56
  algoliasearch
57
57
  gbbib (~> 0.4.0)
58
58
  iecbib (~> 0.2.0)
@@ -13,7 +13,7 @@ module Relaton
13
13
  doc
14
14
  html
15
15
  uri
16
- relaton
16
+ rxl
17
17
  revdate
18
18
  abstract
19
19
  technical_committee
@@ -73,7 +73,7 @@ module Relaton
73
73
  xml: source.at(ns("./uri[@type='xml']"))&.text,
74
74
  pdf: source.at(ns("./uri[@type='pdf']"))&.text,
75
75
  html: source.at(ns("./uri[@type='html']"))&.text,
76
- relaton: source.at(ns("./uri[@type='relaton']"))&.text,
76
+ rxl: source.at(ns("./uri[@type='rxl']"))&.text,
77
77
  doc: source.at(ns("./uri[@type='doc']"))&.text,
78
78
  docidentifier: source.at(ns("./docidentifier"))&.text,
79
79
  title: source.at(ns("./title"))&.text,
@@ -107,7 +107,7 @@ module Relaton
107
107
  ret += "<uri type='html'>#{html}</uri>\n" if html
108
108
  ret += "<uri type='pdf'>#{pdf}</uri>\n" if pdf
109
109
  ret += "<uri type='doc'>#{doc}</uri>\n" if doc
110
- ret += "<uri type='relaton'>#{relaton}</uri>\n" if relaton
110
+ ret += "<uri type='rxl'>#{rxl}</uri>\n" if rxl
111
111
 
112
112
  ret += "<language>#{language}</language>\n"
113
113
  ret += "<script>#{script}</script>\n"
@@ -1,6 +1,7 @@
1
1
  require "relaton/cli/relaton_file"
2
2
  require "relaton/cli/xml_convertor"
3
3
  require "relaton/cli/yaml_convertor"
4
+ require "fcntl"
4
5
 
5
6
  module Relaton
6
7
  module Cli
@@ -11,7 +12,8 @@ module Relaton
11
12
 
12
13
  def fetch(code)
13
14
  Relaton::Cli.relaton
14
- say(fetch_document(code, options) || supported_type_message)
15
+ io = IO.new(STDOUT.fcntl(::Fcntl::F_DUPFD), mode: 'w:UTF-8')
16
+ io.puts(fetch_document(code, options) || supported_type_message)
15
17
  end
16
18
 
17
19
  desc "extract Metanorma-XML-Directory Relaton-XML-Directory", "Extract Relaton XML from folder of Metanorma XML"
@@ -102,7 +102,7 @@ module Relaton
102
102
  end
103
103
 
104
104
  def build_bibdata_relaton(bibdata, file)
105
- ["xml", "pdf", "doc", "html"].each do |type|
105
+ ["xml", "pdf", "doc", "html", "rxl"].each do |type|
106
106
  file = Pathname.new(file).sub_ext(".#{type}")
107
107
  bibdata.send("#{type}=", file) if File.file?(file)
108
108
  end
@@ -1,5 +1,5 @@
1
1
  module Relaton
2
2
  module Cli
3
- VERSION = "0.1.4".freeze
3
+ VERSION = "0.1.5".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-11-19 00:00:00.000000000 Z
11
+ date: 2018-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler