dm-persevere-adapter 0.71.0 → 0.71.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/persevere_adapter.rb +4 -2
- data/spec/persevere_adapter_spec.rb +3 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.71.
|
1
|
+
0.71.1
|
data/lib/persevere_adapter.rb
CHANGED
@@ -530,12 +530,14 @@ module DataMapper
|
|
530
530
|
end
|
531
531
|
|
532
532
|
scrub_schema(schema_hash['properties'])
|
533
|
+
properties = schema_hash.delete('properties')
|
533
534
|
schema_hash['extends'] = { "$ref" => "/Class/Versioned" } if @options[:versioned]
|
534
535
|
schema_hash.delete_if{|key,value| value.nil? }
|
535
536
|
result = @persevere.create(path, schema_hash)
|
536
537
|
if result.code == '201'
|
537
|
-
|
538
|
-
|
538
|
+
# return JSON.parse(result.body)
|
539
|
+
schema_hash['properties'] = properties
|
540
|
+
return update_schema(schema_hash)
|
539
541
|
else
|
540
542
|
return false
|
541
543
|
end
|
@@ -520,7 +520,9 @@ describe DataMapper::Adapters::PersevereAdapter do
|
|
520
520
|
end
|
521
521
|
|
522
522
|
it "should remove resources from both sides of the relationship when there are many on each side" do
|
523
|
-
|
523
|
+
Bozon.has(Infinity, :nugatons, {:through => DataMapper::Resource})
|
524
|
+
Nugaton.has(Infinity, :bozons, {:through => DataMapper::Resource})
|
525
|
+
|
524
526
|
bozon1 = Bozon.create(:author => 'Jade', :title => "Jade's the author")
|
525
527
|
bozon2 = Bozon.create(:author => 'Ivan', :title => "Blow up the world!")
|
526
528
|
nugat1 = Nugaton.new(:name => "numero uno")
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dm-persevere-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 257
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 71
|
9
|
-
-
|
10
|
-
version: 0.71.
|
9
|
+
- 1
|
10
|
+
version: 0.71.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ivan R. Judson
|