bauxite 0.6.14 → 0.6.15

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.
data/lib/bauxite.rb CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  #--
24
24
  module Bauxite
25
- VERSION = "0.6.14"
25
+ VERSION = "0.6.15"
26
26
  end
27
27
  #++
28
28
 
@@ -27,6 +27,7 @@
27
27
  #
28
28
  # File logger options include:
29
29
  # [<tt>file</tt>] Output file name.
30
+ # [<tt>verbose</tt>] Output all log (e.g. errors) to the file.
30
31
  #
31
32
  #
32
33
  class Bauxite::Loggers::FileLogger < Bauxite::Loggers::NullLogger
@@ -38,6 +39,7 @@ class Bauxite::Loggers::FileLogger < Bauxite::Loggers::NullLogger
38
39
  unless @file and @file != ''
39
40
  raise ArgumentError, "FileLogger configuration error: Undefined 'file' option."
40
41
  end
42
+ @verbose = options[:verbose]
41
43
  @lines = []
42
44
  end
43
45
 
@@ -51,4 +53,17 @@ class Bauxite::Loggers::FileLogger < Bauxite::Loggers::NullLogger
51
53
  @lines << action.text
52
54
  yield
53
55
  end
56
+
57
+ # Logs the specified string.
58
+ #
59
+ # +type+, if specified, should be one of +:error+, +:warning+,
60
+ # +:info+ (default), +:debug+.
61
+ #
62
+ def log(s, type = :info)
63
+ if @verbose
64
+ @lines << s
65
+ else
66
+ super
67
+ end
68
+ end
54
69
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bauxite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.14
4
+ version: 0.6.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patricio Zavolinsky
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-05 00:00:00.000000000 Z
11
+ date: 2014-12-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selenium-webdriver
@@ -265,7 +265,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
265
265
  version: '0'
266
266
  requirements: []
267
267
  rubyforge_project:
268
- rubygems_version: 2.2.0
268
+ rubygems_version: 2.2.2
269
269
  signing_key:
270
270
  specification_version: 4
271
271
  summary: Bauxite is a façade over Selenium intended for non-developers