logger2r 1.0.4 → 1.0.5

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
2
  SHA1:
3
- metadata.gz: 930651b9d7054fa0dcd260a633e32155a41a640a
4
- data.tar.gz: 395c72a609624a16257fde4d72fdff21787623fc
3
+ metadata.gz: 7cba69c25fb58148f99e2b7dd789e7c190a3b508
4
+ data.tar.gz: c11741e36be489f2dc7a1ae3417c24a029bdc100
5
5
  SHA512:
6
- metadata.gz: 758557c42fb47337e9761b324e88c0d74a643133471eb8c6221475a7b648a751d0772d48d8c7fedcf045d6c6906fb254bfae5b3665f82c4f72c6f0e56a1851d4
7
- data.tar.gz: 73667c3332bcf3927bd4b070c8b2f3df663dcfcc01c56d4852ee695dcb09879b85eda1b01047470ef67226f6e37bdf3a948d8d482dba2f2bcedbcc23b5eb1590
6
+ metadata.gz: 462adb4ceb323f178de007f2a143d07e1dd7746f25e1a0cdab31273183dc117ccd1aa19753b968096f8bb3e7ba82a7ed9bd28e57dfc2fba6073452e6c600ccb0
7
+ data.tar.gz: e846cba8816adfd9d24c58ffecbcf8bf67ba454e332940fd0939a6cf189634d5d1d11666935874cca728b4cfb310d5918c983cbbcbd90b4a9714a8f86b96eb7f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ === 1.0.5 (2017.01.06)
2
+
3
+ * improve tests
4
+
1
5
  === 1.0.4 (2017.01.04)
2
6
 
3
7
  * update readme
@@ -18,5 +18,5 @@
18
18
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
 
20
20
  module Logger2r
21
- VERSION = "1.0.4".freeze
21
+ VERSION = "1.0.5".freeze
22
22
  end
data/lib/logger2r.rb CHANGED
@@ -40,8 +40,12 @@ module Logger2r
40
40
 
41
41
  private
42
42
 
43
+ def config_from_file?
44
+ defined?(@config_file) && !@config_file.nil?
45
+ end
46
+
43
47
  def get_config_for_class(class_name)
44
- config_form_file = @config_file.nil? ? {} : YAML.load_file(@config_file)
48
+ config_form_file = config_from_file? ? YAML.load_file(@config_file) : {}
45
49
  config_form_file = config_form_file.fetch(:logger2r_config, {})
46
50
  config_for_all_classes = config_form_file.fetch(:default, {})
47
51
  config_for_class = config_form_file.fetch(class_name.to_sym, {})
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logger2r
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Szymon Kopciewski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-04 00:00:00.000000000 Z
11
+ date: 2017-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake