memory_model 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +15 -0
  2. data/.ruby-version +1 -0
  3. data/.travis.yml +7 -4
  4. data/Appraisals +9 -0
  5. data/Guardfile +7 -1
  6. data/README.md +5 -1
  7. data/Rakefile +12 -0
  8. data/gemfiles/rails_3.gemfile +8 -0
  9. data/gemfiles/rails_3.gemfile.lock +109 -0
  10. data/gemfiles/rails_4.gemfile +8 -0
  11. data/gemfiles/rails_4.gemfile.lock +117 -0
  12. data/lib/memory_model/base/actions/class_methods.rb +27 -0
  13. data/lib/memory_model/base/actions.rb +75 -0
  14. data/lib/memory_model/base/attributes.rb +87 -0
  15. data/lib/memory_model/base/auto_increment.rb +47 -0
  16. data/lib/memory_model/base/collectible.rb +26 -0
  17. data/lib/memory_model/base/conversion.rb +11 -0
  18. data/lib/memory_model/base/fields/field.rb +57 -0
  19. data/lib/memory_model/base/fields/field_set.rb +87 -0
  20. data/lib/memory_model/base/fields.rb +49 -0
  21. data/lib/memory_model/base/operations/comparisons.rb +25 -0
  22. data/lib/memory_model/base/operations.rb +10 -0
  23. data/lib/memory_model/base/persistence.rb +13 -11
  24. data/lib/memory_model/base.rb +58 -43
  25. data/lib/memory_model/collection/finders.rb +75 -0
  26. data/lib/memory_model/collection/index/multi.rb +61 -0
  27. data/lib/memory_model/collection/index/unique.rb +79 -0
  28. data/lib/memory_model/collection/index.rb +86 -0
  29. data/lib/memory_model/collection/initializers.rb +48 -0
  30. data/lib/memory_model/collection/loader_delegate.rb +63 -0
  31. data/lib/memory_model/collection/marshaled_record.rb +23 -0
  32. data/lib/memory_model/collection/operations.rb +82 -0
  33. data/lib/memory_model/collection.rb +18 -73
  34. data/lib/memory_model/version.rb +1 -1
  35. data/lib/memory_model.rb +7 -7
  36. data/memory_model.gemspec +8 -3
  37. data/spec/benchmark/benchmark.rb +126 -0
  38. data/spec/memory_model/base/{actionable_spec.rb → actions_spec.rb} +34 -103
  39. data/spec/memory_model/base/{attributable_spec.rb → attributes_spec.rb} +4 -6
  40. data/spec/memory_model/base/{collectable_spec.rb → collectible_spec.rb} +1 -1
  41. data/spec/memory_model/base/fieldable/field_set_spec.rb +23 -37
  42. data/spec/memory_model/base/fieldable/field_spec.rb +16 -16
  43. data/spec/memory_model/base/{fieldable_spec.rb → fields_spec.rb} +1 -1
  44. data/spec/memory_model/base/{comparable_spec.rb → operations/comparisons_spec.rb} +4 -4
  45. data/spec/memory_model/base/persistence_spec.rb +2 -2
  46. data/spec/memory_model/base_spec.rb +10 -9
  47. data/spec/memory_model/collection_spec.rb +24 -146
  48. data/spec/spec_helper.rb +11 -0
  49. data/spec/support/delegate_matcher.rb +40 -0
  50. metadata +120 -65
  51. data/.idea/.rakeTasks +0 -7
  52. data/.idea/dictionaries/jwaldrip.xml +0 -3
  53. data/.idea/encodings.xml +0 -5
  54. data/.idea/memory_model.iml +0 -47
  55. data/.idea/misc.xml +0 -8
  56. data/.idea/modules.xml +0 -9
  57. data/.idea/scopes/scope_settings.xml +0 -5
  58. data/.idea/vcs.xml +0 -7
  59. data/.idea/workspace.xml +0 -701
  60. data/lib/memory_model/base/actionable.rb +0 -95
  61. data/lib/memory_model/base/attributable.rb +0 -76
  62. data/lib/memory_model/base/collectable.rb +0 -22
  63. data/lib/memory_model/base/comparable.rb +0 -16
  64. data/lib/memory_model/base/fieldable/field.rb +0 -35
  65. data/lib/memory_model/base/fieldable/field_set.rb +0 -74
  66. data/lib/memory_model/base/fieldable.rb +0 -45
  67. data/lib/memory_model/base/versionable.rb +0 -17
  68. data/lib/memory_model/core_ext/object.rb +0 -5
  69. data/spec/memory_model/base/versionable_spec.rb +0 -31
  70. data/spec/memory_model/core_ext/object_spec.rb +0 -12
