ae_easy-core 0.0.5 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/doc/AeEasy/Core/Config.html +5 -5
- data/doc/AeEasy/Core/Exception/OutdatedError.html +1 -1
- data/doc/AeEasy/Core/Exception.html +1 -1
- data/doc/AeEasy/Core/Helper/Cookie.html +1 -1
- data/doc/AeEasy/Core/Helper.html +1 -1
- data/doc/AeEasy/Core/Mock/FakeDb.html +2 -2
- data/doc/AeEasy/Core/Mock/FakeExecutor.html +8 -8
- data/doc/AeEasy/Core/Mock/FakeParser.html +1 -1
- data/doc/AeEasy/Core/Mock/FakeSeeder.html +1 -1
- data/doc/AeEasy/Core/Mock.html +1 -1
- data/doc/AeEasy/Core/Plugin/CollectionVault.html +1 -1
- data/doc/AeEasy/Core/Plugin/ConfigBehavior.html +1 -1
- data/doc/AeEasy/Core/Plugin/ContextIntegrator.html +2 -2
- data/doc/AeEasy/Core/Plugin/Executor.html +259 -0
- data/doc/AeEasy/Core/Plugin/ExecutorBehavior.html +344 -0
- data/doc/AeEasy/Core/Plugin/InitializeHook.html +2 -2
- data/doc/AeEasy/Core/Plugin/Parser.html +13 -2
- data/doc/AeEasy/Core/Plugin/ParserBehavior.html +12 -197
- data/doc/AeEasy/Core/Plugin/Seeder.html +9 -3
- data/doc/AeEasy/Core/Plugin/SeederBehavior.html +5 -145
- data/doc/AeEasy/Core/Plugin.html +3 -3
- data/doc/AeEasy/Core/SmartCollection.html +4 -4
- data/doc/AeEasy/Core.html +68 -58
- data/doc/AeEasy.html +2 -2
- data/doc/_index.html +15 -1
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +1 -1
- data/doc/index.html +1 -1
- data/doc/method_list.html +56 -64
- data/doc/top-level-namespace.html +1 -1
- data/lib/ae_easy/core/config.rb +2 -0
- data/lib/ae_easy/core/mock/fake_db.rb +2 -2
- data/lib/ae_easy/core/mock/fake_executor.rb +5 -5
- data/lib/ae_easy/core/plugin/executor.rb +19 -0
- data/lib/ae_easy/core/plugin/executor_behavior.rb +32 -0
- data/lib/ae_easy/core/plugin/parser_behavior.rb +1 -23
- data/lib/ae_easy/core/plugin/seeder_behavior.rb +1 -13
- data/lib/ae_easy/core/plugin.rb +2 -0
- data/lib/ae_easy/core/smart_collection.rb +1 -1
- data/lib/ae_easy/core/version.rb +1 -1
- data/lib/ae_easy/core.rb +13 -8
- metadata +6 -2
data/lib/ae_easy/core/plugin.rb
CHANGED
@@ -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
|
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
|
data/lib/ae_easy/core/version.rb
CHANGED
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
|
-
|
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
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
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
|
-
|
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
|
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-
|
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
|