gbbib 0.1.5 → 0.2.0

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: f37b15238b5f0416f6c47510eab966bc8eeb63308f0b03a339acf3dde5688f40
4
- data.tar.gz: ee15c19b4d3d9cea1c4a58181c8fd21e1b812694cf7037ec315ac315dc7395c1
3
+ metadata.gz: be8b8056be4856d110ff8bdfb78f1d3075879bdd17c54e4848de39d278b65a68
4
+ data.tar.gz: b151f547e1d7ec7c89824ccad47fef315f2665938789b36f18336101feb5b91a
5
5
  SHA512:
6
- metadata.gz: 858b4851abdb8f0e6e2a8156d969cc8ffcb65d9b953fe47f1ae7b6dbac7317b1a077d2b57bcea4f06a61c838f5e7003235de27ca684ad2c35e7799d1d6fe9b43
7
- data.tar.gz: bb59a8be1116609e293fbb9d276ff72aef024eb7c9b7ef9aba5cfaf5a6bbc32614246e7d6d4fcf731cd5b9f501a83293bf0b939d25d476f83bc3c11cc3d20059
6
+ metadata.gz: 62742ccbc9c15f182015550a4166ca5b09fd9127cabec488d7fb184743e78000d616c83f136e9171c6aa578419c80d3986ab168d202e4ce875fb963fac93a7a4
7
+ data.tar.gz: 68d3a7bb83d9ebd8d2d63e1a0800430c2a8e132658f7583579f21af411fde1530014f89a5d9dfcdc8bcafd88cb5f7261f386862f94fefda339b96125d5dc5926
data/.travis.yml CHANGED
@@ -7,7 +7,7 @@ rvm:
7
7
  - 2.3
8
8
  - ruby-head
9
9
 
10
- before_install: gem install bundler -v 1.16.1
10
+ before_install: gem install bundler -v 1.16.2
11
11
 
12
12
  matrix:
13
13
  allow_failures:
data/Gemfile.lock CHANGED
@@ -3,7 +3,7 @@ PATH
3
3
  specs:
4
4
  gbbib (0.1.5)
5
5
  cnccs (~> 0.1.1)
6
- iso-bib-item (~> 0.1.10)
6
+ iso-bib-item (~> 0.2)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
@@ -13,13 +13,12 @@ GEM
13
13
  coderay (1.1.2)
14
14
  diff-lcs (1.3)
15
15
  docile (1.3.1)
16
- duplicate (1.1.1)
17
16
  equivalent-xml (0.6.0)
18
17
  nokogiri (>= 1.4.3)
19
- iso-bib-item (0.1.10)
20
- duplicate (~> 1.1.1)
18
+ iso-bib-item (0.2.1)
21
19
  isoics (~> 0.1.6)
22
- nokogiri
20
+ nokogiri (~> 1.8.4)
21
+ ruby_deep_clone (~> 0.8.0)
23
22
  isoics (0.1.6)
24
23
  json (2.1.0)
25
24
  method_source (0.9.0)
@@ -46,6 +45,7 @@ GEM
46
45
  diff-lcs (>= 1.2.0, < 2.0)
47
46
  rspec-support (~> 3.7.0)
48
47
  rspec-support (3.7.1)
48
+ ruby_deep_clone (0.8.0)
49
49
  simplecov (0.16.1)
50
50
  docile (~> 1.1)
51
51
  json (>= 1.8, < 3)
data/gbbib.gemspec CHANGED
@@ -31,5 +31,5 @@ Gem::Specification.new do |spec|
31
31
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
32
32
 
33
33
  spec.add_dependency 'cnccs', "~> 0.1.1"
34
- spec.add_dependency 'iso-bib-item', "~> 0.1.10"
34
+ spec.add_dependency 'iso-bib-item', "~> 0.2"
35
35
  end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'gbbib/gb_bibliographic_item'
3
4
  require 'gbbib/workers_pool'
4
5
 
5
6
  # GB bib module.
@@ -44,7 +45,7 @@ module Gbbib
44
45
  return nil if ret.nil?
45
46
  ret.to_most_recent_reference unless year
46
47
  ret.to_all_parts if opts[:all_parts]
47
- ret.to_xml
48
+ ret
48
49
  end
49
50
 
50
51
  private
data/lib/gbbib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gbbib
4
- VERSION = '0.1.5'
4
+ VERSION = '0.2.0'
5
5
  end
data/lib/gbbib.rb CHANGED
@@ -1,2 +1,7 @@
1
1
  require 'gbbib/version'
2
2
  require 'gbbib/gb_bibliography'
3
+
4
+ if defined? Relaton
5
+ require_relative 'relaton/processor'
6
+ Relaton::Registry.instance.register Relaton::Gbbib::Processor
7
+ end
@@ -0,0 +1,17 @@
1
+ require "relaton/processor"
2
+
3
+ module Relaton
4
+ module Gbbib
5
+ class Processor < Relaton::Processor
6
+
7
+ def initialize
8
+ @short = :gbbib
9
+ @prefix = %r{^(GB|GJ|GS)|^ZB|^DB|^Q\/|^T\/[^\s]{3,6}\s}
10
+ end
11
+
12
+ def get(code, date, opts)
13
+ ::Gbbib::GbBibliography.get(code, date, opts)
14
+ end
15
+ end
16
+ end
17
+ 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.1.5
4
+ version: 0.2.0
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-07-10 00:00:00.000000000 Z
11
+ date: 2018-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 0.1.10
117
+ version: '0.2'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 0.1.10
124
+ version: '0.2'
125
125
  description: 'GdBib: retrieve Chinese GB Standards for bibliographic use using the
126
126
  BibliographicItem model.'
127
127
  email:
@@ -156,6 +156,7 @@ files:
156
156
  - lib/gbbib/version.rb
157
157
  - lib/gbbib/workers_pool.rb
158
158
  - lib/gbbib/yaml/prefixes.yaml
159
+ - lib/relaton/processor.rb
159
160
  homepage: https://github.com/riboseinc/gdbib
160
161
  licenses:
161
162
  - MIT