relaton-iso 1.2.0 → 1.2.1

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: 695d73fc8a0ec542936778c62629e23278859d137bc6ee9b84e6d20336d832da
4
- data.tar.gz: 1c529be373cf17e122e7d98cb910e83474916bb9d2b9d38a612c8a5f3d41aeb3
3
+ metadata.gz: 9e3b6cecb41e4d2c51cecad3b906e25fc1202ff2f9d69261d23a199c9084f0d8
4
+ data.tar.gz: 8a3f4c0a7857ef1c8668b1c1624f22573817b333a6bc674a77d729f2034098d9
5
5
  SHA512:
6
- metadata.gz: ecdd90086da2528bf41a05e499da97f10409a69004e7d45786bffcabce715bc5f3261f25a79212b56f9171cbd66ef56a82b382a3c26750f0fed8a2d1142ba922
7
- data.tar.gz: d23cdc8f56ec945e945a8b5a5cede2f84e9f68c0419f6e9fc16403988d5f8fd4917656a327ed921f216783829ec2fd91073a2f59adc982cfe249a73f2bc516c2
6
+ metadata.gz: 379e71ee50015f6ee0d012f3f157c1a355d5a69a670f3ed2a6dc7be6dafd86b4376808c8263f15c8deea3c85617ed7368dee72770c5d13e3f6e8948a1bfd9cea
7
+ data.tar.gz: d66f8ede9750f437adbc36682c4ae591ea800f887c8df54d36ea48f57ee1a09cd98e6e4b1b22dfc8653afdef2a29d7cf678782d41600110fca1e59e5074c77cc
@@ -5,6 +5,6 @@
5
5
  inherit_from:
6
6
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
7
7
  AllCops:
8
- TargetRubyVersion: 2.3
8
+ TargetRubyVersion: 2.4
9
9
  Rails:
10
- Enabled: true
10
+ Enabled: false
@@ -38,9 +38,10 @@ module RelatonIso
38
38
 
39
39
  if year.nil?
40
40
  /^(?<code1>[^\s]+(\s\w+)?\s[\d-]+)(:(?<year1>\d{4}))?(?<code2>\s\w+)?/ =~ code
41
+ /:(?<year2>\d{4})/ =~ corr
41
42
  unless code1.nil?
42
43
  code = code1 + code2.to_s
43
- year = year1
44
+ year = year2 || year1
44
45
  end
45
46
  end
46
47
  opts[:all_parts] ||= code !~ %r{^[^\s]+\s\d+-\d+} && opts[:all_parts].nil? && code2.nil?
@@ -145,7 +146,7 @@ module RelatonIso
145
146
  def isobib_results_filter(result, year, opts)
146
147
  missed_years = []
147
148
  hits = result.reduce!([]) do |hts, h|
148
- if !year || %r{:(?<iyear>\d{4})} =~ h.hit["docRef"] && iyear == year
149
+ if !year || %r{:(?<iyear>\d{4})(?!.*:\d{4})} =~ h.hit["docRef"] && iyear == year
149
150
  hts << h
150
151
  else
151
152
  missed_years << iyear
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelatonIso
4
- VERSION = "1.2.0"
4
+ VERSION = "1.2.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.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: 2020-06-26 00:00:00.000000000 Z
11
+ date: 2020-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug