lolitado 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lolitado.rb +4 -0
- data/lib/version.rb +1 -1
- metadata +1 -2
- data/lib/yaml.rb +0 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1b994f8ee23ddb68c0538490bd5b18e9e3c08b27aa37ff3a561044d79751cb9
|
4
|
+
data.tar.gz: 96d4aab3e4c3f091d59e69b87a956b5c3f4a602db41ba5b49220cc03445ba756
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f692b16a95e32587e4f4194fcd379afc72fc5c07dacf72a353df02887af16c387a808b54b1828bc5710eb2c8708b761f2b2ec1201b6c956aada662c1a889a2f
|
7
|
+
data.tar.gz: 2ccb705cf3f67d1828b386d0667b9d9080fdb8523881ae8ad190c5aeb8b2336f4f61b4c7ede69cd310303183d8fabe9fdaaac21c3989b3c6a3910ddfe6dc98da
|
data/lib/lolitado.rb
CHANGED
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lolitado
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dolores Zhang
|
@@ -79,7 +79,6 @@ files:
|
|
79
79
|
- lib/pool.rb
|
80
80
|
- lib/request.rb
|
81
81
|
- lib/version.rb
|
82
|
-
- lib/yaml.rb
|
83
82
|
homepage: http://github.com/doloreszhang/lolitado
|
84
83
|
licenses:
|
85
84
|
- MIT
|
data/lib/yaml.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
require 'psych'
|
2
|
-
|
3
|
-
module Cleric
|
4
|
-
module YAML
|
5
|
-
|
6
|
-
CONFIGURE_PATH = File.expand_path("../data/stage.yml",__FILE__)
|
7
|
-
|
8
|
-
def self.fetch_corresponding_conf_by name
|
9
|
-
all_hash_values = load_yml(CONFIGURE_PATH)
|
10
|
-
conf_value = fetch_value_by all_hash_values, name
|
11
|
-
return conf_value
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.load_yml path
|
15
|
-
Psych.load_file(path)
|
16
|
-
end
|
17
|
-
|
18
|
-
def self.fetch_value_by hash, key
|
19
|
-
if hash == false
|
20
|
-
fail "no configuration in #{ENV['PLATFORM']}.yml"
|
21
|
-
else
|
22
|
-
if hash[key].nil?
|
23
|
-
fail "can not find corresponding configure value for #{key}"
|
24
|
-
else
|
25
|
-
hash[key]
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
end
|
31
|
-
end
|