cuprum-collections 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +59 -0
  3. data/CODE_OF_CONDUCT.md +132 -0
  4. data/DEVELOPMENT.md +25 -0
  5. data/LICENSE +22 -0
  6. data/README.md +950 -0
  7. data/lib/cuprum/collections/base.rb +11 -0
  8. data/lib/cuprum/collections/basic/collection.rb +135 -0
  9. data/lib/cuprum/collections/basic/command.rb +112 -0
  10. data/lib/cuprum/collections/basic/commands/assign_one.rb +54 -0
  11. data/lib/cuprum/collections/basic/commands/build_one.rb +45 -0
  12. data/lib/cuprum/collections/basic/commands/destroy_one.rb +48 -0
  13. data/lib/cuprum/collections/basic/commands/find_many.rb +65 -0
  14. data/lib/cuprum/collections/basic/commands/find_matching.rb +126 -0
  15. data/lib/cuprum/collections/basic/commands/find_one.rb +49 -0
  16. data/lib/cuprum/collections/basic/commands/insert_one.rb +50 -0
  17. data/lib/cuprum/collections/basic/commands/update_one.rb +52 -0
  18. data/lib/cuprum/collections/basic/commands/validate_one.rb +69 -0
  19. data/lib/cuprum/collections/basic/commands.rb +18 -0
  20. data/lib/cuprum/collections/basic/query.rb +160 -0
  21. data/lib/cuprum/collections/basic/query_builder.rb +69 -0
  22. data/lib/cuprum/collections/basic/rspec/command_contract.rb +392 -0
  23. data/lib/cuprum/collections/basic/rspec.rb +8 -0
  24. data/lib/cuprum/collections/basic.rb +22 -0
  25. data/lib/cuprum/collections/command.rb +26 -0
  26. data/lib/cuprum/collections/commands/abstract_find_many.rb +77 -0
  27. data/lib/cuprum/collections/commands/abstract_find_matching.rb +64 -0
  28. data/lib/cuprum/collections/commands/abstract_find_one.rb +44 -0
  29. data/lib/cuprum/collections/commands.rb +8 -0
  30. data/lib/cuprum/collections/constraints/attribute_name.rb +22 -0
  31. data/lib/cuprum/collections/constraints/order/attributes_array.rb +26 -0
  32. data/lib/cuprum/collections/constraints/order/attributes_hash.rb +27 -0
  33. data/lib/cuprum/collections/constraints/order/complex_ordering.rb +46 -0
  34. data/lib/cuprum/collections/constraints/order/sort_direction.rb +32 -0
  35. data/lib/cuprum/collections/constraints/order.rb +8 -0
  36. data/lib/cuprum/collections/constraints/ordering.rb +114 -0
  37. data/lib/cuprum/collections/constraints/query_hash.rb +25 -0
  38. data/lib/cuprum/collections/constraints.rb +8 -0
  39. data/lib/cuprum/collections/errors/already_exists.rb +86 -0
  40. data/lib/cuprum/collections/errors/extra_attributes.rb +66 -0
  41. data/lib/cuprum/collections/errors/failed_validation.rb +66 -0
  42. data/lib/cuprum/collections/errors/invalid_parameters.rb +50 -0
  43. data/lib/cuprum/collections/errors/invalid_query.rb +55 -0
  44. data/lib/cuprum/collections/errors/missing_default_contract.rb +49 -0
  45. data/lib/cuprum/collections/errors/not_found.rb +81 -0
  46. data/lib/cuprum/collections/errors/unknown_operator.rb +71 -0
  47. data/lib/cuprum/collections/errors.rb +8 -0
  48. data/lib/cuprum/collections/queries/ordering.rb +74 -0
  49. data/lib/cuprum/collections/queries/parse.rb +22 -0
  50. data/lib/cuprum/collections/queries/parse_block.rb +206 -0
  51. data/lib/cuprum/collections/queries/parse_strategy.rb +91 -0
  52. data/lib/cuprum/collections/queries.rb +25 -0
  53. data/lib/cuprum/collections/query.rb +247 -0
  54. data/lib/cuprum/collections/query_builder.rb +61 -0
  55. data/lib/cuprum/collections/rspec/assign_one_command_contract.rb +168 -0
  56. data/lib/cuprum/collections/rspec/build_one_command_contract.rb +93 -0
  57. data/lib/cuprum/collections/rspec/collection_contract.rb +153 -0
  58. data/lib/cuprum/collections/rspec/destroy_one_command_contract.rb +106 -0
  59. data/lib/cuprum/collections/rspec/find_many_command_contract.rb +327 -0
  60. data/lib/cuprum/collections/rspec/find_matching_command_contract.rb +194 -0
  61. data/lib/cuprum/collections/rspec/find_one_command_contract.rb +154 -0
  62. data/lib/cuprum/collections/rspec/fixtures.rb +89 -0
  63. data/lib/cuprum/collections/rspec/insert_one_command_contract.rb +83 -0
  64. data/lib/cuprum/collections/rspec/query_builder_contract.rb +92 -0
  65. data/lib/cuprum/collections/rspec/query_contract.rb +650 -0
  66. data/lib/cuprum/collections/rspec/querying_contract.rb +298 -0
  67. data/lib/cuprum/collections/rspec/update_one_command_contract.rb +79 -0
  68. data/lib/cuprum/collections/rspec/validate_one_command_contract.rb +96 -0
  69. data/lib/cuprum/collections/rspec.rb +8 -0
  70. data/lib/cuprum/collections/version.rb +59 -0
  71. data/lib/cuprum/collections.rb +26 -0
  72. metadata +219 -0
