cuprum-collections 0.1.0 → 0.3.0.rc.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/CHANGELOG.md +26 -0
  3. data/README.md +321 -15
  4. data/lib/cuprum/collections/basic/collection.rb +13 -0
  5. data/lib/cuprum/collections/basic/commands/destroy_one.rb +4 -3
  6. data/lib/cuprum/collections/basic/commands/find_many.rb +1 -1
  7. data/lib/cuprum/collections/basic/commands/insert_one.rb +4 -3
  8. data/lib/cuprum/collections/basic/commands/update_one.rb +4 -3
  9. data/lib/cuprum/collections/basic/query.rb +3 -3
  10. data/lib/cuprum/collections/basic/repository.rb +67 -0
  11. data/lib/cuprum/collections/commands/abstract_find_many.rb +33 -32
  12. data/lib/cuprum/collections/commands/abstract_find_one.rb +4 -3
  13. data/lib/cuprum/collections/commands/create.rb +60 -0
  14. data/lib/cuprum/collections/commands/find_one_matching.rb +134 -0
  15. data/lib/cuprum/collections/commands/update.rb +74 -0
  16. data/lib/cuprum/collections/commands/upsert.rb +162 -0
  17. data/lib/cuprum/collections/commands.rb +7 -2
  18. data/lib/cuprum/collections/errors/abstract_find_error.rb +210 -0
  19. data/lib/cuprum/collections/errors/already_exists.rb +4 -72
  20. data/lib/cuprum/collections/errors/extra_attributes.rb +8 -18
  21. data/lib/cuprum/collections/errors/failed_validation.rb +5 -18
  22. data/lib/cuprum/collections/errors/invalid_parameters.rb +7 -15
  23. data/lib/cuprum/collections/errors/invalid_query.rb +5 -15
  24. data/lib/cuprum/collections/errors/missing_default_contract.rb +5 -17
  25. data/lib/cuprum/collections/errors/not_found.rb +4 -67
  26. data/lib/cuprum/collections/errors/not_unique.rb +18 -0
  27. data/lib/cuprum/collections/errors/unknown_operator.rb +7 -17
  28. data/lib/cuprum/collections/errors.rb +13 -1
  29. data/lib/cuprum/collections/queries/ordering.rb +4 -2
  30. data/lib/cuprum/collections/repository.rb +105 -0
  31. data/lib/cuprum/collections/rspec/assign_one_command_contract.rb +2 -2
  32. data/lib/cuprum/collections/rspec/build_one_command_contract.rb +1 -1
  33. data/lib/cuprum/collections/rspec/collection_contract.rb +140 -103
  34. data/lib/cuprum/collections/rspec/destroy_one_command_contract.rb +8 -6
  35. data/lib/cuprum/collections/rspec/find_many_command_contract.rb +114 -34
  36. data/lib/cuprum/collections/rspec/find_one_command_contract.rb +12 -9
  37. data/lib/cuprum/collections/rspec/insert_one_command_contract.rb +4 -3
  38. data/lib/cuprum/collections/rspec/query_contract.rb +3 -3
  39. data/lib/cuprum/collections/rspec/querying_contract.rb +2 -2
  40. data/lib/cuprum/collections/rspec/repository_contract.rb +235 -0
  41. data/lib/cuprum/collections/rspec/update_one_command_contract.rb +4 -3
  42. data/lib/cuprum/collections/version.rb +3 -3
  43. data/lib/cuprum/collections.rb +1 -0
  44. metadata +25 -91
metadata CHANGED
@@ -1,119 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cuprum-collections
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.0.rc.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob "Merlin" Smith
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-19 00:00:00.000000000 Z
11
+ date: 2023-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cuprum
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0.11'
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '2.0'
23
- type: :runtime
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: '0.11'
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '2.0'
33
- - !ruby/object:Gem::Dependency
34
- name: stannum
35
15
  requirement: !ruby/object:Gem::Requirement
36
16
  requirements:
37
17
  - - "~>"
38
18
  - !ruby/object:Gem::Version
39
- version: '0.2'
19
+ version: '1.1'
40
20
  type: :runtime
41
21
  prerelease: false
42
22
  version_requirements: !ruby/object:Gem::Requirement
43
23
  requirements:
44
24
  - - "~>"
45
25
  - !ruby/object:Gem::Version
46
- version: '0.2'
47
- - !ruby/object:Gem::Dependency
48
- name: rspec
49
- requirement: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '3.9'
54
- type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - "~>"
59
- - !ruby/object:Gem::Version
60
- version: '3.9'
26
+ version: '1.1'
61
27
  - !ruby/object:Gem::Dependency
62
- name: rspec-sleeping_king_studios
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '2.5'
68
- type: :development
69
- prerelease: false
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '2.5'
75
- - !ruby/object:Gem::Dependency
76
- name: rubocop
77
- requirement: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - "~>"
80
- - !ruby/object:Gem::Version
81
- version: '1.22'
82
- type: :development
83
- prerelease: false
84
- version_requirements: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - "~>"
87
- - !ruby/object:Gem::Version
88
- version: '1.22'
89
- - !ruby/object:Gem::Dependency
90
- name: rubocop-rspec
91
- requirement: !ruby/object:Gem::Requirement
92
- requirements:
93
- - - "~>"
94
- - !ruby/object:Gem::Version
95
- version: '2.5'
96
- type: :development
97
- prerelease: false
98
- version_requirements: !ruby/object:Gem::Requirement
99
- requirements:
100
- - - "~>"
101
- - !ruby/object:Gem::Version
102
- version: '2.5'
103
- - !ruby/object:Gem::Dependency
104
- name: simplecov
28
+ name: stannum
105
29
  requirement: !ruby/object:Gem::Requirement
106
30
  requirements:
107
31
  - - "~>"
108
32
  - !ruby/object:Gem::Version
109
- version: '0.18'
110
- type: :development
33
+ version: '0.3'
34
+ type: :runtime
111
35
  prerelease: false
112
36
  version_requirements: !ruby/object:Gem::Requirement
113
37
  requirements:
114
38
  - - "~>"
115
39
  - !ruby/object:Gem::Version
116
- version: '0.18'
40
+ version: '0.3'
117
41
  description: An adapter library to provide a consistent interface between data stores.
118
42
  email:
119
43
  - merlin@sleepingkingstudios.com
@@ -143,6 +67,7 @@ files:
143
67
  - lib/cuprum/collections/basic/commands/validate_one.rb
144
68
  - lib/cuprum/collections/basic/query.rb
145
69
  - lib/cuprum/collections/basic/query_builder.rb
70
+ - lib/cuprum/collections/basic/repository.rb
146
71
  - lib/cuprum/collections/basic/rspec.rb
147
72
  - lib/cuprum/collections/basic/rspec/command_contract.rb
148
73
  - lib/cuprum/collections/command.rb
@@ -150,6 +75,10 @@ files:
150
75
  - lib/cuprum/collections/commands/abstract_find_many.rb
151
76
  - lib/cuprum/collections/commands/abstract_find_matching.rb
152
77
  - lib/cuprum/collections/commands/abstract_find_one.rb
78
+ - lib/cuprum/collections/commands/create.rb
79
+ - lib/cuprum/collections/commands/find_one_matching.rb
80
+ - lib/cuprum/collections/commands/update.rb
81
+ - lib/cuprum/collections/commands/upsert.rb
153
82
  - lib/cuprum/collections/constraints.rb
154
83
  - lib/cuprum/collections/constraints/attribute_name.rb
155
84
  - lib/cuprum/collections/constraints/order.rb
@@ -160,6 +89,7 @@ files:
160
89
  - lib/cuprum/collections/constraints/ordering.rb
161
90
  - lib/cuprum/collections/constraints/query_hash.rb
162
91
  - lib/cuprum/collections/errors.rb
92
+ - lib/cuprum/collections/errors/abstract_find_error.rb
163
93
  - lib/cuprum/collections/errors/already_exists.rb
164
94
  - lib/cuprum/collections/errors/extra_attributes.rb
165
95
  - lib/cuprum/collections/errors/failed_validation.rb
@@ -167,6 +97,7 @@ files:
167
97
  - lib/cuprum/collections/errors/invalid_query.rb
168
98
  - lib/cuprum/collections/errors/missing_default_contract.rb
169
99
  - lib/cuprum/collections/errors/not_found.rb
100
+ - lib/cuprum/collections/errors/not_unique.rb
170
101
  - lib/cuprum/collections/errors/unknown_operator.rb
171
102
  - lib/cuprum/collections/queries.rb
172
103
  - lib/cuprum/collections/queries/ordering.rb
@@ -175,6 +106,7 @@ files:
175
106
  - lib/cuprum/collections/queries/parse_strategy.rb
176
107
  - lib/cuprum/collections/query.rb
177
108
  - lib/cuprum/collections/query_builder.rb
109
+ - lib/cuprum/collections/repository.rb
178
110
  - lib/cuprum/collections/rspec.rb
179
111
  - lib/cuprum/collections/rspec/assign_one_command_contract.rb
180
112
  - lib/cuprum/collections/rspec/build_one_command_contract.rb
@@ -188,6 +120,7 @@ files:
188
120
  - lib/cuprum/collections/rspec/query_builder_contract.rb
189
121
  - lib/cuprum/collections/rspec/query_contract.rb
190
122
  - lib/cuprum/collections/rspec/querying_contract.rb
123
+ - lib/cuprum/collections/rspec/repository_contract.rb
191
124
  - lib/cuprum/collections/rspec/update_one_command_contract.rb
192
125
  - lib/cuprum/collections/rspec/validate_one_command_contract.rb
193
126
  - lib/cuprum/collections/version.rb
@@ -197,7 +130,8 @@ licenses:
197
130
  metadata:
198
131
  bug_tracker_uri: https://github.com/sleepingkingstudios/cuprum-collections/issues
199
132
  source_code_uri: https://github.com/sleepingkingstudios/cuprum-collections
200
- post_install_message:
133
+ rubygems_mfa_required: 'true'
134
+ post_install_message:
201
135
  rdoc_options: []
202
136
  require_paths:
203
137
  - lib
@@ -205,15 +139,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
205
139
  requirements:
206
140
  - - ">="
207
141
  - !ruby/object:Gem::Version
208
- version: 2.6.0
142
+ version: 2.7.0
209
143
  required_rubygems_version: !ruby/object:Gem::Requirement
210
144
  requirements:
211
- - - ">="
145
+ - - ">"
212
146
  - !ruby/object:Gem::Version
213
- version: '0'
147
+ version: 1.3.1
214
148
  requirements: []
215
- rubygems_version: 3.1.2
216
- signing_key:
149
+ rubygems_version: 3.4.13
150
+ signing_key:
217
151
  specification_version: 4
218
152
  summary: A data abstraction layer based on the Cuprum library.
219
153
  test_files: []