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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c4b0edb7f4385f09ec139db71b5d5dfddf1370ae
|
|
4
|
+
data.tar.gz: a66db9f7b7625d7cb9b0e483418fb3e3583e82ea
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
@@ -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.
|
|
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-
|
|
11
|
+
date: 2014-06-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|