terrestrial 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -9
  3. data/.rspec +2 -0
  4. data/.ruby-version +1 -0
  5. data/CODE_OF_CONDUCT.md +28 -0
  6. data/Gemfile.lock +73 -0
  7. data/LICENSE.txt +22 -0
  8. data/MissingFeatures.md +64 -0
  9. data/README.md +161 -16
  10. data/Rakefile +30 -0
  11. data/TODO.md +41 -0
  12. data/features/env.rb +60 -0
  13. data/features/example.feature +120 -0
  14. data/features/step_definitions/example_steps.rb +46 -0
  15. data/lib/terrestrial/abstract_record.rb +99 -0
  16. data/lib/terrestrial/association_loaders.rb +52 -0
  17. data/lib/terrestrial/collection_mutability_proxy.rb +81 -0
  18. data/lib/terrestrial/configurations/conventional_association_configuration.rb +186 -0
  19. data/lib/terrestrial/configurations/conventional_configuration.rb +302 -0
  20. data/lib/terrestrial/dataset.rb +49 -0
  21. data/lib/terrestrial/deleted_record.rb +20 -0
  22. data/lib/terrestrial/dirty_map.rb +42 -0
  23. data/lib/terrestrial/graph_loader.rb +63 -0
  24. data/lib/terrestrial/graph_serializer.rb +91 -0
  25. data/lib/terrestrial/identity_map.rb +22 -0
  26. data/lib/terrestrial/lazy_collection.rb +74 -0
  27. data/lib/terrestrial/lazy_object_proxy.rb +55 -0
  28. data/lib/terrestrial/many_to_many_association.rb +138 -0
  29. data/lib/terrestrial/many_to_one_association.rb +66 -0
  30. data/lib/terrestrial/mapper_facade.rb +137 -0
  31. data/lib/terrestrial/one_to_many_association.rb +66 -0
  32. data/lib/terrestrial/public_conveniencies.rb +139 -0
  33. data/lib/terrestrial/query_order.rb +32 -0
  34. data/lib/terrestrial/relation_mapping.rb +50 -0
  35. data/lib/terrestrial/serializer.rb +18 -0
  36. data/lib/terrestrial/short_inspection_string.rb +18 -0
  37. data/lib/terrestrial/struct_factory.rb +17 -0
  38. data/lib/terrestrial/subset_queries_proxy.rb +11 -0
  39. data/lib/terrestrial/upserted_record.rb +15 -0
  40. data/lib/terrestrial/version.rb +1 -1
  41. data/lib/terrestrial.rb +5 -2
  42. data/sequel_mapper.gemspec +31 -0
  43. data/spec/config_override_spec.rb +193 -0
  44. data/spec/custom_serializers_spec.rb +49 -0
  45. data/spec/deletion_spec.rb +101 -0
  46. data/spec/graph_persistence_spec.rb +313 -0
  47. data/spec/graph_traversal_spec.rb +121 -0
  48. data/spec/new_graph_persistence_spec.rb +71 -0
  49. data/spec/object_identity_spec.rb +70 -0
  50. data/spec/ordered_association_spec.rb +51 -0
  51. data/spec/persistence_efficiency_spec.rb +224 -0
  52. data/spec/predefined_queries_spec.rb +62 -0
  53. data/spec/proxying_spec.rb +88 -0
  54. data/spec/querying_spec.rb +48 -0
  55. data/spec/readme_examples_spec.rb +35 -0
  56. data/spec/sequel_mapper/abstract_record_spec.rb +244 -0
  57. data/spec/sequel_mapper/collection_mutability_proxy_spec.rb +135 -0
  58. data/spec/sequel_mapper/deleted_record_spec.rb +59 -0
  59. data/spec/sequel_mapper/dirty_map_spec.rb +214 -0
  60. data/spec/sequel_mapper/lazy_collection_spec.rb +119 -0
  61. data/spec/sequel_mapper/lazy_object_proxy_spec.rb +140 -0
  62. data/spec/sequel_mapper/public_conveniencies_spec.rb +58 -0
  63. data/spec/sequel_mapper/upserted_record_spec.rb +59 -0
  64. data/spec/spec_helper.rb +36 -0
  65. data/spec/support/blog_schema.rb +38 -0
  66. data/spec/support/have_persisted_matcher.rb +19 -0
  67. data/spec/support/mapper_setup.rb +221 -0
  68. data/spec/support/mock_sequel.rb +193 -0
  69. data/spec/support/object_graph_setup.rb +139 -0
  70. data/spec/support/seed_data_setup.rb +165 -0
  71. data/spec/support/sequel_persistence_setup.rb +19 -0
  72. data/spec/support/sequel_test_support.rb +166 -0
  73. metadata +207 -13
  74. data/.travis.yml +0 -4
  75. data/bin/console +0 -14
  76. data/bin/setup +0 -7
  77. data/terrestrial.gemspec +0 -23
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terrestrial
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Best
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-01 00:00:00.000000000 Z
11
+ date: 2016-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.10'
19
+ version: '1.7'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.10'
26
+ version: '1.7'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,7 +38,105 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
- description: A data mapping ORM to make your objects feel less alien
41
+ - !ruby/object:Gem::Dependency
42
+ name: pry
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 0.10.1
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 0.10.1
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.1'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.1'
69
+ - !ruby/object:Gem::Dependency
70
+ name: cucumber
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: pg
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 0.17.1
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 0.17.1
97
+ - !ruby/object:Gem::Dependency
98
+ name: sequel
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '4.16'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '4.16'
111
+ - !ruby/object:Gem::Dependency
112
+ name: activesupport
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '4.0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '4.0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: fetchable
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '1.0'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '1.0'
139
+ description: Terrestial persists your POROs while keeping them free of database concerns.
42
140
  email:
