conifer 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/conifer/file.rb +6 -2
- data/lib/conifer/version.rb +1 -1
- data/lib/conifer.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c68dba617d8e0545cddd1cc5755edfadedb01a37715c6d4275b9f2eef5867c88
|
4
|
+
data.tar.gz: 97194015c550ae2aaed5ee8c6b5ce0190e5de7699729b0239d3ae5a4ad59121c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f213d2a3e0ce582043e58ffb5a0a583c9d7ccbf90308004e97c4e4087d3cdd9277247a8a141e01c0a04b70bbe1082e8265fdd85609346ef7014b522f8c507ca
|
7
|
+
data.tar.gz: ec6b46ea5d9ff44582da67cad8707639c9b99639e95215ac51144228d566738fde202708c94040b2fbd89e33cb8ad605dbf456180b8f9d95c5ea1fa7a0e1062d
|
data/Gemfile.lock
CHANGED
data/lib/conifer/file.rb
CHANGED
@@ -31,15 +31,19 @@ module Conifer
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def path(directory = dir)
|
34
|
-
file = ::File.join(directory,
|
34
|
+
file = ::File.join(directory, filename).to_s
|
35
35
|
|
36
36
|
if ::File.exist?(file)
|
37
37
|
file
|
38
38
|
else
|
39
|
-
raise NotFoundError, "Could not find file #{
|
39
|
+
raise NotFoundError, "Could not find file #{filename}" if directory == '/'
|
40
40
|
|
41
41
|
path(::File.expand_path('..', directory))
|
42
42
|
end
|
43
43
|
end
|
44
|
+
|
45
|
+
def filename
|
46
|
+
"#{::File.basename(name.to_s, '.yml')}.yml"
|
47
|
+
end
|
44
48
|
end
|
45
49
|
end
|
data/lib/conifer/version.rb
CHANGED
data/lib/conifer.rb
CHANGED
@@ -9,7 +9,7 @@ module Conifer
|
|
9
9
|
extend ActiveSupport::Concern
|
10
10
|
|
11
11
|
class_methods do
|
12
|
-
def conifer(file, prefix: nil, dir: nil, method: '
|
12
|
+
def conifer(file, prefix: nil, dir: nil, method: ::File.basename(file.to_s, '.yml'), singleton: false)
|
13
13
|
body = proc do
|
14
14
|
return instance_variable_get("@conifer_#{method}") if instance_variable_defined?("@conifer_#{method}")
|
15
15
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: conifer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hamed Asghari
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|