radiant-ecom_engine-extension 0.2.0 → 0.3.0.pre.alpha.1

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: 8b5d6b3ccfe4e8428598d53e395671f44359c860
4
- data.tar.gz: 6967da35de9dd8f06c87ac2922262c52bb18ff67
3
+ metadata.gz: f6b44e0368dea7205db274f228dc6b7febd12d0c
4
+ data.tar.gz: 69d00c0dd61b70e87fee61fdd5f919f863eb1027
5
5
  SHA512:
6
- metadata.gz: b02af186730b9a8bceb76f48a3aa907128d151563d5c006f2ca65da0915c909102ae21829a0075ffcb0548b4e9676ec757871178c1536cb4316e3e21a9d52316
7
- data.tar.gz: 393fbe44cf84fe4a8a5c6fc80f7d53a754d91d51a3d69f18fb2b18461c57ca5f73c53484a648163a09429511ce35fb960d5270021ce11264ee5a4886d22f4a90
6
+ metadata.gz: 673c9b231b908ee4be9fe1fee4ecdd6d0f76cafc1c8038bdc5ad77fa90922db53ff4ebd49b16d0deda2ae89f8cd79dc8bdfc8e4bd6e13f80e7a6edc6caed56f2
7
+ data.tar.gz: 343d56598449f1c96a0a38b892ac1a372ba8abc7b5574b31e2db31fdf8a82936d0b8f5e874ccecbbb11806724125047a7f67877a31c0ac74638ebfd560bd610b
data/CHANGELOG.md CHANGED
@@ -4,7 +4,11 @@
4
4
  +This changelog adheres to [Keep a
5
5
  CHANGELOG](http://keepachangelog.com/).
6
6
 
7
- ## Unreleased
7
+ ## 0.3.0-alpha.1
8
+
9
+ ### Added
10
+ - [TT-1945] Add search routes
11
+ - [DO-29] Add a tag for invalidating Javascript cache
8
12
 
9
13
  ## 0.2.0
10
14
 
data/config/routes.rb CHANGED
@@ -1,8 +1,6 @@
1
1
  ActionController::Routing::Routes.draw do |map|
2
2
  # Page-mounted App
3
3
  map.with_options controller: 'page_mount', action: 'proxy' do |page_mount|
4
- page_mount.connect 'search/accommodations'
5
-
6
4
  # These are CMS pages:
7
5
  # /accommodation/hotel-motel (for each type)
8
6
  # /accommodation/kangaroo-island-accommodation/ (for landing page)
@@ -15,6 +13,7 @@ ActionController::Routing::Routes.draw do |map|
15
13
 
16
14
  page_mount.connect 'transport/*paths'
17
15
  page_mount.connect 'tours/*paths'
16
+ page_mount.connect 'search/*paths'
18
17
 
19
18
  page_mount.connect 'app_cells/*paths'
20
19
 
@@ -1,11 +1,15 @@
1
1
  # Uncomment this if you reference any of your controllers in activate
2
2
  # require_dependency 'application_controller'
3
+
4
+ require 'tags/script_tags'
5
+
3
6
  class EcomEngineExtension < Radiant::Extension
4
7
  version "1.0"
5
8
  description "This extension is communicating with Ecom Engine"
6
9
  url 'https://github.com/sealink/radiant-ecom_engine-extension'
7
10
 
8
11
  def activate
12
+ Page.send :include, ScriptTags
9
13
  end
10
14
 
11
15
  def deactivate
@@ -0,0 +1,12 @@
1
+ module ScriptTags
2
+ include Radiant::Taggable
3
+
4
+ desc 'Econ-Engine javascript tag with the key for cache invalidation'
5
+ tag 'ee_script_tag' do |tag|
6
+ version_uri = "#{PageMountCalculator.new(@request).ecom_engine_url}/version.txt"
7
+ response = Net::HTTP.get_response(URI.parse(version_uri))
8
+ query = ''
9
+ query = "?#{CGI::escape(response.body.strip)}" if response.is_a? Net::HTTPSuccess
10
+ raw %{<script src="/ecom-engine-js/#{tag.attr['src']}#{query}"></script>}
11
+ end
12
+ end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "radiant-ecom_engine-extension"
3
- spec.version = '0.2.0'
3
+ spec.version = '0.3.0-alpha.1'
4
4
  spec.authors = ["Michael Noack"]
5
5
  spec.email = ["support@travellink.com.au"]
6
6
  spec.description = %q{Integrate ecom engine with radiant}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-ecom_engine-extension
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0.pre.alpha.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Noack
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-06 00:00:00.000000000 Z
11
+ date: 2017-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: radius
@@ -80,6 +80,7 @@ files:
80
80
  - config/routes.rb
81
81
  - ecom_engine_extension.rb
82
82
  - lib/request_proxy.rb
83
+ - lib/tags/script_tags.rb
83
84
  - radiant-ecom_engine-extension.gemspec
84
85
  homepage: http://github.com/sealink/radiant-ecom_engine-extension
85
86
  licenses:
@@ -96,12 +97,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
97
  version: '0'
97
98
  required_rubygems_version: !ruby/object:Gem::Requirement
98
99
  requirements:
99
- - - ">="
100
+ - - ">"
100
101
  - !ruby/object:Gem::Version
101
- version: '0'
102
+ version: 1.3.1
102
103
  requirements: []
103
104
  rubyforge_project:
104
- rubygems_version: 2.4.8
105
+ rubygems_version: 2.6.11
105
106
  signing_key:
106
107
  specification_version: 4
107
108
  summary: Integrate ecom engine with radiant