pageflow-external-links 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile +3 -0
- data/Gemfile.ci +3 -0
- data/app/views/pageflow/external_links/sites/_site.html.erb +1 -1
- data/lib/generators/pageflow_external_links/install/install_generator.rb +26 -1
- data/lib/pageflow/external_links/version.rb +1 -1
- data/spec/integration/page_type_spec.rb +46 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d667192454267997136db2359354bf6736861c4b663b4b042f3902db5be31bd0
|
4
|
+
data.tar.gz: 053ceeea26282f5fe1e7777e6439f24f57a92ce094ae778e6221586eedab8790
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14bdc1df07ec6053138e40302c8b295a8716f3af48db2b82eec89c2767e2e1d8cef8ea2d8d8a002616c17784789c117a5a5379120e86a90b68bf5dd8de9a7329
|
7
|
+
data.tar.gz: 5aa73cf35b0ed78de23ae36d23eb877c829291b9194c4a8014f06d5350651a4641c7727bbbbbe53ca3930a3eeb6e15a849c29f5f136dddbf8abb072459078e41
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
### Version 2.2.1
|
4
|
+
|
5
|
+
2020-02-11
|
6
|
+
|
7
|
+
[Compare changes](https://github.com/codevise/pageflow-external-links/compare/v2.2.0...v2.2.1)
|
8
|
+
|
9
|
+
- Prevent error with missing site urls in Pageflow 15.1
|
10
|
+
([#45](https://github.com/codevise/pageflow-external-links/pull/45))
|
11
|
+
|
3
12
|
### Version 2.2.0
|
4
13
|
|
5
14
|
2019-11-04
|
data/Gemfile
CHANGED
data/Gemfile.ci
CHANGED
@@ -1,5 +1,30 @@
|
|
1
1
|
module PageflowExternalLinks
|
2
|
-
class InstallGenerator <
|
2
|
+
class InstallGenerator < Rails::Generators::Base
|
3
|
+
desc 'Install the Pageflow plugin and the necessary migrations.'
|
4
|
+
|
5
|
+
def register_plugin
|
6
|
+
inject_into_file('config/initializers/pageflow.rb',
|
7
|
+
after: "Pageflow.configure do |config|\n") do
|
8
|
+
|
9
|
+
" config.plugin(Pageflow::#{engine_name_suffix.camelize}.plugin)\n"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def mount_engine
|
14
|
+
route("mount #{engine.name}, at: '/#{engine_name_suffix}'\n")
|
15
|
+
end
|
16
|
+
|
17
|
+
def install_migrations
|
18
|
+
rake "pageflow_#{engine_name_suffix}:install:migrations"
|
19
|
+
rake 'pageflow_external_links:install:migrations'
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def engine_name_suffix
|
25
|
+
engine.engine_name.gsub(/^pageflow_/, '')
|
26
|
+
end
|
27
|
+
|
3
28
|
def engine
|
4
29
|
Pageflow::ExternalLinks::Engine
|
5
30
|
end
|
@@ -2,3 +2,49 @@ require 'spec_helper'
|
|
2
2
|
require 'pageflow/lint'
|
3
3
|
|
4
4
|
Pageflow::Lint.page_type(Pageflow::ExternalLinks.page_type)
|
5
|
+
|
6
|
+
module Pageflow
|
7
|
+
module ExternalLinks
|
8
|
+
describe 'built in video page type', type: :helper do
|
9
|
+
include RenderPageTestHelper
|
10
|
+
|
11
|
+
it 'renders links to referenced sites' do
|
12
|
+
revision = FactoryBot.create(:revision, :published)
|
13
|
+
Site.create!(revision: revision,
|
14
|
+
perma_id: 10,
|
15
|
+
url: 'https://example.com',
|
16
|
+
title: 'Example')
|
17
|
+
|
18
|
+
page = FactoryBot.create(:page,
|
19
|
+
template: 'external_links',
|
20
|
+
revision: revision,
|
21
|
+
configuration: {
|
22
|
+
linked_external_site_perma_ids: [10]
|
23
|
+
})
|
24
|
+
|
25
|
+
html = render_page(page)
|
26
|
+
|
27
|
+
expect(html).to have_selector('.link-title', text: 'Example')
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'can handle sites with missing url' do
|
31
|
+
revision = FactoryBot.create(:revision, :published)
|
32
|
+
Site.create!(revision: revision,
|
33
|
+
perma_id: 10,
|
34
|
+
url: nil,
|
35
|
+
title: 'Example')
|
36
|
+
|
37
|
+
page = FactoryBot.create(:page,
|
38
|
+
template: 'external_links',
|
39
|
+
revision: revision,
|
40
|
+
configuration: {
|
41
|
+
linked_external_site_perma_ids: [10]
|
42
|
+
})
|
43
|
+
|
44
|
+
html = render_page(page)
|
45
|
+
|
46
|
+
expect(html).to have_selector('.link-title', text: 'Example')
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
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.2.
|
4
|
+
version: 2.2.1
|
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: 2020-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pageflow
|