bunyan_capybara 0.1.3 → 0.1.4
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 +4 -4
- data/lib/bunyan_capybara.rb +7 -3
- data/lib/bunyan_capybara/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a37fb31399d7eb181e7db7032167a0fd0e9feef9
|
4
|
+
data.tar.gz: b6053708f5c7c37e4e957473a34d413e1c5c18d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d4d32eead9a064202e27a68deab56cdc88d164caff80724577184fefe5d182fea49087f61b5a533aea8d683e3a515cc0843d1a562b26bf8b03eeae7c2f8903c
|
7
|
+
data.tar.gz: b0dd807e93375ac1189bf8463eac83f138b730576098f9b909d38ff989ae50f0d318250fd52143796b905289691f04c7a1f1beebf5fce2f25a93cce724b855e0
|
data/lib/bunyan_capybara.rb
CHANGED
@@ -24,16 +24,19 @@ module Bunyan
|
|
24
24
|
# we run any of the examples.
|
25
25
|
#
|
26
26
|
# @note Call this method no more than once per spec
|
27
|
-
def self.instantiate_all_loggers!(config: ENV)
|
27
|
+
def self.instantiate_all_loggers!(config: ENV, path:)
|
28
28
|
raise "You already called instantiate_all_loggers!" if @called
|
29
29
|
@called = true
|
30
30
|
layout = Logging.layouts.pattern(format_as: :json, date_pattern: "%Y-%m-%d %H:%M:%S.%L")
|
31
31
|
Logging.appenders.stdout(layout: layout)
|
32
|
-
|
32
|
+
if !File.exist?(File.expand_path('~/bunyan_logs'))
|
33
|
+
Dir.mkdir(File.expand_path('~/bunyan_logs'))
|
34
|
+
end
|
35
|
+
entries = Dir.glob(File.expand_path(path + '/*', __FILE__))
|
33
36
|
entries.each do |entry|
|
34
37
|
application_name_under_test = entry.split('/').last
|
35
38
|
logger = Logging.logger[application_name_under_test]
|
36
|
-
log_filename = File.expand_path("~/
|
39
|
+
log_filename = File.expand_path("~/bunyan_logs/#{application_name_under_test}.log", __FILE__)
|
37
40
|
logger.add_appenders('stdout', Logging.appenders.file(log_filename, layout: layout))
|
38
41
|
logger.level = config.fetch('LOG_LEVEL', DEFAULT_LOG_LEVEL).to_sym
|
39
42
|
end
|
@@ -221,6 +224,7 @@ module Bunyan
|
|
221
224
|
end
|
222
225
|
|
223
226
|
def initialize_example_variables!
|
227
|
+
require 'byebug'; debugger
|
224
228
|
@example_variable = BunyanVariableExtractor.call(path: @example.metadata.fetch(:absolute_file_path), config: config)
|
225
229
|
end
|
226
230
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bunyan_capybara
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Max Hallwachs
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|