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.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +11 -0
  3. data/.github/workflows/lint.yml +29 -0
  4. data/.github/workflows/test.yml +25 -0
  5. data/.gitignore +1 -0
  6. data/.standard.yml +6 -0
  7. data/CHANGELOG.md +31 -1
  8. data/Gemfile +37 -16
  9. data/Guardfile +9 -7
  10. data/README.md +20 -8
  11. data/Rakefile +2 -2
  12. data/app/helpers/spree/pages_helper.rb +9 -5
  13. data/app/models/solidus_static_content/permission_sets/page_display.rb +10 -0
  14. data/app/models/solidus_static_content/permission_sets/page_management.rb +10 -0
  15. data/app/models/spree/page.rb +38 -34
  16. data/app/overrides/solidus_static_content/pages_in_footer.rb +11 -0
  17. data/app/overrides/solidus_static_content/pages_in_header.rb +11 -0
  18. data/app/overrides/solidus_static_content/pages_in_sidebar.rb +11 -0
  19. data/bin/r +1 -0
  20. data/bin/rails +1 -0
  21. data/bin/rails-engine +2 -0
  22. data/bin/rails-sandbox +2 -1
  23. data/bin/sandbox +18 -25
  24. data/bin/sandbox_rails +1 -0
  25. data/config/locales/en.yml +1 -2
  26. data/config/routes.rb +5 -2
  27. data/db/migrate/20081216193152_create_pages.rb +2 -0
  28. data/db/migrate/20090625125735_extend_pages.rb +9 -8
  29. data/db/migrate/20090814113100_add_visible_to_pages.rb +5 -3
  30. data/db/migrate/20090814142845_add_default_true_to_visible_for_page.rb +4 -2
  31. data/db/migrate/20090829000527_add_index_for_page.rb +2 -1
  32. data/db/migrate/20091219021134_add_meta_fields_to_pages.rb +2 -0
  33. data/db/migrate/20100204105222_add_layout_to_pages.rb +3 -1
  34. data/db/migrate/20100323085528_add_show_in_sidebar_option_to_pages.rb +4 -2
  35. data/db/migrate/20110717103112_add_meta_title_to_page.rb +2 -0
  36. data/db/migrate/20120723144115_add_render_as_partial_for_layout_for_spree_pages.rb +8 -6
  37. data/db/migrate/20140926121757_add_pages_stores.rb +3 -3
  38. data/db/migrate/20180305193240_update_spree_page_position.rb +8 -6
  39. data/lib/controllers/backend/spree/admin/pages_controller.rb +17 -11
  40. data/lib/controllers/frontend/spree/static_content_controller.rb +21 -13
  41. data/lib/generators/solidus_static_content/install/install_generator.rb +33 -5
  42. data/lib/generators/solidus_static_content/install/templates/app/controllers/static_content_controller.rb +28 -0
  43. data/lib/generators/solidus_static_content/install/templates/app/views/static_content/show.html.erb +28 -0
  44. data/lib/solidus_static_content/engine.rb +25 -17
  45. data/lib/solidus_static_content/route_matcher.rb +10 -6
  46. data/lib/solidus_static_content/{factories.rb → testing_support/factories.rb} +1 -1
  47. data/lib/solidus_static_content/version.rb +1 -1
  48. data/lib/solidus_static_content.rb +4 -7
  49. data/solidus_static_content.gemspec +16 -17
  50. metadata +23 -40
  51. data/.circleci/config.yml +0 -35
  52. data/.rubocop.yml +0 -2
  53. data/app/overrides/pages_in_footer.rb +0 -5
  54. data/app/overrides/pages_in_header.rb +0 -5
  55. data/app/overrides/pages_in_sidebar.rb +0 -5
  56. data/spec/controllers/spree/admin/pages_controller_spec.rb +0 -11
  57. data/spec/controllers/spree/static_content_controller_spec.rb +0 -34
  58. data/spec/features/spree/admin/pages_spec.rb +0 -70
  59. data/spec/features/spree/static_content_spec.rb +0 -55
  60. data/spec/helpers/spree/page_helper_spec.rb +0 -14
  61. data/spec/lib/solidus_static_content/engine_spec.rb +0 -14
  62. data/spec/lib/solidus_static_content/route_matcher_spec.rb +0 -25
  63. data/spec/models/spree/page_spec.rb +0 -61
  64. 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 < ActiveRecord::Base
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, :default => false, :null => false
8
- t.boolean :show_in_footer, :default => false, :null => false
9
- t.string :foreign_link
10
- t.integer :position, :default => 1, :null => false
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 < ActiveRecord::Base
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 :visible => true
10
+ Page.update_all visible: true
9
11
  else
10
- Spree::Page.update_all :visible => true
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, :default=> true
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 AddIndexForPage < SolidusSupport::Migration[4.2]
2
4
  def self.up
3
5
  add_index(:spree_pages, :slug)
@@ -7,4 +9,3 @@ class AddIndexForPage < SolidusSupport::Migration[4.2]
7
9
  remove_index(:spree_pages, :slug)
8
10
  end
9
11
  end
10
-
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class AddMetaFieldsToPages < SolidusSupport::Migration[4.2]
2
4
  def self.up
3
5
  add_column :spree_pages, :meta_keywords, :string
