google-content-api 0.1.5 → 0.1.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 278179a947b6f244964810163fb76c4985ed1fe3
4
- data.tar.gz: c352bae8e0dbb96a9179842c66cd4e2d795107b6
3
+ metadata.gz: c4b0edb7f4385f09ec139db71b5d5dfddf1370ae
4
+ data.tar.gz: a66db9f7b7625d7cb9b0e483418fb3e3583e82ea
5
5
  SHA512:
6
- metadata.gz: 53a3567008c4d40d0465fe32dc5eed8373e5a08d64e01c09c34a0735683f4efdd01909cf8a279c9abbe460f3dc182c3feb083e36209086857f2f9cea803759b2
7
- data.tar.gz: 0f8c585dfdece74743c610d7323e5d3154f76503df62151ff8d7fd76de554db6e0ec70fe5b22959200049fd90cb6a5fe8c476f0620a204de12db67d654610ead
6
+ metadata.gz: 0c2a5ca59b7d5258d6f739e65bf6a241579e036539ff5447e805a5d516f2ccf3c7f3a6a74625d5109865ff09658240c21fc970d9307b97ed03aecf6f56727510
7
+ data.tar.gz: 83ad329bf312982173f7cd84f8d6f0ac5464de948273837e0cd36a3c628cfd73620c236a40931aa71f79d7f155c3a5f73771063c6ca171e25d9263b4bea711c3
@@ -176,6 +176,11 @@ module GoogleContentApi
176
176
  if attributes[:unit_pricing_measure] && attributes[:unit]
177
177
  xml['scp'].unit_pricing_measure_ attributes[:unit_pricing_measure], :unit => attributes[:unit]
178
178
  end
179
+ (0..4).each do |i|
180
+ if attributes["custom_label_#{i}".to_sym]
181
+ xml['scp'].send "custom_label_#{i}_".to_sym, attributes["custom_label_#{i}".to_sym]
182
+ end
183
+ end
179
184
  end
180
185
  end
181
186
  end
@@ -1,3 +1,3 @@
1
1
  module GoogleContentApi
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -95,6 +95,12 @@ describe GoogleContentApi::Product do
95
95
  result_xml = subject.send(:create_product_items_batch_xml, [product_attributes.merge(:unit => unit, :unit_pricing_measure => unit_pricing_measure)])
96
96
  result_xml.should match "<scp:unit_pricing_measure unit=\"#{unit}\">#{unit_pricing_measure}</scp:unit_pricing_measure>"
97
97
  end
98
+
99
+ it "creates custom labels" do
100
+ result_xml = subject.send(:create_product_items_batch_xml, [product_attributes.merge(:custom_label_0 => "bla", :custom_label_1 => "foo")])
101
+ result_xml.should match "<scp:custom_label_0>bla</scp:custom_label_0>"
102
+ result_xml.should match "<scp:custom_label_1>foo</scp:custom_label_1>"
103
+ end
98
104
  end
99
105
  end
100
106
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-content-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - DaWanda GmbH
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-21 00:00:00.000000000 Z
11
+ date: 2014-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler