ituBib 0.1.0 → 0.1.1

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
- SHA1:
3
- metadata.gz: 33e1ba7e42b32d864a7a36d015bcb12f9598dfbc
4
- data.tar.gz: 01d5acc567d8bc229db69efe0f491ddcf3cd9632
2
+ SHA256:
3
+ metadata.gz: fd50bb5bda4e5d99143d225c754fd08ad766961eb91579582116b3cad853d5bf
4
+ data.tar.gz: f2eba33d43947efc4abaf471a4fffde29667dbc43792fca6d6014dc9961b8e6c
5
5
  SHA512:
6
- metadata.gz: 89b11fd0c276a4fc0dc2e6d8b1095e55d768309858d0a72fa3a4797572cbbbbfcb72f33276b985294a9f212aa2e78ff3d1e775a7befb2ec5747c140a14ad54ce
7
- data.tar.gz: 5f0e981c92023e96c7400d04323f0dbfbb995c9f59d07d079d011598c7fcf99540b9a26473db74bfe55417e1e7a91e52fac46d3c491fe2f426cb09249a30a458
6
+ metadata.gz: 6b423b376f16aced2c285211b3f99dbd9004f66f58b1da42c61682c593e9139a82fcd0f81f0f5f6374929b885900e611fc11c918720c62b3ca2fd39f9dcd8f77
7
+ data.tar.gz: eb23d3a65e7fd2400aa1a0f55d56a32d99fb1c9706564b6cdb3262870d52e43742a56bfcdff728636fd123508bd46d1857de1b8dd1b97c4ff84dd253bba5caa9
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ituBib (0.1.0)
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.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
@@ -1,8 +1,8 @@
1
1
  = ItuBib: retrieve ITU Standards for bibliographic use using the BibliographicItem model
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/itubib`. To experiment with that code, run `bin/console` for an interactive prompt.
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/riboseinc/isodoc-models#iso-bibliographic-item[IsoBibliographicItem model].
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/[USERNAME]/itubib.
72
+ Bug reports and pull requests are welcome on GitHub at https://github.com/metanorma/itubib.
73
73
 
74
74
  == License
75
75
 
@@ -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
  "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/riboseinc/itubib"
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?
@@ -1,3 +1,3 @@
1
1
  module ItuBib
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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-03-01 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
@@ -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/riboseinc/itubib
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.12
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