pageflow-internal-links 1.1.0 → 1.2.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: a1a870a698d82d71535eb8cee49ff231ef453ca7a5716bef67094ccbebce1a6f
4
- data.tar.gz: 3f32cb717c99c2916cf9e1e184e3c18bedb389635f046075cea6449cb7b44a48
3
+ metadata.gz: 8a24a0e3ee46c6a17e1c5558a32ea08a334c117dde8003f21753c9c08b534ddd
4
+ data.tar.gz: 8638cddf9198cafa697dfb9ba4348d461506d13a553519b95f78acc43bf4cd58
5
5
  SHA512:
6
- metadata.gz: 49fd5f384611cbd3ed2a296d299a57d318786536ce1550e7be289d2932ae8a27001f2e445b47a72206134898e68b9893fc3198904e77bd86a2b7ad89f44bcaa3
7
- data.tar.gz: 821b08d9bdb0ab5589445ffa511aad7ad97e4f4ab26c659396ea3c2a01ada15b45f42a85184962dca632a439abaa046d98d3e673e00bb410fec1b86a140b0c01
6
+ metadata.gz: cac06878b7958f08327d22374f8d40b6de5cab63cac49c911a1d59c28a53d5a63917fddc808e7a5970fdfd3f09debaf9ff47cc1d16f44c16ddf585a8156cc248
7
+ data.tar.gz: f9e33adc8e4aee1bdddd26c7d0850b9439121315de0c04337584e46474d1dc7ce81c8354625373ecb3a9ccc4947ea9b08ac86b52bed753784906d64bff622a3b
data/.gitignore CHANGED
@@ -12,6 +12,7 @@ doc/
12
12
  lib/bundler/man
13
13
  pkg
14
14
  rdoc
15
+ spec/dummy
15
16
  spec/reports
16
17
  test/tmp
17
18
  test/version_tmp
@@ -0,0 +1,40 @@
1
+ #https://github.com/brigade/scss-lint/blob/master/lib/scss_lint/linter/README.md
2
+
3
+ scss_files: 'app/assets/stylesheets/**/*.scss'
4
+
5
+ linters:
6
+ Indentation:
7
+ severity: warning
8
+ width: 2
9
+
10
+ NameFormat:
11
+ placeholder_convention: "^[-a-z_]+$"
12
+ mixin_convention: "^[-a-z_]+$"
13
+ SelectorFormat:
14
+ convention: "^[-a-z0-9_]+$"
15
+
16
+ StringQuotes:
17
+ style: double_quotes
18
+
19
+ DeclarationOrder:
20
+ enabled: false
21
+ PropertySortOrder:
22
+ enabled: false
23
+ NestingDepth:
24
+ max_depth: 4
25
+
26
+ IdSelector:
27
+ enabled: false
28
+ QualifyingElement:
29
+ enabled: true
30
+ allow_element_with_attribute: true
31
+ allow_element_with_class: true
32
+ allow_element_with_id: true
33
+
34
+ ColorKeyword:
35
+ enabled: false
36
+ LeadingZero:
37
+ style: include_zero
38
+
39
+ Shorthand:
40
+ enabled: false
@@ -0,0 +1,10 @@
1
+ language: ruby
2
+ rvm: 2.5
3
+
4
+ # User container based travis infrastructure which allows caching
5
+ # features for open source projects.
6
+ sudo: false
7
+ cache: bundler
8
+
9
+ script:
10
+ - bin/rspec
@@ -1,20 +1,16 @@
1
1
  # CHANGELOG
2
2
 
3
- ### Version 1.1.0
3
+ ### Version 1.2.0
4
4
 
5
- 2018-12-10
5
+ 2019-04-08
6
6
 
7
- [Compare changes](https://github.com/codevise/pageflow-internal-links/compare/1-0-stable...v1.1.0)
7
+ [Compare changes](https://github.com/codevise/pageflow-internal-links/compare/1-1-stable...v1.2.0)
8
8
 
9
- - Add support for pageflow 13
10
- ([#13](https://github.com/codevise/pageflow-internal-links/pull/13))
11
- - Add theme variables for color and typography of grid
12
- ([#15](https://github.com/codevise/pageflow-internal-links/pull/15))
13
- - Use page link inputs group
14
- ([#14](https://github.com/codevise/pageflow-internal-links/pull/14))
15
- - Remove duplicated page padding styles
16
- ([#12](https://github.com/codevise/pageflow-internal-links/pull/12))
9
+ - Adapt page dom for pageflow 14
10
+ ([#17](https://github.com/codevise/pageflow-internal-links/pull/17))
11
+ - Setup page type lint specs
12
+ ([#16](https://github.com/codevise/pageflow-internal-links/pull/16))
17
13
 
18
14
  See
19
- [1-0-stable branch](https://github.com/codevise/pageflow-internal-links/blob/1-0-stable/CHANGELOG.md)
15
+ [1-1-stable branch](https://github.com/codevise/pageflow-internal-links/blob/1-1-stable/CHANGELOG.md)
20
16
  for previous changes.
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Pageflow Internal Links
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/pageflow-internal-links.svg)](http://badge.fury.io/rb/pageflow-internal-links)
4
+ [![Build Status](https://travis-ci.org/codevise/pageflow-internal-links.svg?branch=master)](https://travis-ci.org/codevise/pageflow-internal-links)
4
5
 
5
6
  Page types for linking to pages inside a Pageflow.
6
7
 
@@ -1,4 +1,4 @@
1
- pageflow.react.registerPageTypeWithDefaultBackground('internal_links_grid', {
1
+ pageflow.react.registerPageTypeWithDefaultBackground('internal_links_grid', _.extend({
2
2
  prepareNextPageTimeout: 0,
3
3
 
4
4
  enhance: function(pageElement, configuration) {
@@ -11,10 +11,7 @@ pageflow.react.registerPageTypeWithDefaultBackground('internal_links_grid', {
11
11
  },
12
12
 
13
13
  update: function(pageElement, configuration) {
14
- pageElement.find('h2 .tagline').text(configuration.get('tagline') || '');
15
- pageElement.find('h2 .title').text(configuration.get('title') || '');
16
- pageElement.find('h2 .subtitle').text(configuration.get('subtitle') || '');
17
- pageElement.find('p').html(configuration.get('text') || '');
14
+ this.updateDefaultPageContent(pageElement, configuration);
18
15
 
19
16
  pageElement.find('.shadow').css({
20
17
  opacity: configuration.get('gradient_opacity') / 100
@@ -22,4 +19,4 @@ pageflow.react.registerPageTypeWithDefaultBackground('internal_links_grid', {
22
19
 
23
20
  pageElement.find('nav').attr('data-layout', configuration.get('linked_pages_layout'));
24
21
  }
25
- });
22
+ }, pageflow.defaultPageContent));
@@ -1,4 +1,4 @@
1
- pageflow.react.registerPageTypeWithDefaultBackground('internal_links_list', {
1
+ pageflow.react.registerPageTypeWithDefaultBackground('internal_links_list', _.extend({
2
2
  prepareNextPageTimeout: 0,
3
3
 
4
4
  enhance: function(pageElement, configuration) {
@@ -19,10 +19,7 @@ pageflow.react.registerPageTypeWithDefaultBackground('internal_links_list', {
19
19
  },
20
20
 
21
21
  update: function(pageElement, configuration) {
22
- pageElement.find('h2 .tagline').text(configuration.get('tagline') || '');
23
- pageElement.find('h2 .title').text(configuration.get('title') || '');
24
- pageElement.find('h2 .subtitle').text(configuration.get('subtitle') || '');
25
- pageElement.find('.contentText p').html(configuration.get('text') || '');
22
+ this.updateDefaultPageContent(pageElement, configuration);
26
23
 
27
24
  pageElement.find('.shadow').css({
28
25
  opacity: configuration.get('gradient_opacity') / 100
@@ -44,4 +41,4 @@ pageflow.react.registerPageTypeWithDefaultBackground('internal_links_list', {
44
41
  }
45
42
  });
46
43
  }
47
- });
44
+ }, pageflow.defaultPageContent));
@@ -2,7 +2,7 @@
2
2
  $internal-links-list-main-color: $main-color-dark !default;
3
3
  $internal-links-list-item-background-color: rgba(48, 48, 48, 0.8) !default;
4
4
 
5
- .contentText {
5
+ .page_text {
6
6
  margin-bottom: 250px;
7
7
 
8
8
  @include mobile {
@@ -1,24 +1,14 @@
1
- <div class="blackLayer"></div>
1
+ <div class="black_layer"></div>
2
2
  <div class="content_and_background internal_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
  <div class="content scroller">
8
8
  <div>
9
- <div class="contentWrapper">
10
- <div class="page_header">
11
- <h2>
12
- <span class="tagline"><%= configuration['tagline'] %></span>
13
- <span class="title"><%= configuration['title'] %></span>
14
- <span class="subtitle"><%= configuration['subtitle'] %></span>
15
- </h2>
16
- <%= background_image_tag(configuration['background_image_id'], {"class" => "print_image"}) %>
17
- </div>
18
- <div class="contentText">
19
- <p><%= raw configuration['text'] %></p>
20
- </div>
21
- <%= internal_links_grid(@entry, configuration) %>
9
+ <div class="content_wrapper">
10
+ <%= page_default_content(page) %>
11
+ <%= internal_links_grid(entry, configuration) %>
22
12
  </div>
23
13
  </div>
24
14
  </div>
@@ -1,25 +1,14 @@
1
- <div class="blackLayer"></div>
1
+ <div class="black_layer"></div>
2
2
  <div class="content_and_background internal_links_list_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
  <div class="content scroller">
8
8
  <div>
9
- <div class="contentWrapper">
10
- <div class="page_header">
11
- <h2>
12
- <span class="tagline"><%= configuration['tagline'] %></span>
13
- <span class="title"><%= configuration['title'] %></span>
14
- <span class="subtitle"><%= configuration['subtitle'] %></span>
15
- </h2>
16
- <%= background_image_tag(configuration['background_image_id'], {"class" => "print_image"}) %>
17
- </div>
18
- <div class="contentText">
19
- <p><%= raw configuration['text'] %></p>
20
- </div>
21
-
22
- <%= internal_links_list(@entry, configuration) %>
9
+ <div class="content_wrapper">
10
+ <%= page_default_content(page) %>
11
+ <%= internal_links_list(entry, configuration) %>
23
12
  </div>
24
13
  </div>
25
14
  </div>
@@ -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 InternalLinks
3
- VERSION = '1.1.0'.freeze
3
+ VERSION = '1.2.0'.freeze
4
4
  end
5
5
  end
@@ -18,10 +18,12 @@ Gem::Specification.new do |spec|
18
18
 
19
19
  spec.required_ruby_version = '~> 2.1'
20
20
 
21
- spec.add_runtime_dependency('pageflow', ['>= 12.0', '< 14'])
21
+ spec.add_runtime_dependency 'pageflow', '~> 14.x'
22
22
 
23
- spec.add_development_dependency 'bundler', '~> 1.0'
23
+ spec.add_development_dependency 'bundler', ['>= 1.0', '< 3']
24
+ spec.add_development_dependency 'pageflow-support', '~> 14.x'
24
25
  spec.add_development_dependency 'rake', '~> 12.0'
26
+ spec.add_development_dependency 'rspec-rails', '~> 3.0'
25
27
 
26
28
  # Semantic versioning rake tasks
27
29
  spec.add_development_dependency 'semmy', '~> 1.0'
@@ -0,0 +1,5 @@
1
+ require 'spec_helper'
2
+ require 'pageflow/lint'
3
+
4
+ Pageflow::Lint.page_type(Pageflow::InternalLinks.grid_page_type)
5
+ Pageflow::Lint.page_type(Pageflow::InternalLinks.list_page_type)
@@ -0,0 +1,14 @@
1
+ ENV['RAILS_ENV'] ||= 'test'
2
+ ENV['PAGEFLOW_PLUGIN_ENGINE'] = 'pageflow_internal_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,49 +1,63 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pageflow-internal-links
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Codevise Solutions
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-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pageflow
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 14.x
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 14.x
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement
16
30
  requirements:
17
31
  - - ">="
18
32
  - !ruby/object:Gem::Version
19
- version: '12.0'
33
+ version: '1.0'
20
34
  - - "<"
21
35
  - !ruby/object:Gem::Version
22
- version: '14'
23
- type: :runtime
36
+ version: '3'
37
+ type: :development
24
38
  prerelease: false
25
39
  version_requirements: !ruby/object:Gem::Requirement
26
40
  requirements:
27
41
  - - ">="
28
42
  - !ruby/object:Gem::Version
29
- version: '12.0'
43
+ version: '1.0'
30
44
  - - "<"
31
45
  - !ruby/object:Gem::Version
32
- version: '14'
46
+ version: '3'
33
47
  - !ruby/object:Gem::Dependency
34
- name: bundler
48
+ name: pageflow-support
35
49
  requirement: !ruby/object:Gem::Requirement
36
50
  requirements:
37
51
  - - "~>"
38
52
  - !ruby/object:Gem::Version
39
- version: '1.0'
53
+ version: 14.x
40
54
  type: :development
41
55
  prerelease: false
42
56
  version_requirements: !ruby/object:Gem::Requirement
43
57
  requirements:
44
58
  - - "~>"
45
59
  - !ruby/object:Gem::Version
46
- version: '1.0'
60
+ version: 14.x
47
61
  - !ruby/object:Gem::Dependency
48
62
  name: rake
49
63
  requirement: !ruby/object:Gem::Requirement
@@ -58,6 +72,20 @@ dependencies:
58
72
  - - "~>"
59
73
  - !ruby/object:Gem::Version
60
74
  version: '12.0'
75
+ - !ruby/object:Gem::Dependency
76
+ name: rspec-rails
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '3.0'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '3.0'
61
89
  - !ruby/object:Gem::Dependency
62
90
  name: semmy
63
91
  requirement: !ruby/object:Gem::Requirement
@@ -81,6 +109,8 @@ extra_rdoc_files: []
81
109
  files:
82
110
  - ".gitignore"
83
111
  - ".jshintrc"
112
+ - ".scss-lint.yml"
113
+ - ".travis.yml"
84
114
  - CHANGELOG.md
85
115
  - Gemfile
86
116
  - README.md
@@ -138,6 +168,7 @@ files:
138
168
  - app/views/pageflow/internal_links/list/_list.html.erb
139
169
  - app/views/pageflow/internal_links/list/_page_link.html.erb
140
170
  - app/views/pageflow/internal_links/list/page.html.erb
171
+ - bin/rspec
141
172
  - config/locales/de.yml
142
173
  - config/locales/en.yml
143
174
  - db/migrate/20150109121800_rename_internal_links_page_type.rb
@@ -148,6 +179,8 @@ files:
148
179
  - lib/pageflow/internal_links/plugin.rb
149
180
  - lib/pageflow/internal_links/version.rb
150
181
  - pageflow-internal-links.gemspec
182
+ - spec/integration/page_types_spec.rb
183
+ - spec/spec_helper.rb
151
184
  homepage: https://github.com/codevise/pageflow-internal-links
152
185
  licenses:
153
186
  - MIT
@@ -172,4 +205,6 @@ rubygems_version: 2.7.5
172
205
  signing_key:
173
206
  specification_version: 4
174
207
  summary: Pageflow page types for linking to other pages.
175
- test_files: []
208
+ test_files:
209
+ - spec/integration/page_types_spec.rb
210
+ - spec/spec_helper.rb