eco-helpers 0.6.17 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +19 -0
  3. data/.yardopts +2 -2
  4. data/Gemfile +6 -0
  5. data/Rakefile +27 -0
  6. data/eco-helpers.gemspec +9 -6
  7. data/lib/eco/api.rb +2 -1
  8. data/lib/eco/api/common/people.rb +1 -1
  9. data/lib/eco/api/common/people/base_parser.rb +31 -1
  10. data/lib/eco/api/common/people/default_parsers.rb +5 -1
  11. data/lib/eco/api/common/people/default_parsers/csv_parser.rb +37 -0
  12. data/lib/eco/api/common/people/default_parsers/numeric_parser.rb +0 -1
  13. data/lib/eco/api/common/people/entries.rb +14 -18
  14. data/lib/eco/api/common/people/entry_factory.rb +97 -9
  15. data/lib/eco/api/common/people/person_entry.rb +147 -206
  16. data/lib/eco/api/common/people/person_entry_attribute_mapper.rb +212 -0
  17. data/lib/eco/api/common/people/person_factory.rb +10 -12
  18. data/lib/eco/api/common/people/person_parser.rb +97 -37
  19. data/lib/eco/api/common/session/base_session.rb +1 -2
  20. data/lib/eco/api/common/session/file_manager.rb +1 -1
  21. data/lib/eco/api/organization.rb +2 -1
  22. data/lib/eco/api/organization/people.rb +54 -22
  23. data/lib/eco/api/organization/person_schemas.rb +54 -0
  24. data/lib/eco/api/organization/policy_groups.rb +5 -9
  25. data/lib/eco/api/organization/{presets.rb → presets_factory.rb} +1 -1
  26. data/lib/eco/api/policies.rb +10 -0
  27. data/lib/eco/api/policies/base_policy.rb +14 -0
  28. data/lib/eco/api/policies/policy.rb +20 -0
  29. data/lib/eco/api/policies/used_policies.rb +37 -0
  30. data/lib/eco/api/session.rb +36 -34
  31. data/lib/eco/api/session/batch.rb +94 -44
  32. data/lib/eco/api/session/batch_job.rb +108 -48
  33. data/lib/eco/api/session/batch_jobs.rb +4 -5
  34. data/lib/eco/api/session/batch_status.rb +70 -11
  35. data/lib/eco/api/session/config.rb +22 -5
  36. data/lib/eco/api/session/config/files.rb +10 -1
  37. data/lib/eco/api/session/config/people.rb +18 -5
  38. data/lib/eco/api/session/config/policies.rb +29 -0
  39. data/lib/eco/api/session/config/use_cases.rb +3 -7
  40. data/lib/eco/api/session/job_groups.rb +9 -10
  41. data/lib/eco/api/usecases.rb +2 -1
  42. data/lib/eco/api/usecases/base_case.rb +7 -2
  43. data/lib/eco/api/usecases/default_cases/change_email_case.rb +4 -2
  44. data/lib/eco/api/usecases/default_cases/create_case.rb +2 -1
  45. data/lib/eco/api/usecases/default_cases/create_details_case.rb +3 -1
  46. data/lib/eco/api/usecases/default_cases/create_details_with_supervisor_case.rb +4 -2
  47. data/lib/eco/api/usecases/default_cases/hris_case.rb +20 -13
  48. data/lib/eco/api/usecases/default_cases/new_email_case.rb +3 -1
  49. data/lib/eco/api/usecases/default_cases/new_id_case.rb +4 -2
  50. data/lib/eco/api/usecases/default_cases/recover_db_case.rb +9 -5
  51. data/lib/eco/api/usecases/default_cases/remove_account_case.rb +4 -2
  52. data/lib/eco/api/usecases/default_cases/set_supervisor_case.rb +4 -2
  53. data/lib/eco/api/usecases/default_cases/to_csv_case.rb +2 -2
  54. data/lib/eco/api/usecases/default_cases/to_csv_detailed_case.rb +2 -2
  55. data/lib/eco/api/usecases/default_cases/update_case.rb +16 -2
  56. data/lib/eco/api/usecases/default_cases/update_details_case.rb +3 -1
  57. data/lib/eco/api/usecases/default_cases/upsert_case.rb +25 -3
  58. data/lib/eco/api/usecases/use_case.rb +23 -140
  59. data/lib/eco/api/usecases/use_case_chain.rb +95 -0
  60. data/lib/eco/api/usecases/use_case_io.rb +117 -0
  61. data/lib/eco/api/usecases/use_group.rb +25 -5
  62. data/lib/eco/common/base_cli_backup.rb +1 -0
  63. data/lib/eco/language/models.rb +1 -1
  64. data/lib/eco/language/models/collection.rb +42 -31
  65. data/lib/eco/language/models/parser_serializer.rb +68 -0
  66. data/lib/eco/version.rb +1 -1
  67. metadata +93 -38
  68. data/lib/eco/api/common/people/types.rb +0 -47
  69. data/lib/eco/api/usecases/case_data.rb +0 -13
  70. data/lib/eco/language/models/attribute_parser.rb +0 -38
  71. data/lib/eco/lexic/dictionary.rb +0 -33
  72. data/lib/eco/lexic/dictionary/dictionary.txt +0 -355484
  73. data/lib/eco/lexic/dictionary/tags.json +0 -38
