ae_easy-core 0.0.5 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/doc/AeEasy/Core/Config.html +5 -5
  4. data/doc/AeEasy/Core/Exception/OutdatedError.html +1 -1
  5. data/doc/AeEasy/Core/Exception.html +1 -1
  6. data/doc/AeEasy/Core/Helper/Cookie.html +1 -1
  7. data/doc/AeEasy/Core/Helper.html +1 -1
  8. data/doc/AeEasy/Core/Mock/FakeDb.html +2 -2
  9. data/doc/AeEasy/Core/Mock/FakeExecutor.html +8 -8
  10. data/doc/AeEasy/Core/Mock/FakeParser.html +1 -1
  11. data/doc/AeEasy/Core/Mock/FakeSeeder.html +1 -1
  12. data/doc/AeEasy/Core/Mock.html +1 -1
  13. data/doc/AeEasy/Core/Plugin/CollectionVault.html +1 -1
  14. data/doc/AeEasy/Core/Plugin/ConfigBehavior.html +1 -1
  15. data/doc/AeEasy/Core/Plugin/ContextIntegrator.html +2 -2
  16. data/doc/AeEasy/Core/Plugin/Executor.html +259 -0
  17. data/doc/AeEasy/Core/Plugin/ExecutorBehavior.html +344 -0
  18. data/doc/AeEasy/Core/Plugin/InitializeHook.html +2 -2
  19. data/doc/AeEasy/Core/Plugin/Parser.html +13 -2
  20. data/doc/AeEasy/Core/Plugin/ParserBehavior.html +12 -197
  21. data/doc/AeEasy/Core/Plugin/Seeder.html +9 -3
  22. data/doc/AeEasy/Core/Plugin/SeederBehavior.html +5 -145
  23. data/doc/AeEasy/Core/Plugin.html +3 -3
  24. data/doc/AeEasy/Core/SmartCollection.html +4 -4
  25. data/doc/AeEasy/Core.html +68 -58
  26. data/doc/AeEasy.html +2 -2
  27. data/doc/_index.html +15 -1
  28. data/doc/class_list.html +1 -1
  29. data/doc/file.README.html +1 -1
  30. data/doc/index.html +1 -1
  31. data/doc/method_list.html +56 -64
  32. data/doc/top-level-namespace.html +1 -1
  33. data/lib/ae_easy/core/config.rb +2 -0
  34. data/lib/ae_easy/core/mock/fake_db.rb +2 -2
  35. data/lib/ae_easy/core/mock/fake_executor.rb +5 -5
  36. data/lib/ae_easy/core/plugin/executor.rb +19 -0
  37. data/lib/ae_easy/core/plugin/executor_behavior.rb +32 -0
  38. data/lib/ae_easy/core/plugin/parser_behavior.rb +1 -23
  39. data/lib/ae_easy/core/plugin/seeder_behavior.rb +1 -13
  40. data/lib/ae_easy/core/plugin.rb +2 -0
  41. data/lib/ae_easy/core/smart_collection.rb +1 -1
  42. data/lib/ae_easy/core/version.rb +1 -1
  43. data/lib/ae_easy/core.rb +13 -8
  44. metadata +6 -2
@@ -2,6 +2,8 @@ require 'ae_easy/core/plugin/initialize_hook'
2
2
  require 'ae_easy/core/plugin/context_integrator'
3
3
  require 'ae_easy/core/plugin/collection_vault'
4
4
  require 'ae_easy/core/plugin/config_behavior'
5
+ require 'ae_easy/core/plugin/executor_behavior'
6
+ require 'ae_easy/core/plugin/executor'
5
7
  require 'ae_easy/core/plugin/parser_behavior'
6
8
  require 'ae_easy/core/plugin/parser'
7
9
  require 'ae_easy/core/plugin/seeder_behavior'
@@ -211,7 +211,7 @@ module AeEasy
211
211
  #
212
212
  # @param [Hash] filter
213
213
  #
214
- # @return [Hash|nil] First existing item match or nil when no match.
214
+ # @return [Hash,nil] First existing item match or nil when no match.
215
215
  #
216
216
  # @note _Warning:_ It uses table scan to filter and will be slow.
217
217
  def find_match filter
@@ -1,6 +1,6 @@
1
1
  module AeEasy
2
2
  module Core
3
3
  # Gem version
4
- VERSION = "0.0.5"
4
+ VERSION = "0.1.0"
5
5
  end
6
6
  end
data/lib/ae_easy/core.rb CHANGED
@@ -40,14 +40,15 @@ module AeEasy
40
40
  # @param [Hash] opts ({}) Configuration options.
41
41
  # @option opts [Array] :except (nil) Literal file collection excluded from process.
42
42
  def require_all dir, opts = {}
43
- real_dir = options = nil
44
- real_except = []
43
+ dir_list = real_dir_list = options = nil
44
+ real_except = (opts[:except] || []).map{|f| "#{f}.rb"}
45
+ options = opts.merge except: real_except
45
46
  $LOAD_PATH.each do |load_path|
46
- real_dir = File.join load_path, dir
47
- next unless File.directory? real_dir
48
- real_except = (opts[:except] || []).map{|f| "#{f}.rb"}
49
- options = opts.merge except: real_except
50
- all_scripts(real_dir, options) {|file| require file}
47
+ dir_list = Dir.glob File.join(load_path, dir)
48
+ dir_list.each do |real_dir|
49
+ next unless File.directory? real_dir
50
+ all_scripts(real_dir, options) {|file| require file}
51
+ end
51
52
  end
52
53
  end
53
54
 
@@ -59,7 +60,11 @@ module AeEasy
59
60
  def require_relative_all dir, opts = {}
60
61
  real_except = (opts[:except] || []).map{|f| "#{f}.rb"}
61
62
  options = opts.merge except: real_except
62
- all_scripts(dir, options) {|file| require file}
63
+ dir_list = Dir.glob dir
64
+ dir_list.each do |relative_dir|
65
+ real_dir = File.expand_path relative_dir
66
+ all_scripts(real_dir, options) {|file| require file}
67
+ end
63
68
  end
64
69
 
65
70
  # Expose an environment into an object instance as methods.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ae_easy-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo Rosales
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-20 00:00:00.000000000 Z
11
+ date: 2019-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: answersengine
@@ -168,6 +168,8 @@ files:
168
168
  - doc/AeEasy/Core/Plugin/CollectionVault.html
169
169
  - doc/AeEasy/Core/Plugin/ConfigBehavior.html
170
170
  - doc/AeEasy/Core/Plugin/ContextIntegrator.html
171
+ - doc/AeEasy/Core/Plugin/Executor.html
172
+ - doc/AeEasy/Core/Plugin/ExecutorBehavior.html
171
173
  - doc/AeEasy/Core/Plugin/InitializeHook.html
172
174
  - doc/AeEasy/Core/Plugin/Parser.html
173
175
  - doc/AeEasy/Core/Plugin/ParserBehavior.html
@@ -203,6 +205,8 @@ files:
203
205
  - lib/ae_easy/core/plugin/collection_vault.rb
204
206
  - lib/ae_easy/core/plugin/config_behavior.rb
205
207
  - lib/ae_easy/core/plugin/context_integrator.rb
208
+ - lib/ae_easy/core/plugin/executor.rb
209
+ - lib/ae_easy/core/plugin/executor_behavior.rb
206
210
  - lib/ae_easy/core/plugin/initialize_hook.rb
207
211
  - lib/ae_easy/core/plugin/parser.rb
208
212
  - lib/ae_easy/core/plugin/parser_behavior.rb