ituBib 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/Gemfile.lock +9 -2
- data/README.adoc +3 -3
- data/appveyor.yml +30 -0
- data/itubib.gemspec +3 -1
- data/lib/itubib/itu_bibliography.rb +9 -1
- data/lib/itubib/version.rb +1 -1
- metadata +33 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fd50bb5bda4e5d99143d225c754fd08ad766961eb91579582116b3cad853d5bf
|
4
|
+
data.tar.gz: f2eba33d43947efc4abaf471a4fffde29667dbc43792fca6d6014dc9961b8e6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b423b376f16aced2c285211b3f99dbd9004f66f58b1da42c61682c593e9139a82fcd0f81f0f5f6374929b885900e611fc11c918720c62b3ca2fd39f9dcd8f77
|
7
|
+
data.tar.gz: eb23d3a65e7fd2400aa1a0f55d56a32d99fb1c9706564b6cdb3262870d52e43742a56bfcdff728636fd123508bd46d1857de1b8dd1b97c4ff84dd253bba5caa9
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ituBib (0.1.
|
4
|
+
ituBib (0.1.1)
|
5
5
|
iso-bib-item (~> 0.4.2)
|
6
6
|
|
7
7
|
GEM
|
@@ -9,10 +9,13 @@ GEM
|
|
9
9
|
specs:
|
10
10
|
addressable (2.6.0)
|
11
11
|
public_suffix (>= 2.0.2, < 4.0)
|
12
|
-
byebug (11.0.
|
12
|
+
byebug (11.0.1)
|
13
13
|
coderay (1.1.2)
|
14
14
|
crack (0.4.3)
|
15
15
|
safe_yaml (~> 1.0.0)
|
16
|
+
debase (0.2.2)
|
17
|
+
debase-ruby_core_source (>= 0.10.2)
|
18
|
+
debase-ruby_core_source (0.10.4)
|
16
19
|
diff-lcs (1.3)
|
17
20
|
docile (1.3.1)
|
18
21
|
equivalent-xml (0.6.0)
|
@@ -49,6 +52,8 @@ GEM
|
|
49
52
|
diff-lcs (>= 1.2.0, < 2.0)
|
50
53
|
rspec-support (~> 3.8.0)
|
51
54
|
rspec-support (3.8.0)
|
55
|
+
ruby-debug-ide (0.6.1)
|
56
|
+
rake (>= 0.8.1)
|
52
57
|
ruby_deep_clone (0.8.0)
|
53
58
|
safe_yaml (1.0.5)
|
54
59
|
simplecov (0.16.1)
|
@@ -67,11 +72,13 @@ PLATFORMS
|
|
67
72
|
|
68
73
|
DEPENDENCIES
|
69
74
|
bundler (~> 2.0)
|
75
|
+
debase
|
70
76
|
equivalent-xml (~> 0.6)
|
71
77
|
ituBib!
|
72
78
|
pry-byebug
|
73
79
|
rake (~> 10.0)
|
74
80
|
rspec (~> 3.0)
|
81
|
+
ruby-debug-ide
|
75
82
|
simplecov
|
76
83
|
vcr
|
77
84
|
webmock
|
data/README.adoc
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
= ItuBib: retrieve ITU Standards for bibliographic use using the BibliographicItem model
|
2
2
|
|
3
|
-
|
3
|
+
image:https://img.shields.io/gem/v/ituBib.svg["Gem Version", link="https://rubygems.org/gems/ituBib"]
|
4
4
|
|
5
|
-
ItuBib is a Ruby gem that implements the https://github.com/
|
5
|
+
ItuBib is a Ruby gem that implements the https://github.com/metanorma/metanorma-model-iso#iso-bibliographic-item[IsoBibliographicItem model].
|
6
6
|
|
7
7
|
== Installation
|
8
8
|
|
@@ -69,7 +69,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
69
69
|
|
70
70
|
== Contributing
|
71
71
|
|
72
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
72
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/metanorma/itubib.
|
73
73
|
|
74
74
|
== License
|
75
75
|
|
data/appveyor.yml
ADDED
@@ -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
|
+
|
data/itubib.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
|
|
13
13
|
"using the BibliographicItem model"
|
14
14
|
spec.description = "ItuBib: retrieve ITU Standards for bibliographic use "\
|
15
15
|
"using the BibliographicItem model"
|
16
|
-
spec.homepage = "https://github.com/
|
16
|
+
spec.homepage = "https://github.com/metanorma/itubib"
|
17
17
|
spec.license = "MIT"
|
18
18
|
|
19
19
|
# Specify which files should be added to the gem when it is released.
|
@@ -33,6 +33,8 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.add_development_dependency 'simplecov'
|
34
34
|
spec.add_development_dependency 'vcr'
|
35
35
|
spec.add_development_dependency 'webmock'
|
36
|
+
spec.add_development_dependency 'ruby-debug-ide'
|
37
|
+
spec.add_development_dependency 'debase'
|
36
38
|
|
37
39
|
spec.add_dependency 'iso-bib-item', '~> 0.4.2'
|
38
40
|
end
|
@@ -24,7 +24,15 @@ module ItuBib
|
|
24
24
|
# @param year [String] the year the standard was published (optional)
|
25
25
|
# @param opts [Hash] options; restricted to :all_parts if all-parts reference is required
|
26
26
|
# @return [String] Relaton XML serialisation of reference
|
27
|
-
def get(code, year, opts)
|
27
|
+
def get(code, year = nil, opts = {})
|
28
|
+
if year.nil?
|
29
|
+
/^(?<code1>[^\s]+\s[^\s]+)\s\(\d{2}\/(?<year1>\d+)\)$/ =~ code
|
30
|
+
unless code1.nil?
|
31
|
+
code = code1
|
32
|
+
year = year1
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
28
36
|
code += '-1' if opts[:all_parts]
|
29
37
|
ret = itubib_get1(code, year, opts)
|
30
38
|
return nil if ret.nil?
|
data/lib/itubib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ituBib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
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-
|
11
|
+
date: 2019-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -122,6 +122,34 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: ruby-debug-ide
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: debase
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
125
153
|
- !ruby/object:Gem::Dependency
|
126
154
|
name: iso-bib-item
|
127
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -152,6 +180,7 @@ files:
|
|
152
180
|
- LICENSE.txt
|
153
181
|
- README.adoc
|
154
182
|
- Rakefile
|
183
|
+
- appveyor.yml
|
155
184
|
- bin/console
|
156
185
|
- bin/setup
|
157
186
|
- itubib.gemspec
|
@@ -163,7 +192,7 @@ files:
|
|
163
192
|
- lib/itubib/version.rb
|
164
193
|
- lib/itubib/workers_pool.rb
|
165
194
|
- lib/relaton/processor.rb
|
166
|
-
homepage: https://github.com/
|
195
|
+
homepage: https://github.com/metanorma/itubib
|
167
196
|
licenses:
|
168
197
|
- MIT
|
169
198
|
metadata: {}
|
@@ -183,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
212
|
version: '0'
|
184
213
|
requirements: []
|
185
214
|
rubyforge_project:
|
186
|
-
rubygems_version: 2.6
|
215
|
+
rubygems_version: 2.7.6
|
187
216
|
signing_key:
|
188
217
|
specification_version: 4
|
189
218
|
summary: 'ItuBib: retrieve ITU Standards for bibliographic use using the BibliographicItem
|