Skip to content

Commit ec56ee1

Browse files
committed
Addendum to previous version: fix expiry issues
1 parent 00103bd commit ec56ee1

File tree

6 files changed

+6
-5
lines changed

6 files changed

+6
-5
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ Version History
33
* All Version bumps are required to update this file as well!!
44
----
55

6+
* 0.5.2 - Addendum to previous version: fix expiry issues
67
* 0.5.1 - Set Webpage feed cache to never expire
78
* 0.5.0 - Auto-inject Client Helper into Views/Controllers. Add 10s race condition resolution to Rails cache fetch. Pass through to Snippet tag entire set of HTML attributes. Implement new namespacing and support Bundler.require.

cortex-snippets-client-ruby.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
44
require 'cortex/snippets/client/version'
55

66
Gem::Specification.new do |spec|
7-
spec.name = 'cortex-snippets-client-ruby'
7+
spec.name = 'cortex-snippets-client'
88
spec.version = Cortex::Snippets::Client::VERSION
99
spec.authors = ['CB Content Enablement']
1010
spec.email = ['ContentEnablementProductTeam@careerbuilder.com']
File renamed without changes.

lib/cortex/snippets/client.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def cortex_client
1818

1919
def current_webpage(request)
2020
if defined?(Rails)
21-
Rails.cache.fetch("webpages/#{request_url(request)}", expires_in: 0, race_condition_ttl: 10) do
21+
Rails.cache.fetch("webpages/#{request_url(request)}", race_condition_ttl: 10) do
2222
cortex_client.webpages.get_feed(request_url(request)).contents
2323
end
2424
else
@@ -29,7 +29,7 @@ def current_webpage(request)
2929
def request_url(request)
3030
# TODO: Should be grabbing request URL in a framework-agnostic manner, but this is fine for now
3131
uri = Addressable::URI.parse(request.original_url)
32-
path = uri.path == "/" ? uri.path : uri.path.chomp("/")
32+
path = uri.path == '/' ? uri.path : uri.path.chomp('/')
3333
"#{uri.scheme}://#{uri.authority}#{path}"
3434
end
3535
end

lib/cortex/snippets/client/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Cortex
22
module Snippets
33
module Client
4-
VERSION = '0.5.1'
4+
VERSION = '0.5.2'
55
end
66
end
77
end

spec/spec_helper.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2-
require 'cortex-snippets-client-ruby'
2+
require 'cortex-snippets-client'

0 commit comments

Comments
 (0)