spectifly 0.0.7 → 0.0.8
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/lib/spectifly/base/association.rb +2 -2
- data/lib/spectifly/version.rb +1 -1
- data/lib/spectifly/xsd/association.rb +1 -1
- data/lib/spectifly/xsd/builder.rb +1 -1
- data/spec/expectations/individual.json +10 -3
- data/spec/expectations/individual.xsd +7 -2
- data/spec/expectations/presented/positionless_individual.json +8 -6
- data/spec/expectations/presented/positionless_individual.xsd +4 -4
- data/spec/fixtures/individual.entity +8 -3
- data/spec/fixtures/presenters/positionless_individual/individual.entity +2 -1
- data/spec/spectifly/json/builder_spec.rb +2 -2
- metadata +8 -3
data/lib/spectifly/version.rb
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"individual": {
|
|
3
3
|
"belongs_to": {
|
|
4
|
-
"
|
|
4
|
+
"political_party": {
|
|
5
5
|
"type": "group",
|
|
6
6
|
"required": true,
|
|
7
|
-
"description": "
|
|
7
|
+
"description": "Less funtime party that aligns with this individual's ideals"
|
|
8
8
|
},
|
|
9
9
|
"stupid_club": {
|
|
10
10
|
"type": "group",
|
|
@@ -12,6 +12,13 @@
|
|
|
12
12
|
"description": "Which stupid club this individual was manipulated into joining"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
|
+
"belongs_to_many": {
|
|
16
|
+
"parties": {
|
|
17
|
+
"type": "group",
|
|
18
|
+
"required": false,
|
|
19
|
+
"description": "Which funtime party/parties this individual happy with is"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
15
22
|
"name": {
|
|
16
23
|
"type": "string",
|
|
17
24
|
"multiple": false,
|
|
@@ -59,4 +66,4 @@
|
|
|
59
66
|
"description": "Whether or not this individual is pickled"
|
|
60
67
|
}
|
|
61
68
|
}
|
|
62
|
-
}
|
|
69
|
+
}
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
<xs:documentation>Whether or not this individual is pickled</xs:documentation>
|
|
37
37
|
</xs:annotation>
|
|
38
38
|
</xs:element>
|
|
39
|
-
<xs:element name="
|
|
39
|
+
<xs:element name="PoliticalPartyId" type="xs:string">
|
|
40
40
|
<xs:annotation>
|
|
41
|
-
<xs:documentation>
|
|
41
|
+
<xs:documentation>Less funtime party that aligns with this individual's ideals</xs:documentation>
|
|
42
42
|
</xs:annotation>
|
|
43
43
|
</xs:element>
|
|
44
44
|
<xs:element name="StupidClubId" type="xs:string" minOccurs="0">
|
|
@@ -46,6 +46,11 @@
|
|
|
46
46
|
<xs:documentation>Which stupid club this individual was manipulated into joining</xs:documentation>
|
|
47
47
|
</xs:annotation>
|
|
48
48
|
</xs:element>
|
|
49
|
+
<xs:element name="PartiesId" type="xs:string" minOccurs="0" maxOccurs="unbounded">
|
|
50
|
+
<xs:annotation>
|
|
51
|
+
<xs:documentation>Which funtime party/parties this individual happy with is</xs:documentation>
|
|
52
|
+
</xs:annotation>
|
|
53
|
+
</xs:element>
|
|
49
54
|
</xs:sequence>
|
|
50
55
|
</xs:complexType>
|
|
51
56
|
</xs:schema>
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"individual": {
|
|
3
3
|
"belongs_to": {
|
|
4
|
-
"party": {
|
|
5
|
-
"type": "group",
|
|
6
|
-
"required": true,
|
|
7
|
-
"description": "Which funtime party this individual happy with is"
|
|
8
|
-
},
|
|
9
4
|
"stupid_club": {
|
|
10
5
|
"type": "group",
|
|
11
6
|
"required": false,
|
|
12
7
|
"description": "Which stupid club this individual was manipulated into joining"
|
|
13
8
|
}
|
|
14
9
|
},
|
|
10
|
+
"belongs_to_many": {
|
|
11
|
+
"parties": {
|
|
12
|
+
"type": "group",
|
|
13
|
+
"required": false,
|
|
14
|
+
"description": "Which funtime party/parties this individual happy with is"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
15
17
|
"name": {
|
|
16
18
|
"type": "string",
|
|
17
19
|
"multiple": false,
|
|
@@ -46,4 +48,4 @@
|
|
|
46
48
|
"description": "Whether or not this individual is pickled"
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
|
-
}
|
|
51
|
+
}
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
<xs:documentation>Whether or not this individual is pickled</xs:documentation>
|
|
25
25
|
</xs:annotation>
|
|
26
26
|
</xs:element>
|
|
27
|
-
<xs:element name="
|
|
27
|
+
<xs:element name="StupidClubId" type="xs:string" minOccurs="0">
|
|
28
28
|
<xs:annotation>
|
|
29
|
-
<xs:documentation>Which
|
|
29
|
+
<xs:documentation>Which stupid club this individual was manipulated into joining</xs:documentation>
|
|
30
30
|
</xs:annotation>
|
|
31
31
|
</xs:element>
|
|
32
|
-
<xs:element name="
|
|
32
|
+
<xs:element name="PartiesId" type="xs:string" minOccurs="0" maxOccurs="unbounded">
|
|
33
33
|
<xs:annotation>
|
|
34
|
-
<xs:documentation>Which
|
|
34
|
+
<xs:documentation>Which funtime party/parties this individual happy with is</xs:documentation>
|
|
35
35
|
</xs:annotation>
|
|
36
36
|
</xs:element>
|
|
37
37
|
</xs:sequence>
|
|
@@ -28,10 +28,15 @@ Individual:
|
|
|
28
28
|
|
|
29
29
|
Related Entities:
|
|
30
30
|
Belongs To:
|
|
31
|
-
Party*:
|
|
32
|
-
Description:
|
|
31
|
+
Political Party*:
|
|
32
|
+
Description: Less funtime party that aligns with this individual's ideals
|
|
33
33
|
Type: Group
|
|
34
34
|
|
|
35
35
|
Stupid Club:
|
|
36
36
|
Description: Which stupid club this individual was manipulated into joining
|
|
37
|
-
Type: Group
|
|
37
|
+
Type: Group
|
|
38
|
+
|
|
39
|
+
Belongs To Many:
|
|
40
|
+
Parties:
|
|
41
|
+
Description: Which funtime party/parties this individual happy with is
|
|
42
|
+
Type: Group
|
|
@@ -7,7 +7,7 @@ describe Spectifly::Json::Builder do
|
|
|
7
7
|
entity = Spectifly::Entity.parse(fixture_path('individual'))
|
|
8
8
|
json_path = expectation_path('individual', 'json')
|
|
9
9
|
hash = described_class.new(entity).build
|
|
10
|
-
JSON.pretty_generate(hash).should == File.read(json_path)
|
|
10
|
+
JSON.pretty_generate(hash).strip.should == File.read(json_path).strip
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
it 'works with containing relationships' do
|
|
@@ -26,7 +26,7 @@ describe Spectifly::Json::Builder do
|
|
|
26
26
|
builder = described_class.new(entity)
|
|
27
27
|
builder.present_as(presenter_entity).should == builder
|
|
28
28
|
hash = builder.build
|
|
29
|
-
JSON.pretty_generate(hash).should == File.read(json_path)
|
|
29
|
+
JSON.pretty_generate(hash).strip.should == File.read(json_path).strip
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
it 'works with overriding relationships' do
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spectifly
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.8
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2013-
|
|
12
|
+
date: 2013-09-27 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: builder
|
|
@@ -207,12 +207,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
207
207
|
- - ! '>='
|
|
208
208
|
- !ruby/object:Gem::Version
|
|
209
209
|
version: '0'
|
|
210
|
+
segments:
|
|
211
|
+
- 0
|
|
212
|
+
hash: 4342167303691961125
|
|
210
213
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
211
214
|
none: false
|
|
212
215
|
requirements:
|
|
213
216
|
- - ! '>='
|
|
214
217
|
- !ruby/object:Gem::Version
|
|
215
218
|
version: '0'
|
|
219
|
+
segments:
|
|
220
|
+
- 0
|
|
221
|
+
hash: 4342167303691961125
|
|
216
222
|
requirements: []
|
|
217
223
|
rubyforge_project:
|
|
218
224
|
rubygems_version: 1.8.23
|
|
@@ -248,4 +254,3 @@ test_files:
|
|
|
248
254
|
- spec/spectifly/xsd/field_spec.rb
|
|
249
255
|
- spec/spectifly/xsd/types_spec.rb
|
|
250
256
|
- spec/support/path_helper.rb
|
|
251
|
-
has_rdoc:
|