rfcbib 0.2.2 → 0.2.3

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: c3c3222d54dac62bc53ae2aa83c8c17c91d0b10af9ae34b9c13482cfa9373814
4
- data.tar.gz: 501faf3949bc0926ab835e1b8c35896ab25c6bb86a4d7fc421aa35e7cb6e5e0d
3
+ metadata.gz: e21e2f90cfe142b28809bb2f54b99c58cb9221b6d1e47dcf15cf6a0d4b8038b4
4
+ data.tar.gz: 16cbb242630b0541c63a7b2c5db5c11adbcbd2a992d229e4ae3ba55d2fd6ee38
5
5
  SHA512:
6
- metadata.gz: 22eddb85d63b743be19f234d37a22862e631b5618421d1f3ecd0df80d919d6a6120bd5b40675e134f4b07cd52a4af339570648191f0f5795d26f84da45161db3
7
- data.tar.gz: c1100e43e8a2a2d47a643d7b2a24d3874e18694bb54d86164737e0a78e66855585b77372d129ebe52e87a0946f35c87599dec4f8f296e0fb52f1682be9f10357
6
+ metadata.gz: 478643da005f8bede163284cd838820a50b37d88bd6d932d5652d9379d8d3b75207a293789ec33ec822d0831c0f5eaead44c8f698bc8eadb7395edaa111eebe7
7
+ data.tar.gz: d1e0e72605031865e2bce5162b00029fe76d2a37f4c366e130d8839ba767cf98097e9713af275f155aabe0f6c09f7a5e963ac93aaad8596f5bedd52f224ca442
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rfcbib (0.2.2)
4
+ rfcbib (0.2.3)
5
5
  iso-bib-item (~> 0.2.0)
6
6
 
7
7
  GEM
@@ -13,11 +13,11 @@ GEM
13
13
  docile (1.3.1)
14
14
  equivalent-xml (0.6.0)
15
15
  nokogiri (>= 1.4.3)
16
- iso-bib-item (0.2.2)
16
+ iso-bib-item (0.2.5)
17
17
  isoics (~> 0.1.6)
18
18
  nokogiri (~> 1.8.4)
19
19
  ruby_deep_clone (~> 0.8.0)
20
- isoics (0.1.6)
20
+ isoics (0.1.7)
21
21
  json (2.1.0)
22
22
  method_source (0.9.0)
23
23
  mini_portile2 (2.3.0)
@@ -30,19 +30,19 @@ GEM
30
30
  byebug (~> 10.0)
31
31
  pry (~> 0.10)
32
32
  rake (10.5.0)
33
- rspec (3.7.0)
34
- rspec-core (~> 3.7.0)
35
- rspec-expectations (~> 3.7.0)
36
- rspec-mocks (~> 3.7.0)
37
- rspec-core (3.7.1)
38
- rspec-support (~> 3.7.0)
39
- rspec-expectations (3.7.0)
33
+ rspec (3.8.0)
34
+ rspec-core (~> 3.8.0)
35
+ rspec-expectations (~> 3.8.0)
36
+ rspec-mocks (~> 3.8.0)
37
+ rspec-core (3.8.0)
38
+ rspec-support (~> 3.8.0)
39
+ rspec-expectations (3.8.1)
40
40
  diff-lcs (>= 1.2.0, < 2.0)
41
- rspec-support (~> 3.7.0)
42
- rspec-mocks (3.7.0)
41
+ rspec-support (~> 3.8.0)
42
+ rspec-mocks (3.8.0)
43
43
  diff-lcs (>= 1.2.0, < 2.0)
44
- rspec-support (~> 3.7.0)
45
- rspec-support (3.7.1)
44
+ rspec-support (~> 3.8.0)
45
+ rspec-support (3.8.0)
46
46
  ruby_deep_clone (0.8.0)
47
47
  simplecov (0.16.1)
48
48
  docile (~> 1.1)
data/LICENSE.txt CHANGED
@@ -1,21 +1,25 @@
1
- The MIT License (MIT)
1
+ BSD 2-Clause License
2
2
 
