condition 0.0.19 → 0.0.20
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/README.md +3 -0
- data/lib/condition/reader/redis_reader.rb +3 -1
- data/lib/condition/version.rb +1 -1
- data/spec/condition_spec.rb +6 -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: 1600a1f079b5dda433b728ebcefd9f31e9341074
|
|
4
|
+
data.tar.gz: baead12e5cb94c49937c7fb63ba0203bf4885c55
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 94272e37d660028c6799028690d59c9f19ee6bad37e6cba832a654453f23415a24cd3130f8a5b7f895cc46e86b4790d0bf2ffeba25ee807bac851ff6f3d3f4a1
|
|
7
|
+
data.tar.gz: fda4ea6d4f5e3d5af1f8a76cc437f25cf36c13ec507325887569a31cc71f1969f25b4821679bb5345a888309d9fbdb48f5dc6993e42be154e42dc5916a4e45da
|
data/README.md
CHANGED
|
@@ -9,7 +9,9 @@ module Condition
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
def read_sheet(path, sheet_index)
|
|
12
|
-
|
|
12
|
+
data = @redis.get(path)
|
|
13
|
+
raise "redis key name #{path} not found" if data.nil? || data == ""
|
|
14
|
+
JSON.parse(data, {:symbolize_names => true})
|
|
13
15
|
end
|
|
14
16
|
end
|
|
15
17
|
end
|
data/lib/condition/version.rb
CHANGED
data/spec/condition_spec.rb
CHANGED
|
@@ -111,4 +111,10 @@ describe Condition do
|
|
|
111
111
|
val3: 3,
|
|
112
112
|
}])
|
|
113
113
|
end
|
|
114
|
+
|
|
115
|
+
it 'redis read error' do
|
|
116
|
+
reader = Condition::Reader::RedisReader.new(REDIS)
|
|
117
|
+
Condition::Param.set_reader(nil)
|
|
118
|
+
expect { Condition::Param.new('files_aaa', reader: reader) }.to raise_error("redis key name files_aaa not found")
|
|
119
|
+
end
|
|
114
120
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: condition
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.20
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- aoyagikouhei
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-12-
|
|
11
|
+
date: 2013-12-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|