sbsm 1.4.6 → 1.4.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +5 -0
- data/lib/sbsm/app.rb +1 -1
- data/lib/sbsm/logger.rb +2 -1
- data/lib/sbsm/session_store.rb +4 -0
- data/lib/sbsm/version.rb +1 -1
- data/test/test_logger.rb +14 -0
- 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: b370d3f21165accf1e116ff96c1f2384093da81f
|
4
|
+
data.tar.gz: c6de8a95bfcdca73be4b3115be51bf517c07e16b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a398654589315be802f054f274a3be7bb4748241efad88c31b42f49a8b338d4753f1642764fef340fd47057f4e686b43e3b1aa0d2d71105d3407fd5e87af456
|
7
|
+
data.tar.gz: 80684c6ae85ea2303de7477d3eb824555971143acf1fe6d79332f0dc912cdf11c8f516ba3b0de53e7cc6a16af9c449271dedd6901ca67cfd7ddf1beed331fd86
|
data/History.txt
CHANGED
data/lib/sbsm/app.rb
CHANGED
@@ -108,7 +108,7 @@ module SBSM
|
|
108
108
|
end
|
109
109
|
if File.file?(file_name)
|
110
110
|
mime_type = MimeMagic.by_extension(File.extname(file_name)).type
|
111
|
-
SBSM.
|
111
|
+
SBSM.debug "file_name is #{file_name} checkin base #{File.basename(file_name)} MIME #{mime_type}"
|
112
112
|
response.set_header('Content-Type', mime_type)
|
113
113
|
response.write(File.open(file_name, File::RDONLY){|file| file.read})
|
114
114
|
return response
|
data/lib/sbsm/logger.rb
CHANGED
data/lib/sbsm/session_store.rb
CHANGED
data/lib/sbsm/version.rb
CHANGED
data/test/test_logger.rb
CHANGED
@@ -120,4 +120,18 @@ class TestLogger < Minitest::Test
|
|
120
120
|
assert_match(/test_error/, IO.read(@temp_file.path))
|
121
121
|
end
|
122
122
|
|
123
|
+
def test_log_level
|
124
|
+
assert_equal(Logger::WARN, SBSM.logger.level)
|
125
|
+
SBSM.logger = Logger.new(@temp_file.path, level: Logger::ERROR)
|
126
|
+
assert_equal(Logger::ERROR, SBSM.logger.level)
|
127
|
+
saved_length = File.size(@temp_file.path)
|
128
|
+
assert( !/test_error/.match(IO.read(@temp_file.path)))
|
129
|
+
SBSM.error("test_error #{__LINE__}")
|
130
|
+
SBSM.logger.level= Logger::WARN
|
131
|
+
assert_match(/test_error/, IO.read(@temp_file.path))
|
132
|
+
SBSM.info("test_info #{__LINE__}")
|
133
|
+
content = IO.read(@temp_file.path)
|
134
|
+
assert_nil(/test_info/.match(IO.read(@temp_file.path)))
|
135
|
+
end
|
136
|
+
|
123
137
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sbsm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masaomi Hatakeyama, Zeno R.R. Davatz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|