treaty 0.18.0 → 0.20.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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/config/locales/en.yml +3 -3
- data/lib/treaty/action/base.rb +11 -0
- data/lib/treaty/action/context/callable.rb +90 -0
- data/lib/treaty/action/context/dsl.rb +56 -0
- data/lib/treaty/action/context/workspace.rb +92 -0
- data/lib/treaty/action/executor/inventory.rb +136 -0
- data/lib/treaty/{info/rest → action/info}/builder.rb +2 -2
- data/lib/treaty/{info/rest → action/info}/dsl.rb +2 -2
- data/lib/treaty/{info/rest → action/info}/result.rb +2 -2
- data/lib/treaty/action/inventory/collection.rb +77 -0
- data/lib/treaty/action/inventory/factory.rb +108 -0
- data/lib/treaty/action/inventory/inventory.rb +146 -0
- data/lib/treaty/action/request/attribute/attribute.rb +76 -0
- data/lib/treaty/action/request/attribute/builder.rb +98 -0
- data/lib/treaty/action/request/entity.rb +78 -0
- data/lib/treaty/action/request/factory.rb +116 -0
- data/lib/treaty/action/request/validator.rb +120 -0
- data/lib/treaty/action/response/attribute/attribute.rb +79 -0
- data/lib/treaty/action/response/attribute/builder.rb +96 -0
- data/lib/treaty/action/response/entity.rb +79 -0
- data/lib/treaty/action/response/factory.rb +129 -0
- data/lib/treaty/action/response/validator.rb +111 -0
- data/lib/treaty/action/result.rb +81 -0
- data/lib/treaty/action/versions/collection.rb +47 -0
- data/lib/treaty/action/versions/dsl.rb +116 -0
- data/lib/treaty/action/versions/execution/request.rb +287 -0
- data/lib/treaty/action/versions/executor.rb +61 -0
- data/lib/treaty/action/versions/factory.rb +253 -0
- data/lib/treaty/action/versions/resolver.rb +150 -0
- data/lib/treaty/action/versions/semantic.rb +64 -0
- data/lib/treaty/action/versions/workspace.rb +106 -0
- data/lib/treaty/action.rb +31 -0
- data/lib/treaty/controller/dsl.rb +1 -1
- data/lib/treaty/engine.rb +1 -1
- data/lib/treaty/{attribute/entity → entity/attribute}/attribute.rb +4 -4
- data/lib/treaty/entity/attribute/base.rb +184 -0
- data/lib/treaty/entity/attribute/builder/base.rb +275 -0
- data/lib/treaty/entity/attribute/collection.rb +67 -0
- data/lib/treaty/entity/attribute/dsl.rb +92 -0
- data/lib/treaty/entity/attribute/helper_mapper.rb +74 -0
- data/lib/treaty/entity/attribute/option/base.rb +190 -0
- data/lib/treaty/entity/attribute/option/conditionals/base.rb +92 -0
- data/lib/treaty/entity/attribute/option/conditionals/if_conditional.rb +136 -0
- data/lib/treaty/entity/attribute/option/conditionals/unless_conditional.rb +153 -0
- data/lib/treaty/entity/attribute/option/modifiers/as_modifier.rb +93 -0
- data/lib/treaty/entity/attribute/option/modifiers/cast_modifier.rb +285 -0
- data/lib/treaty/entity/attribute/option/modifiers/computed_modifier.rb +128 -0
- data/lib/treaty/entity/attribute/option/modifiers/default_modifier.rb +105 -0
- data/lib/treaty/entity/attribute/option/modifiers/transform_modifier.rb +114 -0
- data/lib/treaty/entity/attribute/option/registry.rb +157 -0
- data/lib/treaty/entity/attribute/option/registry_initializer.rb +117 -0
- data/lib/treaty/entity/attribute/option/validators/format_validator.rb +222 -0
- data/lib/treaty/entity/attribute/option/validators/inclusion_validator.rb +94 -0
- data/lib/treaty/entity/attribute/option/validators/required_validator.rb +100 -0
- data/lib/treaty/entity/attribute/option/validators/type_validator.rb +219 -0
- data/lib/treaty/entity/attribute/option_normalizer.rb +168 -0
- data/lib/treaty/entity/attribute/option_orchestrator.rb +192 -0
- data/lib/treaty/entity/attribute/validation/attribute_validator.rb +147 -0
- data/lib/treaty/entity/attribute/validation/base.rb +76 -0
- data/lib/treaty/entity/attribute/validation/nested_array_validator.rb +207 -0
- data/lib/treaty/entity/attribute/validation/nested_object_validator.rb +105 -0
- data/lib/treaty/entity/attribute/validation/nested_transformer.rb +432 -0
- data/lib/treaty/entity/attribute/validation/orchestrator/base.rb +262 -0
- data/lib/treaty/entity/base.rb +90 -0
- data/lib/treaty/entity/builder.rb +101 -0
- data/lib/treaty/{info/entity → entity/info}/builder.rb +8 -8
- data/lib/treaty/{info/entity → entity/info}/dsl.rb +2 -2
- data/lib/treaty/{info/entity → entity/info}/result.rb +2 -2
- data/lib/treaty/entity.rb +7 -79
- data/lib/treaty/version.rb +1 -1
- metadata +66 -64
- data/lib/treaty/attribute/base.rb +0 -182
- data/lib/treaty/attribute/builder/base.rb +0 -273
- data/lib/treaty/attribute/collection.rb +0 -65
- data/lib/treaty/attribute/dsl.rb +0 -90
- data/lib/treaty/attribute/entity/builder.rb +0 -46
- data/lib/treaty/attribute/helper_mapper.rb +0 -72
- data/lib/treaty/attribute/option/base.rb +0 -188
- data/lib/treaty/attribute/option/conditionals/base.rb +0 -90
- data/lib/treaty/attribute/option/conditionals/if_conditional.rb +0 -134
- data/lib/treaty/attribute/option/conditionals/unless_conditional.rb +0 -151
- data/lib/treaty/attribute/option/modifiers/as_modifier.rb +0 -91
- data/lib/treaty/attribute/option/modifiers/cast_modifier.rb +0 -283
- data/lib/treaty/attribute/option/modifiers/computed_modifier.rb +0 -126
- data/lib/treaty/attribute/option/modifiers/default_modifier.rb +0 -103
- data/lib/treaty/attribute/option/modifiers/transform_modifier.rb +0 -112
- data/lib/treaty/attribute/option/registry.rb +0 -155
- data/lib/treaty/attribute/option/registry_initializer.rb +0 -115
- data/lib/treaty/attribute/option/validators/format_validator.rb +0 -220
- data/lib/treaty/attribute/option/validators/inclusion_validator.rb +0 -92
- data/lib/treaty/attribute/option/validators/required_validator.rb +0 -98
- data/lib/treaty/attribute/option/validators/type_validator.rb +0 -217
- data/lib/treaty/attribute/option_normalizer.rb +0 -166
- data/lib/treaty/attribute/option_orchestrator.rb +0 -190
- data/lib/treaty/attribute/validation/attribute_validator.rb +0 -145
- data/lib/treaty/attribute/validation/base.rb +0 -74
- data/lib/treaty/attribute/validation/nested_array_validator.rb +0 -205
- data/lib/treaty/attribute/validation/nested_object_validator.rb +0 -103
- data/lib/treaty/attribute/validation/nested_transformer.rb +0 -430
- data/lib/treaty/attribute/validation/orchestrator/base.rb +0 -260
- data/lib/treaty/base.rb +0 -9
- data/lib/treaty/context/callable.rb +0 -26
- data/lib/treaty/context/dsl.rb +0 -12
- data/lib/treaty/context/workspace.rb +0 -32
- data/lib/treaty/executor/inventory.rb +0 -122
- data/lib/treaty/inventory/collection.rb +0 -71
- data/lib/treaty/inventory/factory.rb +0 -91
- data/lib/treaty/inventory/inventory.rb +0 -92
- data/lib/treaty/request/attribute/attribute.rb +0 -25
- data/lib/treaty/request/attribute/builder.rb +0 -46
- data/lib/treaty/request/entity.rb +0 -33
- data/lib/treaty/request/factory.rb +0 -81
- data/lib/treaty/request/validator.rb +0 -60
- data/lib/treaty/response/attribute/attribute.rb +0 -25
- data/lib/treaty/response/attribute/builder.rb +0 -46
- data/lib/treaty/response/entity.rb +0 -33
- data/lib/treaty/response/factory.rb +0 -87
- data/lib/treaty/response/validator.rb +0 -53
- data/lib/treaty/result.rb +0 -23
- data/lib/treaty/versions/collection.rb +0 -15
- data/lib/treaty/versions/dsl.rb +0 -42
- data/lib/treaty/versions/execution/request.rb +0 -177
- data/lib/treaty/versions/executor.rb +0 -14
- data/lib/treaty/versions/factory.rb +0 -112
- data/lib/treaty/versions/resolver.rb +0 -70
- data/lib/treaty/versions/semantic.rb +0 -22
- data/lib/treaty/versions/workspace.rb +0 -43
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Treaty
|
|
4
|
+
module Entity
|
|
5
|
+
# Base class for defining reusable entity classes in Treaty.
|
|
6
|
+
#
|
|
7
|
+
# ## Purpose
|
|
8
|
+
#
|
|
9
|
+
# Treaty::Entity::Base provides a base class for creating reusable entity classes
|
|
10
|
+
# that can be used in both request and response definitions. This allows
|
|
11
|
+
# for better code organization and reusability of common data structures.
|
|
12
|
+
#
|
|
13
|
+
# ## Usage
|
|
14
|
+
#
|
|
15
|
+
# Create an entity class by inheriting from Treaty::Entity::Base:
|
|
16
|
+
#
|
|
17
|
+
# ```ruby
|
|
18
|
+
# module Posts
|
|
19
|
+
# module Create
|
|
20
|
+
# class ResponseEntity < Treaty::Entity::Base
|
|
21
|
+
# string :id
|
|
22
|
+
# string :title
|
|
23
|
+
# string :content
|
|
24
|
+
# datetime :created_at
|
|
25
|
+
# end
|
|
26
|
+
# end
|
|
27
|
+
# end
|
|
28
|
+
# ```
|
|
29
|
+
#
|
|
30
|
+
# Then use it in your treaty definitions:
|
|
31
|
+
#
|
|
32
|
+
# ```ruby
|
|
33
|
+
# class Posts::CreateTreaty < ApplicationTreaty
|
|
34
|
+
# version 1 do
|
|
35
|
+
# request Posts::Create::RequestEntity
|
|
36
|
+
# response 201, Posts::Create::ResponseEntity
|
|
37
|
+
# end
|
|
38
|
+
# end
|
|
39
|
+
# ```
|
|
40
|
+
#
|
|
41
|
+
# ## Attribute Defaults
|
|
42
|
+
#
|
|
43
|
+
# Unlike request/response blocks, Entity attributes are required by default:
|
|
44
|
+
# - All attributes have `required: true` unless explicitly marked as `:optional`
|
|
45
|
+
# - Use `:optional` helper to make attributes optional:
|
|
46
|
+
# ```ruby
|
|
47
|
+
# string :title # required by default
|
|
48
|
+
# string :summary, :optional # optional
|
|
49
|
+
# ```
|
|
50
|
+
#
|
|
51
|
+
# ## Features
|
|
52
|
+
#
|
|
53
|
+
# - **Type Safety** - Enforce strict type checking for all attributes
|
|
54
|
+
# - **Nested Structures** - Support for nested objects and arrays
|
|
55
|
+
# - **Validation** - Built-in validation for all attribute types
|
|
56
|
+
# - **Reusability** - Define once, use in multiple treaties
|
|
57
|
+
# - **Options** - Full support for attribute options (required, default, as, etc.)
|
|
58
|
+
#
|
|
59
|
+
# ## Supported Types
|
|
60
|
+
#
|
|
61
|
+
# - `string` - String values
|
|
62
|
+
# - `integer` - Integer values
|
|
63
|
+
# - `boolean` - Boolean values (true/false)
|
|
64
|
+
# - `datetime` - DateTime values
|
|
65
|
+
# - `array` - Array values (with nested type definition)
|
|
66
|
+
# - `object` - Object values (with nested attributes)
|
|
67
|
+
class Base
|
|
68
|
+
include Info::DSL
|
|
69
|
+
include Attribute::DSL
|
|
70
|
+
|
|
71
|
+
class << self
|
|
72
|
+
private
|
|
73
|
+
|
|
74
|
+
# Creates an Entity::Attribute for this Entity class
|
|
75
|
+
#
|
|
76
|
+
# @return [Treaty::Entity::Attribute::Attribute] Created attribute instance
|
|
77
|
+
def create_attribute(name, type, *helpers, nesting_level:, **options, &block)
|
|
78
|
+
Attribute::Attribute.new(
|
|
79
|
+
name,
|
|
80
|
+
type,
|
|
81
|
+
*helpers,
|
|
82
|
+
nesting_level:,
|
|
83
|
+
**options,
|
|
84
|
+
&block
|
|
85
|
+
)
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Treaty
|
|
4
|
+
module Entity
|
|
5
|
+
# DSL builder for defining entity attributes.
|
|
6
|
+
#
|
|
7
|
+
# ## Purpose
|
|
8
|
+
#
|
|
9
|
+
# Provides Entity-specific implementation of the attribute builder.
|
|
10
|
+
# Creates Entity::Attribute::Attribute instances with **required by default**
|
|
11
|
+
# behavior (unlike Request/Response which have different defaults).
|
|
12
|
+
#
|
|
13
|
+
# ## Inheritance
|
|
14
|
+
#
|
|
15
|
+
# Extends Treaty::Entity::Attribute::Builder::Base which provides:
|
|
16
|
+
# - DSL interface (string, integer, object, array, etc.)
|
|
17
|
+
# - method_missing magic for type-based method calls
|
|
18
|
+
# - Helper support (:required, :optional)
|
|
19
|
+
# - Entity reuse via use_entity
|
|
20
|
+
#
|
|
21
|
+
# ## Usage
|
|
22
|
+
#
|
|
23
|
+
# Used internally by:
|
|
24
|
+
# - Entity::Attribute::Attribute (when processing nested object/array blocks)
|
|
25
|
+
#
|
|
26
|
+
# ## Default Behavior
|
|
27
|
+
#
|
|
28
|
+
# Entity attributes default to **required: true**, meaning all fields
|
|
29
|
+
# must be present unless explicitly marked `:optional`.
|
|
30
|
+
#
|
|
31
|
+
# ## DSL Example
|
|
32
|
+
#
|
|
33
|
+
# class UserEntity < Treaty::Entity::Base
|
|
34
|
+
# object :user do
|
|
35
|
+
# string :id # required by default
|
|
36
|
+
# string :name # required by default
|
|
37
|
+
# string :bio, :optional # explicitly optional
|
|
38
|
+
# object :profile do
|
|
39
|
+
# string :avatar_url
|
|
40
|
+
# end
|
|
41
|
+
# end
|
|
42
|
+
# end
|
|
43
|
+
#
|
|
44
|
+
# ## Methods
|
|
45
|
+
#
|
|
46
|
+
# Implements abstract methods from base class:
|
|
47
|
+
# - `create_attribute` - Creates Entity::Attribute::Attribute
|
|
48
|
+
# - `deep_copy_attribute` - Deep copies attribute for use_entity support
|
|
49
|
+
class Builder < Treaty::Entity::Attribute::Builder::Base
|
|
50
|
+
private
|
|
51
|
+
|
|
52
|
+
# Creates a new entity attribute instance
|
|
53
|
+
#
|
|
54
|
+
# Called by base class when defining attributes via DSL.
|
|
55
|
+
#
|
|
56
|
+
# @param name [Symbol] Attribute name
|
|
57
|
+
# @param type [Symbol] Attribute type (:string, :integer, :object, etc.)
|
|
58
|
+
# @param helpers [Array<Symbol>] Helper symbols (:required, :optional)
|
|
59
|
+
# @param nesting_level [Integer] Current nesting depth
|
|
60
|
+
# @param options [Hash] Attribute options (default:, format:, etc.)
|
|
61
|
+
# @param block [Proc] Block for nested attributes (object/array)
|
|
62
|
+
# @return [Treaty::Entity::Attribute::Attribute] Created attribute instance
|
|
63
|
+
def create_attribute(name, type, *helpers, nesting_level:, **options, &block)
|
|
64
|
+
Treaty::Entity::Attribute::Attribute.new(
|
|
65
|
+
name,
|
|
66
|
+
type,
|
|
67
|
+
*helpers,
|
|
68
|
+
nesting_level:,
|
|
69
|
+
**options,
|
|
70
|
+
&block
|
|
71
|
+
)
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Deep copies an attribute with adjusted nesting level
|
|
75
|
+
#
|
|
76
|
+
# Used when copying attributes from other Entity classes via use_entity.
|
|
77
|
+
# Recursively copies nested attributes for object/array types.
|
|
78
|
+
#
|
|
79
|
+
# @param source_attribute [Treaty::Entity::Attribute::Base] Source attribute to copy
|
|
80
|
+
# @param new_nesting_level [Integer] Nesting level for copied attribute
|
|
81
|
+
# @return [Treaty::Entity::Attribute::Attribute] Deep copied attribute
|
|
82
|
+
def deep_copy_attribute(source_attribute, new_nesting_level) # rubocop:disable Metrics/MethodLength
|
|
83
|
+
copied = Treaty::Entity::Attribute::Attribute.new(
|
|
84
|
+
source_attribute.name,
|
|
85
|
+
source_attribute.type,
|
|
86
|
+
nesting_level: new_nesting_level,
|
|
87
|
+
**deep_copy_options(source_attribute.options)
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
return copied unless source_attribute.nested?
|
|
91
|
+
|
|
92
|
+
source_attribute.collection_of_attributes.each do |nested_source|
|
|
93
|
+
nested_copied = deep_copy_attribute(nested_source, new_nesting_level + 1)
|
|
94
|
+
copied.collection_of_attributes << nested_copied
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
copied
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Treaty
|
|
4
|
-
module
|
|
5
|
-
module
|
|
4
|
+
module Entity
|
|
5
|
+
module Info
|
|
6
6
|
class Builder
|
|
7
7
|
attr_reader :attributes
|
|
8
8
|
|
|
@@ -26,6 +26,12 @@ module Treaty
|
|
|
26
26
|
|
|
27
27
|
##########################################################################
|
|
28
28
|
|
|
29
|
+
def build_nested_attributes(attribute, current_level)
|
|
30
|
+
return {} unless attribute.nested?
|
|
31
|
+
|
|
32
|
+
build_versions_with(attribute.collection_of_attributes, current_level + 1)
|
|
33
|
+
end
|
|
34
|
+
|
|
29
35
|
def build_versions_with(collection, current_level = 0)
|
|
30
36
|
collection.to_h do |attribute|
|
|
31
37
|
[
|
|
@@ -38,12 +44,6 @@ module Treaty
|
|
|
38
44
|
]
|
|
39
45
|
end
|
|
40
46
|
end
|
|
41
|
-
|
|
42
|
-
def build_nested_attributes(attribute, current_level)
|
|
43
|
-
return {} unless attribute.nested?
|
|
44
|
-
|
|
45
|
-
build_versions_with(attribute.collection_of_attributes, current_level + 1)
|
|
46
|
-
end
|
|
47
47
|
end
|
|
48
48
|
end
|
|
49
49
|
end
|
data/lib/treaty/entity.rb
CHANGED
|
@@ -1,88 +1,16 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Treaty
|
|
4
|
-
#
|
|
4
|
+
# Entity namespace containing the base class and attribute system.
|
|
5
5
|
#
|
|
6
|
-
#
|
|
6
|
+
# Users should inherit from Treaty::Entity::Base:
|
|
7
7
|
#
|
|
8
|
-
# Treaty::Entity
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
# ## Usage
|
|
13
|
-
#
|
|
14
|
-
# Create an entity class by inheriting from Treaty::Entity:
|
|
15
|
-
#
|
|
16
|
-
# ```ruby
|
|
17
|
-
# module Posts
|
|
18
|
-
# module Create
|
|
19
|
-
# class ResponseEntity < Treaty::Entity
|
|
20
|
-
# string :id
|
|
21
|
-
# string :title
|
|
22
|
-
# string :content
|
|
23
|
-
# datetime :created_at
|
|
24
|
-
# end
|
|
8
|
+
# class MyEntity < Treaty::Entity::Base
|
|
9
|
+
# string :name
|
|
10
|
+
# integer :age
|
|
25
11
|
# end
|
|
26
|
-
# end
|
|
27
|
-
# ```
|
|
28
|
-
#
|
|
29
|
-
# Then use it in your treaty definitions:
|
|
30
|
-
#
|
|
31
|
-
# ```ruby
|
|
32
|
-
# class Posts::CreateTreaty < ApplicationTreaty
|
|
33
|
-
# version 1 do
|
|
34
|
-
# request Posts::Create::RequestEntity
|
|
35
|
-
# response 201, Posts::Create::ResponseEntity
|
|
36
|
-
# end
|
|
37
|
-
# end
|
|
38
|
-
# ```
|
|
39
|
-
#
|
|
40
|
-
# ## Attribute Defaults
|
|
41
12
|
#
|
|
42
|
-
#
|
|
43
|
-
|
|
44
|
-
# - Use `:optional` helper to make attributes optional:
|
|
45
|
-
# ```ruby
|
|
46
|
-
# string :title # required by default
|
|
47
|
-
# string :summary, :optional # optional
|
|
48
|
-
# ```
|
|
49
|
-
#
|
|
50
|
-
# ## Features
|
|
51
|
-
#
|
|
52
|
-
# - **Type Safety** - Enforce strict type checking for all attributes
|
|
53
|
-
# - **Nested Structures** - Support for nested objects and arrays
|
|
54
|
-
# - **Validation** - Built-in validation for all attribute types
|
|
55
|
-
# - **Reusability** - Define once, use in multiple treaties
|
|
56
|
-
# - **Options** - Full support for attribute options (required, default, as, etc.)
|
|
57
|
-
#
|
|
58
|
-
# ## Supported Types
|
|
59
|
-
#
|
|
60
|
-
# - `string` - String values
|
|
61
|
-
# - `integer` - Integer values
|
|
62
|
-
# - `boolean` - Boolean values (true/false)
|
|
63
|
-
# - `datetime` - DateTime values
|
|
64
|
-
# - `array` - Array values (with nested type definition)
|
|
65
|
-
# - `object` - Object values (with nested attributes)
|
|
66
|
-
class Entity
|
|
67
|
-
include Info::Entity::DSL
|
|
68
|
-
include Attribute::DSL
|
|
69
|
-
|
|
70
|
-
class << self
|
|
71
|
-
private
|
|
72
|
-
|
|
73
|
-
# Creates an Attribute::Entity::Attribute for this Entity class
|
|
74
|
-
#
|
|
75
|
-
# @return [Attribute::Entity::Attribute] Created attribute instance
|
|
76
|
-
def create_attribute(name, type, *helpers, nesting_level:, **options, &block)
|
|
77
|
-
Attribute::Entity::Attribute.new(
|
|
78
|
-
name,
|
|
79
|
-
type,
|
|
80
|
-
*helpers,
|
|
81
|
-
nesting_level:,
|
|
82
|
-
**options,
|
|
83
|
-
&block
|
|
84
|
-
)
|
|
85
|
-
end
|
|
86
|
-
end
|
|
13
|
+
# @see Treaty::Entity::Base for full documentation and examples
|
|
14
|
+
module Entity
|
|
87
15
|
end
|
|
88
16
|
end
|
data/lib/treaty/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: treaty
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.20.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Anton Sokolov
|
|
@@ -147,44 +147,75 @@ files:
|
|
|
147
147
|
- Rakefile
|
|
148
148
|
- config/locales/en.yml
|
|
149
149
|
- lib/treaty.rb
|
|
150
|
-
- lib/treaty/
|
|
151
|
-
- lib/treaty/
|
|
152
|
-
- lib/treaty/
|
|
153
|
-
- lib/treaty/
|
|
154
|
-
- lib/treaty/
|
|
155
|
-
- lib/treaty/
|
|
156
|
-
- lib/treaty/
|
|
157
|
-
- lib/treaty/
|
|
158
|
-
- lib/treaty/
|
|
159
|
-
- lib/treaty/
|
|
160
|
-
- lib/treaty/
|
|
161
|
-
- lib/treaty/
|
|
162
|
-
- lib/treaty/
|
|
163
|
-
- lib/treaty/
|
|
164
|
-
- lib/treaty/
|
|
165
|
-
- lib/treaty/
|
|
166
|
-
- lib/treaty/
|
|
167
|
-
- lib/treaty/attribute/
|
|
168
|
-
- lib/treaty/
|
|
169
|
-
- lib/treaty/
|
|
170
|
-
- lib/treaty/
|
|
171
|
-
- lib/treaty/
|
|
172
|
-
- lib/treaty/
|
|
173
|
-
- lib/treaty/
|
|
174
|
-
- lib/treaty/
|
|
175
|
-
- lib/treaty/
|
|
176
|
-
- lib/treaty/
|
|
177
|
-
- lib/treaty/
|
|
178
|
-
- lib/treaty/
|
|
179
|
-
- lib/treaty/
|
|
180
|
-
- lib/treaty/
|
|
150
|
+
- lib/treaty/action.rb
|
|
151
|
+
- lib/treaty/action/base.rb
|
|
152
|
+
- lib/treaty/action/context/callable.rb
|
|
153
|
+
- lib/treaty/action/context/dsl.rb
|
|
154
|
+
- lib/treaty/action/context/workspace.rb
|
|
155
|
+
- lib/treaty/action/executor/inventory.rb
|
|
156
|
+
- lib/treaty/action/info/builder.rb
|
|
157
|
+
- lib/treaty/action/info/dsl.rb
|
|
158
|
+
- lib/treaty/action/info/result.rb
|
|
159
|
+
- lib/treaty/action/inventory/collection.rb
|
|
160
|
+
- lib/treaty/action/inventory/factory.rb
|
|
161
|
+
- lib/treaty/action/inventory/inventory.rb
|
|
162
|
+
- lib/treaty/action/request/attribute/attribute.rb
|
|
163
|
+
- lib/treaty/action/request/attribute/builder.rb
|
|
164
|
+
- lib/treaty/action/request/entity.rb
|
|
165
|
+
- lib/treaty/action/request/factory.rb
|
|
166
|
+
- lib/treaty/action/request/validator.rb
|
|
167
|
+
- lib/treaty/action/response/attribute/attribute.rb
|
|
168
|
+
- lib/treaty/action/response/attribute/builder.rb
|
|
169
|
+
- lib/treaty/action/response/entity.rb
|
|
170
|
+
- lib/treaty/action/response/factory.rb
|
|
171
|
+
- lib/treaty/action/response/validator.rb
|
|
172
|
+
- lib/treaty/action/result.rb
|
|
173
|
+
- lib/treaty/action/versions/collection.rb
|
|
174
|
+
- lib/treaty/action/versions/dsl.rb
|
|
175
|
+
- lib/treaty/action/versions/execution/request.rb
|
|
176
|
+
- lib/treaty/action/versions/executor.rb
|
|
177
|
+
- lib/treaty/action/versions/factory.rb
|
|
178
|
+
- lib/treaty/action/versions/resolver.rb
|
|
179
|
+
- lib/treaty/action/versions/semantic.rb
|
|
180
|
+
- lib/treaty/action/versions/workspace.rb
|
|
181
181
|
- lib/treaty/configuration.rb
|
|
182
|
-
- lib/treaty/context/callable.rb
|
|
183
|
-
- lib/treaty/context/dsl.rb
|
|
184
|
-
- lib/treaty/context/workspace.rb
|
|
185
182
|
- lib/treaty/controller/dsl.rb
|
|
186
183
|
- lib/treaty/engine.rb
|
|
187
184
|
- lib/treaty/entity.rb
|
|
185
|
+
- lib/treaty/entity/attribute/attribute.rb
|
|
186
|
+
- lib/treaty/entity/attribute/base.rb
|
|
187
|
+
- lib/treaty/entity/attribute/builder/base.rb
|
|
188
|
+
- lib/treaty/entity/attribute/collection.rb
|
|
189
|
+
- lib/treaty/entity/attribute/dsl.rb
|
|
190
|
+
- lib/treaty/entity/attribute/helper_mapper.rb
|
|
191
|
+
- lib/treaty/entity/attribute/option/base.rb
|
|
192
|
+
- lib/treaty/entity/attribute/option/conditionals/base.rb
|
|
193
|
+
- lib/treaty/entity/attribute/option/conditionals/if_conditional.rb
|
|
194
|
+
- lib/treaty/entity/attribute/option/conditionals/unless_conditional.rb
|
|
195
|
+
- lib/treaty/entity/attribute/option/modifiers/as_modifier.rb
|
|
196
|
+
- lib/treaty/entity/attribute/option/modifiers/cast_modifier.rb
|
|
197
|
+
- lib/treaty/entity/attribute/option/modifiers/computed_modifier.rb
|
|
198
|
+
- lib/treaty/entity/attribute/option/modifiers/default_modifier.rb
|
|
199
|
+
- lib/treaty/entity/attribute/option/modifiers/transform_modifier.rb
|
|
200
|
+
- lib/treaty/entity/attribute/option/registry.rb
|
|
201
|
+
- lib/treaty/entity/attribute/option/registry_initializer.rb
|
|
202
|
+
- lib/treaty/entity/attribute/option/validators/format_validator.rb
|
|
203
|
+
- lib/treaty/entity/attribute/option/validators/inclusion_validator.rb
|
|
204
|
+
- lib/treaty/entity/attribute/option/validators/required_validator.rb
|
|
205
|
+
- lib/treaty/entity/attribute/option/validators/type_validator.rb
|
|
206
|
+
- lib/treaty/entity/attribute/option_normalizer.rb
|
|
207
|
+
- lib/treaty/entity/attribute/option_orchestrator.rb
|
|
208
|
+
- lib/treaty/entity/attribute/validation/attribute_validator.rb
|
|
209
|
+
- lib/treaty/entity/attribute/validation/base.rb
|
|
210
|
+
- lib/treaty/entity/attribute/validation/nested_array_validator.rb
|
|
211
|
+
- lib/treaty/entity/attribute/validation/nested_object_validator.rb
|
|
212
|
+
- lib/treaty/entity/attribute/validation/nested_transformer.rb
|
|
213
|
+
- lib/treaty/entity/attribute/validation/orchestrator/base.rb
|
|
214
|
+
- lib/treaty/entity/base.rb
|
|
215
|
+
- lib/treaty/entity/builder.rb
|
|
216
|
+
- lib/treaty/entity/info/builder.rb
|
|
217
|
+
- lib/treaty/entity/info/dsl.rb
|
|
218
|
+
- lib/treaty/entity/info/result.rb
|
|
188
219
|
- lib/treaty/exceptions/base.rb
|
|
189
220
|
- lib/treaty/exceptions/class_name.rb
|
|
190
221
|
- lib/treaty/exceptions/deprecated.rb
|
|
@@ -199,37 +230,8 @@ files:
|
|
|
199
230
|
- lib/treaty/exceptions/version_default_deprecated_conflict.rb
|
|
200
231
|
- lib/treaty/exceptions/version_multiple_defaults.rb
|
|
201
232
|
- lib/treaty/exceptions/version_not_found.rb
|
|
202
|
-
- lib/treaty/executor/inventory.rb
|
|
203
|
-
- lib/treaty/info/entity/builder.rb
|
|
204
|
-
- lib/treaty/info/entity/dsl.rb
|
|
205
|
-
- lib/treaty/info/entity/result.rb
|
|
206
|
-
- lib/treaty/info/rest/builder.rb
|
|
207
|
-
- lib/treaty/info/rest/dsl.rb
|
|
208
|
-
- lib/treaty/info/rest/result.rb
|
|
209
|
-
- lib/treaty/inventory/collection.rb
|
|
210
|
-
- lib/treaty/inventory/factory.rb
|
|
211
|
-
- lib/treaty/inventory/inventory.rb
|
|
212
|
-
- lib/treaty/request/attribute/attribute.rb
|
|
213
|
-
- lib/treaty/request/attribute/builder.rb
|
|
214
|
-
- lib/treaty/request/entity.rb
|
|
215
|
-
- lib/treaty/request/factory.rb
|
|
216
|
-
- lib/treaty/request/validator.rb
|
|
217
|
-
- lib/treaty/response/attribute/attribute.rb
|
|
218
|
-
- lib/treaty/response/attribute/builder.rb
|
|
219
|
-
- lib/treaty/response/entity.rb
|
|
220
|
-
- lib/treaty/response/factory.rb
|
|
221
|
-
- lib/treaty/response/validator.rb
|
|
222
|
-
- lib/treaty/result.rb
|
|
223
233
|
- lib/treaty/support/loader.rb
|
|
224
234
|
- lib/treaty/version.rb
|
|
225
|
-
- lib/treaty/versions/collection.rb
|
|
226
|
-
- lib/treaty/versions/dsl.rb
|
|
227
|
-
- lib/treaty/versions/execution/request.rb
|
|
228
|
-
- lib/treaty/versions/executor.rb
|
|
229
|
-
- lib/treaty/versions/factory.rb
|
|
230
|
-
- lib/treaty/versions/resolver.rb
|
|
231
|
-
- lib/treaty/versions/semantic.rb
|
|
232
|
-
- lib/treaty/versions/workspace.rb
|
|
233
235
|
homepage: https://github.com/servactory/treaty
|
|
234
236
|
licenses:
|
|
235
237
|
- MIT
|