lib/rgeoserver/coverage.rb in rgeoserver-0.5.4 vs lib/rgeoserver/coverage.rb in rgeoserver-0.5.5

- old
+ new

@@ -2,11 +2,11 @@ module RGeoServer class Coverage < ResourceInfo OBJ_ATTRIBUTES = {:catalog => "catalog", :name => "name", :workspace => "workspace", :enabled => "enabled" } - OBJ_DEFAULT_ATTRIBUTES = {:catalog => nil, :workspace => nil, :coverage_store => nil, :name => nil, :enabled => false } + OBJ_DEFAULT_ATTRIBUTES = {:catalog => nil, :workspace => nil, :coverage_store => nil, :name => nil, :enabled => "false" } define_attribute_methods OBJ_ATTRIBUTES.keys update_attribute_accessors OBJ_ATTRIBUTES @@r = Confstruct::Configuration.new( @@ -73,13 +73,13 @@ def profile_xml_to_hash profile_xml doc = profile_xml_to_ng profile_xml h = { "coverage_store" => @coverage_store.name, "workspace" => @workspace.name, - "name" => doc.at_xpath('//name/text()').text.strip, - "nativeName" => doc.at_xpath('//nativeName/text()').to_s, - "title" => doc.at_xpath('//title/text()').to_s, - "supportedFormats" => doc.xpath('//supportedFormats/string/text()').collect{ |t| t.to_s } + "name" => doc.at_xpath('//name').text.strip, + "nativeName" => doc.at_xpath('//nativeName').to_s, + "title" => doc.at_xpath('//title').to_s, + "supportedFormats" => doc.xpath('//supportedFormats/string').collect{ |t| t.to_s } }.freeze h end