@@ -0,0 +1,117 @@
1
+ module Eco
2
+ module API
3
+ module UseCases
4
+ class UseCaseIO
5
+ TYPES = [:import, :filter, :transform, :sync, :export]
6
+ ALL_PARAMS = [:input, :people, :session, :options]
7
+ TYPE_PARAMS = {
8
+ import: [:input, :session],
9
+ filter: [:people, :session, :options],
10
+ transform: [:people, :session],
11
+ export: [:people, :session, :options]
12
+ }
13
+
14
+ attr_reader :usecase
15
+ attr_reader :input, :people, :session, :options
16
+ attr_accessor :output
17
+
18
+ class << self
19
+ def valid_type?(type)
20
+ TYPES.include?(type)
21
+ end
22
+
23
+ def type_params(type)
24
+ raise "Invalid type '#{type.to_s}'" if !valid_type?(type)
25
+ TYPE_PARAMS[type]
26
+ end
27
+ end
28
+
29
+ def initialize(input: nil, people: nil, session:, options: {}, usecase:)
30
+ self.usecase = usecase
31
+ @output = nil
32
+
33
+ validate_args(input: input, people: people, session: session, options: options)
34
+
35
+ @input = input
36
+ @people = people
37
+ @session = session
38
+ @options = options
39
+ end
40
+
41
+ def usecase=(value)
42
+ raise "It should be a UseCase. Given: #{value}" if !value.is_a?(UseCase)
43
+ @usecase = value
44
+ end
45
+
46
+ def type
47
+ @usecase.type
48
+ end
49
+
50
+ def params(input: nil, people: nil, session: nil, options: {}, keyed: false)
51
+ opts = @options.merge(options&.dup || {})
52
+ input ||= @input
53
+ people ||= @people
54
+ session ||= @session
55
+
56
+ kargs = {}
57
+ kargs.merge!(input: input) if input_required?
58
+ kargs.merge!(people: people) if people_required?
59
+ kargs.merge!(session: session, options: opts)
60
+ keyed ? kargs : kargs.values
61
+ end
62
+
63
+ def chain(usecase:)
64
+ raise "It should be a UseCase. Given: #{usecase}" if !usecase.is_a?(UseCase)
65
+
66
+ kargs = params(keyed: true)
67
+
68
+ # TODO: review chaining framework (redirection should depend on self.type as well)
69
+ case usecase.type
70
+ when :import
71
+ kargs[:input] = output
72
+ when :filter
73
+ kargs[:people] = output
74
+ when :transform, :sync, :export
75
+ # no redirections => should it redirect the input?
76
+ end
77
+
78
+ self.class.new(kargs)
79
+ end
80
+
81
+ protected
82
+
83
+ private
84
+
85
+ def validate_args(input:, people:, session:, options:)
86
+ case
87
+ when !session.is_a?(Eco::API::Session)
88
+ raise "A UseCase needs a Session object. Given: #{session}"
89
+ when input_required? && !input
90
+ raise "UseCase of type '#{@type.to_s}' requires a valid input. None given"
91
+ when people_required? && !people.is_a?(Eco::API::Organization::People)
92
+ raise "UseCase of type '#{@type.to_s}' requires a People object. Given: #{people}"
93
+ when !options || (options && !options.is_a?(Hash))
94
+ raise "To inject dependencies via ':options' it should be a Hash object. Given: #{options}"
95
+ when options_required? && !options
96
+ raise "UseCase of type '#{@type.to_s}' requires a Hash ':options' object."
97
+ end
98
+ true
99
+ end
100
+
101
+ def input_required?
102
+ [:import, :sync].include?(type)
103
+ end
104
+
105
+ def people_required?
106
+ [:filter, :transform, :sync, :export].include?(type)
107
+ end
108
+
109
+ def options_required?
110
+ [:filter].include?(type)
111
+ end
112
+
113
+ end
114
+
115
+ end
116
+ end
117
+ end
@@ -2,10 +2,11 @@ module Eco
2
2
  module API
3
3
  module UseCases
4
4
  class UseGroup
5
+ include Enumerable
5
6
 
6
7
  def initialize()
7
- @usecases = {}
8
- @cache_init = false
8
+ @usecases = {}
9
+ @cache_init = false
9
10
  @cases_by_name = {}
10
11
  end
11
12
 
@@ -20,7 +21,9 @@ module Eco
20
21
  end
21
22
 
22
23
  def define(name, type:, &block)
23
- add(UseCase.new(name, type: type, root:self, &block))
24
+ UseCase.new(name, type: type, root: self, &block).tap do |usecase|
25
+ add(usecase)
26
+ end
24
27
  end
25
28
 
26
29
  def defined?(name, type: nil)
@@ -54,7 +57,7 @@ module Eco
54
57
  def merge(cases)
55
58
  return self if !cases
56
59
  raise "Expected a UseGroup object. Given #{cases}" if !cases.is_a?(UseGroup)
57
- cases_hash = cases.hash
60
+ cases_hash = cases.to_h
58
61
 
59
62
  @usecases.merge!(cases_hash)
60
63
 
@@ -66,9 +69,26 @@ module Eco
66
69
  self
67
70
  end
68
71
 
72
+ def length
73
+ count
74
+ end
75
+
76
+ def empty?
77
+ count == 0
78
+ end
79
+
80
+ def each(params: {}, &block)
81
+ return to_enum(:each) unless block
82
+ items.each(&block)
83
+ end
84
+
85
+ def items
86
+ @usecases.values
87
+ end
88
+
69
89
  protected
70
90
 
71
- def hash
91
+ def to_h
72
92
  @usecases
73
93
  end
74
94
 
@@ -63,6 +63,7 @@ module Eco
63
63
  if options
64
64
  options.key?("input") || options.key?(:input) ||
65
65
  options.key?("json") || options.key?(:json)
66
+ end
66
67
  end
67
68
 
68
69
  def input_object(input)
@@ -7,5 +7,5 @@ end
7
7
 
8
8
  require_relative 'models/modifier'
9
9
  require_relative 'models/collection'
10
- require_relative 'models/attribute_parser'
10
+ require_relative 'models/parser_serializer'
11
11
  require_relative 'models/wrap'
@@ -1,9 +1,10 @@
1
1
  module Eco
2
2
  module Language
3
3
  module Models
4
- class Collection < Array
4
+ class Collection
5
+ include Enumerable
5
6
 
6
- ATTR_PRESENCE_METHODS = ["present", "empty", "present_all?", "present_some?"]
7
+ ATTR_PRESENCE_METHODS = ["present", "empty", "present_all?", "present_some?"]
7
8
  ATTR_COLLECTION_METHODS = ["exclude", "remove", "attr", "attr?", "attrs", "unique_attrs", "contains"] + ATTR_PRESENCE_METHODS
8
9
 
9
10
  class << self
@@ -34,14 +35,14 @@ module Eco
34
35
 
35
36
  end
36
37
 
37
- #attr_reader :kclass
38
+ #attr_reader :items
38
39
 
39
40
  def initialize(data = [], klass:, factory: nil, handy: Eco::Common::Language.new)
40
41
  raise "Raise klass required, given: #{klass}" if !klass
41
42
  @klass = klass
42
43
  @factory = factory
43
44
  @handy = handy
44
- super(to_klass(data))
45
+ @items = to_klass(data)
45
46
  end
46
47
 
47
48
  def newFrom(data)
@@ -53,17 +54,29 @@ module Eco
53
54
  end
54
55
 
55
56
  def new
56
- self.class.new(self.to_a, klass: @klass, factory: @factory)
57
+ self.class.new(to_a, klass: @klass, factory: @factory)
58
+ end
59
+
60
+ def length
61
+ count
62
+ end
63
+
64
+ def empty?
65
+ count == 0
66
+ end
67
+
68
+ def each(params: {}, &block)
69
+ return to_enum(:each) unless block
70
+ @items.each(&block)
57
71
  end
58
72
 
59
73
  def <(value)
60
- self.clear << value
61
- on_change
62
- self
74
+ @items.clear
75
+ self << value
63
76
  end
64
77
 
65
78
  def <<(value)
66
- self.concat(into_a(value))
79
+ @items.concat(into_a(value))
67
80
  on_change
68
81
  self
69
82
  end
@@ -72,28 +85,26 @@ module Eco
72
85
  newFrom self.map(&block)
73
86
  end
74
87
 
75
- def delete(value)
76
- self < self - value
77
- on_change
78
- self
88
+ def delete!(value)
89
+ self < @items - into_a(value)
79
90
  end
80
91
 
81
92
  # attr dependant methods
82
93
  def exclude(attr, value, modifier = Language::MatchModifier.new)
83
- newFrom self - self.attr(attr, value, modifier)
94
+ newFrom @items - self.attr(attr, value, modifier)
84
95
  end
85
96
 
86
97
  def remove(attr, value, modifier = Language::MatchModifier.new)
87
- self < self.exclude(attr, value, modifier)
98
+ self < exclude(attr, value, modifier)
88
99
  on_change
89
100
  self
90
101
  end
91
102
 
92
103
  def attr(attr, value = true, modifier = Language::MatchModifier.new)
93
104
  if !!value == value # boolean?
94
- self.present(attr, value)
105
+ present(attr, value)
95
106
  else
