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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2ec1da87ff4117c96c6fa68d3b269212cafe78d582e488a42048005d93c2ad54
4
- data.tar.gz: 980158d0537f81fa66dbbe55e3ea6272ea7c92b7f5e9e54bbcdb30ffd42be13f
3
+ metadata.gz: 346615b36f62575e6dbf43cf2237c045115587a4c5ce9a7de865e4687c21de06
4
+ data.tar.gz: 53c3e0204212221068c292f7443bdc53d1a6e91543aa6716c0a751f7c64de35f
5
5
  SHA512:
6
- metadata.gz: d7319c479fdd7308b460efefc355935c8dcb4fcc33c6c3a8bb203659eb4e7bcfa28148bda2335cdba4d4429493a4f1444ab546d817034ca76b69dfdba689abd9
7
- data.tar.gz: f506de9aecfaf3ee09064b1ad326399aa31cec73bbb5b6398c572e17148366f270e112cf6c07f8e42b76028dca0369552ba07139a02d53678bc15728e0ab68da
6
+ metadata.gz: d2f7bbb58e4e469a3aca88fa8639752a71a06003fb9580c12313829cb89a5a8fe6a2cb95b5d95feb06662ea28381c8ebf7fa25e5df85e215d928a9cf40e4a0cf
7
+ data.tar.gz: 752cb59f5cea9a2b9c938db024c24bc0b81f29fcd32a15871ce569b5db9dc6798e6ed15983f366bcb47ad8a8ab666ad056abbd8f7a948712e55b78ef4d457f74
data/.gitignore CHANGED
@@ -13,6 +13,7 @@ lib/bundler/man
13
13
  pkg
14
14
  rdoc
15
15
  spec/reports
16
+ spec/dummy
16
17
  test/tmp
17
18
  test/version_tmp
18
19
  tmp
data/.travis.yml CHANGED
@@ -13,4 +13,5 @@ before_install:
13
13
  - nvm install stable
14
14
 
15
15
  script:
16
+ - bin/rspec
16
17
  - bundle exec publish-pageflow-theme-doc
data/CHANGELOG.md CHANGED
@@ -1,16 +1,16 @@
1
1
  # CHANGELOG
2
2
 
3
- ### Version 2.0.0
3
+ ### Version 2.1.0
4
4
 
5
- 2018-07-31
5
+ 2019-04-04
6
6
 
7
- [Compare changes](https://github.com/codevise/pageflow-external-links/compare/1-x-stable...v2.0.0)
7
+ [Compare changes](https://github.com/codevise/pageflow-external-links/compare/2-0-stable...v2.1.0)
8
8
 
9
- - Upgrade to Rails 5/Pageflow 13
10
- ([#37](https://github.com/codevise/pageflow-external-links/pull/37))
11
- - Fix template file extension
12
- ([#38](https://github.com/codevise/pageflow-external-links/pull/38))
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
- [1-x-stable branch](https://github.com/codevise/pageflow-external-links/blob/1-x-stable/CHANGELOG.md)
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
@@ -1,3 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ gemspec
4
+
3
5
  gem 'pageflow-theme-doc-publisher', git: 'https://github.com/tf/pageflow-theme-doc-publisher'
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('.contentWrapper');
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
- pageElement.find('h2 .tagline').text(configuration.get('tagline') || '');
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="blackLayer"></div>
1
+ <div class="black_layer"></div>
2
2
  <div class="content_and_background external-links-page">
3
- <div class="backgroundArea">
4
- <%= page_background_asset(configuration) %>
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="contentWrapper">
12
- <div class="page_header">
13
- <h2>
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")
@@ -1,5 +1,5 @@
1
1
  module Pageflow
2
2
  module ExternalLinks
3
- VERSION = '2.0.0'.freeze
3
+ VERSION = '2.1.0'.freeze
4
4
  end
5
5
  end
@@ -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', '~> 13.x'
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', '~> 1.0'
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'
@@ -0,0 +1,4 @@
1
+ require 'spec_helper'
2
+ require 'pageflow/lint'
3
+
4
+ Pageflow::Lint.page_type(Pageflow::ExternalLinks.page_type)
@@ -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.0.0
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: 2018-12-10 00:00:00.000000000 Z
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: 13.x
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: 13.x
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