dm-xml-adapter 0.572 → 0.573

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.
Files changed (2) hide show
  1. data/lib/dm-xml-adapter.rb +3 -3
  2. metadata +1 -1
@@ -263,7 +263,7 @@ module DataMapper::Adapters
263
263
  # special case for false
264
264
  if property.primitive == TrueClass and value == false
265
265
  xml.tag!(property.name.to_s, false, :class => FalseClass.to_s)
266
- elsif (value != nil and property.primitive == BigDecimal)
266
+ elsif (property.primitive == BigDecimal and value != nil)
267
267
  xml.tag!(property.name.to_s, value.to_s("F"), :class => BigDecimal)
268
268
  elsif (value != nil)
269
269
  xml.tag!(property.name.to_s, value, :class => property.primitive)
@@ -271,8 +271,8 @@ module DataMapper::Adapters
271
271
  end
272
272
  end
273
273
 
274
- xmlfile = File.new(class_name_to_file(resource.class.to_s, resource.key.first), "w")
275
- tempfile = Tempfile.new("dm-xml-adapter", "/tmp")
274
+ xmlfile = File.new(class_name_to_file(resource_class, resource_key), "w")
275
+ tempfile = Tempfile.new("dm-xml-adapter", Dir.tmpdir())
276
276
  tempfile.puts out_string
277
277
  tempfile.close
278
278
  FileUtils.mv(tempfile.path,xmlfile.path)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dm-xml-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.572"
4
+ version: "0.573"
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Harding