43
141
  - bestie@gmail.com
44
142
  executables: []
@@ -46,17 +144,80 @@ extensions: []
46
144
  extra_rdoc_files: []
47
145
  files:
48
146
  - ".gitignore"
49
- - ".travis.yml"
147
+ - ".rspec"
148
+ - ".ruby-version"
149
+ - CODE_OF_CONDUCT.md
50
150
  - Gemfile
151
+ - Gemfile.lock
152
+ - LICENSE.txt
153
+ - MissingFeatures.md
51
154
  - README.md
52
155
  - Rakefile
53
- - bin/console
54
- - bin/setup
156
+ - TODO.md
157
+ - features/env.rb
158
+ - features/example.feature
159
+ - features/step_definitions/example_steps.rb
55
160
  - lib/terrestrial.rb
161
+ - lib/terrestrial/abstract_record.rb
162
+ - lib/terrestrial/association_loaders.rb
163
+ - lib/terrestrial/collection_mutability_proxy.rb
164
+ - lib/terrestrial/configurations/conventional_association_configuration.rb
165
+ - lib/terrestrial/configurations/conventional_configuration.rb
166
+ - lib/terrestrial/dataset.rb
167
+ - lib/terrestrial/deleted_record.rb
168
+ - lib/terrestrial/dirty_map.rb
169
+ - lib/terrestrial/graph_loader.rb
170
+ - lib/terrestrial/graph_serializer.rb
171
+ - lib/terrestrial/identity_map.rb
172
+ - lib/terrestrial/lazy_collection.rb
173
+ - lib/terrestrial/lazy_object_proxy.rb
174
+ - lib/terrestrial/many_to_many_association.rb
175
+ - lib/terrestrial/many_to_one_association.rb
176
+ - lib/terrestrial/mapper_facade.rb
177
+ - lib/terrestrial/one_to_many_association.rb
178
+ - lib/terrestrial/public_conveniencies.rb
179
+ - lib/terrestrial/query_order.rb
180
+ - lib/terrestrial/relation_mapping.rb
181
+ - lib/terrestrial/serializer.rb
182
+ - lib/terrestrial/short_inspection_string.rb
183
+ - lib/terrestrial/struct_factory.rb
184
+ - lib/terrestrial/subset_queries_proxy.rb
185
+ - lib/terrestrial/upserted_record.rb
56
186
  - lib/terrestrial/version.rb