3
- Copyright (c) 2018 Andrei Kislichenko
3
+ Copyright (c) 2018, Ribose
4
+ All rights reserved.
4
5
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
11
8
 
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
9
+ * Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
14
11
 
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
12
+ * Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
20
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/README.adoc CHANGED
@@ -1,5 +1,9 @@
1
1
  = Rfcbib
2
2
 
3
+ image:https://img.shields.io/gem/v/rfcbib.svg["Gem Version", link="https://rubygems.org/gems/rfcbib"]
4
+ image:https://img.shields.io/travis/riboseinc/rfcbib/master.svg["Build Status", link="https://travis-ci.org/riboseinc/rfcbib"]
5
+ image:https://codeclimate.com/github/riboseinc/rfcbib/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/riboseinc/rfcbib"]
6
+
3
7
  RFCBib is a Ruby gem that search and fetch RFC standards.
4
8
  The standards scrape form https://www.rfc-editor.org/search/rfc_search.php
5
9
 
@@ -66,7 +66,7 @@ module RfcBib
66
66
  @reference.xpath('//front/author').map do |author|
67
67
  entity = IsoBibItem::Person.new(
68
68
  name: full_name(author),
69
- affilation: [affilation(author)],
69
+ affiliation: [affiliation(author)],
70
70
  contacts: contacts(author.at('//address'))
71
71
  )
72
72
  { entity: entity, roles: [contributor_role(author)] }
@@ -132,7 +132,7 @@ module RfcBib
132
132
 
133
133
  # @param author [Nokogiri::XML::Document]
134
134
  # @return [IsoBibItem::Affilation]
135
- def affilation(author)
135
+ def affiliation(author)
136
136
  organization = author.at('//organization')
137
137
  IsoBibItem::Affilation.new IsoBibItem::Organization.new(
138
138
  name: organization.text.empty? ? 'IETF' : organization.text,
@@ -164,14 +164,15 @@ module RfcBib
164
164
  # @return [Array<IsoBibItem::DocumentIdentifier>]
165
165
  #
166
166
  def docids(id)
167
- ret = @reference.xpath('//seriesinfo').map do |si|
167
+ ret = []
168
+ ret << IsoBibItem::DocumentIdentifier.new(type: "IETF", id: id)
169
+ ret = ret + @reference.xpath('//seriesinfo').map do |si|
168
170
  next unless si[:name] == 'DOI'
169
171
  IsoBibItem::DocumentIdentifier.new(
170
172
  id: si[:value],
171
173
  type: si[:name]
172
174
  )
173
175
  end.compact
174
- ret << IsoBibItem::DocumentIdentifier.new(type: "IETF", id: id)
175
176
  end
176
177
 
177
178
  #
@@ -186,7 +187,8 @@ module RfcBib
186
187
  title: IsoBibItem::FormattedString.new(
187
188
  content: si[:name], language: language, script: 'Latn'
188
189
  ),
189
- number: si[:value]
190
+ number: si[:value],
191
+ type: "main"
190
192
  )
191
193
  end.compact
192
194
  end
@@ -1,3 +1,3 @@
1
1
  module Rfcbib
2
- VERSION = '0.2.2'.freeze
2
+ VERSION = '0.2.3'.freeze
3
3
  end
data/rfcbib.gemspec CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
  spec.description = 'RfcBib: retrieve RFC Standards for bibliographic use '\
16
16
  'using the BibliographicItem model'
17
17
  spec.homepage = 'https://github.com/riboseinc/rfcbib'
18
- spec.license = 'MIT'
18
+ spec.license = 'BSD-2-Clause'
19
19
 
20
20
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
21
21
  f.match(%r{^(test|spec|features)/})
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rfcbib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
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-23 00:00:00.000000000 Z
11
+ date: 2018-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -135,7 +135,7 @@ files:
135
135
  - rfcbib.gemspec
136
136
  homepage: https://github.com/riboseinc/rfcbib
137
137
  licenses:
138
- - MIT
138
+ - BSD-2-Clause
139
139
  metadata: {}
140
140
  post_install_message:
141
141
  rdoc_options: []