solidus_static_content 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +11 -0
- data/.github/workflows/lint.yml +29 -0
- data/.github/workflows/test.yml +25 -0
- data/.gitignore +1 -0
- data/.standard.yml +6 -0
- data/CHANGELOG.md +31 -1
- data/Gemfile +37 -16
- data/Guardfile +9 -7
- data/README.md +20 -8
- data/Rakefile +2 -2
- data/app/helpers/spree/pages_helper.rb +9 -5
- data/app/models/solidus_static_content/permission_sets/page_display.rb +10 -0
- data/app/models/solidus_static_content/permission_sets/page_management.rb +10 -0
- data/app/models/spree/page.rb +38 -34
- data/app/overrides/solidus_static_content/pages_in_footer.rb +11 -0
- data/app/overrides/solidus_static_content/pages_in_header.rb +11 -0
- data/app/overrides/solidus_static_content/pages_in_sidebar.rb +11 -0
- data/bin/r +1 -0
- data/bin/rails +1 -0
- data/bin/rails-engine +2 -0
- data/bin/rails-sandbox +2 -1
- data/bin/sandbox +18 -25
- data/bin/sandbox_rails +1 -0
- data/config/locales/en.yml +1 -2
- data/config/routes.rb +5 -2
- data/db/migrate/20081216193152_create_pages.rb +2 -0
- data/db/migrate/20090625125735_extend_pages.rb +9 -8
- data/db/migrate/20090814113100_add_visible_to_pages.rb +5 -3
- data/db/migrate/20090814142845_add_default_true_to_visible_for_page.rb +4 -2
- data/db/migrate/20090829000527_add_index_for_page.rb +2 -1
- data/db/migrate/20091219021134_add_meta_fields_to_pages.rb +2 -0
- data/db/migrate/20100204105222_add_layout_to_pages.rb +3 -1
- data/db/migrate/20100323085528_add_show_in_sidebar_option_to_pages.rb +4 -2
- data/db/migrate/20110717103112_add_meta_title_to_page.rb +2 -0
- data/db/migrate/20120723144115_add_render_as_partial_for_layout_for_spree_pages.rb +8 -6
- data/db/migrate/20140926121757_add_pages_stores.rb +3 -3
- data/db/migrate/20180305193240_update_spree_page_position.rb +8 -6
- data/lib/controllers/backend/spree/admin/pages_controller.rb +17 -11
- data/lib/controllers/frontend/spree/static_content_controller.rb +21 -13
- data/lib/generators/solidus_static_content/install/install_generator.rb +33 -5
- data/lib/generators/solidus_static_content/install/templates/app/controllers/static_content_controller.rb +28 -0
- data/lib/generators/solidus_static_content/install/templates/app/views/static_content/show.html.erb +28 -0
- data/lib/solidus_static_content/engine.rb +25 -17
- data/lib/solidus_static_content/route_matcher.rb +10 -6
- data/lib/solidus_static_content/{factories.rb → testing_support/factories.rb} +1 -1
- data/lib/solidus_static_content/version.rb +1 -1
- data/lib/solidus_static_content.rb +4 -7
- data/solidus_static_content.gemspec +16 -17
- metadata +23 -40
- data/.circleci/config.yml +0 -35
- data/.rubocop.yml +0 -2
- data/app/overrides/pages_in_footer.rb +0 -5
- data/app/overrides/pages_in_header.rb +0 -5
- data/app/overrides/pages_in_sidebar.rb +0 -5
- data/spec/controllers/spree/admin/pages_controller_spec.rb +0 -11
- data/spec/controllers/spree/static_content_controller_spec.rb +0 -34
- data/spec/features/spree/admin/pages_spec.rb +0 -70
- data/spec/features/spree/static_content_spec.rb +0 -55
- data/spec/helpers/spree/page_helper_spec.rb +0 -14
- data/spec/lib/solidus_static_content/engine_spec.rb +0 -14
- data/spec/lib/solidus_static_content/route_matcher_spec.rb +0 -25
- data/spec/models/spree/page_spec.rb +0 -61
- data/spec/spec_helper.rb +0 -27
|
@@ -1,19 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
class ExtendPages < SolidusSupport::Migration[4.2]
|
|
2
|
-
class Page <
|
|
4
|
+
class Page < ApplicationRecord
|
|
3
5
|
end
|
|
4
6
|
|
|
5
7
|
def self.up
|
|
6
8
|
change_table :spree_pages do |t|
|
|
7
|
-
t.boolean :show_in_header, :
|
|
8
|
-
t.boolean :show_in_footer, :
|
|
9
|
-
t.string
|
|
10
|
-
t.integer :position, :
|
|
9
|
+
t.boolean :show_in_header, default: false, null: false
|
|
10
|
+
t.boolean :show_in_footer, default: false, null: false
|
|
11
|
+
t.string :foreign_link
|
|
12
|
+
t.integer :position, default: 1, null: false
|
|
11
13
|
if Page.table_exists?
|
|
12
|
-
Page.order(:updated_at).each_with_index{|page,x| page.update_attribute(:position, x+1)}
|
|
14
|
+
Page.order(:updated_at).each_with_index { |page, x| page.update_attribute(:position, x + 1) }
|
|
13
15
|
else
|
|
14
|
-
Spree::Page.order(:updated_at).each_with_index{|page,x| page.update_attribute(:position, x+1)}
|
|
16
|
+
Spree::Page.order(:updated_at).each_with_index { |page, x| page.update_attribute(:position, x + 1) }
|
|
15
17
|
end
|
|
16
|
-
|
|
17
18
|
end
|
|
18
19
|
end
|
|
19
20
|
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
class AddVisibleToPages < SolidusSupport::Migration[4.2]
|
|
2
|
-
class Page <
|
|
4
|
+
class Page < ApplicationRecord
|
|
3
5
|
end
|
|
4
6
|
|
|
5
7
|
def self.up
|
|
6
8
|
add_column :spree_pages, :visible, :boolean
|
|
7
9
|
if Page.table_exists?
|
|
8
|
-
Page.update_all :
|
|
10
|
+
Page.update_all visible: true
|
|
9
11
|
else
|
|
10
|
-
Spree::Page.update_all :
|
|
12
|
+
Spree::Page.update_all visible: true
|
|
11
13
|
end
|
|
12
14
|
end
|
|
13
15
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
class AddDefaultTrueToVisibleForPage < SolidusSupport::Migration[4.2]
|
|
2
4
|
def self.up
|
|
3
|
-
change_column :spree_pages, :visible, :boolean, :
|
|
5
|
+
change_column :spree_pages, :visible, :boolean, default: true
|
|
4
6
|
end
|
|
5
7
|
|
|
6
8
|
def self.down
|
|
7
9
|
end
|
|
8
|
-
end
|
|
10
|
+
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
class AddLayoutToPages < SolidusSupport::Migration[4.2]
|
|
2
4
|
def self.up
|
|
3
5
|
add_column :spree_pages, :layout, :string
|
|
@@ -6,4 +8,4 @@ class AddLayoutToPages < SolidusSupport::Migration[4.2]
|
|
|
6
8
|
def self.down
|
|
7
9
|
remove_column :spree_pages, :layout
|
|
8
10
|
end
|
|
9
|
-
end
|
|
11
|
+
end
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
class AddShowInSidebarOptionToPages < SolidusSupport::Migration[4.2]
|
|
2
4
|
def self.up
|
|
3
|
-
add_column :spree_pages, :show_in_sidebar, :boolean, :
|
|
5
|
+
add_column :spree_pages, :show_in_sidebar, :boolean, default: false, null: false
|
|
4
6
|
end
|
|
5
7
|
|
|
6
8
|
def self.down
|
|
7
9
|
remove_column :spree_pages, :show_in_sidebar
|
|
8
10
|
end
|
|
9
|
-
end
|
|
11
|
+
end
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
class AddRenderAsPartialForLayoutForSpreePages < SolidusSupport::Migration[4.2]
|
|
2
4
|
def up
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
return if column_exists? :spree_pages, :render_layout_as_partial
|
|
6
|
+
|
|
7
|
+
add_column :spree_pages, :render_layout_as_partial, :boolean, default: false
|
|
6
8
|
end
|
|
7
9
|
|
|
8
10
|
def down
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
return unless column_exists? :spree_pages, :render_layout_as_partial
|
|
12
|
+
|
|
13
|
+
remove_column :spree_pages, :render_layout_as_partial
|
|
12
14
|
end
|
|
13
15
|
end
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
class AddPagesStores < SolidusSupport::Migration[4.2]
|
|
3
4
|
def change
|
|
4
|
-
create_table :spree_pages_stores, :
|
|
5
|
+
create_table :spree_pages_stores, id: false do |t|
|
|
5
6
|
t.integer :store_id
|
|
6
7
|
t.integer :page_id
|
|
7
8
|
t.timestamps
|
|
@@ -9,6 +10,5 @@ class AddPagesStores < SolidusSupport::Migration[4.2]
|
|
|
9
10
|
|
|
10
11
|
add_index :spree_pages_stores, :store_id
|
|
11
12
|
add_index :spree_pages_stores, :page_id
|
|
12
|
-
|
|
13
13
|
end
|
|
14
14
|
end
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
class UpdateSpreePagePosition < SolidusSupport::Migration[4.2]
|
|
2
4
|
def up
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
return unless column_exists?(:spree_pages, :position)
|
|
6
|
+
|
|
7
|
+
change_column :spree_pages, :position, :integer, default: 0
|
|
6
8
|
end
|
|
7
9
|
|
|
8
10
|
def down
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
return unless column_exists?(:spree_pages, :position)
|
|
12
|
+
|
|
13
|
+
change_column :spree_pages, :position, :boolean, default: false
|
|
12
14
|
end
|
|
13
15
|
end
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
private
|
|
1
|
+
# frozen_string_literal: true
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
module Spree
|
|
4
|
+
module Admin
|
|
5
|
+
class PagesController < Spree::Admin::ResourceController
|
|
6
|
+
private
|
|
7
|
+
|
|
8
|
+
# Set some default attributes
|
|
9
|
+
def build_resource
|
|
10
|
+
super.tap do |resource|
|
|
11
|
+
if resource.stores.blank?
|
|
12
|
+
resource.stores << Spree::Store.default
|
|
13
|
+
end
|
|
14
|
+
end
|
|
9
15
|
end
|
|
10
|
-
end
|
|
11
|
-
end
|
|
12
16
|
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
def collection
|
|
18
|
+
super.ordered_by_position
|
|
19
|
+
end
|
|
20
|
+
end
|
|
15
21
|
end
|
|
16
22
|
end
|
|
@@ -1,24 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
helper 'spree/products'
|
|
3
|
-
layout :determine_layout
|
|
1
|
+
# frozen_string_literal: true
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
module Spree
|
|
4
|
+
class StaticContentController < Spree::StoreController
|
|
5
|
+
helper "spree/products"
|
|
6
|
+
layout :determine_layout
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
@static_content = @page
|
|
8
|
+
def show
|
|
9
|
+
@page = Spree::Page.by_store(current_store).visible.find_by!(slug: request.path_info)
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
# Assign static_content to let solidus recognize it as the current
|
|
12
|
+
# controller resource, this is used by meta tags and in other places.
|
|
13
|
+
@static_content = @page
|
|
14
|
+
|
|
15
|
+
@taxonomies = Spree::Taxonomy.includes(root: :children)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
private
|
|
14
19
|
|
|
15
|
-
private
|
|
16
20
|
def determine_layout
|
|
17
|
-
return @page.layout if @page
|
|
21
|
+
return @page.layout if @page && @page.layout.present? && !@page.render_layout_as_partial?
|
|
22
|
+
|
|
18
23
|
Spree::Config.layout
|
|
19
24
|
end
|
|
20
25
|
|
|
21
26
|
def accurate_title
|
|
22
|
-
|
|
27
|
+
return unless @page
|
|
28
|
+
|
|
29
|
+
@page.meta_title.presence || @page.title
|
|
23
30
|
end
|
|
31
|
+
end
|
|
24
32
|
end
|
|
@@ -3,22 +3,50 @@
|
|
|
3
3
|
module SolidusStaticContent
|
|
4
4
|
module Generators
|
|
5
5
|
class InstallGenerator < Rails::Generators::Base
|
|
6
|
+
source_root File.expand_path("templates", __dir__)
|
|
6
7
|
class_option :auto_run_migrations, type: :boolean, default: false
|
|
8
|
+
# Either 'starter' or 'classic'
|
|
9
|
+
class_option :frontend, type: :string, default: "classic"
|
|
7
10
|
|
|
8
11
|
def add_stylesheets
|
|
9
|
-
inject_into_file
|
|
12
|
+
inject_into_file "vendor/assets/stylesheets/spree/frontend/all.css", " *= require spree/frontend/solidus_static_content\n", before: %r{\*/}, verbose: true
|
|
10
13
|
end
|
|
11
14
|
|
|
12
15
|
def add_migrations
|
|
13
|
-
run
|
|
16
|
+
run "bin/rails railties:install:migrations FROM=solidus_static_content"
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def add_javascripts
|
|
20
|
+
empty_directory "app/assets/javascripts"
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def copy_starter_frontend_files
|
|
24
|
+
return if options[:frontend] != "starter"
|
|
25
|
+
|
|
26
|
+
copy_file "app/controllers/static_content_controller.rb"
|
|
27
|
+
copy_file "app/views/static_content/show.html.erb"
|
|
28
|
+
|
|
29
|
+
insert_into_file "config/initializers/spree.rb", after: "Spree.config do |config|\n" do
|
|
30
|
+
<<~RUBY.indent(2)
|
|
31
|
+
config.layout = 'layouts/storefront'
|
|
32
|
+
|
|
33
|
+
RUBY
|
|
34
|
+
end
|
|
35
|
+
route <<~ROUTES
|
|
36
|
+
if Spree::Config.layout == 'layouts/storefront'
|
|
37
|
+
constraints(SolidusStaticContent::RouteMatcher) do
|
|
38
|
+
get '/(*path)', to: 'static_content#show', as: 'static'
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
ROUTES
|
|
14
42
|
end
|
|
15
43
|
|
|
16
44
|
def run_migrations
|
|
17
|
-
run_migrations = options[:auto_run_migrations] || [
|
|
45
|
+
run_migrations = options[:auto_run_migrations] || ["", "y", "Y"].include?(ask("Would you like to run the migrations now? [Y/n]"))
|
|
18
46
|
if run_migrations
|
|
19
|
-
run
|
|
47
|
+
run "bin/rails db:migrate"
|
|
20
48
|
else
|
|
21
|
-
puts
|
|
49
|
+
puts "Skipping bin/rails db:migrate, don't forget to run it!"
|
|
22
50
|
end
|
|
23
51
|
end
|
|
24
52
|
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class StaticContentController < StoreController
|
|
4
|
+
helper "spree/products"
|
|
5
|
+
layout :determine_layout
|
|
6
|
+
|
|
7
|
+
def show
|
|
8
|
+
@page = Spree::Page.by_store(current_store).visible.find_by!(slug: request.path_info)
|
|
9
|
+
|
|
10
|
+
# Assign static_content to let solidus recognize it as the current
|
|
11
|
+
# controller resource, this is used by meta tags and in other places.
|
|
12
|
+
@static_content = @page
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
private
|
|
16
|
+
|
|
17
|
+
def determine_layout
|
|
18
|
+
return @page.layout if @page && @page.layout.present? && !@page.render_layout_as_partial?
|
|
19
|
+
|
|
20
|
+
Spree::Config.layout
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def accurate_title
|
|
24
|
+
return unless @page
|
|
25
|
+
|
|
26
|
+
@page.meta_title.presence || @page.title
|
|
27
|
+
end
|
|
28
|
+
end
|
data/lib/generators/solidus_static_content/install/templates/app/views/static_content/show.html.erb
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<% if @page.layout.present? and @page.render_layout_as_partial? %>
|
|
2
|
+
<%= render partial: @page.layout %>
|
|
3
|
+
<% else %>
|
|
4
|
+
<% content_for :head do -%>
|
|
5
|
+
<%- if @page.meta_title.present? -%>
|
|
6
|
+
<meta name="title" content="<%= @page.meta_title %>">
|
|
7
|
+
<%- else -%>
|
|
8
|
+
<meta name="title" content="<%= @page.title %>">
|
|
9
|
+
<%- end -%>
|
|
10
|
+
<meta name="keywords" content="<%= @page.meta_keywords %>">
|
|
11
|
+
<meta name="description" content="<%= @page.meta_description %>">
|
|
12
|
+
<% end -%>
|
|
13
|
+
|
|
14
|
+
<% content_for :sidebar do %>
|
|
15
|
+
<% if (defined?(@products) && @products) && (defined?(@taxon) && @taxon) %>
|
|
16
|
+
<%= render partial: 'spree/shared/filters' %>
|
|
17
|
+
<% elsif defined?(@taxonomies) && @taxonomies %>
|
|
18
|
+
<%= render partial: 'spree/shared/taxonomies' %>
|
|
19
|
+
<% end %>
|
|
20
|
+
<% end %>
|
|
21
|
+
|
|
22
|
+
<div class="container" id="page_content">
|
|
23
|
+
<h1 class="wrapper mt-4 font-serif text-h3 lg:text-h2"><%= @page.title %></h1>
|
|
24
|
+
<div class="pt-4 pb-4">
|
|
25
|
+
<%= raw @page.body %>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
<% end %>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require
|
|
4
|
-
require
|
|
3
|
+
require "solidus_core"
|
|
4
|
+
require "solidus_support"
|
|
5
5
|
|
|
6
6
|
module SolidusStaticContent
|
|
7
7
|
class Engine < Rails::Engine
|
|
@@ -9,27 +9,35 @@ module SolidusStaticContent
|
|
|
9
9
|
|
|
10
10
|
isolate_namespace ::Spree
|
|
11
11
|
|
|
12
|
-
engine_name
|
|
12
|
+
engine_name "solidus_static_content"
|
|
13
13
|
|
|
14
14
|
# use rspec for tests
|
|
15
15
|
config.generators do |g|
|
|
16
16
|
g.test_framework :rspec
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
initializer "solidus_subscriptions.configure_backend" do
|
|
20
|
+
next unless ::Spree::Backend::Config.respond_to?(:menu_items)
|
|
21
|
+
|
|
22
|
+
::Spree::Backend::Config.configure do |config|
|
|
23
|
+
config.menu_items << if Spree.solidus_gem_version >= Gem::Version.new("4.2.0")
|
|
24
|
+
config.class::MenuItem.new(
|
|
25
|
+
label: :pages,
|
|
26
|
+
icon: "ri-file-text-line",
|
|
27
|
+
url: :admin_pages_path,
|
|
28
|
+
condition: -> { can?(:admin, Spree::Page) },
|
|
29
|
+
match_path: "/pages"
|
|
30
|
+
)
|
|
31
|
+
else
|
|
32
|
+
config.class::MenuItem.new(
|
|
33
|
+
[:pages],
|
|
34
|
+
"file-text",
|
|
35
|
+
url: :admin_pages_path,
|
|
36
|
+
condition: -> { can?(:admin, Spree::Page) },
|
|
37
|
+
match_path: "/pages"
|
|
38
|
+
)
|
|
39
|
+
end
|
|
40
|
+
end
|
|
25
41
|
end
|
|
26
|
-
|
|
27
|
-
def self.activate_menu_items
|
|
28
|
-
return if Spree::Backend::Config.menu_items.include?(menu_item)
|
|
29
|
-
|
|
30
|
-
Spree::Backend::Config.menu_items << menu_item
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
config.to_prepare(&method(:activate_menu_items))
|
|
34
42
|
end
|
|
35
43
|
end
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
EXCLUDED_PATHS = /^\/+(admin|account|cart|checkout|content|login|pg\/|orders|products|s\/|session|signup|shipments|states|t\/|tax_categories|user)+/
|
|
1
|
+
# frozen_string_literal: true
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
module SolidusStaticContent
|
|
4
|
+
module RouteMatcher
|
|
5
|
+
EXCLUDED_PATHS = %r{^/+(admin|account|cart|checkout|content|login|pg/|orders|products|s/|session|signup|shipments|states|t/|tax_categories|user)+}
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
def self.matches?(request)
|
|
8
|
+
path = request.path_info
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
return false if EXCLUDED_PATHS.match? path
|
|
11
|
+
|
|
12
|
+
Spree::Page.visible.where(slug: path).exists?
|
|
13
|
+
end
|
|
10
14
|
end
|
|
11
15
|
end
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require
|
|
4
|
-
require
|
|
5
|
-
require
|
|
6
|
-
|
|
7
|
-
require 'solidus_static_content/version'
|
|
8
|
-
require 'solidus_static_content/route_matcher'
|
|
9
|
-
require 'solidus_static_content/engine'
|
|
3
|
+
require "solidus_static_content/version"
|
|
4
|
+
require "solidus_static_content/route_matcher"
|
|
5
|
+
require "solidus_static_content/engine"
|
|
6
|
+
require "deface"
|
|
@@ -1,37 +1,36 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require_relative
|
|
3
|
+
require_relative "lib/solidus_static_content/version"
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |spec|
|
|
6
|
-
spec.name =
|
|
6
|
+
spec.name = "solidus_static_content"
|
|
7
7
|
spec.version = SolidusStaticContent::VERSION
|
|
8
|
-
spec.authors = [
|
|
9
|
-
spec.email =
|
|
8
|
+
spec.authors = ["Peter Berkenbosch", "Roman Smirnov"]
|
|
9
|
+
spec.email = "peter@pero-ict.nl"
|
|
10
10
|
|
|
11
|
-
spec.summary =
|
|
12
|
-
spec.description =
|
|
13
|
-
spec.homepage =
|
|
14
|
-
spec.license =
|
|
11
|
+
spec.summary = "Extension to manage the static pages for your Solidus store."
|
|
12
|
+
spec.description = "Manage the static pages of your Solidus store or replace existing pages with a static version"
|
|
13
|
+
spec.homepage = "https://github.com/solidusio-contrib/solidus_static_content#readme"
|
|
14
|
+
spec.license = "BSD-3-Clause"
|
|
15
15
|
|
|
16
|
-
spec.metadata[
|
|
17
|
-
spec.metadata[
|
|
18
|
-
spec.metadata[
|
|
16
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
|
17
|
+
spec.metadata["source_code_uri"] = "https://github.com/solidusio-contrib/solidus_static_content#readme"
|
|
18
|
+
spec.metadata["changelog_uri"] = "https://github.com/solidusio-contrib/solidus_static_content/releases"
|
|
19
19
|
|
|
20
|
-
spec.required_ruby_version = Gem::Requirement.new(
|
|
20
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.5")
|
|
21
21
|
|
|
22
22
|
# Specify which files should be added to the gem when it is released.
|
|
23
23
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
24
24
|
files = Dir.chdir(__dir__) { `git ls-files -z`.split("\x0") }
|
|
25
25
|
|
|
26
26
|
spec.files = files.grep_v(%r{^(test|spec|features)/})
|
|
27
|
-
spec.test_files = files.grep(%r{^(test|spec|features)/})
|
|
28
27
|
spec.bindir = "exe"
|
|
29
28
|
spec.executables = files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
30
29
|
spec.require_paths = ["lib"]
|
|
31
30
|
|
|
32
|
-
spec.add_dependency
|
|
33
|
-
spec.add_dependency
|
|
34
|
-
spec.add_dependency
|
|
31
|
+
spec.add_dependency "deface", "~> 1.0"
|
|
32
|
+
spec.add_dependency "solidus_core", [">= 2.0.0", "< 5"]
|
|
33
|
+
spec.add_dependency "solidus_support", "~> 0.8"
|
|
35
34
|
|
|
36
|
-
spec.add_development_dependency
|
|
35
|
+
spec.add_development_dependency "solidus_dev_support", "~> 2.7"
|
|
37
36
|
end
|