testcloud-support 0.0.0.7 → 0.0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/testcloud/support.rb +2 -1
- data/lib/testcloud/support/gem_version.rb +1 -1
- data/lib/testcloud/support/logger.rb +1 -12
- data/spec/testcloud/support/logger.rb +15 -0
- metadata +3 -5
- data/lib/testcloud/support/dependencies.rb +0 -6
- data/lib/testcloud/support/loading.rb +0 -9
- data/lib/testcloud/support/logging/default_logger.rb +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01ecc12c6da0aacfc3cbdd58907caf46f8a29156
|
4
|
+
data.tar.gz: 2d85bb8ea05487b3cfcfc398aff5484c0bf1b905
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: babba0b6db6094aa127f38e0a19fc0f2d0e7a0cead206377c15d02d00b25ba4422253acf0a42a41d68a81474075626f1c0739ee279b46d1c57a1606ac2f506ff
|
7
|
+
data.tar.gz: 82cafedc59a182c95ef0968190dc375a30c209bdc735a3d55e3669c6218e53967c59ac0f4f662c7de03be6f2b48a46423823c92051bf737361649457e093e1db
|
data/Gemfile.lock
CHANGED
data/lib/testcloud/support.rb
CHANGED
@@ -1,21 +1,10 @@
|
|
1
|
-
require 'testcloud/support/logging/default_logger'
|
2
|
-
|
3
1
|
module Testcloud
|
4
2
|
module Support
|
5
3
|
|
6
4
|
class << self
|
7
5
|
def logger
|
8
|
-
|
6
|
+
@logger ||= ActiveSupport::Logger.new(STDOUT)
|
9
7
|
end
|
10
|
-
|
11
|
-
private
|
12
|
-
def logger_class
|
13
|
-
@logger ||= logger_for_environment(Testcloud.env)
|
14
|
-
end
|
15
|
-
|
16
|
-
def logger_for_environment(environment)
|
17
|
-
Logging::DefaultLogger.new
|
18
|
-
end
|
19
8
|
end # self
|
20
9
|
|
21
10
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'testcloud/support/logger'
|
3
|
+
|
4
|
+
describe 'Testcloud::Support.logger' do
|
5
|
+
|
6
|
+
it 'should append a logger to the Testcloud::Support object' do
|
7
|
+
expect(Testcloud::Support).to respond_to(:logger)
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'should have standard logging methods' do
|
11
|
+
[:fatal, :error, :warn, :info, :debug].each do |output_method|
|
12
|
+
expect(Testcloud::Support.logger).to respond_to(output_method)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testcloud-support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.0.
|
4
|
+
version: 0.0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- testCloud Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -121,15 +121,13 @@ files:
|
|
121
121
|
- README.md
|
122
122
|
- Rakefile
|
123
123
|
- lib/testcloud/support.rb
|
124
|
-
- lib/testcloud/support/dependencies.rb
|
125
124
|
- lib/testcloud/support/gem_version.rb
|
126
125
|
- lib/testcloud/support/global_methods.rb
|
127
|
-
- lib/testcloud/support/loading.rb
|
128
126
|
- lib/testcloud/support/logger.rb
|
129
|
-
- lib/testcloud/support/logging/default_logger.rb
|
130
127
|
- lib/testcloud/support/version.rb
|
131
128
|
- lib/testcloud_support.rb
|
132
129
|
- spec/spec_helper.rb
|
130
|
+
- spec/testcloud/support/logger.rb
|
133
131
|
- spec/testcloud/support_spec.rb
|
134
132
|
homepage: https://testcloud.io
|
135
133
|
licenses:
|
@@ -1,21 +0,0 @@
|
|
1
|
-
require 'logger'
|
2
|
-
|
3
|
-
module Testcloud
|
4
|
-
module Support
|
5
|
-
module Logging
|
6
|
-
|
7
|
-
class DefaultLogger
|
8
|
-
attr_reader :logger
|
9
|
-
|
10
|
-
def initialize
|
11
|
-
@logger = ::Logger.new(STDOUT)
|
12
|
-
@logger.datetime_format = '%Y-%M-%d %H:%M:%S'
|
13
|
-
@logger.formatter = proc do |severity, datetime, program_name, message|
|
14
|
-
"[#{severity}]: #{message} [#{datetime}]"
|
15
|
-
end
|
16
|
-
self
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|