I need the post as a single string



From: Victor Lowther [mailto:notifications@github.com]
Sent: Monday, December 16, 2013 10:37 PM Central Standard Time
To: crowbar/barclamp-crowbar <barclamp-crowbar@noreply.github.com>
Cc: Hirschfeld, Rob
Subject: Re: [barclamp-crowbar] Allow users to set MAC address in DHCP database when node is created AND deal w/ issues created when we changed the attribute system [1/5] (#808)


In crowbar_framework/app/models/attrib.rb:

>    end
>
>    private
>
> +  # used to create a mapping for discovery values from the map
> +  def map_set_value(map,value)
> +    return ( map =~ /^([^\/]*)\/(.*)/ ? { $1 => map_set_value($2, value)} : { map => value } )


This regex smells a bit gratuitous -- what is wrong with using map.split("/",2) here?

—
Reply to this email directly or view it on GitHub<https://github.com/crowbar/barclamp-crowbar/pull/808/files#r8392341>.