zazzle_rails 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module ZazzleRails
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
data/lib/zazzle_rails.rb CHANGED
@@ -4,7 +4,7 @@ require 'open-uri'
4
4
  require "cgi"
5
5
  module ZazzleRails
6
6
  def self.get_products(store_name)
7
- products = {:items => {}}
7
+ products = {:items => []}
8
8
  zazzle_feed = Nokogiri::XML(open("http://feed.zazzle.com/#{store_name}/feed")) do |config|
9
9
  config.noblanks
10
10
  end
@@ -22,7 +22,7 @@ module ZazzleRails
22
22
  end
23
23
  item_attributes.merge!({"#{item_attr.name}".to_sym => attr_to_add})
24
24
  end
25
- products[:items].merge!({"item_#{index}".to_sym => item_attributes})
25
+ products[:items] << item_attributes
26
26
  end
27
27
  products
28
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zazzle_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: