cortex-snippets-client 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/CHANGELOG.md +2 -0
- data/README.md +60 -0
- data/lib/cortex/snippets/client/helper.rb +7 -0
- data/lib/cortex/snippets/client/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d701713c6087c44972b7205b69d4b3abcc879cc2
|
4
|
+
data.tar.gz: bef33a68024253b7f53cdfb2234f83187b6a96ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce7b2ac62a686d2cfe923150fe6504520460dd9c75a5dae4a76c54ba3cc860cf5ac01681e300acb4ccb1069668b58a77888fb30097dd05c23ab921992e9911fc
|
7
|
+
data.tar.gz: 34409b9ea8153b6887c878c3e298614e848884d0d2bd03e5aa2414e8bbb3cb1f28ed31c278475374b7d776c1d0a16a8bb6c19c1a2681801590b3763a0b08e5c8
|
data/.travis.yml
CHANGED
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
|
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.
|
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-
|
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.
|
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
|