On Fri, Jun 24, 2011 at 12:24:29PM +0200, Jan Provaznik wrote:
On 06/24/2011 12:42 AM, Matt Wagner wrote:
> ---
> src/lib/warehouse_client.rb | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/src/lib/warehouse_client.rb b/src/lib/warehouse_client.rb
> index 9e805a6..66aabee 100644
> --- a/src/lib/warehouse_client.rb
> +++ b/src/lib/warehouse_client.rb
> @@ -40,6 +40,7 @@ module Warehouse
> def attrs(list)
> attrs = {}
> list.each do |att|
> + next if att.match('-')
> attrs[att] = (@connection.do_request("#{@path}/#{att}", :plain
=> true) rescue nil)
> end
> attrs
I would vote for fixing this in WarehouseModel. This works fine, but we
won't be able to use '-'* attrs in future. Also problem is in
WarehouseModel attr_* calls, not in warehouse_client itself. We can fix
bug directly by replacing invalid chars with '_' when defining attr_*.
I think this is a good idea, but I don't have the bandwidth to do this
today. Can someone else either implement what Jan describes, or can we
push my crude fix as a provisional patch?
-- Matt