@@ -1,47 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="RUBY_MODULE" version="4">
3
- <component name="FacetManager">
4
- <facet type="gem" name="Gem">
5
- <configuration>
6
- <option name="GEM_APP_ROOT_PATH" value="$MODULE_DIR$" />
7
- <option name="GEM_APP_TEST_PATH" value="" />
8
- <option name="GEM_APP_LIB_PATH" value="$MODULE_DIR$/lib" />
9
- </configuration>
10
- </facet>
11
- </component>
12
- <component name="NewModuleRootManager">
13
- <content url="file://$MODULE_DIR$">
14
- <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
15
- </content>
16
- <orderEntry type="inheritedJdk" />
17
- <orderEntry type="sourceFolder" forTests="false" />
18
- <orderEntry type="library" scope="PROVIDED" name="activemodel (v@6581d7, rbenv: 1.9.3-p362) [gem]" level="application" />
19
- <orderEntry type="library" scope="PROVIDED" name="activesupport (v@6581d7, rbenv: 1.9.3-p362) [gem]" level="application" />
20
- <orderEntry type="library" scope="PROVIDED" name="builder (v3.0.4, rbenv: 1.9.3-p362) [gem]" level="application" />
21
- <orderEntry type="library" scope="PROVIDED" name="bundler (v1.2.3, rbenv: 1.9.3-p362) [gem]" level="application" />
22
- <orderEntry type="library" scope="PROVIDED" name="coderay (v1.0.8, rbenv: 1.9.3-p362) [gem]" level="application" />
23
- <orderEntry type="library" scope="PROVIDED" name="concerned_inheritance (v0.0.2, rbenv: 1.9.3-p362) [gem]" level="application" />
24
- <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.1.3, rbenv: 1.9.3-p362) [gem]" level="application" />
25
- <orderEntry type="library" scope="PROVIDED" name="guard (v1.6.1, rbenv: 1.9.3-p362) [gem]" level="application" />
26
- <orderEntry type="library" scope="PROVIDED" name="guard-rspec (v2.3.3, rbenv: 1.9.3-p362) [gem]" level="application" />
27
- <orderEntry type="library" scope="PROVIDED" name="i18n (v0.6.1, rbenv: 1.9.3-p362) [gem]" level="application" />
28
- <orderEntry type="library" scope="PROVIDED" name="ice_nine (v0.6.0, rbenv: 1.9.3-p362) [gem]" level="application" />
29
- <orderEntry type="library" scope="PROVIDED" name="listen (v0.7.1, rbenv: 1.9.3-p362) [gem]" level="application" />
30
- <orderEntry type="library" scope="PROVIDED" name="lumberjack (v1.0.2, rbenv: 1.9.3-p362) [gem]" level="application" />
31
- <orderEntry type="library" scope="PROVIDED" name="method_source (v0.8.1, rbenv: 1.9.3-p362) [gem]" level="application" />
32
- <orderEntry type="library" scope="PROVIDED" name="multi_json (v1.5.0, rbenv: 1.9.3-p362) [gem]" level="application" />
33
- <orderEntry type="library" scope="PROVIDED" name="pry (v0.9.10, rbenv: 1.9.3-p362) [gem]" level="application" />
34
- <orderEntry type="library" scope="PROVIDED" name="rb-fsevent (v0.9.3, rbenv: 1.9.3-p362) [gem]" level="application" />
35
- <orderEntry type="library" scope="PROVIDED" name="rspec (v2.12.0, rbenv: 1.9.3-p362) [gem]" level="application" />
36
- <orderEntry type="library" scope="PROVIDED" name="rspec-core (v2.12.2, rbenv: 1.9.3-p362) [gem]" level="application" />
37
- <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v2.12.1, rbenv: 1.9.3-p362) [gem]" level="application" />
38
- <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v2.12.1, rbenv: 1.9.3-p362) [gem]" level="application" />
39
- <orderEntry type="library" scope="PROVIDED" name="simplecov (v0.7.1, rbenv: 1.9.3-p362) [gem]" level="application" />
40
- <orderEntry type="library" scope="PROVIDED" name="simplecov-html (v0.7.1, rbenv: 1.9.3-p362) [gem]" level="application" />
41
- <orderEntry type="library" scope="PROVIDED" name="slop (v3.3.3, rbenv: 1.9.3-p362) [gem]" level="application" />
42
- <orderEntry type="library" scope="PROVIDED" name="terminal-notifier-guard (v1.5.3, rbenv: 1.9.3-p362) [gem]" level="application" />
43
- <orderEntry type="library" scope="PROVIDED" name="test-unit (v2.5.3, rbenv: 1.9.3-p362) [gem]" level="application" />
44
- <orderEntry type="library" scope="PROVIDED" name="thor (v0.16.0, rbenv: 1.9.3-p362) [gem]" level="application" />
45
- </component>
46
- </module>
47
-
data/.idea/misc.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectResources">
4
- <default-html-doctype>$APPLICATION_HOME_DIR$/lib/rubymine.jar!/resources/html5-schema/html5.rnc</default-html-doctype>
5
- </component>
6
- <component name="ProjectRootManager" version="2" project-jdk-name="rbenv: 1.9.3-p362" project-jdk-type="RUBY_SDK" />
7
- </project>
8
-
data/.idea/modules.xml DELETED
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/memory_model.iml" filepath="$PROJECT_DIR$/.idea/memory_model.iml" />
6
- </modules>
7
- </component>
8
- </project>
9
-
@@ -1,5 +0,0 @@
1
- <component name="DependencyValidationManager">
2
- <state>
3
- <option name="SKIP_IMPORT_STATEMENTS" value="false" />
4
- </state>
5
- </component>
data/.idea/vcs.xml DELETED
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
- </component>
6
- </project>
7
-