ror_hack 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ror_hack/kernel_hack.rb +19 -0
- data/lib/ror_hack/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 537d2dcb14e404675c1d6b0a0a45ee22543004a2
|
4
|
+
data.tar.gz: b886d0fe063e2a021793daae25da866b4e62103b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9fb9002182aa963c1f3efd8bfe9a6e50f105625e7881aa72d58345384cac769e6acfd8ce4a4412659b2dc7808560d67aa26939175afcf96527db3af0fe18155
|
7
|
+
data.tar.gz: 2c7e90ed853db7b3e4c32f6cc63a421e07f2c3ec0e2526d0fac5ee65dfb5d4f943e9bee337e765d862f0cd6af4aa63a78ce52609c07b85e1a9e72a94f90d1d60
|
data/lib/ror_hack/kernel_hack.rb
CHANGED
@@ -4,6 +4,25 @@ module RorHack
|
|
4
4
|
def petty_eval(bind, str)
|
5
5
|
eval str, bind
|
6
6
|
end
|
7
|
+
|
8
|
+
def yml_load_config(name, default_value='66dc9e58b19ecc4ec538ea771b71b372')
|
9
|
+
name += '.yml' unless name.end_with?('.yml')
|
10
|
+
if File.file?(File.join(Rails.root, '/config', name))
|
11
|
+
result = YAML.load_file(File.join(Rails.root, '/config', name))
|
12
|
+
if result.is_a? Array
|
13
|
+
return result
|
14
|
+
else
|
15
|
+
return OpenStruct.new(result)
|
16
|
+
end
|
17
|
+
else
|
18
|
+
if default_value == '66dc9e58b19ecc4ec538ea771b71b372'
|
19
|
+
YAML.load_file(File.join(Rails.root, '/config', name))
|
20
|
+
else
|
21
|
+
return default_value
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
7
26
|
end
|
8
27
|
end
|
9
28
|
|
data/lib/ror_hack/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ror_hack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- happyMing
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
96
|
version: '0'
|
97
97
|
requirements: []
|
98
98
|
rubyforge_project:
|
99
|
-
rubygems_version: 2.4.
|
99
|
+
rubygems_version: 2.4.8
|
100
100
|
signing_key:
|
101
101
|
specification_version: 4
|
102
102
|
summary: ruby on rails library hack.
|