condition 0.0.19 → 0.0.20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 61d962f0e11bd728b3c8ae8ccab732e6b9533d03
4
- data.tar.gz: 4711e5312cbbf60877a37e227adf323b3cdbcdbd
3
+ metadata.gz: 1600a1f079b5dda433b728ebcefd9f31e9341074
4
+ data.tar.gz: baead12e5cb94c49937c7fb63ba0203bf4885c55
5
5
  SHA512:
6
- metadata.gz: a0eced2d36943454a86a5a9f42f07c1be28a552448aa00fd9799a70b8ca6feb91cfd16800b20c36976947aff41d388458530264cdf5db29f3d9899be24b07190
7
- data.tar.gz: 4855af721f9135bf72aa8b12dd4e561f55c0b13b99f6ba9f03dc89021319ce6db6d31d1dd041155cc64b07df3c66dbfd4c8e2e16171ee58e2ad7149e1c709e38
6
+ metadata.gz: 94272e37d660028c6799028690d59c9f19ee6bad37e6cba832a654453f23415a24cd3130f8a5b7f895cc46e86b4790d0bf2ffeba25ee807bac851ff6f3d3f4a1
7
+ data.tar.gz: fda4ea6d4f5e3d5af1f8a76cc437f25cf36c13ec507325887569a31cc71f1969f25b4821679bb5345a888309d9fbdb48f5dc6993e42be154e42dc5916a4e45da
data/README.md CHANGED
@@ -30,6 +30,9 @@ TODO: Write usage instructions here
30
30
 
31
31
  ## Changes
32
32
 
33
+ 2013-12-13 0.0.20
34
+ check redis key not found
35
+
33
36
  2013-12-12 0.0.19
34
37
  add convert file to redis
35
38
 
@@ -9,7 +9,9 @@ module Condition
9
9
  end
10
10
 
11
11
  def read_sheet(path, sheet_index)
12
- JSON.parse(@redis.get(path), {:symbolize_names => true})
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
@@ -1,5 +1,5 @@
1
1
  # coding: utf-8
2
2
 
3
3
  module Condition
4
- VERSION = "0.0.19"
4
+ VERSION = "0.0.20"
5
5
  end
@@ -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.19
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 00:00:00.000000000 Z
11
+ date: 2013-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler