gbbib 0.4.3 → 0.4.4

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: 58ab839578d5b3328e69d578d2eedd6f5d4ffd50d335640166c036e14ef1529a
4
- data.tar.gz: 255fad3a6567026a7e9d84ed2b4cec4adca96338f55f5f2b6c615cd8770055d9
3
+ metadata.gz: a3a9988c32f07a777f12a018a116efa5373d90338b3be43a1de9b3671d429402
4
+ data.tar.gz: d1897a16b386176d12c57e355b4e9759706603692762d6e8c8a151e5ea7605b5
5
5
  SHA512:
6
- metadata.gz: ff92e79b4036741e3b14265b164ef4d425fb4364428ee0c7d44dfcbcc76c8afd41f22613f69bf5f329c486149ed10d72e554f595ab99c0e05bb9d3bc899a9450
7
- data.tar.gz: 56a556ca5591226870f02938348c5b256c536cecd062d2f430a466bcdb3b50cefe07384fbb3b08cea771a07e6073a02c73828c45c4077c88d1bbd350d6764eb2
6
+ metadata.gz: 6e8e5a24ea500f0caa65005c27a06d7d84226448985799f0b4ab6118f5424575b259701a3c085db56d60bd8ed8185f3c7962225a9d6cc721b6181fc8d5480448
7
+ data.tar.gz: 0e4f0c479f9df9d15b6857086e5f7681ba2af404c86d913b5a9c6e19ab2d2faaf02b0cc1db036a54be3748f17472c77810be08860b35ee8f5e6237bb181dc426
data/.gitignore CHANGED
@@ -6,6 +6,7 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ .vscode/
9
10
 
10
11
  # rspec failure tracking
11
12
  .rspec_status
@@ -9,7 +9,7 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- byebug (10.0.2)
12
+ byebug (11.0.1)
13
13
  cnccs (0.1.3)
14
14
  coderay (1.1.2)
15
15
  diff-lcs (1.3)
@@ -22,7 +22,7 @@ GEM
22
22
  nokogiri (~> 1.8.4)
23
23
  ruby_deep_clone (~> 0.8.0)
24
24
  isoics (0.1.7)
25
- json (2.1.0)
25
+ json (2.2.0)
26
26
  method_source (0.9.2)
27
27
  mini_portile2 (2.3.0)
28
28
  nokogiri (1.8.5)
@@ -30,8 +30,8 @@ GEM
30
30
  pry (0.12.2)
31
31
  coderay (~> 1.1.0)
32
32
  method_source (~> 0.9.0)
33
- pry-byebug (3.6.0)
34
- byebug (~> 10.0)
33
+ pry-byebug (3.7.0)
34
+ byebug (~> 11.0)
35
35
  pry (~> 0.10)
36
36
  rake (10.5.0)
37
37
  rspec (3.8.0)
@@ -58,7 +58,7 @@ PLATFORMS
58
58
  ruby
59
59
 
60
60
  DEPENDENCIES
61
- bundler (~> 1.16)
61
+ bundler (~> 2.0.1)
62
62
  equivalent-xml (~> 0.6)
63
63
  gbbib!
64
64
  pry-byebug
@@ -67,4 +67,4 @@ DEPENDENCIES
67
67
  simplecov
68
68
 
69
69
  BUNDLED WITH
70
- 1.17.1
70
+ 2.0.1
@@ -1,8 +1,9 @@
1
1
  = Gbbib
2
2
 
3
3
  image:https://img.shields.io/gem/v/gbbib.svg["Gem Version", link="https://rubygems.org/gems/gbbib"]
4
- image:https://img.shields.io/travis/riboseinc/gbbib/master.svg["Build Status", link="https://travis-ci.org/riboseinc/gbbib"]
5
- image:https://codeclimate.com/github/riboseinc/gbbib/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/riboseinc/gbbib"]
4
+ image:https://img.shields.io/travis/metanorma/gbbib/master.svg["Build Status", link="https://travis-ci.com/metanorma/gbbib"]
5
+ image:https://ci.appveyor.com/api/projects/status/7sgnnqlf38jwf4ds?svg=true["Appveyor Build Status", link="https://ci.appveyor.com/project/ribose/gbbib"]
6
+ image:https://codeclimate.com/github/metanorma/gbbib/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/gbbib"]
6
7
 
