cortex-snippets-client 0.7.0 → 0.8.0

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: 298a5f8b88cdd5795df1e692afcc3bfe3d9bc963
4
- data.tar.gz: fff0646d82724789657034c948a374edbda78f00
3
+ metadata.gz: d701713c6087c44972b7205b69d4b3abcc879cc2
4
+ data.tar.gz: bef33a68024253b7f53cdfb2234f83187b6a96ad
5
5
  SHA512:
6
- metadata.gz: 9325dd3b45975adf9856069d1211e68681eb6b32f75c3981ad60f74500e93900034569163d2ec642503910e3139b23aaf9b461db45e8aa682b6940667e1e446a
7
- data.tar.gz: d83148dee459c71e4fc1154638045451b5918e30ef125637cb7338169a2466f45e8084f377ef750031a986cba74b5ffdc628d064ced57ddaadedbaeb99886cad
6
+ metadata.gz: ce7b2ac62a686d2cfe923150fe6504520460dd9c75a5dae4a76c54ba3cc860cf5ac01681e300acb4ccb1069668b58a77888fb30097dd05c23ab921992e9911fc
7
+ data.tar.gz: 34409b9ea8153b6887c878c3e298614e848884d0d2bd03e5aa2414e8bbb3cb1f28ed31c278475374b7d776c1d0a16a8bb6c19c1a2681801590b3763a0b08e5c8
data/.travis.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.3.0
3
+ - 2.3.3
4
4
  notifications:
5
5
  recipients:
6
6
  - ContentEnablementProductTeam@careerbuilder.com
data/CHANGELOG.md CHANGED
@@ -3,6 +3,8 @@ Version History
3
3
  * All Version bumps are required to update this file as well!!
4
4
  ----
5
5
 
6
+ * 0.8.0 - Add Dynamic Yield Metadata
7
+ * 0.7.0 - Add SEO Robot Metadata
6
8
  * 0.6.0 - Set SEO Keyword feed to be an array rather than comma separated String
7
9
  * 0.5.3 - Extract a framework-agnostic sanitized_webpage_url method
8
10
  * 0.5.2 - Addendum to previous version: fix expiry issues
data/README.md CHANGED
@@ -1 +1,61 @@
1
1
  # cortex-snippets-client-ruby
2
+
3
+ [![Build Status](https://travis-ci.org/cortex-cms/cortex-snippets-client-ruby.svg?branch=master)](https://travis-ci.org/cortex-cms/cortex-snippets-client-ruby)
4
+ [![Dependency Status](https://gemnasium.com/cortex-cms/cortex-snippets-client-ruby.svg)](https://gemnasium.com/cortex-cms/cortex-snippets-client-ruby)
5
+
6
+ Ruby client library that provides helpers to assist with loading and displaying Cortex Snippets.
7
+
8
+ ## Installation
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ gem 'cortex-snippets-client'
13
+
14
+ And then execute:
15
+
16
+ $ bundle
17
+
18
+ Or install it yourself as:
19
+
20
+ $ gem install cortex-snippets-client
21
+
22
+ ## Configuration
23
+
24
+ Several environmental variables must be set before using the library:
25
+
26
+ * `CORTEX_SNIPPET_KEY`
27
+ * `CORTEX_SNIPPET_SECRET`
28
+ * `CORTEX_SNIPPET_BASE_URL`: provide the Cortex API base URL
29
+ * `CORTEX_SNIPPET_ACCESS_TOKEN`: only use this if you have been granted a bearer token (but [don't](https://hueniverse.com/2010/09/29/oauth-bearer-tokens-are-a-terrible-idea/))
30
+ * `CORTEX_SNIPPET_SCOPES`: provide the necessary scopes to obtain Webpage/Snippet data (usually just `view:webpages`)
31
+
32
+ ```ruby
33
+ use OmniAuth::Builder do
34
+ provider :cortex, ENV['CORTEX_KEY'], ENV['CORTEX_SECRET'], scope: 'scope1, scope2, scope3'
35
+ end
36
+ ```
37
+
38
+ ## Rails Helpers
39
+
40
+ ```haml
41
+ = snippet :id => "subhero-button1__text" do
42
+ ```
43
+
44
+ ## Sinatra Helpers
45
+
46
+ ## Override Environment
47
+
48
+ If you would like to change the URLs used by cortex-snippets-client-ruby, override :client_options in the provider config step.
49
+
50
+ ```ruby
51
+ provider :cortex, ENV['CORTEX_KEY'], ENV['CORTEX_SECRET'], scope: 'scope1, scope2, scope3',
52
+ {
53
+ :client_options => {
54
+ :site => 'http://localhost:3000/api/v1',
55
+ :authorize_url => 'http://localhost:3000/oauth/authorize',
56
+ :token_url => 'http://localhost:3000/oauth/token'
57
+ }
58
+ }
59
+ ```
60
+
61
+ ## Caching
@@ -60,6 +60,13 @@ module Cortex
60
60
  webpage[:noimageindex]
61
61
  end
62
62
 
63
+ def dynamic_yield
64
+ {
65
+ sku: webpage[:dynamic_yield_sku],
66
+ category: webpage[:dynamic_yield_category]
67
+ }
68
+ end
69
+
63
70
  private
64
71
 
65
72
  def webpage
@@ -1,7 +1,7 @@
1
1
  module Cortex
2
2
  module Snippets
3
3
  module Client
4
- VERSION = '0.7.0'
4
+ VERSION = '0.8.0'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cortex-snippets-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - CB Content Enablement
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-18 00:00:00.000000000 Z
11
+ date: 2016-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cortex-client
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  version: '0'
138
138
  requirements: []
139
139
  rubyforge_project:
140
- rubygems_version: 2.5.1
140
+ rubygems_version: 2.5.2
141
141
  signing_key:
142
142
  specification_version: 4
143
143
  summary: Provides loading of Cortex snippets for Ruby applications, with some Rails