simp-rake-helpers 5.1.2 → 5.1.4

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
- SHA1:
3
- metadata.gz: d260fd31b63df8bf7e860e9f841a441c88c11b5a
4
- data.tar.gz: c0ad88da3bfb756e50ee0bd9b53e9ec82d99fae6
2
+ SHA256:
3
+ metadata.gz: 3172c665fe5f42370b01ef6a03b7530da556471e89a7b55a90e23b8cc5c899e5
4
+ data.tar.gz: 377fad7a7d2acccd401c1cf17e52548144a27bbcd220618e0caca66e7e3cadea
5
5
  SHA512:
6
- metadata.gz: 778fee0c5eb4827b7e5f7351033101e59d83995bdd4d2356f9aab642f9b4a31f953f77e4d97d7703bd4c4329129de9360f08da722710fbb2ec3f1ec4ce8ab2ec
7
- data.tar.gz: f62ca1fa679d08c7facb89023fbae5eec50e711621a001710dd09bc669a472109676ef74ce691382edfbc24c09e6b346ac644106bc1d9aec0dd5ad2916c29d76
6
+ metadata.gz: fa1a4fc7b92292ceb0908368d43768ca70ec77ff31efd8e9d5c4def2dec3b90c213066f9843eaf258b070e4cfe53aeae8f0066cad24a062b41992e3da005f3f2
7
+ data.tar.gz: 3dd45d6438797ba3a8173ee33b511f90319725b5602930f3e75068bdc4002d485e58b4a58dbcdc684dc46f7c6af1dcd53766c39f44aae95b9c036a8cee976d74
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### 5.1.4 / 2017-11-27
2
+ * Switch back to using Gem::Version.new instead of Puppet's vercmp since
3
+ Gem::Version matches the standard RPM version semantics and Puppet does not.
4
+
5
+ ### 5.1.3 / 2017-10-16
6
+ * Ensure that the first package run uses the existing Bundle environment and
7
+ falls back to a clean Bundle environment on failure.
8
+
1
9
  ### 5.1.2 / 2017-10-06
2
10
  * Fixed 'Obsoletes' in the RPM spec files
3
11
 
@@ -924,10 +924,8 @@ protect=1
924
924
 
925
925
  build_success = true
926
926
  begin
927
- ::Bundler.with_clean_env do
928
- %x{#{cmd}}
929
- build_success = $?.success?
930
- end
927
+ %x{#{cmd}}
928
+ build_success = $?.success?
931
929
 
932
930
  built_rpm = true
933
931
  rescue
@@ -2,5 +2,5 @@ module Simp; end
2
2
  module Simp::Rake; end
3
3
 
4
4
  class Simp::Rake::Helpers
5
- VERSION = '5.1.2'
5
+ VERSION = '5.1.4'
6
6
  end
@@ -201,7 +201,6 @@ class Simp::Rake::Pupmod::Helpers < ::Rake::TaskLib
201
201
  EOM
202
202
  task :compare_latest_tag, [:tags_source, :ignore_owner, :verbose] do |t,args|
203
203
  require 'json'
204
- require 'puppet/util/package'
205
204
 
206
205
  tags_source = args[:tags_source].nil? ? 'origin' : args[:tags_source]
207
206
  ignore_owner = true if args[:ignore_owner].to_s == 'true'
@@ -220,7 +219,7 @@ class Simp::Rake::Pupmod::Helpers < ::Rake::TaskLib
220
219
  if tags.empty?
221
220
  puts "No tags exist from #{tags_source}"
222
221
  else
223
- last_tag = (tags.sort { |a,b| Puppet::Util::Package::versioncmp(a,b) })[-1]
222
+ last_tag = (tags.sort { |a,b| Gem::Version.new(a) <=> Gem::Version.new(b) })[-1]
224
223
 
225
224
  # determine mission-impacting files that have changed
226
225
  files_changed = `git diff tags/#{last_tag} --name-only`.strip.split("\n")
@@ -246,10 +245,12 @@ class Simp::Rake::Pupmod::Helpers < ::Rake::TaskLib
246
245
  end
247
246
  end
248
247
 
249
- cmp_result = Puppet::Util::Package::versioncmp(module_version, last_tag)
250
- if cmp_result < 0
248
+ curr_module_version = Gem::Version.new(module_version)
249
+ last_tag_version = Gem::Version.new(last_tag)
250
+
251
+ if curr_module_version < last_tag_version
251
252
  fail("ERROR: Version regression. '#{module_version}' < last tag '#{last_tag}'")
252
- elsif cmp_result == 0
253
+ elsif curr_module_version == last_tag_version
253
254
  fail("ERROR: Version update beyond last tag '#{last_tag}' is required for changes to #{files_changed}")
254
255
  else
255
256
  puts " New tag of version '#{module_version}' is required for changes to #{files_changed}"
data/lib/simp/rpm.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  require 'securerandom'
2
- require 'puppet/util'
3
2
 
4
3
  module Simp
5
4
  # An Simp::RPM instance represents RPM metadata extracted from an
@@ -226,9 +225,8 @@ module Simp
226
225
  end
227
226
 
228
227
  begin
229
- # Puppet::Util::Package::versioncmp can handle simp-doc-UNKNOWN-0.el7, whereas
230
- # Gem::Version can't
231
- return Puppet::Util::Package::versioncmp(full_version(package), other_full_version) > 0
228
+
229
+ return Gem::Version.new(full_version(package)) > Gem::Version.new(other_full_version)
232
230
 
233
231
  rescue ArgumentError, NoMethodError
234
232
  fail("Could not compare RPMs '#{rpm_name(package)}' and '#{other_rpm}'")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simp-rake-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.2
4
+ version: 5.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Tessmer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-10-06 00:00:00.000000000 Z
12
+ date: 2017-11-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -559,7 +559,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
559
559
  version: '0'
560
560
  requirements: []
561
561
  rubyforge_project:
562
- rubygems_version: 2.6.13
562
+ rubygems_version: 2.7.3
563
563
  signing_key:
564
564
  specification_version: 4
565
565
  summary: SIMP rake helpers