rzo 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d67408c1091aa82e515dd92bbd1bbcd1034290e6
4
- data.tar.gz: 04671d9b7c98f50d71a653489d8862e181cf23a8
3
+ metadata.gz: 6974bf3026de895a982abdcd218564cfb9fadd87
4
+ data.tar.gz: c949443d5fff2c64a36033aad8af9f1b7412f1c3
5
5
  SHA512:
6
- metadata.gz: a3897968ecc1fb45588f2888003559de212c0f80300d91528cd71ec3a016a1bbe4efe8632574da15dc6995ddc52ae083fd9adca7b4ca74dcb56032c13cc324d4
7
- data.tar.gz: 6252bd6fec7b7f27912f34e29bd6eb0d29469392d177a9df4077fadde5c33d425c2bed73e24f212268b4e9c6bb4ca5e37d37763577eb80a7c90cda4a6393d750
6
+ metadata.gz: 7c43d4433d78e5f0af754a9c3001a3303bf3013c8ed2388ada4f648ff89e0538e707cb60db37271bc34d827d156dab783bf1c1e0bbbbb503bf248a04ad480be9
7
+ data.tar.gz: 6447d475c5c42783b201f14ec9c6ed1102fa7511054c5316c53b22f71e1fe076c948e56930322e2bee5273a8445b9581829ebf186888e740e2c4b0f21043a165
data/CHANGELOG.md CHANGED
@@ -1,6 +1,17 @@
1
1
  # Change Log
2
2
 
3
- ## [v0.2.0](https://github.com/ghoneycutt/rizzo/tree/v0.1.0) (2017-08-23)
3
+ ## [v0.3.0](https://github.com/ghoneycutt/rizzo/tree/v0.3.0)
4
+
5
+ [Full Changelog](https://github.com/ghoneycutt/rizzo/compare/v0.2.0...v0.3.0)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - Fix syslog LoadError on Windows [\#9](https://github.com/ghoneycutt/rizzo/pull/9) ([jeffmccune](https://github.com/jeffmccune))
10
+
11
+ ## [v0.2.0](https://github.com/ghoneycutt/rizzo/tree/v0.2.0) (2017-08-23)
12
+ [Full Changelog](https://github.com/ghoneycutt/rizzo/compare/v0.1.0...v0.2.0)
13
+
14
+ ## [v0.1.0](https://github.com/ghoneycutt/rizzo/tree/v0.1.0) (2017-08-23)
4
15
  **Closed issues:**
5
16
 
6
17
  - configuration language should be YAML instead of JSON [\#4](https://github.com/ghoneycutt/rizzo/issues/4)
data/README.md CHANGED
@@ -16,6 +16,11 @@ dependent on them.
16
16
 
17
17
  Rizzo is named after Rizzo the Rat.
18
18
 
19
+ # Compatibility
20
+
21
+ Tested to work with ruby versions associated with Puppet, see
22
+ `.travis.yml`, on OSX and Windows 2012R2.
23
+
19
24
  # Installation
20
25
 
21
26
  Add the rizzo gem to your control repository `Gemfile`. For example, in
data/lib/rzo/logging.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  require 'logger'
2
2
  require 'stringio'
3
- require 'syslog/logger'
4
3
  module Rzo
5
4
  ##
6
5
  # Support module to mix into a class for consistent logging behavior.
@@ -10,16 +9,32 @@ module Rzo
10
9
  #
11
10
  # @return [Logger] initialized logging instance
12
11
  def self.reset_logging!(opts)
13
- logger = opts[:syslog] ? syslog_logger : stream_logger(opts)
12
+ logger = opts[:syslog] ? syslog_logger(opts) : stream_logger(opts)
14
13
  @log = logger
15
14
  end
16
15
 
17
16
  ##
18
17
  # Return a new Syslog::Logger instance configured for syslog output
19
- def self.syslog_logger
20
- # Use the daemon facility, matching Puppet behavior.
21
- Syslog::Logger.new('rzo', Syslog::LOG_DAEMON)
18
+ # rubocop:disable Metrics/MethodLength
19
+ def self.syslog_logger(opts)
20
+ begin
21
+ require 'syslog/logger'
22
+ have_syslog = true
23
+ rescue LoadError
24
+ have_syslog = false
25
+ end
26
+
27
+ if have_syslog
28
+ # Use the daemon facility, matching Puppet behavior.
29
+ Syslog::Logger.new('rzo', Syslog::LOG_DAEMON)
30
+ else
31
+ logger = stream_logger(opts)
32
+ logger.warn('Syslog is not available. Falling back to stream logging.') unless @syslog_warned
33
+ @syslog_warned = true
34
+ logger
35
+ end
22
36
  end
37
+ # rubocop:enable Metrics/MethodLength
23
38
 
24
39
  ##
25
40
  # Return a new Logger instance configured for file output
data/lib/rzo/version.rb CHANGED
@@ -5,7 +5,7 @@ module Rzo
5
5
  # The authoritative location of the rzo version. It should be possible to
6
6
  # `require 'rizzo/version'` and access `Rizzo::VERSION` from third party
7
7
  # libraries and the gemspec. The version is defined as a Semantic Version.
8
- VERSION = '0.2.0'.freeze
8
+ VERSION = '0.3.0'.freeze
9
9
 
10
10
  ##
11
11
  # Return the SemVer string, e.g. `"0.1.0"`
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rzo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garrett Honeycutt
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-08-23 00:00:00.000000000 Z
12
+ date: 2017-08-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake