-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3792 from 3scale/managed-services-essential-asset…
…s-fix Managed services essential assets fix
- Loading branch information
Showing
7 changed files
with
1,175 additions
and
8 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
@allow-rescue | ||
Feature: Dev portal backwards compatibility | ||
|
||
As a long time 3scale user, I don't want any new updates in 3scale to break my developer portal. | ||
|
||
Background: | ||
Given a provider | ||
And the current domain is "foo.3scale.localhost" | ||
|
||
Scenario: Essential assets | ||
Given the provider has main layout with: | ||
""" | ||
<html> | ||
<head> | ||
{% essential_assets %} | ||
</head> | ||
<body> | ||
Good news everyone! | ||
</body> | ||
</html> | ||
""" | ||
And the cms page "/" has main layout | ||
When they go to the homepage | ||
Then they should see "Good news everyone!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
lib/developer_portal/app/views/shared/_essential_assets.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<%= csrf_meta_tag %> | ||
|
||
<%= javascript_include_tag "vendor/jquery-#{defined?(jquery) ? jquery : '2.1.4'}.min.js" %> | ||
|
||
<%= javascript_include_tag 'vendor/jquery-migrate-1.2.1.min.js' %> | ||
|
||
<%= javascript_include_tag 'vendor/colorbox/jquery.colorbox-min.js' %> | ||
<%= stylesheet_link_tag 'colorbox/colorbox.css' %> | ||
|
||
<%= javascript_include_tag 'highlight/highlight.pack.js' %> | ||
<%= javascript_include_tag 'flash', 'remote', 'switch', 'extra_fields' %> | ||
<%= javascript_include_tag 'application' %> | ||
|
||
<%= yield :javascripts %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
# frozen_string_literal: true | ||
|
||
module Liquid | ||
module Tags | ||
class EssentialAssets < Liquid::Tags::Base | ||
deprecated 'This is outdated and should not be use anymore.' | ||
include Liquid::Tags::ContentFor::ContentFor | ||
nodoc! | ||
|
||
# this makes versioning harder, delete it | ||
|
||
# This exists for backwards compatibility. Some very old dev portals may still be using tag | ||
# {% essential_assets %} and thus loading old libraries and overriding our updates. | ||
def render(context); end | ||
def render(context) | ||
[ | ||
stylesheets.render(context), | ||
render_erb(context, "shared/essential_assets"), | ||
javascripts.render(context) | ||
].join.html_safe | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.