metadata ADDED
@@ -0,0 +1,219 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cuprum-collections
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Rob "Merlin" Smith
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-10-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
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
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '0.2'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !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'
61
+ - !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
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '0.18'
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - "~>"
115
+ - !ruby/object:Gem::Version
116
+ version: '0.18'
117
+ description: An adapter library to provide a consistent interface between data stores.
118
+ email:
119
+ - merlin@sleepingkingstudios.com
120
+ executables: []
121
+ extensions: []
122
+ extra_rdoc_files: []
123
+ files:
124
+ - CHANGELOG.md
125
+ - CODE_OF_CONDUCT.md
126
+ - DEVELOPMENT.md
127
+ - LICENSE
128
+ - README.md
129
+ - lib/cuprum/collections.rb
130
+ - lib/cuprum/collections/base.rb
131
+ - lib/cuprum/collections/basic.rb
132
+ - lib/cuprum/collections/basic/collection.rb
133
+ - lib/cuprum/collections/basic/command.rb
134
+ - lib/cuprum/collections/basic/commands.rb
135
+ - lib/cuprum/collections/basic/commands/assign_one.rb
136
+ - lib/cuprum/collections/basic/commands/build_one.rb
137
+ - lib/cuprum/collections/basic/commands/destroy_one.rb
138
+ - lib/cuprum/collections/basic/commands/find_many.rb
139
+ - lib/cuprum/collections/basic/commands/find_matching.rb
140
+ - lib/cuprum/collections/basic/commands/find_one.rb
141
+ - lib/cuprum/collections/basic/commands/insert_one.rb
142
+ - lib/cuprum/collections/basic/commands/update_one.rb
143
+ - lib/cuprum/collections/basic/commands/validate_one.rb
144
+ - lib/cuprum/collections/basic/query.rb
145
+ - lib/cuprum/collections/basic/query_builder.rb
146
+ - lib/cuprum/collections/basic/rspec.rb
147
+ - lib/cuprum/collections/basic/rspec/command_contract.rb
148
+ - lib/cuprum/collections/command.rb
149
+ - lib/cuprum/collections/commands.rb
150
+ - lib/cuprum/collections/commands/abstract_find_many.rb
151
+ - lib/cuprum/collections/commands/abstract_find_matching.rb
152
+ - lib/cuprum/collections/commands/abstract_find_one.rb
153
+ - lib/cuprum/collections/constraints.rb
154
+ - lib/cuprum/collections/constraints/attribute_name.rb
155
+ - lib/cuprum/collections/constraints/order.rb
156
+ - lib/cuprum/collections/constraints/order/attributes_array.rb
157
+ - lib/cuprum/collections/constraints/order/attributes_hash.rb
158
+ - lib/cuprum/collections/constraints/order/complex_ordering.rb
159
+ - lib/cuprum/collections/constraints/order/sort_direction.rb
160
+ - lib/cuprum/collections/constraints/ordering.rb
161
+ - lib/cuprum/collections/constraints/query_hash.rb
162
+ - lib/cuprum/collections/errors.rb
163
+ - lib/cuprum/collections/errors/already_exists.rb
164
+ - lib/cuprum/collections/errors/extra_attributes.rb
165
+ - lib/cuprum/collections/errors/failed_validation.rb
166
+ - lib/cuprum/collections/errors/invalid_parameters.rb
167
+ - lib/cuprum/collections/errors/invalid_query.rb
168
+ - lib/cuprum/collections/errors/missing_default_contract.rb
169
+ - lib/cuprum/collections/errors/not_found.rb
170
+ - lib/cuprum/collections/errors/unknown_operator.rb
171
+ - lib/cuprum/collections/queries.rb
172
+ - lib/cuprum/collections/queries/ordering.rb
173
+ - lib/cuprum/collections/queries/parse.rb
174
+ - lib/cuprum/collections/queries/parse_block.rb
175
+ - lib/cuprum/collections/queries/parse_strategy.rb
176
+ - lib/cuprum/collections/query.rb
177
+ - lib/cuprum/collections/query_builder.rb
178
+ - lib/cuprum/collections/rspec.rb
179
+ - lib/cuprum/collections/rspec/assign_one_command_contract.rb
180
+ - lib/cuprum/collections/rspec/build_one_command_contract.rb
181
+ - lib/cuprum/collections/rspec/collection_contract.rb
182
+ - lib/cuprum/collections/rspec/destroy_one_command_contract.rb
183
+ - lib/cuprum/collections/rspec/find_many_command_contract.rb
184
+ - lib/cuprum/collections/rspec/find_matching_command_contract.rb
185
+ - lib/cuprum/collections/rspec/find_one_command_contract.rb
186
+ - lib/cuprum/collections/rspec/fixtures.rb
187
+ - lib/cuprum/collections/rspec/insert_one_command_contract.rb
188
+ - lib/cuprum/collections/rspec/query_builder_contract.rb
189
+ - lib/cuprum/collections/rspec/query_contract.rb
190
+ - lib/cuprum/collections/rspec/querying_contract.rb
191
+ - lib/cuprum/collections/rspec/update_one_command_contract.rb
192
+ - lib/cuprum/collections/rspec/validate_one_command_contract.rb
193
+ - lib/cuprum/collections/version.rb
194
+ homepage: http://sleepingkingstudios.com
195
+ licenses:
196
+ - MIT
197
+ metadata:
198
+ bug_tracker_uri: https://github.com/sleepingkingstudios/cuprum-collections/issues
199
+ source_code_uri: https://github.com/sleepingkingstudios/cuprum-collections
200
+ post_install_message:
201
+ rdoc_options: []
202
+ require_paths:
203
+ - lib
204
+ required_ruby_version: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: 2.6.0
209
+ required_rubygems_version: !ruby/object:Gem::Requirement
210
+ requirements:
211
+ - - ">="
212
+ - !ruby/object:Gem::Version
213
+ version: '0'
214
+ requirements: []
215
+ rubygems_version: 3.1.2
216
+ signing_key:
217
+ specification_version: 4
218
+ summary: A data abstraction layer based on the Cuprum library.
219
+ test_files: []