composite_content 1.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -2
- data/README.md +5 -2
- data/bin/rails +16 -0
- data/composite_content.gemspec +16 -16
- data/config/locales/fr.yml +1 -1
- data/db/migrate/20220807184334_create_composite_content_slots.rb +1 -1
- data/db/migrate/20220807185808_create_composite_content_blocks.rb +1 -1
- data/db/migrate/20220807191353_create_composite_content_headings.rb +1 -1
- data/db/migrate/20220807191402_create_composite_content_quotes.rb +1 -1
- data/db/migrate/20220807191410_create_composite_content_texts.rb +1 -1
- data/lib/composite_content/action_view.rb +2 -2
- data/lib/composite_content/blocks/heading.rb +1 -0
- data/lib/composite_content/blocks/quote.rb +1 -0
- data/lib/composite_content/blocks/text.rb +1 -0
- data/lib/composite_content/blocks.rb +1 -1
- data/lib/composite_content/engine.rb +8 -1
- data/lib/composite_content/model/base.rb +3 -0
- data/lib/composite_content/model/blockable.rb +6 -0
- data/lib/composite_content/model.rb +1 -1
- data/lib/composite_content/slot.rb +13 -10
- data/lib/composite_content/version.rb +1 -1
- data/lib/generators/composite_content/templates/block/_form.html.erb +4 -3
- data/lib/generators/composite_content/templates/slot/_form.html.erb +4 -3
- metadata +13 -86
- data/.rspec +0 -1
- data/.rubocop.yml +0 -43
- data/Gemfile +0 -10
- data/Gemfile.lock +0 -239
- data/Rakefile +0 -17
- data/gemfiles/rails-6.1.x.gemfile +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ccf56533554d8f9d97dfab613e4ee0ada78da592eccd4cceb8df32e6a0a1c8d2
|
4
|
+
data.tar.gz: 672795ed87288743f2ff87f37e025d43ba719d6e642e363fda2cc71ecf10086e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8033506c9619daa7030139aed7964359e8007f6d41d2c328d2403c06d14e5a6828444e25e055e4b77a525589299e229464f3b7aa96eedf10bc9f8c9daa7b951e
|
7
|
+
data.tar.gz: ce91296bce01bb21899f02ac3a0f9779b4600bf8acbf5c083c13e24655b3e2d67e90919ad0f7bca1bf143c3b165f97e980c7b51d0e722cbe87ef55bddf6796e4
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,35 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
|
+
|
1
7
|
## [Unreleased]
|
2
8
|
|
3
|
-
##
|
9
|
+
## Version 2.1.0 (2023-08-29)
|
10
|
+
|
11
|
+
### Added
|
12
|
+
|
13
|
+
* Allow to customize strong parameters names on a block class with `.strong_parameters_names` (#11)
|
14
|
+
* Allow to change composite_content views base path with `CompositeContent::Engine.config.views_path` (#10)
|
15
|
+
|
16
|
+
### Fixed
|
17
|
+
|
18
|
+
* Typo in french translations
|
19
|
+
|
20
|
+
## Version 2.0.0 (2023-03-07)
|
21
|
+
|
22
|
+
### Breaking changes
|
23
|
+
|
24
|
+
* Update Cocooned dependency to `~2.0.0` (#5)
|
25
|
+
If you installed a previous version of `composite_content`, you may need to run installation generator again or to apply to your templates changes suggested in [Cocooned migration guide](https://github.com/notus-sh/cocooned#from-cocooned-10).
|
26
|
+
|
27
|
+
### Changed
|
28
|
+
|
29
|
+
* Reduce RuboCop configuration to minimal (#6)
|
30
|
+
* Migrate from Travis CI to Github Actions (#2)
|
31
|
+
* Add Ruby 3.2 to the test matrix (#1)
|
32
|
+
|
33
|
+
## Version 1.0.0 (2022-08-06)
|
4
34
|
|
5
|
-
|
35
|
+
* Initial release
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# CompositeContent
|
2
2
|
|
3
|
-
[![
|
3
|
+
[![Unit tests](https://github.com/notus-sh/composite_content/actions/workflows/unit-tests.yml/badge.svg?branch=main)](https://github.com/notus-sh/composite_content/actions/workflows/unit-tests.yml)
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/composite_content.svg)](https://badge.fury.io/rb/composite_content)
|
5
5
|
|
6
6
|
`CompositeContent` add capacities to your Rails application to manage complex contents made of blocks with ease.
|
@@ -10,6 +10,9 @@
|
|
10
10
|
Rich administrable contents used to be managed through WYSIWYG editors. This leaves you with a very poor control over what is allowed inside such content areas and how it will be rendered afterwards: `img` tags may include the full picture as base64 data or, like `iframe`s (pasted from videos or slides sharing code), can have hard-coded dimensions that makes them hard to manipulate in a responsive design; titles hierarchy may not semantically fit in every context where your content will be displayed; rogue CSS classes can be pasted from word processors without being noticed.
|
11
11
|
The list of potential problems in a responsive and multi-channel world goes on…
|
12
12
|
|
13
|
+
The Rails team did an amazing work to go one step forward with [ActionText](https://github.com/rails/rails/tree/main/actiontext) and its integration of [ActiveStorage](https://github.com/rails/rails/tree/main/activestorage). But [the Trix editor](https://trix-editor.org/) supports very few options on content types supported by default, seems to have some limitation on extending them to offer more, requires to create custom elements to support new content types (ex: application models) and does not output semantic HTML markup.
|
14
|
+
Great, but there should be a better way…
|
15
|
+
|
13
16
|
An alternative to a monolithic WYSIWYG editor is to split your content into manageable chunks, or blocks. Each type of block can have its own properties and options and their definition should give you the ability to carefully manage their content to integrate it in various use cases and/or with other parts of your application. Such system should be extensible, so you can create new types of blocks to fit your needs.
|
14
17
|
|
15
18
|
For example:
|
@@ -94,7 +97,7 @@ In your forms, make composite content editable with:
|
|
94
97
|
|
95
98
|
```erbruby
|
96
99
|
<%= form.fields_for :composite_content do |composite_content_form| %>
|
97
|
-
<%= render
|
100
|
+
<%= render "#{CompositeContent::Engine.config.views_path}/slot/form", form: composite_content_form %>
|
98
101
|
<% end %>
|
99
102
|
```
|
100
103
|
|
data/bin/rails
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
# This command will automatically be run when you run "rails" with Rails gems
|
5
|
+
# installed from the root of your application.
|
6
|
+
|
7
|
+
ENGINE_ROOT = File.expand_path('..', __dir__)
|
8
|
+
ENGINE_PATH = File.expand_path('../lib/composite_content/engine', __dir__)
|
9
|
+
APP_PATH = File.expand_path('../spec/dummy/config/application', __dir__)
|
10
|
+
|
11
|
+
# Set up gems listed in the Gemfile.
|
12
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
13
|
+
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
|
14
|
+
|
15
|
+
require 'rails/all'
|
16
|
+
require 'rails/engine/commands'
|
data/composite_content.gemspec
CHANGED
@@ -13,35 +13,35 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.description = 'Build complex contents for your ActiveRecord models in a controllable way.'
|
14
14
|
spec.homepage = 'https://github.com/notus-sh/composite_content'
|
15
15
|
|
16
|
-
spec.metadata
|
17
|
-
|
18
|
-
|
16
|
+
spec.metadata = {
|
17
|
+
'allowed_push_host' => 'https://rubygems.org',
|
18
|
+
'rubygems_mfa_required' => 'true',
|
19
19
|
|
20
|
-
|
21
|
-
|
20
|
+
'bug_tracker_uri' => 'https://github.com/notus-sh/composite_content/issues',
|
21
|
+
'changelog_uri' => 'https://github.com/notus-sh/composite_content/blob/main/CHANGELOG.md',
|
22
|
+
'homepage_uri' => 'https://github.com/notus-sh/composite_content',
|
23
|
+
'source_code_uri' => 'https://github.com/notus-sh/composite_content',
|
24
|
+
'funding_uri' => 'https://opencollective.com/notus-sh'
|
25
|
+
}
|
22
26
|
|
23
27
|
spec.require_paths = ['lib']
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
+
|
29
|
+
excluded_dirs = %r{^(.github|dev|spec)/}
|
30
|
+
excluded_files = %w[.gitignore .rspec Gemfile Gemfile.lock Rakefile]
|
31
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
32
|
+
f.match(excluded_dirs) || excluded_files.include?(f)
|
28
33
|
end
|
29
34
|
|
30
35
|
spec.required_ruby_version = '>= 2.6.0'
|
31
36
|
|
32
37
|
spec.add_dependency 'active_model_validations_reflection'
|
33
|
-
spec.add_dependency 'acts_as_list', '
|
34
|
-
spec.add_dependency 'cocooned', '~>
|
38
|
+
spec.add_dependency 'acts_as_list', '>= 1.0.4'
|
39
|
+
spec.add_dependency 'cocooned', '~> 2.0.0'
|
35
40
|
spec.add_dependency 'rails', '>= 6.1.0'
|
36
41
|
|
37
42
|
# Development tools
|
38
43
|
spec.add_development_dependency 'bundler', '~> 2.1'
|
39
44
|
spec.add_development_dependency 'rake', '~> 13.0'
|
40
45
|
spec.add_development_dependency 'rspec', '~> 3.10'
|
41
|
-
spec.add_development_dependency 'rubocop'
|
42
|
-
spec.add_development_dependency 'rubocop-performance'
|
43
|
-
spec.add_development_dependency 'rubocop-rails'
|
44
|
-
spec.add_development_dependency 'rubocop-rake'
|
45
|
-
spec.add_development_dependency 'rubocop-rspec'
|
46
46
|
spec.add_development_dependency 'shoulda-matchers', '~> 5.0'
|
47
47
|
end
|
data/config/locales/fr.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
class CreateCompositeContentHeadings < ActiveRecord::Migration[6.0]
|
3
|
+
class CreateCompositeContentHeadings < ActiveRecord::Migration[6.0] # :nodoc:
|
4
4
|
def change
|
5
5
|
create_table :composite_content_headings do |t|
|
6
6
|
t.integer :level, null: false, default: 1
|
@@ -6,7 +6,7 @@ module CompositeContent
|
|
6
6
|
# Render the content of a CompositeContent::Slot.
|
7
7
|
def composite_content_render(slot)
|
8
8
|
renders = slot.blocks.collect do |block|
|
9
|
-
render "
|
9
|
+
render "#{CompositeContent::Engine.config.views_path}/blocks/#{block.blockable.block_type}/show", block: block
|
10
10
|
end
|
11
11
|
|
12
12
|
safe_join(renders)
|
@@ -49,7 +49,7 @@ module CompositeContent
|
|
49
49
|
label ||= composite_content_default_label(block_type)
|
50
50
|
opts = (options || {}).except(:count, :form_name, :force_non_association_create)
|
51
51
|
.merge!(form_name: :form,
|
52
|
-
partial:
|
52
|
+
partial: "#{CompositeContent::Engine.config.views_path}/block/form",
|
53
53
|
wrap_object: ->(b) { composite_content_wrap_block(b, block_type) })
|
54
54
|
|
55
55
|
cocooned_add_item_link(label, form, :blocks, opts)
|
@@ -14,7 +14,10 @@ module CompositeContent
|
|
14
14
|
#
|
15
15
|
# # In config/initializers/composite_content.rb
|
16
16
|
# require 'composite_content'
|
17
|
-
# CompositeContent::Engine.config.
|
17
|
+
# CompositeContent::Engine.config.tap do |config|
|
18
|
+
# config.block_types += %w[CompositeContent::Blocks::Image]
|
19
|
+
# config.views_path = 'shared/composite_content'
|
20
|
+
# end
|
18
21
|
|
19
22
|
# Allowed block types
|
20
23
|
config.block_types = %w[
|
@@ -23,6 +26,10 @@ module CompositeContent
|
|
23
26
|
CompositeContent::Blocks::Text
|
24
27
|
]
|
25
28
|
|
29
|
+
# Path where the composite content partials are stored in your application.
|
30
|
+
# Relative to `app/views/`
|
31
|
+
config.views_path = 'composite_content'
|
32
|
+
|
26
33
|
# Engine internals
|
27
34
|
#
|
28
35
|
# Following configurations are here for engine initialization and internal
|
@@ -4,10 +4,13 @@ module CompositeContent
|
|
4
4
|
module Model
|
5
5
|
# Base class for engine's models.
|
6
6
|
# Equivalent to ApplicationRecord in a Rails app.
|
7
|
+
#
|
8
|
+
# rubocop:disable Rails/ApplicationRecord
|
7
9
|
class Base < ::ActiveRecord::Base
|
8
10
|
self.abstract_class = true
|
9
11
|
|
10
12
|
include ActiveModel::Validations::Reflection
|
11
13
|
end
|
14
|
+
# rubocop:enable Rails/ApplicationRecord
|
12
15
|
end
|
13
16
|
end
|
@@ -16,6 +16,12 @@ module CompositeContent
|
|
16
16
|
def block_type
|
17
17
|
self.class.name.demodulize.underscore
|
18
18
|
end
|
19
|
+
|
20
|
+
module ClassMethods # :nodoc:
|
21
|
+
def strong_parameters_names
|
22
|
+
column_names.collect(&:to_sym) - %i[created_at updated_at]
|
23
|
+
end
|
24
|
+
end
|
19
25
|
end
|
20
26
|
end
|
21
27
|
end
|
@@ -32,23 +32,26 @@ module CompositeContent
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def strong_parameters
|
35
|
-
[
|
35
|
+
[
|
36
|
+
:id,
|
37
|
+
{ blocks_attributes: block_strong_parameters_names + [
|
38
|
+
{ blockable_attributes: blockable_strong_parameters_names },
|
39
|
+
:_destroy
|
40
|
+
] }
|
41
|
+
]
|
36
42
|
end
|
37
43
|
|
38
44
|
protected
|
39
45
|
|
40
|
-
def
|
41
|
-
@
|
42
|
-
|
43
|
-
|
46
|
+
def block_strong_parameters_names
|
47
|
+
@block_strong_parameters_names ||= begin
|
48
|
+
parameters = block_class.column_names.collect(&:to_sym)
|
49
|
+
parameters - %i[slot_id blockable_id created_at updated_at]
|
44
50
|
end
|
45
51
|
end
|
46
52
|
|
47
|
-
def
|
48
|
-
@
|
49
|
-
columns = blockable_classes.collect(&:column_names).flatten.collect(&:to_sym).compact.uniq
|
50
|
-
columns - %i[created_at updated_at]
|
51
|
-
end
|
53
|
+
def blockable_strong_parameters_names
|
54
|
+
@blockable_strong_parameters_names ||= blockable_classes.collect(&:strong_parameters_names).flatten.compact.uniq
|
52
55
|
end
|
53
56
|
end
|
54
57
|
end
|
@@ -1,13 +1,14 @@
|
|
1
|
-
|
1
|
+
<%= cocooned_item do %>
|
2
2
|
<%= form.hidden_field :id %>
|
3
3
|
<%= form.hidden_field :position %>
|
4
4
|
<%= form.hidden_field :blockable_type %>
|
5
5
|
|
6
6
|
<%= form.fields_for :blockable, form.object.blockable do |blockable_form| %>
|
7
|
-
<%= render "
|
7
|
+
<%= render "#{CompositeContent::Engine.config.views_path}/blocks/#{form.object.blockable.block_type}/form",
|
8
|
+
form: blockable_form %>
|
8
9
|
<% end %>
|
9
10
|
|
10
11
|
<%= composite_content_move_block_up_link form %>
|
11
12
|
<%= composite_content_move_block_down_link form %>
|
12
13
|
<%= composite_content_remove_block_link form %>
|
13
|
-
|
14
|
+
<% end %>
|
@@ -1,8 +1,9 @@
|
|
1
1
|
<%= form.hidden_field :id %>
|
2
2
|
|
3
|
-
|
3
|
+
<%= cocooned_container reorderable: true do %>
|
4
4
|
<%= form.fields_for :blocks do |block_form| %>
|
5
|
-
<%= render
|
5
|
+
<%= render "#{CompositeContent::Engine.config.views_path}/block/form",
|
6
|
+
form: block_form %>
|
6
7
|
<% end %>
|
7
8
|
|
8
9
|
<div class="links">
|
@@ -10,4 +11,4 @@
|
|
10
11
|
<%= composite_content_add_block_link form, :quote %>
|
11
12
|
<%= composite_content_add_block_link form, :text %>
|
12
13
|
</div>
|
13
|
-
|
14
|
+
<% end %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: composite_content
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gaël-Ian Havard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_validations_reflection
|
@@ -28,14 +28,14 @@ dependencies:
|
|
28
28
|
name: acts_as_list
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 1.0.4
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 1.0.4
|
41
41
|
- !ruby/object:Gem::Dependency
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 2.0.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 2.0.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rails
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,76 +108,6 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '3.10'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: rubocop
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: rubocop-performance
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ">="
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: rubocop-rails
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - ">="
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - ">="
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: rubocop-rake
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - ">="
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '0'
|
160
|
-
type: :development
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - ">="
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: '0'
|
167
|
-
- !ruby/object:Gem::Dependency
|
168
|
-
name: rubocop-rspec
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - ">="
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: '0'
|
174
|
-
type: :development
|
175
|
-
prerelease: false
|
176
|
-
version_requirements: !ruby/object:Gem::Requirement
|
177
|
-
requirements:
|
178
|
-
- - ">="
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
version: '0'
|
181
111
|
- !ruby/object:Gem::Dependency
|
182
112
|
name: shoulda-matchers
|
183
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -200,14 +130,10 @@ executables: []
|
|
200
130
|
extensions: []
|
201
131
|
extra_rdoc_files: []
|
202
132
|
files:
|
203
|
-
- ".rspec"
|
204
|
-
- ".rubocop.yml"
|
205
133
|
- CHANGELOG.md
|
206
|
-
- Gemfile
|
207
|
-
- Gemfile.lock
|
208
134
|
- LICENSE
|
209
135
|
- README.md
|
210
|
-
-
|
136
|
+
- bin/rails
|
211
137
|
- composite_content.gemspec
|
212
138
|
- config/locales/en.yml
|
213
139
|
- config/locales/fr.yml
|
@@ -216,7 +142,6 @@ files:
|
|
216
142
|
- db/migrate/20220807191353_create_composite_content_headings.rb
|
217
143
|
- db/migrate/20220807191402_create_composite_content_quotes.rb
|
218
144
|
- db/migrate/20220807191410_create_composite_content_texts.rb
|
219
|
-
- gemfiles/rails-6.1.x.gemfile
|
220
145
|
- lib/composite_content.rb
|
221
146
|
- lib/composite_content/action_view.rb
|
222
147
|
- lib/composite_content/active_record.rb
|
@@ -248,11 +173,13 @@ homepage: https://github.com/notus-sh/composite_content
|
|
248
173
|
licenses:
|
249
174
|
- Apache-2.0
|
250
175
|
metadata:
|
251
|
-
homepage_uri: https://github.com/notus-sh/composite_content
|
252
|
-
source_code_uri: https://github.com/notus-sh/composite_content
|
253
|
-
changelog_uri: https://github.com/notus-sh/composite_content/CHANGELOG.md
|
254
176
|
allowed_push_host: https://rubygems.org
|
255
177
|
rubygems_mfa_required: 'true'
|
178
|
+
bug_tracker_uri: https://github.com/notus-sh/composite_content/issues
|
179
|
+
changelog_uri: https://github.com/notus-sh/composite_content/blob/main/CHANGELOG.md
|
180
|
+
homepage_uri: https://github.com/notus-sh/composite_content
|
181
|
+
source_code_uri: https://github.com/notus-sh/composite_content
|
182
|
+
funding_uri: https://opencollective.com/notus-sh
|
256
183
|
post_install_message:
|
257
184
|
rdoc_options: []
|
258
185
|
require_paths:
|
@@ -268,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
268
195
|
- !ruby/object:Gem::Version
|
269
196
|
version: '0'
|
270
197
|
requirements: []
|
271
|
-
rubygems_version: 3.
|
198
|
+
rubygems_version: 3.4.1
|
272
199
|
signing_key:
|
273
200
|
specification_version: 4
|
274
201
|
summary: Add composite content capacities to your ActiveRecord models.
|
data/.rspec
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
--require spec_helper
|
data/.rubocop.yml
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
---
|
2
|
-
require:
|
3
|
-
- rubocop-performance
|
4
|
-
- rubocop-rails
|
5
|
-
- rubocop-rake
|
6
|
-
- rubocop-rspec
|
7
|
-
|
8
|
-
inherit_mode:
|
9
|
-
merge:
|
10
|
-
- Exclude
|
11
|
-
|
12
|
-
AllCops:
|
13
|
-
NewCops: enable
|
14
|
-
TargetRubyVersion: 2.6
|
15
|
-
Exclude:
|
16
|
-
- 'spec/dummy/db/schema.rb'
|
17
|
-
|
18
|
-
Layout/LineLength:
|
19
|
-
Max: 120
|
20
|
-
|
21
|
-
# DSLs produce long blocks
|
22
|
-
Metrics/BlockLength:
|
23
|
-
Exclude:
|
24
|
-
- '*.gemspec'
|
25
|
-
- '**/db/migrate/*.rb'
|
26
|
-
- 'spec/**/*_spec.rb'
|
27
|
-
Metrics/MethodLength:
|
28
|
-
Exclude:
|
29
|
-
- '**/db/migrate/*.rb'
|
30
|
-
|
31
|
-
Rails/ApplicationRecord:
|
32
|
-
Exclude:
|
33
|
-
- 'app/**/*.rb'
|
34
|
-
- 'lib/**/*.rb'
|
35
|
-
|
36
|
-
Rails/I18nLocaleTexts:
|
37
|
-
Exclude:
|
38
|
-
- 'spec/dummy/**/*.rb'
|
39
|
-
|
40
|
-
Style/Documentation:
|
41
|
-
Exclude:
|
42
|
-
- '**/db/migrate/*.rb'
|
43
|
-
- 'spec/dummy/**/*.rb'
|
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
@@ -1,239 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
composite_content (1.0.0)
|
5
|
-
active_model_validations_reflection
|
6
|
-
acts_as_list (~> 1.0.4)
|
7
|
-
cocooned (~> 1.4.0)
|
8
|
-
rails (>= 6.1.0)
|
9
|
-
|
10
|
-
GEM
|
11
|
-
remote: https://rubygems.org/
|
12
|
-
specs:
|
13
|
-
actioncable (7.0.3.1)
|
14
|
-
actionpack (= 7.0.3.1)
|
15
|
-
activesupport (= 7.0.3.1)
|
16
|
-
nio4r (~> 2.0)
|
17
|
-
websocket-driver (>= 0.6.1)
|
18
|
-
actionmailbox (7.0.3.1)
|
19
|
-
actionpack (= 7.0.3.1)
|
20
|
-
activejob (= 7.0.3.1)
|
21
|
-
activerecord (= 7.0.3.1)
|
22
|
-
activestorage (= 7.0.3.1)
|
23
|
-
activesupport (= 7.0.3.1)
|
24
|
-
mail (>= 2.7.1)
|
25
|
-
net-imap
|
26
|
-
net-pop
|
27
|
-
net-smtp
|
28
|
-
actionmailer (7.0.3.1)
|
29
|
-
actionpack (= 7.0.3.1)
|
30
|
-
actionview (= 7.0.3.1)
|
31
|
-
activejob (= 7.0.3.1)
|
32
|
-
activesupport (= 7.0.3.1)
|
33
|
-
mail (~> 2.5, >= 2.5.4)
|
34
|
-
net-imap
|
35
|
-
net-pop
|
36
|
-
net-smtp
|
37
|
-
rails-dom-testing (~> 2.0)
|
38
|
-
actionpack (7.0.3.1)
|
39
|
-
actionview (= 7.0.3.1)
|
40
|
-
activesupport (= 7.0.3.1)
|
41
|
-
rack (~> 2.0, >= 2.2.0)
|
42
|
-
rack-test (>= 0.6.3)
|
43
|
-
rails-dom-testing (~> 2.0)
|
44
|
-
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
45
|
-
actiontext (7.0.3.1)
|
46
|
-
actionpack (= 7.0.3.1)
|
47
|
-
activerecord (= 7.0.3.1)
|
48
|
-
activestorage (= 7.0.3.1)
|
49
|
-
activesupport (= 7.0.3.1)
|
50
|
-
globalid (>= 0.6.0)
|
51
|
-
nokogiri (>= 1.8.5)
|
52
|
-
actionview (7.0.3.1)
|
53
|
-
activesupport (= 7.0.3.1)
|
54
|
-
builder (~> 3.1)
|
55
|
-
erubi (~> 1.4)
|
56
|
-
rails-dom-testing (~> 2.0)
|
57
|
-
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
58
|
-
active_model_validations_reflection (0.1.2)
|
59
|
-
activemodel (>= 3.2)
|
60
|
-
activesupport (>= 3.2)
|
61
|
-
activejob (7.0.3.1)
|
62
|
-
activesupport (= 7.0.3.1)
|
63
|
-
globalid (>= 0.3.6)
|
64
|
-
activemodel (7.0.3.1)
|
65
|
-
activesupport (= 7.0.3.1)
|
66
|
-
activerecord (7.0.3.1)
|
67
|
-
activemodel (= 7.0.3.1)
|
68
|
-
activesupport (= 7.0.3.1)
|
69
|
-
activestorage (7.0.3.1)
|
70
|
-
actionpack (= 7.0.3.1)
|
71
|
-
activejob (= 7.0.3.1)
|
72
|
-
activerecord (= 7.0.3.1)
|
73
|
-
activesupport (= 7.0.3.1)
|
74
|
-
marcel (~> 1.0)
|
75
|
-
mini_mime (>= 1.1.0)
|
76
|
-
activesupport (7.0.3.1)
|
77
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
78
|
-
i18n (>= 1.6, < 2)
|
79
|
-
minitest (>= 5.1)
|
80
|
-
tzinfo (~> 2.0)
|
81
|
-
acts_as_list (1.0.4)
|
82
|
-
activerecord (>= 4.2)
|
83
|
-
ast (2.4.2)
|
84
|
-
builder (3.2.4)
|
85
|
-
cocooned (1.4.1)
|
86
|
-
rails (>= 5.0, <= 7.1)
|
87
|
-
concurrent-ruby (1.1.10)
|
88
|
-
crass (1.0.6)
|
89
|
-
diff-lcs (1.5.0)
|
90
|
-
digest (3.1.0)
|
91
|
-
erubi (1.11.0)
|
92
|
-
globalid (1.0.0)
|
93
|
-
activesupport (>= 5.0)
|
94
|
-
i18n (1.12.0)
|
95
|
-
concurrent-ruby (~> 1.0)
|
96
|
-
json (2.6.2)
|
97
|
-
loofah (2.18.0)
|
98
|
-
crass (~> 1.0.2)
|
99
|
-
nokogiri (>= 1.5.9)
|
100
|
-
mail (2.7.1)
|
101
|
-
mini_mime (>= 0.1.1)
|
102
|
-
marcel (1.0.2)
|
103
|
-
method_source (1.0.0)
|
104
|
-
mini_mime (1.1.2)
|
105
|
-
minitest (5.16.2)
|
106
|
-
net-imap (0.2.3)
|
107
|
-
digest
|
108
|
-
net-protocol
|
109
|
-
strscan
|
110
|
-
net-pop (0.1.1)
|
111
|
-
digest
|
112
|
-
net-protocol
|
113
|
-
timeout
|
114
|
-
net-protocol (0.1.3)
|
115
|
-
timeout
|
116
|
-
net-smtp (0.3.1)
|
117
|
-
digest
|
118
|
-
net-protocol
|
119
|
-
timeout
|
120
|
-
nio4r (2.5.8)
|
121
|
-
nokogiri (1.13.8-x86_64-linux)
|
122
|
-
racc (~> 1.4)
|
123
|
-
parallel (1.22.1)
|
124
|
-
parser (3.1.2.1)
|
125
|
-
ast (~> 2.4.1)
|
126
|
-
puma (5.6.4)
|
127
|
-
nio4r (~> 2.0)
|
128
|
-
racc (1.6.0)
|
129
|
-
rack (2.2.4)
|
130
|
-
rack-test (2.0.2)
|
131
|
-
rack (>= 1.3)
|
132
|
-
rails (7.0.3.1)
|
133
|
-
actioncable (= 7.0.3.1)
|
134
|
-
actionmailbox (= 7.0.3.1)
|
135
|
-
actionmailer (= 7.0.3.1)
|
136
|
-
actionpack (= 7.0.3.1)
|
137
|
-
actiontext (= 7.0.3.1)
|
138
|
-
actionview (= 7.0.3.1)
|
139
|
-
activejob (= 7.0.3.1)
|
140
|
-
activemodel (= 7.0.3.1)
|
141
|
-
activerecord (= 7.0.3.1)
|
142
|
-
activestorage (= 7.0.3.1)
|
143
|
-
activesupport (= 7.0.3.1)
|
144
|
-
bundler (>= 1.15.0)
|
145
|
-
railties (= 7.0.3.1)
|
146
|
-
rails-dom-testing (2.0.3)
|
147
|
-
activesupport (>= 4.2.0)
|
148
|
-
nokogiri (>= 1.6)
|
149
|
-
rails-html-sanitizer (1.4.3)
|
150
|
-
loofah (~> 2.3)
|
151
|
-
railties (7.0.3.1)
|
152
|
-
actionpack (= 7.0.3.1)
|
153
|
-
activesupport (= 7.0.3.1)
|
154
|
-
method_source
|
155
|
-
rake (>= 12.2)
|
156
|
-
thor (~> 1.0)
|
157
|
-
zeitwerk (~> 2.5)
|
158
|
-
rainbow (3.1.1)
|
159
|
-
rake (13.0.6)
|
160
|
-
regexp_parser (2.5.0)
|
161
|
-
rexml (3.2.5)
|
162
|
-
rspec (3.11.0)
|
163
|
-
rspec-core (~> 3.11.0)
|
164
|
-
rspec-expectations (~> 3.11.0)
|
165
|
-
rspec-mocks (~> 3.11.0)
|
166
|
-
rspec-core (3.11.0)
|
167
|
-
rspec-support (~> 3.11.0)
|
168
|
-
rspec-expectations (3.11.0)
|
169
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
170
|
-
rspec-support (~> 3.11.0)
|
171
|
-
rspec-mocks (3.11.1)
|
172
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
173
|
-
rspec-support (~> 3.11.0)
|
174
|
-
rspec-support (3.11.0)
|
175
|
-
rubocop (1.34.1)
|
176
|
-
json (~> 2.3)
|
177
|
-
parallel (~> 1.10)
|
178
|
-
parser (>= 3.1.2.1)
|
179
|
-
rainbow (>= 2.2.2, < 4.0)
|
180
|
-
regexp_parser (>= 1.8, < 3.0)
|
181
|
-
rexml (>= 3.2.5, < 4.0)
|
182
|
-
rubocop-ast (>= 1.20.0, < 2.0)
|
183
|
-
ruby-progressbar (~> 1.7)
|
184
|
-
unicode-display_width (>= 1.4.0, < 3.0)
|
185
|
-
rubocop-ast (1.21.0)
|
186
|
-
parser (>= 3.1.1.0)
|
187
|
-
rubocop-performance (1.14.3)
|
188
|
-
rubocop (>= 1.7.0, < 2.0)
|
189
|
-
rubocop-ast (>= 0.4.0)
|
190
|
-
rubocop-rails (2.15.2)
|
191
|
-
activesupport (>= 4.2.0)
|
192
|
-
rack (>= 1.1)
|
193
|
-
rubocop (>= 1.7.0, < 2.0)
|
194
|
-
rubocop-rake (0.6.0)
|
195
|
-
rubocop (~> 1.0)
|
196
|
-
rubocop-rspec (2.12.1)
|
197
|
-
rubocop (~> 1.31)
|
198
|
-
ruby-progressbar (1.11.0)
|
199
|
-
shoulda-matchers (5.1.0)
|
200
|
-
activesupport (>= 5.2.0)
|
201
|
-
sprockets (4.1.1)
|
202
|
-
concurrent-ruby (~> 1.0)
|
203
|
-
rack (> 1, < 3)
|
204
|
-
sprockets-rails (3.4.2)
|
205
|
-
actionpack (>= 5.2)
|
206
|
-
activesupport (>= 5.2)
|
207
|
-
sprockets (>= 3.0.0)
|
208
|
-
sqlite3 (1.4.4)
|
209
|
-
strscan (3.0.4)
|
210
|
-
thor (1.2.1)
|
211
|
-
timeout (0.3.0)
|
212
|
-
tzinfo (2.0.5)
|
213
|
-
concurrent-ruby (~> 1.0)
|
214
|
-
unicode-display_width (2.2.0)
|
215
|
-
websocket-driver (0.7.5)
|
216
|
-
websocket-extensions (>= 0.1.0)
|
217
|
-
websocket-extensions (0.1.5)
|
218
|
-
zeitwerk (2.6.0)
|
219
|
-
|
220
|
-
PLATFORMS
|
221
|
-
x86_64-linux
|
222
|
-
|
223
|
-
DEPENDENCIES
|
224
|
-
bundler (~> 2.1)
|
225
|
-
composite_content!
|
226
|
-
puma
|
227
|
-
rake (~> 13.0)
|
228
|
-
rspec (~> 3.10)
|
229
|
-
rubocop
|
230
|
-
rubocop-performance
|
231
|
-
rubocop-rails
|
232
|
-
rubocop-rake
|
233
|
-
rubocop-rspec
|
234
|
-
shoulda-matchers (~> 5.0)
|
235
|
-
sprockets-rails
|
236
|
-
sqlite3
|
237
|
-
|
238
|
-
BUNDLED WITH
|
239
|
-
2.3.19
|
data/Rakefile
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'bundler/setup'
|
4
|
-
|
5
|
-
APP_RAKEFILE = File.expand_path('spec/dummy/Rakefile', __dir__)
|
6
|
-
load 'rails/tasks/engine.rake'
|
7
|
-
load 'rails/tasks/statistics.rake'
|
8
|
-
|
9
|
-
require 'bundler/gem_tasks'
|
10
|
-
|
11
|
-
require 'rspec/core/rake_task'
|
12
|
-
RSpec::Core::RakeTask.new
|
13
|
-
|
14
|
-
require 'rubocop/rake_task'
|
15
|
-
RuboCop::RakeTask.new
|
16
|
-
|
17
|
-
task default: :spec
|