57
- - terrestrial.gemspec
58
- homepage: ''
59
- licenses: []
187
+ - sequel_mapper.gemspec
188
+ - spec/config_override_spec.rb
189
+ - spec/custom_serializers_spec.rb
190
+ - spec/deletion_spec.rb
191
+ - spec/graph_persistence_spec.rb
192
+ - spec/graph_traversal_spec.rb
193
+ - spec/new_graph_persistence_spec.rb
194
+ - spec/object_identity_spec.rb
195
+ - spec/ordered_association_spec.rb
196
+ - spec/persistence_efficiency_spec.rb
197
+ - spec/predefined_queries_spec.rb
198
+ - spec/proxying_spec.rb
199
+ - spec/querying_spec.rb
200
+ - spec/readme_examples_spec.rb
201
+ - spec/sequel_mapper/abstract_record_spec.rb
202
+ - spec/sequel_mapper/collection_mutability_proxy_spec.rb
203
+ - spec/sequel_mapper/deleted_record_spec.rb
204
+ - spec/sequel_mapper/dirty_map_spec.rb
205
+ - spec/sequel_mapper/lazy_collection_spec.rb
206
+ - spec/sequel_mapper/lazy_object_proxy_spec.rb
207
+ - spec/sequel_mapper/public_conveniencies_spec.rb
208
+ - spec/sequel_mapper/upserted_record_spec.rb
209
+ - spec/spec_helper.rb
210
+ - spec/support/blog_schema.rb
211
+ - spec/support/have_persisted_matcher.rb
212
+ - spec/support/mapper_setup.rb
213
+ - spec/support/mock_sequel.rb
214
+ - spec/support/object_graph_setup.rb
215
+ - spec/support/seed_data_setup.rb
216
+ - spec/support/sequel_persistence_setup.rb
217
+ - spec/support/sequel_test_support.rb
218
+ homepage: https://github.com/bestie/terrestrial
219
+ licenses:
220
+ - MIT
60
221
  metadata: {}
61
222
  post_install_message:
62
223
  rdoc_options: []
@@ -78,4 +239,37 @@ rubygems_version: 2.4.5
78
239
  signing_key:
79
240
  specification_version: 4
80
241
  summary: A data mapping ORM to make your objects feel less alien
81
- test_files: []
242
+ test_files:
243
+ - features/env.rb
244
+ - features/example.feature
245
+ - features/step_definitions/example_steps.rb
246
+ - spec/config_override_spec.rb
247
+ - spec/custom_serializers_spec.rb
248
+ - spec/deletion_spec.rb
249
+ - spec/graph_persistence_spec.rb
250
+ - spec/graph_traversal_spec.rb
251
+ - spec/new_graph_persistence_spec.rb
252
+ - spec/object_identity_spec.rb
253
+ - spec/ordered_association_spec.rb
254
+ - spec/persistence_efficiency_spec.rb
255
+ - spec/predefined_queries_spec.rb
256
+ - spec/proxying_spec.rb
257
+ - spec/querying_spec.rb
258
+ - spec/readme_examples_spec.rb
259
+ - spec/sequel_mapper/abstract_record_spec.rb
260
+ - spec/sequel_mapper/collection_mutability_proxy_spec.rb
261
+ - spec/sequel_mapper/deleted_record_spec.rb
262
+ - spec/sequel_mapper/dirty_map_spec.rb
263
+ - spec/sequel_mapper/lazy_collection_spec.rb
264
+ - spec/sequel_mapper/lazy_object_proxy_spec.rb
265
+ - spec/sequel_mapper/public_conveniencies_spec.rb
266
+ - spec/sequel_mapper/upserted_record_spec.rb
267
+ - spec/spec_helper.rb
268
+ - spec/support/blog_schema.rb
269
+ - spec/support/have_persisted_matcher.rb
270
+ - spec/support/mapper_setup.rb
271
+ - spec/support/mock_sequel.rb
272
+ - spec/support/object_graph_setup.rb
273
+ - spec/support/seed_data_setup.rb
274
+ - spec/support/sequel_persistence_setup.rb
275
+ - spec/support/sequel_test_support.rb
data/.travis.yml DELETED
@@ -1,4 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.2.2
4
- before_install: gem install bundler -v 1.10.6
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "terrestrial"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start
data/bin/setup DELETED
@@ -1,7 +0,0 @@
1
- #!/bin/bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
-
5
- bundle install
6
-
7
- # Do any other automated setup that you need to do here
data/terrestrial.gemspec DELETED
@@ -1,23 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'terrestrial/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "terrestrial"
8
- spec.version = Terrestrial::VERSION
9
- spec.authors = ["Stephen Best"]
10
- spec.email = ["bestie@gmail.com"]
11
-
12
- spec.summary = %q{A data mapping ORM to make your objects feel less alien}
13
- spec.description = %q{A data mapping ORM to make your objects feel less alien}
14
- spec.homepage = ""
15
-
16
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
- spec.bindir = "exe"
18
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
- spec.require_paths = ["lib"]
20
-
21
- spec.add_development_dependency "bundler", "~> 1.10"
22
- spec.add_development_dependency "rake", "~> 10.0"
23
- end