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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2cced1eebdf3423a8316fb0edd4f3436bebd8b32
4
- data.tar.gz: 941e764013b3f1a6e216218a26f28369a85ca741
3
+ metadata.gz: 537d2dcb14e404675c1d6b0a0a45ee22543004a2
4
+ data.tar.gz: b886d0fe063e2a021793daae25da866b4e62103b
5
5
  SHA512:
6
- metadata.gz: 289d7efbc0d38f6479f0c247e4e4ab5517fa350e0b0df8844678210a110a5e6faec0071cd9814cdeee06391d495e7cfd1b1f01a42862f1901e65d71bee741c7a
7
- data.tar.gz: 42f6af3eda1cb441505f3035df7f4b07b8ab154091aa63cd41a53becb9f9413cc9b876d69c5ad3743743feb0788b7d202dc4ff46f2a730fdeb014d455e3127d0
6
+ metadata.gz: b9fb9002182aa963c1f3efd8bfe9a6e50f105625e7881aa72d58345384cac769e6acfd8ce4a4412659b2dc7808560d67aa26939175afcf96527db3af0fe18155
7
+ data.tar.gz: 2c7e90ed853db7b3e4c32f6cc63a421e07f2c3ec0e2526d0fac5ee65dfb5d4f943e9bee337e765d862f0cd6af4aa63a78ce52609c07b85e1a9e72a94f90d1d60
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module RorHack
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
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.3
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-21 00:00:00.000000000 Z
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.6
99
+ rubygems_version: 2.4.8
100
100
  signing_key:
101
101
  specification_version: 4
102
102
  summary: ruby on rails library hack.