logmaster 0.1.1 → 0.1.2

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: 26abc0f44aaf6c12404c18fe29ecdc6cebca1390
4
- data.tar.gz: 8b759d0d837f934cff43a489cedb67b37d0c5d51
3
+ metadata.gz: 705e9d16e0aeffce10375dc6876659d6fd912827
4
+ data.tar.gz: 8b6f701e3a6de1d0bcb088c42ff63956921f1014
5
5
  SHA512:
6
- metadata.gz: b4c017de9cda55a9b0c1fc5ee0ebe48e69a93ecf92932e7c5407ef801ef70c91855703b9e6a6ccdc5eccbacd75f66b2816908b2430f7fdae5a2e6890aa57c009
7
- data.tar.gz: 20b07389838a9603451cf4ddfbf3b406c395d3067deac8318803c6f2c93b9e3ecb2d406aa299a5e0555b8b85bb485145c830057608a686339c826999b3258f6c
6
+ metadata.gz: 78e1ec5cb4afe4ddc0222b992d7e7325abbd9bc52168e7acdbf8c5eb0c832b02131e71f7d20be2fc17032b4238baf905936e261e5a6c017150bf1baa34414eac
7
+ data.tar.gz: 50420ca2a71175336e49daca59252abc1ec690b015547bc9ad5cdf0b8eb5998403fdbeb566851bd786eaf34d97ec993a8d9b1d09ba7736c635b53866c758956b
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -32,6 +32,10 @@ class Logmaster
32
32
  require 'erb'
33
33
 
34
34
  @email_config = { via: :sendmail, from: 'logmaster@localhost', subject: "#{@name} message" }
35
+
36
+ # Convert string keys into symbol keys
37
+ settings = Hash[settings.map{|(k,v)| [k.to_sym,v]}]
38
+
35
39
  @email_config.merge!(settings)
36
40
  if @email_config[:to].nil?
37
41
  raise "Please specify email addresses of email recipients using :to key in email_config attr (value should be array)"
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: logmaster 0.1.1 ruby lib
5
+ # stub: logmaster 0.1.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "logmaster"
9
- s.version = "0.1.1"
9
+ s.version = "0.1.2"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Roman Snitko"]
14
- s.date = "2014-09-23"
14
+ s.date = "2015-01-07"
15
15
  s.description = "A wrapper around ruby stdlib Logger with emailing capabilities"
16
16
  s.email = "roman.snitko@gmail.com"
17
17
  s.extra_rdoc_files = [
@@ -56,4 +56,9 @@ describe Logmaster do
56
56
  end
57
57
  end
58
58
 
59
+ it "converts keys in the config settings hash into symbols (config.yml parsing makes them strings initially)" do
60
+ @logmaster.email_config = { 'to' => 'your-email@here.com' }
61
+ expect(@logmaster.email_config[:to]).not_to be_blank
62
+ end
63
+
59
64
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logmaster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Snitko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-23 00:00:00.000000000 Z
11
+ date: 2015-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pony