@@ -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, :default=> false, :null=>false
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,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class AddMetaTitleToPage < SolidusSupport::Migration[4.2]
2
4
  def self.up
3
5
  add_column :spree_pages, :meta_title, :string
@@ -1,13 +1,15 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class AddRenderAsPartialForLayoutForSpreePages < SolidusSupport::Migration[4.2]
2
4
  def up
3
- unless column_exists? :spree_pages, :render_layout_as_partial
4
- add_column :spree_pages, :render_layout_as_partial, :boolean, :default => false
5
- end
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
- if column_exists? :spree_pages, :render_layout_as_partial
10
- remove_column :spree_pages, :render_layout_as_partial
11
- end
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
- class AddPagesStores < SolidusSupport::Migration[4.2]
1
+ # frozen_string_literal: true
2
2
 
3
+ class AddPagesStores < SolidusSupport::Migration[4.2]
3
4
  def change
4
- create_table :spree_pages_stores, :id => false do |t|
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
- if column_exists?(:spree_pages, :position)
4
- change_column :spree_pages, :position, :integer, default: 0
5
- end
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
- if column_exists?(:spree_pages, :position)
10
- change_column :spree_pages, :position, :boolean, default: false
11
- end
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
- class Spree::Admin::PagesController < Spree::Admin::ResourceController
2
- private
1
+ # frozen_string_literal: true
3
2
 
4
- # Set some default attributes
5
- def build_resource
6
- super.tap do |resource|
7
- if resource.stores.blank?
8
- resource.stores << Spree::Store.default
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
- def collection
14
- super.ordered_by_position
17
+ def collection
18
+ super.ordered_by_position
19
+ end
20
+ end
15
21
  end
16
22
  end
@@ -1,24 +1,32 @@
1
- class Spree::StaticContentController < Spree::StoreController
2
- helper 'spree/products'
3
- layout :determine_layout
1
+ # frozen_string_literal: true
4
2
 
5
- def show
6
- @page = Spree::Page.by_store(current_store).visible.find_by_slug!(request.path_info)
3
+ module Spree
4
+ class StaticContentController < Spree::StoreController
5
+ helper "spree/products"
6
+ layout :determine_layout
7
7
 
8
- # Assign static_content to let solidus recognize it as the current
9
- # controller resource, this is used by meta tags and in other places.
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
- @taxonomies = Spree::Taxonomy.includes(root: :children)
13
- end
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 and @page.layout.present? and not @page.render_layout_as_partial?
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
- @page ? (@page.meta_title.present? ? @page.meta_title : @page.title) : nil
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 'vendor/assets/stylesheets/spree/frontend/all.css', " *= require spree/frontend/solidus_static_content\n", before: %r{\*/}, verbose: true # rubocop:disable Metrics/LineLength
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 'bin/rails railties:install:migrations FROM=solidus_static_content'
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] || ['', 'y', 'Y'].include?(ask('Would you like to run the migrations now? [Y/n]')) # rubocop:disable Metrics/LineLength
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 'bin/rails db:migrate'
47
+ run "bin/rails db:migrate"
20
48
  else
21
- puts 'Skipping bin/rails db:migrate, don\'t forget to run it!' # rubocop:disable Rails/Output
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
@@ -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 'spree/core'
4
- require 'solidus_static_content'
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 'solidus_static_content'
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
- def self.menu_item
20
- @menu_item ||= Spree::Backend::Config.class::MenuItem.new(
21
- [:pages],
22
- 'file-text',
23
- condition: -> { can?(:admin, Spree::Page) },
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
- module SolidusStaticContent::RouteMatcher
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
- def self.matches?(request)
5
- path = request.path_info
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
- return false if EXCLUDED_PATHS.match? path
7
+ def self.matches?(request)
8
+ path = request.path_info
8
9
 
9
- Spree::Page.visible.where(slug: path).exists?
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
@@ -3,7 +3,7 @@
3
3
  FactoryBot.define do
4
4
  factory :page, class: Spree::Page do
5
5
  sequence(:title) { |n| "Page #{n}" }
6
- body { 'This is the body of the page' }
6
+ body { "This is the body of the page" }
7
7
 
8
8
  sequence(:slug) { |n| "/page#{n}" }
9
9
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusStaticContent
4
- VERSION = '2.0.0'
4
+ VERSION = "2.1.0"
5
5
  end
@@ -1,9 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'solidus_core'
4
- require 'solidus_support'
5
- require 'deface'
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 'lib/solidus_static_content/version'
3
+ require_relative "lib/solidus_static_content/version"
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.name = 'solidus_static_content'
6
+ spec.name = "solidus_static_content"
7
7
  spec.version = SolidusStaticContent::VERSION
8
- spec.authors = ['Peter Berkenbosch', 'Roman Smirnov']
9
- spec.email = 'peter@pero-ict.nl'
8
+ spec.authors = ["Peter Berkenbosch", "Roman Smirnov"]
9
+ spec.email = "peter@pero-ict.nl"
10
10
 
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'
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['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'
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('~> 2.5')
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 'deface', '~> 1.0'
33
- spec.add_dependency 'solidus_core', ['>= 2.0.0', '< 3']
34
- spec.add_dependency 'solidus_support', '~> 0.5'
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 'solidus_dev_support'
35
+ spec.add_development_dependency "solidus_dev_support", "~> 2.7"
37
36
  end