google-content-api 0.1.3 → 0.1.4

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: 51a3d8a021a793def5f0192465327b813ca77ced
4
- data.tar.gz: 7b9393a2dd126af28e549951611d29089a252a42
3
+ metadata.gz: da6672a85eabfb10a9c1b87f32e161c20eecfec7
4
+ data.tar.gz: 802f067cc36e78b12d508fe0f0ab82f859aad356
5
5
  SHA512:
6
- metadata.gz: e96100f4aba6b6fb907b1626ed1cd7008c27934515064bfd0b8ccaa4e3507819bc4b47e87c4b10689a72b1da91bf8f0aeaa6f761375a4aa5bd1b515c1a872c1f
7
- data.tar.gz: ee571bb03b1766c6d94baba02fb107e79467ffce1250b174d45aca7896818620372d1952179c8cd0262c5a10d346620e5dda89307e56374a5f35f6339eae0511
6
+ metadata.gz: e1a7f059b988ec749a4b9ada5d0fdd4747cdc7e75dd131ea7db74670cc5a0e41c3b7573f88035b7925b19228286bdfc5d7032ce6157fccd50ebcbba26a483f7e
7
+ data.tar.gz: ef996e0ffac927fca56be8d2a6c193dd50d162ab4cd0dd9faf404d600ea1d0cf0001b447ca5a451d3f98b57a3afe5fef9a8a33167e4731371471c6d1d953ad17
@@ -3,7 +3,7 @@ content_api_scope: "https://www.googleapis.com/auth/structuredcontent"
3
3
  client_secret: "..."
4
4
  refresh_token: "<refresh token for continuous interactions>"
5
5
  redirect_uri: "https://example.com/oauth2callback"
6
- user_id: "<your user id>"
6
+ user_id: "000"
7
7
  application_name: "<your app name>" # Not required
8
8
  application_version: "0.0.0" # Not required
9
9
  feed_urls:
@@ -106,8 +106,11 @@ module GoogleContentApi
106
106
  xml['sc'].id_ attributes[:id]
107
107
  xml.title_ attributes[:title]
108
108
  xml.content_ attributes[:description], :type => 'text'
109
- link_rel = opts[:type] == 'UPDATE' ? 'edit' : 'alternate'
110
- xml.link_(:rel => link_rel, :type => 'text/html', :href => attributes[:link])
109
+ if opts[:type] == 'UPDATE'
110
+ xml.link_(:rel => 'edit', :type => 'application/atom+xml', :href => attributes[:link])
111
+ else
112
+ xml.link_(:rel => 'alternate', :type => 'text/html', :href => attributes[:link])
113
+ end
111
114
  xml['sc'].image_link_ attributes[:image]
112
115
  xml['sc'].content_language_ attributes[:content_language]
113
116
  xml['sc'].target_country_ attributes[:target_country]
@@ -1,3 +1,3 @@
1
1
  module GoogleContentApi
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -82,7 +82,9 @@ describe GoogleContentApi::Product do
82
82
  it "creates an xml with all given product attributes" do
83
83
  result_xml = subject.send(:update_product_items_batch_xml, [product_attributes])
84
84
  result_xml.should match 'batch:operation type="UPDATE"'
85
- product_attributes.each{ |attribute, value| result_xml.should match /#{value}/ }
85
+ result_xml.should match 'link.*rel="edit"'
86
+ result_xml.should match 'link.*application/atom\+xml'
87
+ product_attributes.each{ |attribute,value| result_xml.should match /#{value}/ }
86
88
  end
87
89
  end
88
90
 
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.3
4
+ version: 0.1.4
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-11 00:00:00.000000000 Z
11
+ date: 2014-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -107,7 +107,7 @@ files:
107
107
  - LICENSE.txt
108
108
  - README.md
109
109
  - Rakefile
110
- - config/google_content_api.example
110
+ - config/google_content_api.yml.example
111
111
  - google-content-api.gemspec
112
112
  - lib/google_content_api.rb
113
113
  - lib/google_content_api/authorization.rb