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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NWVlYWM5Zjc1ZjJhOWE0Mjc5MDEzN2UzNTAzM2I3ZTdjNTc1OTU0Mw==
4
+ MzY2Mjk1NGM1ZWJiODllOTllMGYyN2E3MTBkYjg0NzM1ZTAyZDczNg==
5
5
  data.tar.gz: !binary |-
6
- ODczZmM2MTBkOWQ2MGJkOWEwNzI0YTBlYWUxZjA2OGI5YzA1Yzg1Zg==
6
+ MGNjNjc0MWNjYTFmNDFlYTFhMjg4NmI3YzIxNTUyMzM5NzA3ZWFmNA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MmFhYzJhYmQ1ZmZmMDM4YjlmYjc4ZjEwNmVjMDAwYjY4YTM2MjM4ZmIyNjNm
10
- ZWE1ODc2MDQ2MzYwY2M0ZmI3YmU2ZTJiMTUyZTQ5ODNkNWU2ODcxYzc5MTkw
11
- YTc3MThkYWQ5ZDM4ODYyYWI3MWNkMDEzZDRjN2FiYzE1MWJlOGY=
9
+ MDlmODY1ODdmOGFkYzFlNGY2MDEwYmJhZGM4N2M1MmU1NzQzOGIyNmRmYjU2
10
+ ODIwMmYwZTAzZDZjNWNmM2U4NWRkMWQwOTY1OWNiZGU0NzY0YTE3NTQxNDg4
11
+ Nzk5Mjc1ZjYzZDc5MzJiYTc2NTZhODRhYTVmNDI0MWFiODU3MGI=
12
12
  data.tar.gz: !binary |-
13
- NTBjOWJlYjQyMTZhMmYwNTJhYzE0ZTg1OTVlMjRjNWQ4Yzc3MmFlNjk2ZDQ1
14
- NWZhNzIzNzk5NWEwNDMzNTgwNTY5YTI5YjY2MDE5ZjhlYWJkZDhlOTcxMTA0
15
- ZmEyYmI1ZmZmZWI3OTA4NzA0Nzk2NmQzYmUzZDEwMmM1ZDkxNmI=
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
- :orators_path: app/orators/*
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/*
@@ -1,4 +1,4 @@
1
- class ApplicationOrator < Orators::Base
1
+ class ApplicationOrator < Orator::Base
2
2
 
3
3
 
4
4
 
data/lib/orator/cli.rb CHANGED
@@ -143,24 +143,25 @@ module Orator
143
143
  #
144
144
  # @return [void]
145
145
  def load_orators
146
- return unless yaml_options[:orators_path]
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
- return unless yaml_options[:require]
157
- requires = if yaml_options[:require].is_a? Array
158
- yaml_options[:require]
159
- else
160
- [yaml_options[:require]]
161
- end
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
- requires.each do |r|
163
+ files.each do |r|
164
+ next unless r
164
165
  Dir[r].each { |f| load f }
165
166
  end
166
167
  end
@@ -1,5 +1,5 @@
1
1
  module Orator
2
2
 
3
3
  # Version of Orator.
4
- VERSION = '0.4.3'
4
+ VERSION = '0.4.4'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Rodi