simple_mapper 0.0.1
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.
- data/README.rdoc +165 -0
- data/Rakefile.rb +11 -0
- data/lib/simple_mapper.rb +8 -0
- data/lib/simple_mapper/attribute.rb +119 -0
- data/lib/simple_mapper/attribute/collection.rb +130 -0
- data/lib/simple_mapper/attribute/pattern.rb +19 -0
- data/lib/simple_mapper/attributes.rb +196 -0
- data/lib/simple_mapper/attributes/types.rb +224 -0
- data/lib/simple_mapper/change_hash.rb +14 -0
- data/lib/simple_mapper/collection.rb +169 -0
- data/lib/simple_mapper/exceptions.rb +10 -0
- data/test/integration/attribute_change_tracking_test.rb +181 -0
- data/test/integration/attribute_meta_interaction_test.rb +169 -0
- data/test/integration/attribute_pattern_test.rb +77 -0
- data/test/integration/to_simple_test.rb +128 -0
- data/test/test_helper.rb +11 -0
- data/test/unit/attribute_collection_test.rb +379 -0
- data/test/unit/attribute_pattern_test.rb +55 -0
- data/test/unit/attribute_test.rb +419 -0
- data/test/unit/attributes_test.rb +561 -0
- data/test/unit/collection_array_test.rb +194 -0
- data/test/unit/collection_hash_test.rb +139 -0
- data/test/unit/types_test.rb +314 -0
- metadata +140 -0
metadata
ADDED
@@ -0,0 +1,140 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: simple_mapper
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Ethan Rowe
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2010-04-21 00:00:00 -04:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: rake
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
version: "0"
|
33
|
+
type: :development
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: shoulda
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 3
|
44
|
+
segments:
|
45
|
+
- 0
|
46
|
+
version: "0"
|
47
|
+
type: :development
|
48
|
+
version_requirements: *id002
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: mocha
|
51
|
+
prerelease: false
|
52
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
hash: 3
|
58
|
+
segments:
|
59
|
+
- 0
|
60
|
+
version: "0"
|
61
|
+
type: :development
|
62
|
+
version_requirements: *id003
|
63
|
+
description: Provides functionality for building classes that map to/from simple nested data structures of the sort one typically sees with Thrift.
|
64
|
+
email: ethan@endpoint.com
|
65
|
+
executables: []
|
66
|
+
|
67
|
+
extensions: []
|
68
|
+
|
69
|
+
extra_rdoc_files: []
|
70
|
+
|
71
|
+
files:
|
72
|
+
- Rakefile.rb
|
73
|
+
- README.rdoc
|
74
|
+
- lib/simple_mapper/attribute/collection.rb
|
75
|
+
- lib/simple_mapper/attribute/pattern.rb
|
76
|
+
- lib/simple_mapper/attribute.rb
|
77
|
+
- lib/simple_mapper/attributes/types.rb
|
78
|
+
- lib/simple_mapper/attributes.rb
|
79
|
+
- lib/simple_mapper/change_hash.rb
|
80
|
+
- lib/simple_mapper/collection.rb
|
81
|
+
- lib/simple_mapper/exceptions.rb
|
82
|
+
- lib/simple_mapper.rb
|
83
|
+
- test/integration/attribute_change_tracking_test.rb
|
84
|
+
- test/integration/attribute_meta_interaction_test.rb
|
85
|
+
- test/integration/attribute_pattern_test.rb
|
86
|
+
- test/integration/to_simple_test.rb
|
87
|
+
- test/test_helper.rb
|
88
|
+
- test/unit/attribute_collection_test.rb
|
89
|
+
- test/unit/attribute_pattern_test.rb
|
90
|
+
- test/unit/attribute_test.rb
|
91
|
+
- test/unit/attributes_test.rb
|
92
|
+
- test/unit/collection_array_test.rb
|
93
|
+
- test/unit/collection_hash_test.rb
|
94
|
+
- test/unit/types_test.rb
|
95
|
+
has_rdoc: true
|
96
|
+
homepage: http://github.com/csinitiative/simplemapper
|
97
|
+
licenses: []
|
98
|
+
|
99
|
+
post_install_message:
|
100
|
+
rdoc_options: []
|
101
|
+
|
102
|
+
require_paths:
|
103
|
+
- lib
|
104
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
hash: 3
|
110
|
+
segments:
|
111
|
+
- 0
|
112
|
+
version: "0"
|
113
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
|
+
none: false
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
hash: 3
|
119
|
+
segments:
|
120
|
+
- 0
|
121
|
+
version: "0"
|
122
|
+
requirements: []
|
123
|
+
|
124
|
+
rubyforge_project:
|
125
|
+
rubygems_version: 1.5.3
|
126
|
+
signing_key:
|
127
|
+
specification_version: 3
|
128
|
+
summary: Build your classes with this module. Then you can map from a simple JSON-like structure to instances of your class, and vice versa. With type conversion, attribute state tracking, etc.
|
129
|
+
test_files:
|
130
|
+
- test/integration/attribute_change_tracking_test.rb
|
131
|
+
- test/integration/attribute_meta_interaction_test.rb
|
132
|
+
- test/integration/attribute_pattern_test.rb
|
133
|
+
- test/integration/to_simple_test.rb
|
134
|
+
- test/unit/attribute_collection_test.rb
|
135
|
+
- test/unit/attribute_pattern_test.rb
|
136
|
+
- test/unit/attribute_test.rb
|
137
|
+
- test/unit/attributes_test.rb
|
138
|
+
- test/unit/collection_array_test.rb
|
139
|
+
- test/unit/collection_hash_test.rb
|
140
|
+
- test/unit/types_test.rb
|