7
8
 
8
9
  GbBib is a Ruby gem that search and fetch Chinese GB standards.
@@ -0,0 +1,30 @@
1
+ version: '{build}'
2
+
3
+ environment:
4
+ matrix:
5
+ - RUBY_VERSION: 25
6
+ - RUBY_VERSION: 24
7
+ - RUBY_VERSION: 23
8
+ - RUBY_VERSION: _trunk
9
+
10
+ matrix:
11
+ allow_failures:
12
+ - RUBY_VERSION: _trunk
13
+
14
+ install:
15
+ - ps: . { iwr -useb https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/appveyor.ps1 } | iex
16
+ - refreshenv
17
+
18
+ build_script:
19
+ - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
20
+ - bundle update
21
+ - bundle install
22
+
23
+ before_test:
24
+ - ruby -v
25
+ - gem -v
26
+ - bundle -v
27
+
28
+ test_script:
29
+ - bundle exec rake
30
+
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
13
13
  ' use using the BibliographicItem model.'
14
14
  spec.description = 'GdBib: retrieve Chinese GB Standards for bibliographic'\
15
15
  ' use using the BibliographicItem model.'
16
- spec.homepage = 'https://github.com/riboseinc/gdbib'
16
+ spec.homepage = 'https://github.com/metanorma/gbbib'
17
17
  spec.license = 'BSD-2-Clause'
18
18
 
19
19
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
24
  spec.require_paths = ['lib']
25
25
 
26
- spec.add_development_dependency 'bundler', '~> 1.16'
26
+ spec.add_development_dependency 'bundler', '~> 2.0.1'
27
27
  spec.add_development_dependency 'pry-byebug'
28
28
  spec.add_development_dependency 'rake', '~> 10.0'
29
29
  spec.add_development_dependency 'rspec', '~> 3.0'
@@ -38,7 +38,15 @@ module Gbbib
38
38
  # @param year [String] the year the standard was published (optional)
39
39
  # @param opts [Hash] options; restricted to :all_parts if all-parts reference is required
40
40
  # @return [String] Relaton XML serialisation of reference
41
- def get(code, year, opts)
41
+ def get(code, year = nil, opts = {})
42
+ if year.nil?
43
+ /^(?<code1>[^-]+)-(?<year1>[^-]+)$/ =~ code
44
+ unless code1.nil?
45
+ code = code1
46
+ year = year1
47
+ end
48
+ end
49
+
42
50
  code += '.1' if opts[:all_parts]
43
51
  code, year = code.split(/-/, 2) if /-/.match(code)
44
52
  ret = get1(code, year, opts)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gbbib
4
- VERSION = '0.4.3'
4
+ VERSION = '0.4.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gbbib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
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-29 00:00:00.000000000 Z
11
+ date: 2019-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.16'
19
+ version: 2.0.1
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.16'
26
+ version: 2.0.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pry-byebug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -154,6 +154,7 @@ files:
154
154
  - LICENSE.txt
155
155
  - README.adoc
156
156
  - Rakefile
157
+ - appveyor.yml
157
158
  - bin/console
158
159
  - bin/setup
159
160
  - gbbib.gemspec
@@ -173,7 +174,7 @@ files:
173
174
  - lib/gbbib/xml_parser.rb
174
175
  - lib/gbbib/yaml/prefixes.yaml
175
176
  - lib/relaton/processor.rb
176
- homepage: https://github.com/riboseinc/gdbib
177
+ homepage: https://github.com/metanorma/gbbib
177
178
  licenses:
178
179
  - BSD-2-Clause
179
180
  metadata: {}