relaton-iso 0.8.1 → 0.8.2

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: 23cfcc3b3c94cf0988d6087a1afacb4bcc6065249b4f6785879e8242384bf00d
4
- data.tar.gz: f973dc6ba692b89acd1c6b4f9f75b9261ca7aff09557ed58605a7b1b8e499719
3
+ metadata.gz: d9fb58ee6922939bd980b5ad1be1303c40a9e95639716dfd216f2c20233bf5cf
4
+ data.tar.gz: 5fabdb83385bbec3d0f0ff8177a2a3f2b1c2057767cee43ff43e112808f75c73
5
5
  SHA512:
6
- metadata.gz: 8d88890b35c169076ceb3350eedb036116a4fe30403ae23e6e9300718d5cfd8d6d37f49a6724bdb2c4b459a7782bd429cab660d4a195bcef92ac0dc347021c6f
7
- data.tar.gz: e68d82ea105bba5dc0ab989a35eb02062adefdb45302c17065f9b47b3bf3f3b6eb9ea4e3caa43177782235013f984ea6fe574cad8e95fe1a535319d63c8b573e
6
+ metadata.gz: '0747095c51e13eeefa343f5f1c7e46061f44599433efd96b45a5f8b244de8503d36c8b28bc7bcfa1bdb8b288af2fbac113d877042a3184dc5829df9ec81418fe'
7
+ data.tar.gz: 42030ceefefea56a5fa601a18c9906edfcb09068cc3d3e4b7880da6979baa5721158e900ea5eb7c7779e1e1f9d5aec95f1834c960b2bf4f9bc71aeb2719aeefa
data/bin/bundle CHANGED
@@ -31,7 +31,7 @@ m = Module.new do
31
31
  bundler_version = a
32
32
  end
33
33
  next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
34
- bundler_version = $1 || ">= 0.a"
34
+ bundler_version = $1
35
35
  update_index = i
36
36
  end
37
37
  bundler_version
@@ -61,32 +61,41 @@ m = Module.new do
61
61
  end
62
62
 
63
63
  def bundler_version
64
- @bundler_version ||= begin
64
+ @bundler_version ||=
65
65
  env_var_version || cli_arg_version ||
66
- lockfile_version || "#{Gem::Requirement.default}.a"
67
- end
66
+ lockfile_version
67
+ end
68
+
69
+ def bundler_requirement
70
+ return "#{Gem::Requirement.default}.a" unless bundler_version
71
+
72
+ bundler_gem_version = Gem::Version.new(bundler_version)
73
+
74
+ requirement = bundler_gem_version.approximate_recommendation
75
+
76
+ return requirement unless Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.7.0")
77
+
78
+ requirement += ".a" if bundler_gem_version.prerelease?
79
+
80
+ requirement
68
81
  end
69
82
 
70
83
  def load_bundler!
71
84
  ENV["BUNDLE_GEMFILE"] ||= gemfile
72
85
 
73
- # must dup string for RG < 1.8 compatibility
74
- activate_bundler(bundler_version.dup)
86
+ activate_bundler
75
87
  end
76
88
 
77
- def activate_bundler(bundler_version)
78
- if Gem::Version.correct?(bundler_version) && Gem::Version.new(bundler_version).release < Gem::Version.new("2.0")
79
- bundler_version = "< 2"
80
- end
89
+ def activate_bundler
81
90
  gem_error = activation_error_handling do
82
- gem "bundler", bundler_version
91
+ gem "bundler", bundler_requirement
83
92
  end
84
93
  return if gem_error.nil?
85
94
  require_error = activation_error_handling do
86
95
  require "bundler/version"
87
96
  end
88
- return if require_error.nil? && Gem::Requirement.new(bundler_version).satisfied_by?(Gem::Version.new(Bundler::VERSION))
89
- warn "Activating bundler (#{bundler_version}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_version}'`"
97
+ return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
98
+ warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
90
99
  exit 42
91
100
  end
92
101
 
@@ -211,9 +211,12 @@ module RelatonIso
211
211
  type = case r_type
212
212
  when "Previously", "Will be replaced by" then "obsoletes"
213
213
  when "Corrigenda/Amendments", "Revised by", "Now confirmed"
214
- date << { type: "circulated",
215
- on: doc.xpath('//span[@class="stage-date"]').last.text }
216
- "updates"
214
+ on = doc.xpath('//span[@class="stage-date"][contains(., "-")]').last
215
+ if on
216
+ date << { type: "circulated",
217
+ on: on.text }
218
+ "updates"
219
+ end
217
220
  else r_type
218
221
  end
219
222
  if ["Now", "Now under review"].include?(type) then a
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelatonIso
4
- VERSION = "0.8.1"
4
+ VERSION = "0.8.2"
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: 0.8.1
4
+ version: 0.8.2
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-01-22 00:00:00.000000000 Z
11
+ date: 2020-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug