Hello community,

here is the log from the commit of package rubygem-mixlib-log for 
openSUSE:Factory checked in at 2016-08-09 22:15:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-mixlib-log (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-mixlib-log.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-mixlib-log"

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-mixlib-log/rubygem-mixlib-log.changes    
2014-10-23 14:20:47.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-mixlib-log.new/rubygem-mixlib-log.changes   
    2016-08-09 22:15:09.000000000 +0200
@@ -1,0 +2,6 @@
+Fri Aug  5 04:36:58 UTC 2016 - [email protected]
+
+- updated to version 1.7.0
+  no changelog found
+
+-------------------------------------------------------------------

Old:
----
  mixlib-log-1.6.0.gem

New:
----
  gem2rpm.yml
  mixlib-log-1.7.0.gem

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

Other differences:
------------------
++++++ rubygem-mixlib-log.spec ++++++
--- /var/tmp/diff_new_pack.bRomDY/_old  2016-08-09 22:15:10.000000000 +0200
+++ /var/tmp/diff_new_pack.bRomDY/_new  2016-08-09 22:15:10.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-mixlib-log
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 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,8 +16,15 @@
 #
 
 
+#
+# This file was generated with a gem2rpm.yml and not just plain gem2rpm.
+# All sections marked as MANUAL, license headers, summaries and descriptions
+# can be maintained in that file. Please consult this file before editing any
+# of those fields
+#
+
 Name:           rubygem-mixlib-log
-Version:        1.6.0
+Version:        1.7.0
 Release:        0
 %define mod_name mixlib-log
 %define mod_full_name %{mod_name}-%{version}
@@ -25,8 +32,9 @@
 BuildRequires:  %{rubygem gem2rpm}
 BuildRequires:  %{ruby}
 BuildRequires:  ruby-macros >= 5
-Url:            http://www.opscode.com
+Url:            https://www.chef.io
 Source:         http://rubygems.org/gems/%{mod_full_name}.gem
+Source1:        gem2rpm.yml
 Summary:        A gem that provides a simple mixin for log functionality
 License:        Apache-2.0
 Group:          Development/Languages/Ruby
@@ -40,7 +48,7 @@
 
 %install
 %gem_install \
-  --doc-files="README.rdoc LICENSE" \
+  --doc-files="LICENSE README.md" \
   -f
 
 %gem_packages

++++++ gem2rpm.yml ++++++
# ---
# ## used by gem2rpm
# :summary: this is a custom summary
# ## used by gem2rpm
# :description: |-
#   this is a custom description
#
#   it can be multiline
# ## used by gem2rpm
# :license: MIT or Ruby
# ## used by gem2rpm and gem_packages
# :version_suffix: -x_y
# ## used by gem2rpm and gem_packages
# :disable_docs: true
# ## used by gem2rpm
# :disable_automatic_rdoc_dep: true
# ## used by gem2rpm
# :preamble: |-
#   BuildRequires: foobar
#   Requires: foobar
# ## used by gem2rpm
# :patches:
#   foo.patch: -p1
#   bar.patch: 
# ## used by gem2rpm
:sources:
# - foo.desktop
# - bar.desktop
# :gem_install_args: '....'
# ## used by gem2rpm
# :pre_install: |-
#   %if 0%{?use_system_libev}
#   export USE_VENDORED_LIBEV="no"
#   %endif
# ## used by gem2rpm
# :post_install: |-
#   # delete custom files here or do other fancy stuff
#   install -D -m 0644 %{S:1} %{buildroot}%{_bindir}/gem2rpm-opensuse
# ## used by gem2rpm
# :testsuite_command: |-
#   (pushd %{buildroot}%{gem_base}/gems/%{mod_full_name} && rake test)
# ## used by gem2rpm
# :filelist: |-
#   /usr/bin/gem2rpm-opensuse
# ## used by gem2rpm
# :scripts:
#   :post: |-
#     /bin/echo foo
# ## used by gem_packages
# :main:
#   :preamble: |-
#     Requires: util-linux
#     Recommends: pwgen
#   :filelist: |-
#     /usr/bin/gem2rpm-opensuse
# ## used by gem_packages
# :custom:
#   apache:
#     :preamble: |-
#       Requires: .....
#     :filelist: |-
#       /etc/apache2/conf.d/passenger.conf
#     :summary: Custom summary is optional
#     :description: |-
#       Custom description is optional
#
#       bar
#     :post: |-
#       /bin/echo foo
#
++++++ mixlib-log-1.6.0.gem -> mixlib-log-1.7.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Gemfile new/Gemfile
--- old/Gemfile 1970-01-01 01:00:00.000000000 +0100
+++ new/Gemfile 2016-08-04 12:56:12.000000000 +0200
@@ -0,0 +1,8 @@
+source "https://rubygems.org";
+
+gemspec
+
+group :development do
+  gem "rdoc"
+  gem "bundler"
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/NOTICE new/NOTICE
--- old/NOTICE  1970-01-01 01:00:00.000000000 +0100
+++ new/NOTICE  2016-08-04 12:56:12.000000000 +0200
@@ -1,27 +1,28 @@
-Mixin::Log NOTICE
-=================
+============
+Mixin::Log Notices
+============
 
-Developed at Opscode (http://www.opscode.com).
+Developed at Chef (http://www.chef.io).
 
- * Copyright 2009, Opscode, Inc. <[email protected]>
+
+ * Copyright 2009-2016, Chef Software, Inc. <[email protected]>
 
 Mixin::Log incorporates code from Chef.  The Chef notice file follows:
 
-Chef NOTICE
-===========
+============
+Chef Notices
+============
 
-Developed at Opscode (http://www.opscode.com).
+Developed at Chef (http://www.chef.io).
 
 Contributors and Copyright holders:
 
- * Copyright 2008, Adam Jacob <[email protected]>
+ * Copyright 2008, Adam Jacob <[email protected]>
  * Copyright 2008, Arjuna Christensen <[email protected]>
  * Copyright 2008, Bryan McLellan <[email protected]>
  * Copyright 2008, Ezra Zygmuntowicz <[email protected]>
  * Copyright 2009, Sean Cribbs <[email protected]>
- * Copyright 2009, Christopher Brown <[email protected]>
+ * Copyright 2009, Christopher Brown <[email protected]>
  * Copyright 2009, Thom May <[email protected]>
 
 Chef incorporates code modified from Open4 
(http://www.codeforpeople.com/lib/ruby/open4/), which was written by Ara T. 
Howard.
-
-Chef incorporates code modified from Merb (http://www.merbivore.com), which is 
Copyright (c) 2008 Engine Yard.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md       1970-01-01 01:00:00.000000000 +0100
+++ new/README.md       2016-08-04 12:56:12.000000000 +0200
@@ -0,0 +1,51 @@
+# Mixlib::Log
+
+[![Build Status 
Master](https://travis-ci.org/chef/mixlib-log.svg?branch=master)](https://travis-ci.org/chef/mixlib-log)
 [![Gem 
Version](https://badge.fury.io/rb/mixlib-log.svg)](https://badge.fury.io/rb/mixlib-log)
+
+Mixlib::Log provides a mixin for enabling a class based logger object, a-la 
Merb, Chef, and Nanite. To use it:
+
+```ruby
+require 'mixlib/log'
+
+class Log
+  extend Mixlib::Log
+end
+```
+
+You can then do:
+
+```ruby
+Log.debug('foo')
+Log.info('bar')
+Log.warn('baz')
+Log.error('baz')
+Log.fatal('wewt')
+```
+
+By default, `Mixlib::Logger` logs to STDOUT. To alter this, you should call 
+Log.init+, passing any arguments to the standard Ruby Logger. For example:
+
+```ruby
+Log.init('/tmp/logfile')  # log to /tmp/logfile   
+Log.init('/tmp/logfile', 7)  # log to /tmp/logfile, rotate every day
+```
+
+Enjoy!
+
+## LICENSE:
+
+- Copyright:: Copyright (c) 2008-2016 Chef Software, Inc.
+- License:: Apache License, Version 2.0
+
+```text
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+```
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.rdoc new/README.rdoc
--- old/README.rdoc     1970-01-01 01:00:00.000000000 +0100
+++ new/README.rdoc     1970-01-01 01:00:00.000000000 +0100
@@ -1,24 +0,0 @@
-== Mixlib::Log
-
-Mixlib::Log provides a mixin for enabling a class based logger object, a-la 
Merb, Chef, and Nanite.  To use it:
-
-       require 'mixlib/log'
-       
-       class Log
-               extend Mixlib::Log
-       end
-       
-You can then do:
-
-       Log.debug("foo")
-       Log.info("bar")
-       Log.warn("baz")
-       Log.error("baz")
-       Log.fatal("wewt")
-       
-By default, Mixlib::Logger logs to STDOUT.  To alter this, you should call 
Log.init, passing any arguments to the standard Ruby Logger.  For example:
-
-       Log.init("/tmp/logfile")    # log to /tmp/logfile
-       Log.init("/tmp/logfile", 7) # log to /tmp/logfile, rotate every day
-       
-Enjoy!
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Rakefile new/Rakefile
--- old/Rakefile        1970-01-01 01:00:00.000000000 +0100
+++ new/Rakefile        2016-08-04 12:56:12.000000000 +0200
@@ -1,18 +1,10 @@
-require 'rake'
-require 'rubygems/package_task'
-require 'rdoc/task'
-require 'yaml'
-require 'rspec/core/rake_task'
-require 'cucumber/rake/task'
-
-gemspec = eval(IO.read('mixlib-log.gemspec'))
-
-Gem::PackageTask.new(gemspec) do |pkg|
-  pkg.gem_spec = gemspec
-end
+require "bundler/gem_tasks"
+require "rdoc/task"
+require "rspec/core/rake_task"
+require "cucumber/rake/task"
 
 RSpec::Core::RakeTask.new(:spec) do |spec|
-  spec.pattern = 'spec/**/*_spec.rb'
+  spec.pattern = "spec/**/*_spec.rb"
 end
 
 task :default => :spec
@@ -21,13 +13,31 @@
 task :test => :spec
 
 RDoc::Task.new do |rdoc|
-  rdoc.rdoc_dir = 'rdoc'
+  rdoc.rdoc_dir = "rdoc"
   rdoc.title = "mixlib-log #{Mixlib::Log::VERSION}"
-  rdoc.rdoc_files.include('README*')
-  rdoc.rdoc_files.include('lib/**/*.rb')
+  rdoc.rdoc_files.include("README*")
+  rdoc.rdoc_files.include("lib/**/*.rb")
 end
 
 Cucumber::Rake::Task.new(:features) do |t|
   t.cucumber_opts = "--format pretty"
 end
 
+begin
+  require "chefstyle"
+  require "rubocop/rake_task"
+  RuboCop::RakeTask.new(:style) do |task|
+    task.options += ["--display-cop-names", "--no-color"]
+  end
+rescue LoadError
+  puts "chefstyle/rubocop is not available.  gem install chefstyle to do style 
checking."
+end
+
+require "github_changelog_generator/task"
+
+GitHubChangelogGenerator::RakeTask.new :changelog do |config|
+  config.future_release = Mixlib::Log::VERSION
+  config.enhancement_labels = "enhancement,Enhancement,New 
Feature,Feature".split(",")
+  config.bug_labels = "bug,Bug,Improvement,Upstream Bug".split(",")
+  config.exclude_labels = 
"duplicate,question,invalid,wontfix,no_changelog,Exclude From 
Changelog,Question,Discussion".split(",")
+end
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/mixlib/log/formatter.rb 
new/lib/mixlib/log/formatter.rb
--- old/lib/mixlib/log/formatter.rb     1970-01-01 01:00:00.000000000 +0100
+++ new/lib/mixlib/log/formatter.rb     2016-08-04 12:56:12.000000000 +0200
@@ -1,32 +1,32 @@
 #
-# Author:: Adam Jacob (<[email protected]>)
-# Copyright:: Copyright (c) 2008 Opscode, Inc.
+# Author:: Adam Jacob (<[email protected]>)
+# Copyright:: Copyright (c) 2008-2016 Chef Software, Inc.
 # License:: Apache License, Version 2.0
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
-# 
+#
 #     http://www.apache.org/licenses/LICENSE-2.0
-# 
+#
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-require 'logger'
-require 'time'
+require "logger"
+require "time"
 
 module Mixlib
   module Log
     class Formatter < Logger::Formatter
       @@show_time = true
-      
-      def self.show_time=(show=false)
+
+      def self.show_time=(show = false)
         @@show_time = show
       end
-      
+
       # Prints a log message as '[time] severity: message' if 
Chef::Log::Formatter.show_time == true.
       # Otherwise, doesn't print the time.
       def call(severity, time, progname, msg)
@@ -36,9 +36,9 @@
           sprintf("%s: %s\n", severity, msg2str(msg))
         end
       end
-      
+
       # Converts some argument to a Logger.severity() call to a string.  
Regular strings pass through like
-      # normal, Exceptions get formatted as "message (class)\nbacktrace", and 
other random stuff gets 
+      # normal, Exceptions get formatted as "message (class)\nbacktrace", and 
other random stuff gets
       # put through "object.inspect"
       def msg2str(msg)
         case msg
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/mixlib/log/version.rb 
new/lib/mixlib/log/version.rb
--- old/lib/mixlib/log/version.rb       1970-01-01 01:00:00.000000000 +0100
+++ new/lib/mixlib/log/version.rb       2016-08-04 12:56:12.000000000 +0200
@@ -1,5 +1,5 @@
 module Mixlib
   module Log
-    VERSION = "1.6.0"
+    VERSION = "1.7.0"
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/mixlib/log.rb new/lib/mixlib/log.rb
--- old/lib/mixlib/log.rb       1970-01-01 01:00:00.000000000 +0100
+++ new/lib/mixlib/log.rb       2016-08-04 12:56:12.000000000 +0200
@@ -1,7 +1,7 @@
 #
-# Author:: Adam Jacob (<[email protected]>)
-# Author:: Christopher Brown (<[email protected]>)
-# Copyright:: Copyright (c) 2008 Opscode, Inc.
+# Author:: Adam Jacob (<[email protected]>)
+# Author:: Christopher Brown (<[email protected]>)
+# Copyright:: Copyright (c) 2008-2016 Chef Software, Inc.
 # License:: Apache License, Version 2.0
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,20 +16,20 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-require 'logger'
-require 'mixlib/log/version'
-require 'mixlib/log/formatter'
+require "logger"
+require "mixlib/log/version"
+require "mixlib/log/formatter"
 
 module Mixlib
   module Log
 
     @logger, @loggers = nil
 
-    LEVELS = { :debug=>Logger::DEBUG, :info=>Logger::INFO, 
:warn=>Logger::WARN, :error=>Logger::ERROR, :fatal=>Logger::FATAL}.freeze
+    LEVELS = { :debug => Logger::DEBUG, :info => Logger::INFO, :warn => 
Logger::WARN, :error => Logger::ERROR, :fatal => Logger::FATAL }.freeze
     LEVEL_NAMES = LEVELS.invert.freeze
 
-
     def reset!
+      close!
       @logger, @loggers = nil, nil
     end
 
@@ -51,7 +51,7 @@
     # that had been added to the +loggers+ array will be cleared.
     def logger=(new_log_device)
       reset!
-      @logger=new_log_device
+      @logger = new_log_device
     end
 
     def use_log_devices(other)
@@ -63,7 +63,7 @@
         @logger = other.first
       else
         msg = "#use_log_devices takes a Mixlib::Log object or array of log 
devices. " <<
-              "You gave: #{other.inspect}"
+          "You gave: #{other.inspect}"
         raise ArgumentError, msg
       end
     end
@@ -95,14 +95,14 @@
     def level=(new_level)
       level_int = LEVEL_NAMES.key?(new_level) ? new_level : LEVELS[new_level]
       raise ArgumentError, "Log level must be one of :debug, :info, :warn, 
:error, or :fatal" if level_int.nil?
-      loggers.each {|l| l.level = level_int }
+      loggers.each { |l| l.level = level_int }
     end
 
-    def level(new_level=nil)
+    def level(new_level = nil)
       if new_level.nil?
         LEVEL_NAMES[logger.level]
       else
-        self.level=(new_level)
+        self.level = (new_level)
       end
     end
 
@@ -129,11 +129,11 @@
     end
 
     def <<(msg)
-      loggers.each {|l| l << msg }
+      loggers.each { |l| l << msg }
     end
 
     def add(severity, message = nil, progname = nil, &block)
-      loggers.each {|l| l.add(severity, message = nil, progname = nil, &block) 
}
+      loggers.each { |l| l.add(severity, message, progname, &block) }
     end
 
     alias :log :add
@@ -142,7 +142,7 @@
     # this method gets hit before a call to Mixlib::Logger.init has been made, 
it will call
     # Mixlib::Logger.init() with no arguments.
     def method_missing(method_symbol, *args, &block)
-      loggers.each {|l| l.send(method_symbol, *args, &block) }
+      loggers.each { |l| l.send(method_symbol, *args, &block) }
     end
 
     private
@@ -150,12 +150,37 @@
     def logger_for(*opts)
       if opts.empty?
         Logger.new(STDOUT)
-      elsif LEVELS.keys.inject(true) {|quacks, level| quacks && 
opts.first.respond_to?(level)}
+      elsif LEVELS.keys.inject(true) { |quacks, level| quacks && 
opts.first.respond_to?(level) }
         opts.first
       else
         Logger.new(*opts)
       end
     end
 
+    def all_loggers
+      [@logger, *@loggers].uniq
+    end
+
+    # select all loggers with File log devices
+    def loggers_to_close
+      loggers_to_close = []
+      all_loggers.each do |logger|
+        # unfortunately Logger does not provide access to the logdev
+        # via public API. In order to reduce amount of impact and
+        # handle only File type log devices I had to use this method
+        # to get access to it.
+        next unless logdev = logger.instance_variable_get(:"@logdev")
+        loggers_to_close << logger if logdev.filename
+      end
+      loggers_to_close
+    end
+
+    def close!
+      # try to close all file loggers
+      loggers_to_close.each do |l|
+        l.close rescue nil
+      end
+    end
+
   end
 end
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        2016-08-04 12:56:12.000000000 +0200
@@ -1,107 +1,129 @@
 --- !ruby/object:Gem::Specification
 name: mixlib-log
 version: !ruby/object:Gem::Version
-  version: 1.6.0
-  prerelease: 
+  version: 1.7.0
 platform: ruby
 authors:
-- Opscode, Inc.
+- Chef Software, Inc.
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2013-04-02 00:00:00.000000000 Z
+date: 2016-08-04 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: rake
   requirement: !ruby/object:Gem::Requirement
-    none: false
     requirements:
-    - - ! '>='
+    - - ">="
       - !ruby/object:Gem::Version
         version: '0'
   type: :development
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
-    none: false
     requirements:
-    - - ! '>='
+    - - ">="
       - !ruby/object:Gem::Version
         version: '0'
 - !ruby/object:Gem::Dependency
   name: rspec
   requirement: !ruby/object:Gem::Requirement
-    none: false
     requirements:
-    - - ~>
+    - - "~>"
       - !ruby/object:Gem::Version
-        version: '2.10'
+        version: '3.4'
   type: :development
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
-    none: false
     requirements:
-    - - ~>
+    - - "~>"
       - !ruby/object:Gem::Version
-        version: '2.10'
+        version: '3.4'
+- !ruby/object:Gem::Dependency
+  name: chefstyle
+  requirement: !ruby/object:Gem::Requirement
+    requirements:
+    - - "~>"
+      - !ruby/object:Gem::Version
+        version: '0.3'
+  type: :development
+  prerelease: false
+  version_requirements: !ruby/object:Gem::Requirement
+    requirements:
+    - - "~>"
+      - !ruby/object:Gem::Version
+        version: '0.3'
 - !ruby/object:Gem::Dependency
   name: cucumber
   requirement: !ruby/object:Gem::Requirement
-    none: false
     requirements:
-    - - ! '>='
+    - - ">="
       - !ruby/object:Gem::Version
         version: '0'
   type: :development
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
-    none: false
     requirements:
-    - - ! '>='
+    - - ">="
       - !ruby/object:Gem::Version
         version: '0'
+- !ruby/object:Gem::Dependency
+  name: github_changelog_generator
+  requirement: !ruby/object:Gem::Requirement
+    requirements:
+    - - '='
+      - !ruby/object:Gem::Version
+        version: 1.11.3
+  type: :development
+  prerelease: false
+  version_requirements: !ruby/object:Gem::Requirement
+    requirements:
+    - - '='
+      - !ruby/object:Gem::Version
+        version: 1.11.3
 description: 
-email: [email protected]
+email: [email protected]
 executables: []
 extensions: []
 extra_rdoc_files:
-- README.rdoc
+- README.md
 - LICENSE
 - NOTICE
 files:
+- ".gemtest"
+- Gemfile
+- LICENSE
+- NOTICE
+- README.md
+- Rakefile
+- lib/mixlib/log.rb
 - lib/mixlib/log/formatter.rb
 - lib/mixlib/log/version.rb
-- lib/mixlib/log.rb
+- mixlib-log.gemspec
 - spec/mixlib/log/formatter_spec.rb
 - spec/mixlib/log_spec.rb
 - spec/spec_helper.rb
-- Rakefile
-- .gemtest
-- mixlib-log.gemspec
-- README.rdoc
-- LICENSE
-- NOTICE
-homepage: http://www.opscode.com
-licenses: []
+homepage: https://www.chef.io
+licenses:
+- Apache-2.0
+metadata: {}
 post_install_message: 
 rdoc_options: []
 require_paths:
 - lib
 required_ruby_version: !ruby/object:Gem::Requirement
-  none: false
   requirements:
-  - - ! '>='
+  - - ">="
     - !ruby/object:Gem::Version
       version: '0'
 required_rubygems_version: !ruby/object:Gem::Requirement
-  none: false
   requirements:
-  - - ! '>='
+  - - ">="
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
 rubyforge_project: 
-rubygems_version: 1.8.23
+rubygems_version: 2.4.5.1
 signing_key: 
-specification_version: 3
+specification_version: 4
 summary: A gem that provides a simple mixin for log functionality
 test_files: []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mixlib-log.gemspec new/mixlib-log.gemspec
--- old/mixlib-log.gemspec      1970-01-01 01:00:00.000000000 +0100
+++ new/mixlib-log.gemspec      2016-08-04 12:56:12.000000000 +0200
@@ -1,18 +1,21 @@
-$:.unshift File.expand_path('../lib', __FILE__)
-require 'mixlib/log/version'
+$:.unshift File.expand_path("../lib", __FILE__)
+require "mixlib/log/version"
 
 Gem::Specification.new do |gem|
   gem.name = "mixlib-log"
   gem.version = Mixlib::Log::VERSION
   gem.platform = Gem::Platform::RUBY
   gem.summary = "A gem that provides a simple mixin for log functionality"
-  gem.email = "[email protected]"
-  gem.homepage = "http://www.opscode.com";
-  gem.authors = ["Opscode, Inc."]
+  gem.email = "[email protected]"
+  gem.homepage = "https://www.chef.io";
+  gem.license = "Apache-2.0"
+  gem.authors = ["Chef Software, Inc."]
   gem.has_rdoc = true
-  gem.extra_rdoc_files = ["README.rdoc", "LICENSE", 'NOTICE']
-  gem.files = Dir['lib/**/*'] + Dir['spec/**/*'] + ["Rakefile", ".gemtest", 
"mixlib-log.gemspec"]
-  gem.add_development_dependency 'rake'
-  gem.add_development_dependency 'rspec', '~> 2.10'
-  gem.add_development_dependency 'cucumber'
+  gem.extra_rdoc_files = ["README.md", "LICENSE", "NOTICE"]
+  gem.files = Dir["lib/**/*"] + Dir["spec/**/*"] + ["Gemfile", "Rakefile", 
".gemtest", "mixlib-log.gemspec"]
+  gem.add_development_dependency "rake"
+  gem.add_development_dependency "rspec", "~> 3.4"
+  gem.add_development_dependency "chefstyle", "~> 0.3"
+  gem.add_development_dependency "cucumber"
+  gem.add_development_dependency "github_changelog_generator", "1.11.3"
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/mixlib/log/formatter_spec.rb 
new/spec/mixlib/log/formatter_spec.rb
--- old/spec/mixlib/log/formatter_spec.rb       1970-01-01 01:00:00.000000000 
+0100
+++ new/spec/mixlib/log/formatter_spec.rb       2016-08-04 12:56:12.000000000 
+0200
@@ -1,14 +1,14 @@
 #
-# Author:: Adam Jacob (<[email protected]>)
-# Copyright:: Copyright (c) 2008 Opscode, Inc.
+# Author:: Adam Jacob (<[email protected]>)
+# Copyright:: Copyright (c) 2008-2016 Chef Software, Inc.
 # License:: Apache License, Version 2.0
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
-# 
+#
 #     http://www.apache.org/licenses/LICENSE-2.0
-# 
+#
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,36 +16,36 @@
 # limitations under the License.
 #
 
-require 'time'
+require "time"
 require File.expand_path(File.join(File.dirname(__FILE__), "..", "..", 
"spec_helper"))
 
 describe Mixlib::Log::Formatter do
   before(:each) do
     @formatter = Mixlib::Log::Formatter.new
   end
-  
+
   it "should print raw strings with msg2str(string)" do
-    @formatter.msg2str("nuthin new").should == "nuthin new"
+    expect(@formatter.msg2str("nuthin new")).to eq("nuthin new")
   end
-  
+
   it "should format exceptions properly with msg2str(e)" do
     e = IOError.new("legendary roots crew")
-    @formatter.msg2str(e).should == "legendary roots crew (IOError)\n"
+    expect(@formatter.msg2str(e)).to eq("legendary roots crew (IOError)\n")
   end
-  
+
   it "should format random objects via inspect with msg2str(Object)" do
-    @formatter.msg2str([ "black thought", "?uestlove" ]).should == '["black 
thought", "?uestlove"]'
+    expect(@formatter.msg2str([ "black thought", "?uestlove" ])).to 
eq('["black thought", "?uestlove"]')
   end
-  
+
   it "should return a formatted string with call" do
     time = Time.new
     Mixlib::Log::Formatter.show_time = true
-    @formatter.call("monkey", time, "test", "mos def").should == 
"[#{time.iso8601}] monkey: mos def\n"
+    expect(@formatter.call("monkey", time, "test", "mos def")).to 
eq("[#{time.iso8601}] monkey: mos def\n")
   end
-  
+
   it "should allow you to turn the time on and off in the output" do
     Mixlib::Log::Formatter.show_time = false
-    @formatter.call("monkey", Time.new, "test", "mos def").should == "monkey: 
mos def\n"
+    expect(@formatter.call("monkey", Time.new, "test", "mos def")).to 
eq("monkey: mos def\n")
   end
-  
+
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/mixlib/log_spec.rb new/spec/mixlib/log_spec.rb
--- old/spec/mixlib/log_spec.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/spec/mixlib/log_spec.rb 2016-08-04 12:56:12.000000000 +0200
@@ -1,7 +1,7 @@
 #
-# Author:: Adam Jacob (<[email protected]>)
-# Author:: Christopher Brown (<[email protected]>)
-# Copyright:: Copyright (c) 2008 Opscode, Inc.
+# Author:: Adam Jacob (<[email protected]>)
+# Author:: Christopher Brown (<[email protected]>)
+# Copyright:: Copyright (c) 2008-2016 Chef Software, Inc.
 # License:: Apache License, Version 2.0
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,8 +17,8 @@
 # limitations under the License.
 #
 
-require 'tempfile'
-require 'stringio'
+require "tempfile"
+require "stringio"
 require File.expand_path(File.join(File.dirname(__FILE__), "..", 
"spec_helper"))
 
 class LoggerLike
@@ -49,7 +49,7 @@
     io = StringIO.new
     Logit.init(io)
     Logit << "foo"
-    io.string.should match(/foo/)
+    expect(io.string).to match(/foo/)
   end
 
   it "creates a logger with a file name" do
@@ -57,7 +57,7 @@
       Logit.init(tempfile.path)
       Logit << "bar"
       tempfile.rewind
-      tempfile.read.should match(/bar/)
+      expect(tempfile.read).to match(/bar/)
     end
   end
 
@@ -65,18 +65,18 @@
     logger = LoggerLike.new
     Logit.init(logger)
     Logit.debug "qux"
-    logger.messages.should match(/qux/)
+    expect(logger.messages).to match(/qux/)
   end
 
   it "should re-initialize the logger if init is called again" do
     first_logdev, second_logdev = StringIO.new, StringIO.new
     Logit.init(first_logdev)
     Logit.fatal "FIRST"
-    first_logdev.string.should match(/FIRST/)
+    expect(first_logdev.string).to match(/FIRST/)
     Logit.init(second_logdev)
     Logit.fatal "SECOND"
-    first_logdev.string.should_not match(/SECOND/)
-    second_logdev.string.should match(/SECOND/)
+    expect(first_logdev.string).to_not match(/SECOND/)
+    expect(second_logdev.string).to match(/SECOND/)
   end
 
   it "should set the log level using the binding form,  with :debug, :info, 
:warn, :error, or :fatal" do
@@ -85,12 +85,12 @@
       :info  => Logger::INFO,
       :warn  => Logger::WARN,
       :error => Logger::ERROR,
-      :fatal => Logger::FATAL
+      :fatal => Logger::FATAL,
     }
     levels.each do |symbol, constant|
       Logit.level = symbol
-      Logit.logger.level.should == constant
-      Logit.level.should == symbol
+      expect(Logit.logger.level).to eq(constant)
+      expect(Logit.level).to eq(symbol)
     end
   end
 
@@ -98,50 +98,88 @@
     logdev = StringIO.new
     Logit.init(logdev)
     Logit.fatal { "the_message" }
-    logdev.string.should match(/the_message/)
+    expect(logdev.string).to match(/the_message/)
   end
 
-
   it "should set the log level using the method form, with :debug, :info, 
:warn, :error, or :fatal" do
     levels = {
       :debug => Logger::DEBUG,
       :info  => Logger::INFO,
       :warn  => Logger::WARN,
       :error => Logger::ERROR,
-      :fatal => Logger::FATAL
+      :fatal => Logger::FATAL,
     }
     levels.each do |symbol, constant|
       Logit.level(symbol)
-      Logit.logger.level.should == constant
+      expect(Logit.logger.level).to eq(constant)
     end
   end
 
   it "should raise an ArgumentError if you try and set the level to something 
strange using the binding form" do
-    lambda { Logit.level = :the_roots }.should raise_error(ArgumentError)
+    expect(lambda { Logit.level = :the_roots }).to raise_error(ArgumentError)
   end
 
   it "should raise an ArgumentError if you try and set the level to something 
strange using the method form" do
-    lambda { Logit.level(:the_roots) }.should raise_error(ArgumentError)
+    expect(lambda { Logit.level(:the_roots) }).to raise_error(ArgumentError)
   end
 
   it "should pass other method calls directly to logger" do
     Logit.level = :debug
-    Logit.should be_debug
-    lambda { Logit.debug("Gimme some sugar!") }.should_not raise_error
+    expect(Logit).to be_debug
+    expect(lambda { Logit.debug("Gimme some sugar!") }).to_not raise_error
+  end
+
+  it "should pass add method calls directly to logger" do
+    logdev = StringIO.new
+    Logit.init(logdev)
+    Logit.level = :debug
+    expect(Logit).to be_debug
+    expect(lambda { Logit.add(Logger::DEBUG, "Gimme some sugar!") }).to_not 
raise_error
+    expect(logdev.string).to match(/Gimme some sugar/)
   end
 
   it "should default to STDOUT if init is called with no arguments" do
     logger_mock = Struct.new(:formatter, :level).new
-    Logger.stub!(:new).and_return(logger_mock)
-    Logger.should_receive(:new).with(STDOUT).and_return(logger_mock)
+    expect(Logger).to receive(:new).with(STDOUT).and_return(logger_mock)
     Logit.init
   end
 
   it "should have by default a base log level of warn" do
     logger_mock = Struct.new(:formatter, :level).new
-    Logger.stub!(:new).and_return(logger_mock)
+    expect(Logger).to receive(:new).and_return(logger_mock)
     Logit.init
-    Logit.level.should eql(:warn)
+    expect(Logit.level).to eq(:warn)
+  end
+
+  it "should close File logger" do
+    opened_files_count_before = 0
+    ObjectSpace.each_object(File) do |f|
+      opened_files_count_before += 1 unless f.closed?
+    end
+    Logit.init("/tmp/logger.log")
+    Logit.init("/tmp/logger.log")
+    Logit.init("/tmp/logger.log")
+    opened_files_count_after = 0
+    ObjectSpace.each_object(File) do |f|
+      opened_files_count_after += 1 unless f.closed?
+    end
+    expect(opened_files_count_after).to eq(opened_files_count_before + 1)
+  end
+
+  it "should not close IO logger" do
+    opened_files_count_before = 0
+    ObjectSpace.each_object(File) do |f|
+      opened_files_count_before += 1 unless f.closed?
+    end
+    file = File.open("/tmp/logger.log")
+    Logit.init(file)
+    Logit.init(file)
+    Logit.init(file)
+    opened_files_count_after = 0
+    ObjectSpace.each_object(File) do |f|
+      opened_files_count_after += 1 unless f.closed?
+    end
+    expect(opened_files_count_after).to eq(opened_files_count_before + 1)
   end
 
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/spec_helper.rb new/spec/spec_helper.rb
--- old/spec/spec_helper.rb     1970-01-01 01:00:00.000000000 +0100
+++ new/spec/spec_helper.rb     2016-08-04 12:56:12.000000000 +0200
@@ -1,15 +1,15 @@
 #
-# Author:: Adam Jacob (<[email protected]>)
-# Author:: Christopher Brown (<[email protected]>)
-# Copyright:: Copyright (c) 2008 Opscode, Inc.
+# Author:: Adam Jacob (<[email protected]>)
+# Author:: Christopher Brown (<[email protected]>)
+# Copyright:: Copyright (c) 2008-2016 Chef Software, Inc..
 # License:: Apache License, Version 2.0
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
-# 
+#
 #     http://www.apache.org/licenses/LICENSE-2.0
-# 
+#
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,12 +17,12 @@
 # limitations under the License.
 #
 
-$TESTING=true
-$:.push File.join(File.dirname(__FILE__), '..', 'lib')
+$TESTING = true
+$:.push File.join(File.dirname(__FILE__), "..", "lib")
 
-require 'rspec'
-require 'mixlib/log'
-require 'mixlib/log/formatter'
+require "rspec"
+require "mixlib/log"
+require "mixlib/log/formatter"
 
 class Logit
   extend Mixlib::Log


Reply via email to