redis_eval 0.2.1 → 0.2.2

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: 8b3cf8d0ed3c0979a7441634ba8aa63765b0335c
4
- data.tar.gz: a1f2447221b783edac1dcdfdf1ce1cf953dcb0aa
3
+ metadata.gz: 16236c0a6ea8bcbcc3928e5d51229b9659ffc995
4
+ data.tar.gz: 1f3cd2d258cf767257072d383475423d1bb0d8ac
5
5
  SHA512:
6
- metadata.gz: 6bf03974f51cbc83cde295233df882baddb2173b847eaed0323ac84445735321e1d4d90f5c3de9b30db9e8d7b963ed98e9423064184be5c735becd7c33753ea9
7
- data.tar.gz: 7900bb500c2e03160c7af67de9ff501f2efea1523b7a5d926850ea40b632935c19f5f8cc6f1e0592ff1935415808f51118a58d01dd54629fe78a7e79181e226f
6
+ metadata.gz: 1c20a35f547a2e8de7a237ba19a97474c6de8f70cfc1d772e682a8110c859ac060e37ca06df64d16bae7609e56e7f838c6d160b6dd166f790ef026726bc9ed4d
7
+ data.tar.gz: 7471481f48dcd325a0c89d9b6478a027d016946b88fb176b6cf22ce6fce6664ac233a5d1588b326e742b2a2ff78c9d31c76194a4722af24da47340cad14923fa
@@ -1,4 +1,5 @@
1
1
  require "digest"
2
+ require "erb"
2
3
  require "pathname"
3
4
  require "redis"
4
5
 
@@ -10,16 +10,12 @@ module RedisEval
10
10
  end
11
11
 
12
12
  def load(name)
13
- source = script_path(name).read
13
+ source = ERB.new(script_path(name).read).result
14
14
  loaded_scripts[name.to_s] ||= RedisEval::Script.build_from_parent(source, self)
15
15
  end
16
16
 
17
17
  def load_all
18
- path.children(false).each do |child|
19
- name = child.basename(SCRIPT_SUFFIX).to_s
20
- source = script_path(name).read
21
- loaded_scripts[name] ||= RedisEval::Script.build_from_parent(source, self)
22
- end
18
+ path.children(false).each { |child| self.load(child.basename(SCRIPT_SUFFIX).to_s) }
23
19
  true
24
20
  end
25
21
 
@@ -1,3 +1,3 @@
1
1
  module RedisEval
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis_eval
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - i2bskn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-21 00:00:00.000000000 Z
11
+ date: 2017-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis