Hello community,

here is the log from the commit of package rubygem-hiera-eyaml-gpg for 
openSUSE:Factory checked in at 2015-11-28 15:19:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-hiera-eyaml-gpg (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-hiera-eyaml-gpg.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-hiera-eyaml-gpg"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/rubygem-hiera-eyaml-gpg/rubygem-hiera-eyaml-gpg.changes
  2015-06-02 10:02:20.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-hiera-eyaml-gpg.new/rubygem-hiera-eyaml-gpg.changes
     2015-11-28 15:19:32.000000000 +0100
@@ -1,0 +2,5 @@
+Thu Nov 19 12:13:23 UTC 2015 - [email protected]
+
+- Version bump 0.6, no upstream changelog
+
+-------------------------------------------------------------------

Old:
----
  hiera-eyaml-gpg-0.5.gem

New:
----
  hiera-eyaml-gpg-0.6.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-hiera-eyaml-gpg.spec ++++++
--- /var/tmp/diff_new_pack.rcnvd2/_old  2015-11-28 15:19:33.000000000 +0100
+++ /var/tmp/diff_new_pack.rcnvd2/_new  2015-11-28 15:19:33.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-hiera-eyaml-gpg
 #
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,7 +16,7 @@
 #
 
 Name:           rubygem-hiera-eyaml-gpg
-Version:        0.5
+Version:        0.6
 Release:        0
 %define mod_name hiera-eyaml-gpg
 %define mod_full_name %{mod_name}-%{version}

++++++ hiera-eyaml-gpg-0.5.gem -> hiera-eyaml-gpg-0.6.gem ++++++
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/hiera/backend/eyaml/encryptors/gpg/version.rb 
new/lib/hiera/backend/eyaml/encryptors/gpg/version.rb
--- old/lib/hiera/backend/eyaml/encryptors/gpg/version.rb       1970-01-01 
01:00:00.000000000 +0100
+++ new/lib/hiera/backend/eyaml/encryptors/gpg/version.rb       1970-01-01 
01:00:00.000000000 +0100
@@ -3,7 +3,7 @@
     module Eyaml
       module Encryptors
         module Gpg
-          VERSION = "0.5"
+          VERSION = "0.6"
         end
       end
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/hiera/backend/eyaml/encryptors/gpg.rb 
new/lib/hiera/backend/eyaml/encryptors/gpg.rb
--- old/lib/hiera/backend/eyaml/encryptors/gpg.rb       1970-01-01 
01:00:00.000000000 +0100
+++ new/lib/hiera/backend/eyaml/encryptors/gpg.rb       1970-01-01 
01:00:00.000000000 +0100
@@ -26,7 +26,7 @@
           self.options = {
             :gnupghome => { :desc => "Location of your GNUPGHOME directory",
                             :type => :string,
-                            :default => "#{ENV[["HOME", "HOMEPATH"].detect { 
|h| ENV[h] != nil }]}/.gnupg" },
+                            :default => "#{["HOME", "HOMEPATH"].reject { |h| 
ENV[h].nil? }.map { |h| ENV[h]+"/.gnupg" }.first || ""}"},
             :always_trust => { :desc => "Assume that used keys are fully 
trusted",
                                :type => :boolean,
                                :default => false },
@@ -57,6 +57,20 @@
               end
           end
 
+          def self.gnupghome
+            gnupghome = self.option :gnupghome
+            debug("GNUPGHOME is #{gnupghome}")
+            if gnupghome.nil? || gnupghome.empty?
+              warn("No GPG home directory configured, check gpg_gnupghome 
configuration value is correct")
+              raise ArgumentError, "No GPG home directory configured, check 
gpg_gnupghome configuration value is correct"
+            elsif !File.directory?(gnupghome)
+              warn("Configured GPG home directory #{gnupghome} doesn't exist, 
check gpg_gnupghome configuration value is correct")
+              raise ArgumentError, "Configured GPG home directory #{gnupghome} 
doesn't exist, check gpg_gnupghome configuration value is correct"
+            else
+              gnupghome
+            end
+          end
+
           def self.find_recipients
             recipient_option = self.option :recipients
             recipients = if !recipient_option.nil?
@@ -86,7 +100,7 @@
                   selected_file = nil
                   path.descend{|path| path
                     potential_file = path.join('hiera-eyaml-gpg.recipients')
-                    selected_file = potential_file if potential_file.exist? 
+                    selected_file = potential_file if potential_file.exist?
                   }
                   debug("Using file at #{selected_file}")
                   selected_file
@@ -94,7 +108,9 @@
               end
 
               unless recipient_file.nil?
-                recipient_file.readlines.map{ |line| line.strip } 
+                recipient_file.readlines.map{ |line|
+                  line.strip unless line.start_with? '#'
+                }.compact
               else
                 []
               end
@@ -106,9 +122,7 @@
               raise RecoverableError, "Encryption is only supported when using 
the 'gpgme' gem"
             end
 
-            gnupghome = self.option :gnupghome
-            GPGME::Engine.home_dir = gnupghome
-            debug("GNUPGHOME is #{gnupghome}")
+            GPGME::Engine.home_dir = self.gnupghome
 
             ctx = GPGME::Ctx.new
 
@@ -117,9 +131,9 @@
 
             raise RecoverableError, 'No recipients provided, don\'t know who 
to encrypt to' if recipients.empty?
 
-            keys = recipients.map {|r| 
-              key_to_use = ctx.keys(r).first 
-              if key_to_use.nil? 
+            keys = recipients.map {|r|
+              key_to_use = ctx.keys(r).first
+              if key_to_use.nil?
                 raise RecoverableError, "No key found on keyring for #{r}"
               end
               key_to_use
@@ -146,8 +160,7 @@
           end
 
           def self.decrypt ciphertext
-            gnupghome = self.option :gnupghome
-            debug("GNUPGHOME is #{gnupghome}")
+            gnupghome = self.gnupghome
 
             unless defined?(GPGME)
               RubyGpg.config.homedir = gnupghome if gnupghome
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        1970-01-01 01:00:00.000000000 +0100
+++ new/metadata        1970-01-01 01:00:00.000000000 +0100
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: hiera-eyaml-gpg
 version: !ruby/object:Gem::Version
-  version: '0.5'
+  version: '0.6'
 platform: ruby
 authors:
 - Simon Hildrew
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2015-03-21 00:00:00.000000000 Z
+date: 2015-09-10 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: hiera-eyaml


Reply via email to