pageflow-external-links 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +1 -0
- data/CHANGELOG.md +8 -8
- data/Gemfile.ci +2 -0
- data/README.md +1 -0
- data/app/assets/javascripts/pageflow/external_links/page_type.js +4 -7
- data/app/views/pageflow/external_links/page.html.erb +6 -15
- data/bin/rspec +29 -0
- data/lib/pageflow/external_links/version.rb +1 -1
- data/pageflow-external-links.gemspec +4 -2
- data/spec/integration/page_type_spec.rb +4 -0
- data/spec/spec_helper.rb +14 -0
- metadata +46 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 346615b36f62575e6dbf43cf2237c045115587a4c5ce9a7de865e4687c21de06
|
4
|
+
data.tar.gz: 53c3e0204212221068c292f7443bdc53d1a6e91543aa6716c0a751f7c64de35f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2f7bbb58e4e469a3aca88fa8639752a71a06003fb9580c12313829cb89a5a8fe6a2cb95b5d95feb06662ea28381c8ebf7fa25e5df85e215d928a9cf40e4a0cf
|
7
|
+
data.tar.gz: 752cb59f5cea9a2b9c938db024c24bc0b81f29fcd32a15871ce569b5db9dc6798e6ed15983f366bcb47ad8a8ab666ad056abbd8f7a948712e55b78ef4d457f74
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
-
### Version 2.
|
3
|
+
### Version 2.1.0
|
4
4
|
|
5
|
-
|
5
|
+
2019-04-04
|
6
6
|
|
7
|
-
[Compare changes](https://github.com/codevise/pageflow-external-links/compare/
|
7
|
+
[Compare changes](https://github.com/codevise/pageflow-external-links/compare/2-0-stable...v2.1.0)
|
8
8
|
|
9
|
-
-
|
10
|
-
([#
|
11
|
-
-
|
12
|
-
([#
|
9
|
+
- Adapt page dom for Pageflow 14
|
10
|
+
([#40](https://github.com/codevise/pageflow-external-links/pull/40))
|
11
|
+
- Setup page type lint specs
|
12
|
+
([#39](https://github.com/codevise/pageflow-external-links/pull/39))
|
13
13
|
|
14
14
|
See
|
15
|
-
[
|
15
|
+
[2-0-stable branch](https://github.com/codevise/pageflow-external-links/blob/2-0-stable/CHANGELOG.md)
|
16
16
|
for previous changes.
|
data/Gemfile.ci
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# Pageflow External Links
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/pageflow-external-links.svg)](http://badge.fury.io/rb/pageflow-external-links)
|
4
|
+
[![Build Status](https://travis-ci.org/codevise/pageflow-external-links.svg?branch=master)](https://travis-ci.org/codevise/pageflow-external-links)
|
4
5
|
|
5
6
|
Page type to display links to external pages.
|
6
7
|
|
@@ -1,13 +1,13 @@
|
|
1
1
|
/*global IScroll*/
|
2
2
|
|
3
|
-
pageflow.react.registerPageTypeWithDefaultBackground('external_links', {
|
3
|
+
pageflow.react.registerPageTypeWithDefaultBackground('external_links', _.extend({
|
4
4
|
prepareNextPageTimeout: 0,
|
5
5
|
|
6
6
|
enhance: function(pageElement, configuration) {
|
7
7
|
var scrollerElement = pageElement.find('.ext-links'),
|
8
8
|
that = this,
|
9
9
|
innerScroller = pageElement.find('#horizontal_scroller'),
|
10
|
-
contentWrapper = pageElement.find('.
|
10
|
+
contentWrapper = pageElement.find('.content_wrapper');
|
11
11
|
|
12
12
|
this.linkScroller = new IScroll(scrollerElement[0], {
|
13
13
|
mouseWheel: true,
|
@@ -123,10 +123,7 @@ pageflow.react.registerPageTypeWithDefaultBackground('external_links', {
|
|
123
123
|
},
|
124
124
|
|
125
125
|
update: function(pageElement, configuration) {
|
126
|
-
|
127
|
-
pageElement.find('h2 .title').text(configuration.get('title') || '');
|
128
|
-
pageElement.find('h2 .subtitle').text(configuration.get('subtitle') || '');
|
129
|
-
pageElement.find('.contentText p').html(configuration.get('text') || '');
|
126
|
+
this.updateDefaultPageContent(pageElement, configuration);
|
130
127
|
|
131
128
|
pageElement.find('.shadow').css({
|
132
129
|
opacity: configuration.get('gradient_opacity') / 100
|
@@ -144,4 +141,4 @@ pageflow.react.registerPageTypeWithDefaultBackground('external_links', {
|
|
144
141
|
}
|
145
142
|
};
|
146
143
|
}
|
147
|
-
});
|
144
|
+
}, pageflow.defaultPageContent));
|
@@ -1,25 +1,16 @@
|
|
1
|
-
<div class="
|
1
|
+
<div class="black_layer"></div>
|
2
2
|
<div class="content_and_background external-links-page">
|
3
|
-
<div class="
|
4
|
-
<%= page_background_asset(
|
3
|
+
<div class="page_background">
|
4
|
+
<%= page_background_asset(page) %>
|
5
5
|
<%= shadow_div :opacity => configuration['gradient_opacity'] %>
|
6
6
|
</div>
|
7
7
|
|
8
8
|
<div class="content">
|
9
9
|
<div class="scroller">
|
10
10
|
<div>
|
11
|
-
<div class="
|
12
|
-
|
13
|
-
|
14
|
-
<span class="tagline"><%= configuration['tagline'] %></span>
|
15
|
-
<span class="title"><%= configuration['title'] %></span>
|
16
|
-
<span class="subtitle"><%= configuration['subtitle'] %></span>
|
17
|
-
</h2>
|
18
|
-
<%= background_image_tag(configuration['background_image_id'], {"class" => "print_image"}) %>
|
19
|
-
</div>
|
20
|
-
<div class="contentText">
|
21
|
-
<p><%= raw configuration['text'] %></p>
|
22
|
-
</div>
|
11
|
+
<div class="content_wrapper">
|
12
|
+
<%= page_default_content(page) %>
|
13
|
+
|
23
14
|
<div class="ext-links" id="ext-links">
|
24
15
|
<div id="horizontal_scroller">
|
25
16
|
<%= render Pageflow::ExternalLinks::Site.from_perma_ids(@entry.try(:revision), configuration['linked_external_site_perma_ids']) %>
|
data/bin/rspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rspec' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("rspec-core", "rspec")
|
@@ -18,11 +18,13 @@ Gem::Specification.new do |spec|
|
|
18
18
|
|
19
19
|
spec.required_ruby_version = '~> 2.1'
|
20
20
|
|
21
|
-
spec.add_runtime_dependency 'pageflow', '~>
|
21
|
+
spec.add_runtime_dependency 'pageflow', '~> 14.x'
|
22
22
|
spec.add_runtime_dependency 'pageflow-public-i18n', '~> 1.0'
|
23
23
|
|
24
|
-
spec.add_development_dependency 'bundler', '
|
24
|
+
spec.add_development_dependency 'bundler', ['>= 1.0', '< 3']
|
25
|
+
spec.add_development_dependency 'pageflow-support', '~> 14.x'
|
25
26
|
spec.add_development_dependency 'rake', '~> 12.0'
|
27
|
+
spec.add_development_dependency 'rspec-rails', '~> 3.0'
|
26
28
|
|
27
29
|
# Semantic versioning rake tasks
|
28
30
|
spec.add_development_dependency 'semmy', '~> 1.0'
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
ENV['RAILS_ENV'] ||= 'test'
|
2
|
+
ENV['PAGEFLOW_PLUGIN_ENGINE'] = 'pageflow_external_links'
|
3
|
+
|
4
|
+
require 'pageflow/support'
|
5
|
+
Pageflow::Dummy.setup
|
6
|
+
|
7
|
+
require 'rspec/rails'
|
8
|
+
|
9
|
+
engine_root = File.join(File.dirname(__FILE__), '..')
|
10
|
+
Dir[File.join(engine_root, 'spec/support/**/*.rb')].each { |file| require(file) }
|
11
|
+
|
12
|
+
RSpec.configure do |config|
|
13
|
+
config.use_transactional_fixtures = true
|
14
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pageflow-external-links
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Codevise Solutions Ltd
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pageflow
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 14.x
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 14.x
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pageflow-public-i18n
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -42,16 +42,36 @@ dependencies:
|
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.0'
|
48
|
+
- - "<"
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '3'
|
48
51
|
type: :development
|
49
52
|
prerelease: false
|
50
53
|
version_requirements: !ruby/object:Gem::Requirement
|
51
54
|
requirements:
|
52
|
-
- - "
|
55
|
+
- - ">="
|
53
56
|
- !ruby/object:Gem::Version
|
54
57
|
version: '1.0'
|
58
|
+
- - "<"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '3'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: pageflow-support
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: 14.x
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 14.x
|
55
75
|
- !ruby/object:Gem::Dependency
|
56
76
|
name: rake
|
57
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,6 +86,20 @@ dependencies:
|
|
66
86
|
- - "~>"
|
67
87
|
- !ruby/object:Gem::Version
|
68
88
|
version: '12.0'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: rspec-rails
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '3.0'
|
96
|
+
type: :development
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '3.0'
|
69
103
|
- !ruby/object:Gem::Dependency
|
70
104
|
name: semmy
|
71
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -146,6 +180,7 @@ files:
|
|
146
180
|
- app/models/pageflow/external_links/site.rb
|
147
181
|
- app/views/pageflow/external_links/page.html.erb
|
148
182
|
- app/views/pageflow/external_links/sites/_site.html.erb
|
183
|
+
- bin/rspec
|
149
184
|
- config/locales/de.yml
|
150
185
|
- config/locales/en.yml
|
151
186
|
- config/routes.rb
|
@@ -158,6 +193,8 @@ files:
|
|
158
193
|
- lib/pageflow/external_links/plugin.rb
|
159
194
|
- lib/pageflow/external_links/version.rb
|
160
195
|
- pageflow-external-links.gemspec
|
196
|
+
- spec/integration/page_type_spec.rb
|
197
|
+
- spec/spec_helper.rb
|
161
198
|
homepage: https://github.com/codevise/pageflow-external-links
|
162
199
|
licenses:
|
163
200
|
- MIT
|
@@ -182,4 +219,6 @@ rubygems_version: 2.7.5
|
|
182
219
|
signing_key:
|
183
220
|
specification_version: 4
|
184
221
|
summary: Pageflow Page Type for links to external sites
|
185
|
-
test_files:
|
222
|
+
test_files:
|
223
|
+
- spec/integration/page_type_spec.rb
|
224
|
+
- spec/spec_helper.rb
|