checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
---
2
2
SHA256:
3
- metadata.gz: c414019c1b51df3d953ff1b72f7aedcf224d5641ca3b56e16e148b87adad6e4b
4
- data.tar.gz: 5ddf9731a88e930c6e806a4958e824c0f3fcb4173ff8aa42992ae0ab8497a306
3
+ metadata.gz: 6d7f75333f38690a37c1603db561839e6961d92cff1ba1a19686927b9c275956
4
+ data.tar.gz: 4f3ad3e8d68061752214bbbedf6b15b7ae4f76d24353b1bc8642780f79ac719e
5
5
SHA512:
6
- metadata.gz: 66c7c9c1cfc36712c7393e0f7b7f27e172346dd59f5d08486159e93d64dbf7cc72e64e2b818bc3c2eda419ddc6b87f54e344fbbd6e45bdcd0c5d7dce2bf65a1e
7
- data.tar.gz: 1ebad1fe7a93c7ec9e776de4afa25151ae67274d44a0478dcea1725705a8c3e3c9c24c2917a1acb19652f1e96e42565eee5d302c6990784ae0ebd335a6afe8f3
6
+ metadata.gz: 62a41738294652537a9749c916da12ede2ef39818d22b362a36838295f411e284bc73b4a6f7d472b2fe2dcff3c5ddabd2eac2723290ca91350035960fbcaecb8
7
+ data.tar.gz: 22e6b926519024b7e7f768e784048f78dee7b7a4c5dd836bab818be3fad8c101dfd7b511f2ef432459f91370bdd742f462fea77bc77bd140f6c1a43cf4fc3a41
data/.github/workflows/macos.yml ADDED
@@ -0,0 +1,29 @@
1
+ # Auto-generated !!! Do not edit it manually
2
+ # use ci-master https://github.com/metanorma/metanorma-build-scripts
3
+ name: macos
4
+
5
+ on: [push]
6
+
7
+ jobs:
8
+ test-macos:
9
+ name: Test on Ruby ${{ matrix.ruby }} macOS
10
+ runs-on: macos-latest
11
+ strategy:
12
+ matrix:
13
+ ruby: [ '2.6', '2.5', '2.4' ]
14
+ steps:
15
+ - uses: actions/checkout@master
16
+ with:
17
+ submodules: recursive
18
+ - name: Use Ruby
19
+ uses: actions/setup-ruby@v1
20
+ with:
21
+ ruby-version: ${{ matrix.ruby }}
22
+ architecture: 'x64'
23
+ - name: Update gems
24
+ run: |
25
+ sudo gem install bundler -v "~> 2" --force
26
+ bundle install --jobs 4 --retry 3
27
+ - name: Run specs
28
+ run: |
29
+ bundle exec rake
data/.github/workflows/ubuntu.yml ADDED
@@ -0,0 +1,29 @@
1
+ # Auto-generated !!! Do not edit it manually
2
+ # use ci-master https://github.com/metanorma/metanorma-build-scripts
3
+ name: ubuntu
4
+
5
+ on: [push]
6
+
7
+ jobs:
8
+ test-linux:
9
+ name: Test on Ruby ${{ matrix.ruby }} Ubuntu
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ matrix:
13
+ ruby: [ '2.6', '2.5', '2.4' ]
14
+ steps:
15
+ - uses: actions/checkout@master
16
+ with:
17
+ submodules: recursive
18
+ - name: Use Ruby
19
+ uses: actions/setup-ruby@v1
20
+ with:
21
+ ruby-version: ${{ matrix.ruby }}
22
+ architecture: 'x64'
23
+ - name: Update gems
24
+ run: |
25
+ gem install bundler -v "~> 2"
26
+ bundle install --jobs 4 --retry 3
27
+ - name: Run specs
28
+ run: |
29
+ bundle exec rake
data/.github/workflows/windows.yml ADDED
@@ -0,0 +1,32 @@
1
+ # Auto-generated !!! Do not edit it manually
2
+ # use ci-master https://github.com/metanorma/metanorma-build-scripts
3
+ name: windows
4
+
5
+ on: [push]
6
+
7
+ jobs:
8
+ test-windows:
9
+ name: Test on Ruby ${{ matrix.ruby }} Windows
10
+ runs-on: windows-latest
11
+ strategy:
12
+ matrix:
13
+ ruby: [ '2.6', '2.5', '2.4' ]
14
+ steps:
15
+ - uses: actions/checkout@master
16
+ with:
17
+ submodules: recursive
18
+ - name: Use Ruby
19
+ uses: actions/setup-ruby@v1
20
+ with:
21
+ ruby-version: ${{ matrix.ruby }}
22
+ architecture: 'x64'
23
+ - name: Update gems
24
+ shell: pwsh
25
+ run: |
26
+ gem install bundler -v "~> 2"
27
+ bundle config --local path vendor/bundle
28
+ bundle update
29
+ bundle install --jobs 4 --retry 3
30
+ - name: Run specs
31
+ run: |
32
+ bundle exec rake
data/.travis.yml DELETED
@@ -1,18 +0,0 @@
1
- # Auto-generated !!! Do not edit it manually
2
- # use ci-master https://github.com/metanorma/metanorma-build-scripts
3
- language: ruby
4
- cache: bundler
5
- os:
6
- - linux
7
- - osx
8
- rvm:
9
- - 2.6
10
- - 2.5
11
- - 2.4
12
- - ruby-head
13
- before_install:
14
- - gem install bundler -v "~> 2"
15
- - bundle update
16
- matrix:
17
- allow_failures:
18
- - rvm: ruby-head
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
PATH
2
2
remote: .
3
3
specs:
4
- relaton-iec (0.4.10)
4
+ relaton-iec (0.4.11)
5
5
addressable
6
6
relaton-iso-bib (~> 0.3.0)
7
7
@@ -88,4 +88,4 @@ DEPENDENCIES
88
88
webmock
89
89
90
90
BUNDLED WITH
91
- 2.0.1
91
+ 2.0.2
data/appveyor.yml DELETED
@@ -1,37 +0,0 @@
1
- # Auto-generated !!! Do not edit it manually
2
- # use ci-master https://github.com/metanorma/metanorma-build-scripts
3
- version: '{build}'
4
-
5
- cache:
6
- - vendor/bundle
7
-
8
- environment:
9
- matrix:
10
- - RUBY_VERSION: 26
11
- - RUBY_VERSION: 25
12
- - RUBY_VERSION: 24
13
- - RUBY_VERSION: _trunk
14
-
15
- matrix:
16
- allow_failures:
17
- - RUBY_VERSION: _trunk
18
-
19
- install:
20
- - ps: . { iwr -useb https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/appveyor.ps1 } | iex
21
- - refreshenv
22
-
23
- build_script:
24
- - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
25
- - set GIT_TERMINAL_PROMPT=0
26
- - gem install bundler -v "~> 2"
27
- - bundle config --local path vendor/bundle
28
- - bundle update
29
- - bundle install
30
-
31
- before_test:
32
- - ruby -v
33
- - gem -v
34
- - bundle -v
35
-
36
- test_script:
37
- - bundle exec rake
data/lib/relaton_iec/iec_bibliography.rb CHANGED
@@ -29,7 +29,7 @@ module RelatonIec
29
29
# @return [String] Relaton XML serialisation of reference
30
30
def get(code, year = nil, opts = {})
31
31
if year.nil?
32
- /^(?<code1>[^:]+):(?<year1>[^:]+)#x2F; =~ code
32
+ /^(?<code1>[^:]+):(?<year1>[^:]+)/ =~ code
33
33
unless code1.nil?
34
34
code = code1
35
35
year = year1
@@ -38,7 +38,8 @@ module RelatonIec
38
38
39
39
return iev if code.casecmp("IEV").zero?
40
40
41
- code += "-1" if opts[:all_parts]
41
+ opts[:all_parts] ||= !(code = code.sub(" (all parts)", "")).nil?
42
+ # code += "-1" if opts[:all_parts]
42
43
ret = iecbib_get1(code, year, opts)
43
44
return nil if ret.nil?
44
45
@@ -81,7 +82,7 @@ module RelatonIec
81
82
result = search(code)
82
83
result.select do |i|
83
84
i.hit[:code] &&
84
- i.hit[:code].match(docidrx).to_s == code &&
85
+ i.hit[:code].match(docidrx).to_s.include?(code) &&
85
86
corrigrx !~ i.hit[:code]
86
87
end
87
88
end
data/lib/relaton_iec/processor.rb CHANGED
@@ -5,7 +5,7 @@ module RelatonIec
5
5
def initialize
6
6
@short = :relaton_iec
7
7
@prefix = "IEC"
8
- @defaultprefix = %r{^(IEC)[ /]|^IEV($| )}
8
+ @defaultprefix = %r{^IEC\s|^IEV($|\s)}
9
9
@idtype = "IEC"
10
10
end
11
11
data/lib/relaton_iec/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
module RelatonIec
2
- VERSION = "0.4.10".freeze
2
+ VERSION = "0.4.11".freeze
3
3
end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
--- !ruby/object:Gem::Specification
2
2
name: relaton-iec
3
3
version: !ruby/object:Gem::Version
4
- version: 0.4.10
4
+ version: 0.4.11
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-10-31 00:00:00.000000000 Z
11
+ date: 2019-12-02 00:00:00.000000000 Z
12
12
dependencies:
13
13
- !ruby/object:Gem::Dependency
14
14
name: bundler
@@ -186,16 +186,17 @@ executables: []
186
186
extensions: []
187
187
extra_rdoc_files: []
188
188
files:
189
+ - ".github/workflows/macos.yml"
190
+ - ".github/workflows/ubuntu.yml"
191
+ - ".github/workflows/windows.yml"
189
192
- ".gitignore"
190
193
- ".rspec"
191
194
- ".rubocop.yml"
192
- - ".travis.yml"
193
195
- Gemfile
194
196
- Gemfile.lock
195
197
- LICENSE.txt
196
198
- README.adoc
197
199
- Rakefile
198
- - appveyor.yml
199
200
- bin/console
200
201
- bin/setup
201
202
- lib/relaton_iec.rb