alchemy_cms 5.2.0.b1 → 5.2.0.rc1

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: f2d282ae615eeffe270108252f3979dbad9a1233d280f8834c1b5420afc27929
4
- data.tar.gz: '095d174025843dd1c347c17ef6fe9ca93bf80398d6eb33f1d5f6d5c2d1c2e7d4'
3
+ metadata.gz: 0fa742b5807adac37f8b9912eee024cdc10fcfb74a202e5a230b85109cfb7959
4
+ data.tar.gz: 30b3036533cdda4330ce8c89dbfad621d23980ce382aaca46f52df50294b56c4
5
5
  SHA512:
6
- metadata.gz: 260ad000c50c5466d49644054541829229f4eebf0bb75e375c25aeffd835a61acfe5fd8d4accf45bc7724c707966fc8501c21f7ee1e080d73e84c1435265d4b0
7
- data.tar.gz: '08af0b5dab164cfda123d3d600f486592ffc2f5ac59caf63a4c8b6642cf3febff9371c394adab35811c3c7e0c11601bf0b63e17211906dbd31300e7e9d70964a'
6
+ metadata.gz: 57745756593a15e0bcdf2558918ee89721f8adc6612f02043f3f066634f7b458078b0bd21c518b6dd082c396b324483691c7c2fa02c249d829c8e021f05a61cb
7
+ data.tar.gz: 3a9121c8ed3753b1892d098088085e7b35b81857121b0449690c045ad43c3efc6ef65892bc8969fc7750cb51b6b26a3af4862efc6c29ad903f107d518615ed1a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 5.2.0.rc1 (2021-02-17)
2
+
3
+ ### Changes
4
+
5
+ - Change Factory loading mechanism to FactoryBots supported mechanism [#2030](https://github.com/AlchemyCMS/alchemy_cms/pull/2030) ([mamhoff](https://github.com/mamhoff))
6
+
1
7
  ## 5.2.0.b1 (2021-02-11)
2
8
 
3
9
  ### Features
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Alchemy
4
+ module TestSupport
5
+ def self.factory_paths
6
+ Dir[
7
+ ::Alchemy::Engine.root.join("lib", "alchemy", "test_support", "factories", "*_factory.rb")
8
+ ].map { |path| path.sub(/.rb\z/, "") }
9
+ end
10
+ end
11
+ end
@@ -1,9 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "shoulda-matchers"
4
- require "alchemy/test_support/factories/page_factory"
5
- require "alchemy/test_support/factories/element_factory"
6
- require "alchemy/test_support/factories/content_factory"
7
4
 
8
5
  RSpec.shared_examples_for "an essence" do
9
6
  let(:element) { Alchemy::Element.new }
@@ -1,5 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ Alchemy::Deprecation.warn <<~MSG
4
+ Please require factories using FactoryBots preferred approach:
5
+
6
+ # spec/rails_helper.rb
7
+
8
+ require 'alchemy/test_support'
9
+
10
+ FactoryBot.definition_file_paths.concat(Alchemy::TestSupport.factory_paths)
11
+ FactoryBot.reload
12
+ MSG
13
+
3
14
  Dir["#{File.dirname(__FILE__)}/factories/*.rb"].sort.each do |file|
4
15
  require file
5
16
  end
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "factory_bot"
4
-
5
3
  FactoryBot.define do
6
4
  factory :alchemy_attachment, class: "Alchemy::Attachment" do
7
5
  file do
@@ -1,11 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "factory_bot"
4
- require "alchemy/test_support/factories/element_factory"
5
- require "alchemy/test_support/factories/essence_file_factory"
6
- require "alchemy/test_support/factories/essence_picture_factory"
7
- require "alchemy/test_support/factories/essence_text_factory"
8
-
9
3
  FactoryBot.define do
10
4
  factory :alchemy_content, class: "Alchemy::Content" do
11
5
  name { "text" }
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "factory_bot"
4
-
5
3
  FactoryBot.define do
6
4
  factory :alchemy_dummy_user, class: "DummyUser" do
7
5
  sequence(:email) { |n| "john.#{n}@doe.com" }
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "factory_bot"
4
- require "alchemy/test_support/factories/page_factory"
5
-
6
3
  FactoryBot.define do
7
4
  factory :alchemy_element, class: "Alchemy::Element" do
8
5
  name { "article" }
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "factory_bot"
4
- require "alchemy/test_support/factories/attachment_factory"
5
-
6
3
  FactoryBot.define do
7
4
  factory :alchemy_essence_file, class: "Alchemy::EssenceFile" do
8
5
  attachment factory: :alchemy_attachment
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "factory_bot"
4
- require "alchemy/test_support/factories/page_factory"
5
-
6
3
  FactoryBot.define do
7
4
  factory :alchemy_essence_page, class: "Alchemy::EssencePage" do
8
5
  page factory: :alchemy_page
@@ -1,9 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "factory_bot"
4
- require "alchemy/test_support/factories/content_factory"
5
- require "alchemy/test_support/factories/picture_factory"
6
-
7
3
  FactoryBot.define do
8
4
  factory :alchemy_essence_picture, class: "Alchemy::EssencePicture" do
9
5
  picture factory: :alchemy_picture
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "factory_bot"
4
-
5
3
  FactoryBot.define do
6
4
  factory :alchemy_essence_text, class: "Alchemy::EssenceText" do
7
5
  body { "This is a headline" }
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "factory_bot"
4
- require "alchemy/test_support/factories/site_factory"
5
-
6
3
  FactoryBot.define do
7
4
  factory :alchemy_language, class: "Alchemy::Language" do
8
5
  name { "Your Language" }
@@ -1,9 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "factory_bot"
4
- require "alchemy/test_support/factories/language_factory"
5
- require "alchemy/test_support/factories/page_factory"
6
-
7
3
  FactoryBot.define do
8
4
  factory :alchemy_node, class: "Alchemy::Node" do
9
5
  language { Alchemy::Language.default || create(:alchemy_language) }
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "factory_bot"
4
- require "alchemy/test_support/factories/language_factory"
5
-
6
3
  FactoryBot.define do
7
4
  factory :alchemy_page, class: "Alchemy::Page" do
8
5
  language do
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "factory_bot"
4
-
5
3
  FactoryBot.define do
6
4
  factory :alchemy_picture, class: "Alchemy::Picture" do
7
5
  image_file do
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "factory_bot"
4
- require "securerandom"
5
-
6
3
  FactoryBot.define do
7
4
  factory :alchemy_picture_thumb, class: "Alchemy::PictureThumb" do
8
5
  picture { create(:alchemy_picture) }
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "factory_bot"
4
-
5
3
  FactoryBot.define do
6
4
  factory :alchemy_site, class: "Alchemy::Site" do
7
5
  name { "A Site" }
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alchemy
4
- VERSION = "5.2.0.b1"
4
+ VERSION = "5.2.0.rc1"
5
5
 
6
6
  def self.version
7
7
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.0.b1
4
+ version: 5.2.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2021-02-11 00:00:00.000000000 Z
16
+ date: 2021-02-17 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: active_model_serializers
@@ -1111,6 +1111,7 @@ files:
1111
1111
  - lib/alchemy/shell.rb
1112
1112
  - lib/alchemy/taggable.rb
1113
1113
  - lib/alchemy/tasks/tidy.rb
1114
+ - lib/alchemy/test_support.rb
1114
1115
  - lib/alchemy/test_support/config_stubbing.rb
1115
1116
  - lib/alchemy/test_support/essence_shared_examples.rb
1116
1117
  - lib/alchemy/test_support/factories.rb