orator 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/generators/templates/config.yml +4 -1
- data/lib/generators/templates/orators/application_orator.rb +1 -1
- data/lib/orator/cli.rb +12 -11
- data/lib/orator/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzY2Mjk1NGM1ZWJiODllOTllMGYyN2E3MTBkYjg0NzM1ZTAyZDczNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MGNjNjc0MWNjYTFmNDFlYTFhMjg4NmI3YzIxNTUyMzM5NzA3ZWFmNA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MDlmODY1ODdmOGFkYzFlNGY2MDEwYmJhZGM4N2M1MmU1NzQzOGIyNmRmYjU2
|
10
|
+
ODIwMmYwZTAzZDZjNWNmM2U4NWRkMWQwOTY1OWNiZGU0NzY0YTE3NTQxNDg4
|
11
|
+
Nzk5Mjc1ZjYzZDc5MzJiYTc2NTZhODRhYTVmNDI0MWFiODU3MGI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YmRlYTg1N2NjZTk4ZjdmYjdkMGFmYzkzYjczZTNjZjczMWMzODQwN2FjODAy
|
14
|
+
NWE5ZjJiZWI0OGIyMzlhMmU4YjAwZDkwYzMxYmVlZjk1MWFlZGQ4MTc3MWQ1
|
15
|
+
YjNhMTRlNmZhNGI0MWU5OWU3ZmZiNzY1YmFhYzVlNDgzNTkzMDQ=
|
@@ -4,5 +4,8 @@
|
|
4
4
|
:server_options:
|
5
5
|
:host: 0.0.0.0
|
6
6
|
:port: 8080
|
7
|
-
:
|
7
|
+
:orators:
|
8
|
+
# Our application orator needs to be loaded before all of our other orators.
|
9
|
+
- app/orators/application_orator.rb
|
10
|
+
- app/orators/*_orator.rb
|
8
11
|
:require: config/orator/*
|
data/lib/orator/cli.rb
CHANGED
@@ -143,24 +143,25 @@ module Orator
|
|
143
143
|
#
|
144
144
|
# @return [void]
|
145
145
|
def load_orators
|
146
|
-
|
147
|
-
Dir[yaml_options[:orators_path]].each do |file|
|
148
|
-
load file
|
149
|
-
end
|
146
|
+
requires yaml_options[:orators]
|
150
147
|
end
|
151
148
|
|
152
149
|
# This loads files that are deemed required by the configuration file.
|
153
150
|
#
|
154
151
|
# @return [void]
|
155
152
|
def require_files
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
153
|
+
requires yaml_options[:require]
|
154
|
+
end
|
155
|
+
|
156
|
+
# This takes an array or a string snd requires the files that it can reach.
|
157
|
+
#
|
158
|
+
# @param [Array<String>, String] the file(s) to require.
|
159
|
+
# @return [void]
|
160
|
+
def requires(files)
|
161
|
+
files = [files] unless files.is_a? Array
|
162
162
|
|
163
|
-
|
163
|
+
files.each do |r|
|
164
|
+
next unless r
|
164
165
|
Dir[r].each { |f| load f }
|
165
166
|
end
|
166
167
|
end
|
data/lib/orator/version.rb
CHANGED