relaton-cli 0.1.9 → 0.1.10

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: 7864959606a5a5ea10e2b4dbb7fe2e922662779bdc7b7e56041434269533624e
4
- data.tar.gz: a2f45e732d3f90328f5dfabcb2bc74ddf4d3f3d869cf26a57a36bd467089db67
3
+ metadata.gz: f1e8d976c2b02974585ecdae77bf5737e7d3b2701c79f168ab44d775c005935e
4
+ data.tar.gz: 39c205cb7863fb70e43c465c28e87ae54935501b1f9ef0427ef0349b7cbb3047
5
5
  SHA512:
6
- metadata.gz: 7b686cd2eb16b7b6ffd89cb16d3a1405803b52a080c0f185655f77e4ab6ce88dc9985fcd3f3dbb82da27fac50c932f341a567d5a6eb2860dba24d271595a11fb
7
- data.tar.gz: 22775ba4fd0f900d1618c9b731188c5a50a59ba07e760c9c453ed87bbfc8bb574ed044d9c77da7b6216475f01968a0549403fb9a1a2950587fb575ef74af1029
6
+ metadata.gz: fa32c9beb7744a8eba3d41661ac68a5010923b7a7017e29c145d75b37694916203a71365daa69a8ff76148164aee335837752904c3daa3c3d7ecbac16e5cdfb3
7
+ data.tar.gz: c430918d1db7b87438a8e5b64e34bed702ffdeabf07dc06bcc3911b60327d9ad05ab8ab4ec2a70a7b03f7129d8a7626e0bd599b3e86a06ca341d5232f0eec86f
data/.travis.yml CHANGED
@@ -1,18 +1,18 @@
1
- dist: trusty
2
- sudo: false
3
1
  language: ruby
2
+ cache: bundler
3
+ os:
4
+ - linux
5
+ - osx
4
6
  rvm:
5
- - 2.5
6
- - 2.4
7
- - 2.3
8
- - ruby-head
9
-
7
+ - 2.5
8
+ - 2.4
9
+ - 2.3
10
+ - ruby-head
10
11
  before_install:
11
- - gem install bundler -v 1.16.1
12
- - unset _JAVA_OPTIONS
13
- - mkdir ./tmp
14
- - mkdir ~/.relaton
15
-
12
+ - gem install bundler -v 2.0.1
13
+ - bundle update
14
+ - mkdir ./tmp
15
+ - mkdir ~/.relaton
16
16
  matrix:
17
17
  allow_failures:
18
18
  - rvm: 2.3
data/appveyor.yml ADDED
@@ -0,0 +1,29 @@
1
+ version: '{build}'
2
+
3
+ environment:
4
+ matrix:
5
+ - RUBY_VERSION: 25
6
+ - RUBY_VERSION: 24
7
+ - RUBY_VERSION: _trunk
8
+
9
+ matrix:
10
+ allow_failures:
11
+ - RUBY_VERSION: _trunk
12
+
13
+ install:
14
+ - ps: . { iwr -useb https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/appveyor.ps1 } | iex
15
+ - refreshenv
16
+
17
+ build_script:
18
+ - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
19
+ - bundle update
20
+ - bundle install
21
+
22
+ before_test:
23
+ - ruby -v
24
+ - gem -v
25
+ - bundle -v
26
+
27
+ test_script:
28
+ - bundle exec rake
29
+
data/docs/README.adoc CHANGED
@@ -1,12 +1,13 @@
1
1
  = Relaton CLI (relaton-cli): Relaton Command-line Interface
2
2
 
3
3
  image:https://img.shields.io/gem/v/relaton-cli.svg["Gem Version", link="https://rubygems.org/gems/relaton-cli"]
4
- image:https://img.shields.io/travis/riboseinc/relaton-cli/master.svg["Build Status", link="https://travis-ci.org/riboseinc/relaton-cli"]
5
- image:https://codeclimate.com/github/riboseinc/relaton-cli/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/riboseinc/relaton-cli"]
4
+ image:https://img.shields.io/travis/metanorma/relaton-cli/master.svg["Build Status", link="https://travis-ci.org/metanorma/relaton-cli"]
5
+ image:https://ci.appveyor.com/api/projects/status/fyy87flpig4q5o2u?svg=true["Appveyor Build Status", link="https://ci.appveyor.com/project/ribose/relaton-cli"]
6
+ image:https://codeclimate.com/github/metanorma/relaton-cli/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/relaton-cli"]
6
7
 
7
8
  Documentation in development.
8
9
 
9
- Please refer to https://github.com/riboseinc/relaton.
10
+ Please refer to https://github.com/metanorma/relaton.
10
11
 
11
12
  == Executables
12
13
 
@@ -27,6 +27,7 @@ module Relaton
27
27
  script
28
28
  edition
29
29
  datetype
30
+ bib_rxl
30
31
  ]
31
32
 
32
33
  attr_accessor *ATTRIBS
@@ -139,10 +139,18 @@ module Relaton
139
139
 
140
140
  relaton_collection.items.each do |content|
141
141
  name = build_filename(nil, content.docidentifier)
142
+ find_available_bibrxl_file(name, output_dir, content)
142
143
  write_to_file(content.send(output_type), output_dir, name)
143
144
  end
144
145
  end
145
146
 
147
+ def find_available_bibrxl_file(name, ouputdir, content)
148
+ if options[:extension] == "yaml" || options[:extension] == "yml"
149
+ bib_rxl = Pathname.new([outdir, name].join("/")).sub_ext(".rxl")
150
+ content.bib_rxl = bib_rxl.to_s if File.file?(bib_rxl)
151
+ end
152
+ end
153
+
146
154
  def output_type
147
155
  output_format = options[:extension] || "rxl"
148
156
  (output_format == "rxl" ? "to_xml" : "to_#{output_format}").to_sym
@@ -1,5 +1,5 @@
1
1
  module Relaton
2
2
  module Cli
3
- VERSION = "0.1.9".freeze
3
+ VERSION = "0.1.10".freeze
4
4
  end
5
5
  end
data/relaton-cli.gemspec CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.summary = %q{Relaton Command-line Interface}
13
13
  spec.description = %q{Relaton Command-line Interface}
14
- spec.homepage = "https://github.com/riboseinc/relaton-cli"
14
+ spec.homepage = "https://github.com/metanorma/relaton-cli"
15
15
  spec.license = "BSD-2-Clause"
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
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.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-06 00:00:00.000000000 Z
11
+ date: 2019-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -168,6 +168,7 @@ files:
168
168
  - Gemfile
169
169
  - LICENSE
170
170
  - Rakefile
171
+ - appveyor.yml
171
172
  - bin/console
172
173
  - bin/rspec
173
174
  - bin/setup
@@ -192,7 +193,7 @@ files:
192
193
  - templates/_document.liquid
193
194
  - templates/_index.liquid
194
195
  - templates/index-style.css
195
- homepage: https://github.com/riboseinc/relaton-cli
196
+ homepage: https://github.com/metanorma/relaton-cli
196
197
  licenses:
197
198
  - BSD-2-Clause
198
199
  metadata: {}