96
- return newFrom self.select { |object|
107
+ return newFrom select { |object|
97
108
  attr_val = fetch_attr(object, attr)
98
109
  match?(attr_val, value, modifier)
99
110
  }
@@ -103,36 +114,36 @@ module Eco
103
114
  def attr?(attr, value = true, modifier = Language::MatchModifier.new)
104
115
  modifier = modifier.new.reverse
105
116
  if !!value == value # boolean?
106
- self.present(attr, value).length == self.length
117
+ present(attr, value).length == length
107
118
  else
108
- obj_vals = self.attrs(attr)
119
+ obj_vals = attrs(attr)
109
120
  return match?(obj_vals, value, modifier)
110
121
  end
111
122
  end
112
123
 
113
124
  def attrs(attr)
114
- self.map { |object| fetch_attr(object, attr) }
125
+ map { |object| fetch_attr(object, attr) }
115
126
  end
116
127
 
117
128
  def unique_attrs(attr)
118
- self.to_h(attr).keys
129
+ to_h(attr).keys
119
130
  end
120
131
 
121
132
  def present(attr, flag = true)
122
133
  block = ->(o) { !!fetch_attr(o, attr) == !!flag }
123
- newFrom self.select(&block)
134
+ newFrom select(&block)
124
135
  end
125
136
 
126
137
  def empty(attr, flag = true)
127
- self.present(attr, !flag)
138
+ present(attr, !flag)
128
139
  end
129
140
 
130
141
  def present_all?(attr, flag = true)
131
- self.present(attr, flag).length == self.length
142
+ present(attr, flag).length == length
132
143
  end
133
144
 
134
145
  def present_some?(attr, flag = true)
135
- self.present(attr, flag).length > 0
146
+ present(attr, flag).length > 0
136
147
  end
137
148
 
138
149
  def contains(attr, value, modifier = Language::MatchModifier.new)
@@ -141,14 +152,14 @@ module Eco
141
152
  end
142
153
 
143
154
  def group_by(attr)
144
- #self.to_h(attr)
145
- return {} if !attr
146
- self.to_a.group_by { |object| object.method(attr).call }
155
+ to_h(attr)
156
+ #return {} if !attr
157
+ #self.to_a.group_by { |object| object.method(attr).call }
147
158
  end
148
159
 
149
160
  def to_h(attr)
150
161
  return {} if !attr
151
- self.to_a.group_by { |object| object.method(attr).call }
162
+ to_a.group_by { |object| object.method(attr).call }
152
163
  end
153
164
 
154
165
  protected
@@ -158,8 +169,8 @@ module Eco
158
169
  end
159
170
 
160
171
  def into_a(value)
161
- value = [].push(value) unless value.is_a?(Array)
162
- value
172
+ value = [].push(value) unless value.is_a?(Enumerable)
173
+ value.to_a
163
174
  end
164
175
 
165
176
  private
@@ -0,0 +1,68 @@
1
+ module Eco
2
+ module Language
3
+ module Models
4
+
5
+ class ParserSerializer
6
+
7
+ attr_reader :attr
8
+
9
+ # Parser/seralizer.
10
+ # @param attr [String, Symbol] name of the parsed/serialized.
11
+ # @param dependencies [Hash] provisioning of _**default dependencies**_ that will be required when calling back to the
12
+ # parsing or serializing functions.
13
+ def initialize(attr, dependencies: {})
14
+ @attr = attr
15
+ @dependencies = dependencies
16
+ end
17
+
18
+ # Defines the _parser_ of the attribute.
19
+ # @note
20
+ # 1. the _block_ should expect one or two parameters.
21
+ # 2. the final dependencies is a merge of _default dependencies_ with `parse` call dependencies.
22
+ # @yield [source_data, dependencies] user defined parser that returns the parsed value.
23
+ # @yieldparam source_data [Any] source data that will be parsed.
24
+ # @yieldparam dependencies [Hash] hash with the provisioned dependencies.
25
+ def def_parser(&block)
26
+ @parser = block
27
+ self
28
+ end
29
+
30
+ # Defines the _serializer_ of the attribute.
31
+ # @note
32
+ # 1. the block should expect one or two parameters.
33
+ # 2. the final dependencies is a merge of _default dependencies_ with `serialize` call dependencies.
34
+ # @yield [source_data, dependencies] user defined serialiser that returns the serialised value.
35
+ # @yieldparam source_data [Any] source data that will be serialised.
36
+ # @yieldparam dependencies [Hash] hash with the provisioned dependencies.
37
+ def def_serializer(&block)
38
+ @serializer = block
39
+ self
40
+ end
41
+
42
+ # Calls the `parser` of this attribute by passing `source` and resolved dependencies.
43
+ # @note
44
+ # - the method depenencies override keys of the _default dependencies_.
45
+ # @raise [Exception] when there is **no** `parser` defined.
46
+ # @param source [Any] source data to be parsed.
47
+ # @param dependencies [Hash] _additional dependencies_ that should be merged to the _default dependencies_.
48
+ def parse(source, dependencies: {})
49
+ raise "There is no parser for this attribue '#{attr}'" if !@parser
50
+ @parser.call(source, @dependencies.merge(dependencies), attr)
51
+ end
52
+
53
+ # Calls the `serializer` of this attribute by passing `object` and resolved dependencies.
54
+ # @note
55
+ # - the method depenencies override keys of the _default dependencies_.
56
+ # @raise [Exception] when there is **no** `serializer` defined.
57
+ # @param object [Any] source data to be serialized.
58
+ # @param dependencies [Hash] _additional dependencies_ that should be merged to the _default dependencies_.
59
+ def serialize(object, dependencies: {})
60
+ raise "There is no serializer for this attribue '#{attr}'" if !@serializer
61
+ @serializer.call(object, @dependencies.merge(dependencies), attr)
62
+ end
63
+
64
+ end
65
+
66
+ end
67
+ end
68
+ end
data/lib/eco/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Eco
2
- VERSION = "0.6.17"
2
+ VERSION = "0.7.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eco-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.17
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oscar Segura
@@ -10,6 +10,20 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2018-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.16'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.16'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: rspec
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -30,6 +44,20 @@ dependencies:
30
44
  - - ">="
31
45
  - !ruby/object:Gem::Version
32
46
  version: '3.8'
47
+ - !ruby/object:Gem::Dependency
48
+ name: rake
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '10.0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '10.0'
33
61
  - !ruby/object:Gem::Dependency
34
62
  name: yard
35
63
  requirement: !ruby/object:Gem::Requirement
@@ -91,65 +119,45 @@ dependencies:
91
119
  - !ruby/object:Gem::Version
92
120
  version: 0.4.2
93
121
  - !ruby/object:Gem::Dependency
94
- name: faker
95
- requirement: !ruby/object:Gem::Requirement
96
- requirements:
97
- - - "~>"
98
- - !ruby/object:Gem::Version
99
- version: '1'
100
- - - ">="
101
- - !ruby/object:Gem::Version
102
- version: '1.9'
103
- type: :runtime
104
- prerelease: false
105
- version_requirements: !ruby/object:Gem::Requirement
106
- requirements:
107
- - - "~>"
108
- - !ruby/object:Gem::Version
109
- version: '1'
110
- - - ">="
111
- - !ruby/object:Gem::Version
112
- version: '1.9'
113
- - !ruby/object:Gem::Dependency
114
- name: distribution
122
+ name: thor
115
123
  requirement: !ruby/object:Gem::Requirement
116
124
  requirements:
117
125
  - - "~>"
118
126
  - !ruby/object:Gem::Version
119
- version: '0.7'
127
+ version: '0'
120
128
  - - ">="
121
129
  - !ruby/object:Gem::Version
122
- version: 0.7.3
130
+ version: '0.20'
123
131
  type: :runtime
124
132
  prerelease: false
125
133
  version_requirements: !ruby/object:Gem::Requirement
126
134
  requirements:
127
135
  - - "~>"
128
136
  - !ruby/object:Gem::Version
129
- version: '0.7'
137
+ version: '0'
130
138
  - - ">="
131
139
  - !ruby/object:Gem::Version
132
- version: 0.7.3
140
+ version: '0.20'
133
141
  - !ruby/object:Gem::Dependency
134
- name: thor
142
+ name: nokogiri
135
143
  requirement: !ruby/object:Gem::Requirement
136
144
  requirements:
137
145
  - - "~>"
138
146
  - !ruby/object:Gem::Version
139
- version: '0'
147
+ version: '1.6'
140
148
  - - ">="
141
149
  - !ruby/object:Gem::Version
142
- version: '0.20'
150
+ version: 1.6.8
143
151
  type: :runtime
144
152
  prerelease: false
145
153
  version_requirements: !ruby/object:Gem::Requirement
146
154
  requirements:
147
155
  - - "~>"
148
156
  - !ruby/object:Gem::Version
149
- version: '0'
157
+ version: '1.6'
150
158
  - - ">="
151
159
  - !ruby/object:Gem::Version
152
- version: '0.20'
160
+ version: 1.6.8
153
161
  - !ruby/object:Gem::Dependency
154
162
  name: aws-sdk-s3
155
163
  requirement: !ruby/object:Gem::Requirement
@@ -210,6 +218,46 @@ dependencies:
210
218
  - - "~>"
211
219
  - !ruby/object:Gem::Version
212
220
  version: '2.6'
221
+ - !ruby/object:Gem::Dependency
222
+ name: faker
223
+ requirement: !ruby/object:Gem::Requirement
224
+ requirements:
225
+ - - "~>"
226
+ - !ruby/object:Gem::Version
227
+ version: '1'
228
+ - - ">="
229
+ - !ruby/object:Gem::Version
230
+ version: '1.9'
231
+ type: :runtime
232
+ prerelease: false
233
+ version_requirements: !ruby/object:Gem::Requirement
234
+ requirements:
235
+ - - "~>"
236
+ - !ruby/object:Gem::Version
237
+ version: '1'
238
+ - - ">="
239
+ - !ruby/object:Gem::Version
240
+ version: '1.9'
241
+ - !ruby/object:Gem::Dependency
242
+ name: distribution
243
+ requirement: !ruby/object:Gem::Requirement
244
+ requirements:
245
+ - - "~>"
246
+ - !ruby/object:Gem::Version
247
+ version: '0.7'
248
+ - - ">="
249
+ - !ruby/object:Gem::Version
250
+ version: 0.7.3
251
+ type: :runtime
252
+ prerelease: false
253
+ version_requirements: !ruby/object:Gem::Requirement
254
+ requirements:
255
+ - - "~>"
256
+ - !ruby/object:Gem::Version
257
+ version: '0.7'
258
+ - - ">="
259
+ - !ruby/object:Gem::Version
260
+ version: 0.7.3
213
261
  description:
214
262
  email:
215
263
  - oscar@ecoportal.co.nz
@@ -220,7 +268,9 @@ files:
220
268
  - ".gitignore"
221
269
  - ".rspec"
222
270
  - ".yardopts"
271
+ - Gemfile
223
272
  - README.md
273
+ - Rakefile
224
274
  - eco-helpers.gemspec
225
275
  - lib/eco-helpers.rb
226
276
  - lib/eco/api.rb
@@ -229,6 +279,7 @@ files:
229
279
  - lib/eco/api/common/people/base_parser.rb
230
280
  - lib/eco/api/common/people/default_parsers.rb
231
281
  - lib/eco/api/common/people/default_parsers/boolean_parser.rb
282
+ - lib/eco/api/common/people/default_parsers/csv_parser.rb
232
283
  - lib/eco/api/common/people/default_parsers/date_parser.rb
233
284
  - lib/eco/api/common/people/default_parsers/multi_parser.rb
234
285
  - lib/eco/api/common/people/default_parsers/numeric_parser.rb
@@ -236,10 +287,10 @@ files:
236
287
  - lib/eco/api/common/people/entries.rb
237
288
  - lib/eco/api/common/people/entry_factory.rb
238
289
  - lib/eco/api/common/people/person_entry.rb
290
+ - lib/eco/api/common/people/person_entry_attribute_mapper.rb
239
291
  - lib/eco/api/common/people/person_factory.rb
240
292
  - lib/eco/api/common/people/person_modifier.rb
241
293
  - lib/eco/api/common/people/person_parser.rb
242
- - lib/eco/api/common/people/types.rb
243
294
  - lib/eco/api/common/session.rb
244
295
  - lib/eco/api/common/session/base_session.rb
245
296
  - lib/eco/api/common/session/environment.rb
@@ -253,12 +304,17 @@ files:
253
304
  - lib/eco/api/eco_faker.rb
254
305
  - lib/eco/api/organization.rb
255
306
  - lib/eco/api/organization/people.rb
307
+ - lib/eco/api/organization/person_schemas.rb
256
308
  - lib/eco/api/organization/policy_groups.rb
257
309
  - lib/eco/api/organization/preferences.rb
258
310
  - lib/eco/api/organization/preferences_reference.json
259
- - lib/eco/api/organization/presets.rb
311
+ - lib/eco/api/organization/presets_factory.rb
260
312
  - lib/eco/api/organization/presets_values.json
261
313
  - lib/eco/api/organization/tag_tree.rb
314
+ - lib/eco/api/policies.rb
315
+ - lib/eco/api/policies/base_policy.rb
316
+ - lib/eco/api/policies/policy.rb
317
+ - lib/eco/api/policies/used_policies.rb
262
318
  - lib/eco/api/session.rb
263
319
  - lib/eco/api/session/batch.rb
264
320
  - lib/eco/api/session/batch_job.rb
@@ -271,13 +327,13 @@ files:
271
327
  - lib/eco/api/session/config/logger.rb
272
328
  - lib/eco/api/session/config/mailer.rb
273
329
  - lib/eco/api/session/config/people.rb
330
+ - lib/eco/api/session/config/policies.rb
274
331
  - lib/eco/api/session/config/s3_storage.rb
275
332
  - lib/eco/api/session/config/use_cases.rb
276
333
  - lib/eco/api/session/job_groups.rb
277
334
  - lib/eco/api/session/task.rb
278
335
  - lib/eco/api/usecases.rb
279
336
  - lib/eco/api/usecases/base_case.rb
280
- - lib/eco/api/usecases/case_data.rb
281
337
  - lib/eco/api/usecases/default_cases.rb
282
338
  - lib/eco/api/usecases/default_cases/change_email_case.rb
283
339
  - lib/eco/api/usecases/default_cases/create_case.rb
@@ -302,6 +358,8 @@ files:
302
358
  - lib/eco/api/usecases/default_cases/update_details_case.rb
303
359
  - lib/eco/api/usecases/default_cases/upsert_case.rb
304
360
  - lib/eco/api/usecases/use_case.rb
361
+ - lib/eco/api/usecases/use_case_chain.rb
362
+ - lib/eco/api/usecases/use_case_io.rb
305
363
  - lib/eco/api/usecases/use_group.rb
306
364
  - lib/eco/cli.rb
307
365
  - lib/eco/cli/api.rb
@@ -340,14 +398,11 @@ files:
340
398
  - lib/eco/language/match.rb
341
399
  - lib/eco/language/match_modifier.rb
342
400
  - lib/eco/language/models.rb
343
- - lib/eco/language/models/attribute_parser.rb
344
401
  - lib/eco/language/models/collection.rb
345
402
  - lib/eco/language/models/modifier.rb
403
+ - lib/eco/language/models/parser_serializer.rb
346
404
  - lib/eco/language/models/wrap.rb
347
405
  - lib/eco/language/values_at.rb
348
- - lib/eco/lexic/dictionary.rb
349
- - lib/eco/lexic/dictionary/dictionary.txt
350
- - lib/eco/lexic/dictionary/tags.json
351
406
  - lib/eco/scripting.rb
352
407
  - lib/eco/scripting/README.md
353
408
  - lib/eco/scripting/arguments.rb