comfortable_media_surfer 3.1.1 → 3.1.2
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 +7 -0
- data/CHANGELOG.md +27 -0
- data/CONTRIBUTING.md +3 -2
- data/Gemfile +4 -4
- data/README.md +4 -2
- data/app/views/comfy/admin/cms/pages/toggle_branch.js.erb +14 -8
- data/comfortable_media_surfer.gemspec +2 -1
- data/config/application.rb +3 -0
- data/db/migrate/01_create_cms.rb +0 -1
- data/db/migrate/02_add_markdown_to_snippets.rb +5 -0
- data/lib/comfortable_media_surfer/content/tags/audio.rb +1 -1
- data/lib/comfortable_media_surfer/content/tags/breadcrumbs.rb +1 -1
- data/lib/comfortable_media_surfer/content/tags/children.rb +1 -1
- data/lib/comfortable_media_surfer/content/tags/siblings.rb +1 -1
- data/lib/comfortable_media_surfer/version.rb +1 -1
- data/lib/generators/comfy/cms/README +2 -9
- data/lib/generators/comfy/cms/cms_generator.rb +9 -7
- metadata +25 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a85a3f0b343392faa4c1a694a01ed10f22a2bbc4a0226457ccc4477560ca3d4
|
4
|
+
data.tar.gz: 637c668f4813532a4c184b7513b72497c636ff3d507d0f165b586b580cf3f536
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f48fbc4b720a10e251a088d125a0e3e45e4539a7f2e5d697209f8ba21afa7f206a875e53702ed87f2819391886e344c32fc2cb3b170dd32a53e68c6a6b275cb
|
7
|
+
data.tar.gz: 78dbda62d0289007c4cf021866585057b4448a1452f06dd1b97d718b0ce597dc98b5a31fcf54962e13662bf0da012aa2106b0a5ebad0d1406e525b9ff7e8bd1c
|
data/CHANGELOG.md
CHANGED
@@ -12,6 +12,32 @@ For all changes prior to the inception of this project, see the [Release History
|
|
12
12
|
|
13
13
|
## [Unreleased]
|
14
14
|
|
15
|
+
### Fixed
|
16
|
+
|
17
|
+
- Fixed Expand/Collapse error in Admin/Pages.
|
18
|
+
- Include sassc-rails to gemspec, since it is deprecated after rails 7.0.8
|
19
|
+
- Update documentation to reflect recent changes
|
20
|
+
|
21
|
+
### Added
|
22
|
+
|
23
|
+
- added migration for Markdown snippets
|
24
|
+
|
25
|
+
## [v3.1.1] - 2025-02-08
|
26
|
+
|
27
|
+
### Fixed
|
28
|
+
|
29
|
+
- Fixed scss: use scss imports, not css ones that cannot be resolved by the browser
|
30
|
+
|
31
|
+
### Added
|
32
|
+
|
33
|
+
- Added rake task to compile assets, corresponding post install message
|
34
|
+
- Added import Rails from UJS
|
35
|
+
- Added missing jQuery import
|
36
|
+
|
37
|
+
### Removed
|
38
|
+
|
39
|
+
- Removed yarn, as not needed
|
40
|
+
|
15
41
|
## [v3.1.0] - 2024-12-31 (gem yanked, pending resolution of [Issue 8](https://github.com/shakacode/comfortable-media-surfer/issues/8)
|
16
42
|
|
17
43
|
### Added
|
@@ -55,5 +81,6 @@ First release of `comfortable_media_surfer`. This new gem is a revival of [Comfo
|
|
55
81
|
- Rebranded **ComfortableMexicanSofa** as **ComfortableMediaSurfer** in order to publish new gem (database table names and schema have not changed).
|
56
82
|
|
57
83
|
[Unreleased]: https://github.com/shakacode/comfortable-media-surfer/compare/v3.1.0...master
|
84
|
+
[v3.1.1]: https://github.com/shakacode/comfortable-media-surfer/compare/v3.1.0...v3.1.1
|
58
85
|
[v3.1.0]: https://github.com/shakacode/comfortable-media-surfer/compare/v3.0.0...v3.1.0
|
59
86
|
[v3.0.0]: https://github.com/shakacode/comfortable-media-surfer/compare/v2.0.19...v3.0.0
|
data/CONTRIBUTING.md
CHANGED
@@ -8,15 +8,16 @@ Fork the project. Optionally, create a branch you want to work on.
|
|
8
8
|
|
9
9
|
### 2. Get it running locally
|
10
10
|
|
11
|
-
- Install NodeJS and yarn
|
12
|
-
- Install JS dependencies with `yarn`
|
13
11
|
- Install gem dependencies with `bundle install`
|
14
12
|
- There's nothing to configure, by default database is SQLite so it will be
|
15
13
|
created for you. Just run `bundle exec rake db:migrate`
|
14
|
+
- Prepare the environment by running `rails comfy:compile_assets`, and
|
15
|
+
`rake db:test:prepare`
|
16
16
|
- Make sure that existing tests are passing by running `bundle exec rake test`
|
17
17
|
- There are system tests that can be run with `bundle exec rake test:system`.
|
18
18
|
You need to have `chromedriver` installed for that.
|
19
19
|
- You should be able to start the app via `bin/rails s` and navigate to http://localhost:3000/admin
|
20
|
+
and log in with username 'user' and password 'pass'
|
20
21
|
|
21
22
|
### 3. Hack away
|
22
23
|
|
data/Gemfile
CHANGED
@@ -8,8 +8,8 @@ gemspec
|
|
8
8
|
gem 'rails', '~> 8.0'
|
9
9
|
|
10
10
|
group :development, :test do
|
11
|
-
gem 'autoprefixer-rails', '~> 10.4.
|
12
|
-
gem 'byebug', '~>
|
11
|
+
gem 'autoprefixer-rails', '~> 10.4.21.0'
|
12
|
+
gem 'byebug', '~> 12.0.0', platforms: %i[mri mingw x64_mingw]
|
13
13
|
gem 'gem-release'
|
14
14
|
gem 'image_processing', '>= 1.12.0'
|
15
15
|
gem 'propshaft', '~> 1.1.0'
|
@@ -24,7 +24,7 @@ group :development do
|
|
24
24
|
end
|
25
25
|
|
26
26
|
group :test do
|
27
|
-
gem 'brakeman', '~>
|
27
|
+
gem 'brakeman', '~> 7.0.2'
|
28
28
|
gem 'bundler-audit', '~> 0.9.1'
|
29
29
|
gem 'coveralls_reborn', '~> 0.28.0', require: false
|
30
30
|
gem 'cuprite', '>= 0.15'
|
@@ -35,7 +35,7 @@ group :test do
|
|
35
35
|
gem 'ostruct'
|
36
36
|
gem 'puma'
|
37
37
|
gem 'rails-controller-testing', '~> 1.0.5'
|
38
|
-
gem 'rubocop', '~> 1.
|
38
|
+
gem 'rubocop', '~> 1.75.7', require: false
|
39
39
|
gem 'rubocop-minitest'
|
40
40
|
gem 'rubocop-rails'
|
41
41
|
gem 'simplecov', '~> 0.22.0', require: false
|
data/README.md
CHANGED
@@ -42,7 +42,8 @@ Then from the Rails project's root run:
|
|
42
42
|
```
|
43
43
|
bundle install
|
44
44
|
rails generate comfy:cms
|
45
|
-
|
45
|
+
rails db:migrate
|
46
|
+
rails comfy:compile_assets
|
46
47
|
```
|
47
48
|
|
48
49
|
Now take a look inside your `config/routes.rb` file. You'll see where routes attach for the admin area and content serving. Make sure that content serving route appears as a very last item or it will make all other routes to be inaccessible.
|
@@ -84,6 +85,7 @@ UPDATE comfy_cms_fragments SET record_type = 'Comfy::Cms::Snippet' WHERE record_
|
|
84
85
|
UPDATE comfy_cms_revisions SET record_type = 'Comfy::Cms::Page' WHERE record_type = 'Occams::Cms::Page';
|
85
86
|
UPDATE comfy_cms_revisions SET record_type = 'Comfy::Cms::Layout' WHERE record_type = 'Occams::Cms::Layout';
|
86
87
|
UPDATE comfy_cms_revisions SET record_type = 'Comfy::Cms::Snippet' WHERE record_type = 'Occams::Cms::Snippet';
|
88
|
+
UPDATE active_storage_attachments SET record_type = 'Comfy::Cms::File' WHERE record_type = 'Occams::Cms::File';
|
87
89
|
```
|
88
90
|
|
89
91
|
## Quick Start Guide
|
@@ -140,5 +142,5 @@ ComfortableMediaSurfer can run like any Rails application in development. It's a
|
|
140
142
|
|
141
143
|
---
|
142
144
|
|
143
|
-
Copyright 2010-2019 Oleg Khabarov, 2024 ShakaCode LLC
|
145
|
+
Copyright 2010-2019 Oleg Khabarov, 2024-2025 ShakaCode LLC
|
144
146
|
Released under the [MIT license](LICENSE)
|
@@ -1,13 +1,19 @@
|
|
1
1
|
// TODO: Extract this so the server only renders the HTML.
|
2
|
-
var li =
|
3
|
-
li.
|
4
|
-
|
2
|
+
var li = document.querySelector('li#comfy_cms_page_<%=@page.id%>');
|
3
|
+
var toggle = li.querySelector('.item .toggle');
|
4
|
+
toggle.classList.toggle('open');
|
5
5
|
<% if session[:cms_page_tree].member?(@page.id.to_s) %>
|
6
|
-
if(!li.
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
if(!li.querySelector('ul.children')) {
|
7
|
+
var childrenList = document.createElement('ul');
|
8
|
+
childrenList.className = 'children sortable pl-md-3';
|
9
|
+
childrenList.innerHTML = '<%= escape_javascript(render partial: "index_branch", collection: @page.children) %>';
|
10
|
+
li.appendChild(childrenList);
|
11
|
+
CMS.sortableList.dispose();
|
12
|
+
CMS.sortableList.init();
|
10
13
|
}
|
11
14
|
<% else %>
|
12
|
-
li.
|
15
|
+
var childrenList = li.querySelector('ul.children');
|
16
|
+
if (childrenList) {
|
17
|
+
childrenList.remove();
|
18
|
+
}
|
13
19
|
<% end %>
|
@@ -29,7 +29,8 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_dependency 'kaminari', '~> 1.2', '>= 1.2.2'
|
30
30
|
spec.add_dependency 'kramdown', '~> 2.4', '>= 2.4.0'
|
31
31
|
spec.add_dependency 'mimemagic', '~> 0.4', '>= 0.4.3'
|
32
|
-
spec.add_dependency 'mini_magick', '
|
32
|
+
spec.add_dependency 'mini_magick', '>= 4.12', '< 6.0'
|
33
33
|
spec.add_dependency 'rails', '>= 7.0.0'
|
34
34
|
spec.add_dependency 'rails-i18n', '>= 6.0.0'
|
35
|
+
spec.add_dependency 'sassc-rails', '>= 2.1.2'
|
35
36
|
end
|
data/config/application.rb
CHANGED
@@ -10,6 +10,9 @@ Bundler.require(*Rails.groups)
|
|
10
10
|
|
11
11
|
module ComfortableMediaSurfer
|
12
12
|
class Application < Rails::Application
|
13
|
+
# Ensuring that ActiveStorage routes are loaded before Comfy's globbing
|
14
|
+
# route. Without this file serving routes are inaccessible.
|
15
|
+
config.railties_order = [ActiveStorage::Engine, :main_app, :all]
|
13
16
|
# Load defaults based on Rails major/minor version
|
14
17
|
config.load_defaults Rails.version.scan(%r{^\d+\.\d+}).first.to_f
|
15
18
|
|
data/db/migrate/01_create_cms.rb
CHANGED
@@ -88,7 +88,6 @@ class CreateCms < ActiveRecord::Migration[5.2]
|
|
88
88
|
t.integer :site_id, null: false
|
89
89
|
t.string :label, null: false
|
90
90
|
t.string :identifier, null: false
|
91
|
-
t.boolean :markdown
|
92
91
|
t.text :content, limit: LIMIT
|
93
92
|
t.integer :position, null: false, default: 0
|
94
93
|
t.timestamps
|
@@ -30,7 +30,7 @@ class ComfortableMediaSurfer::Content::Tags::Audio < ComfortableMediaSurfer::Con
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def content
|
33
|
-
|
33
|
+
"#{@style}<audio controls class=\"audioplayer\" src=#{@path}></audio>"
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
@@ -13,16 +13,9 @@ You are almost done. Don't forget to:
|
|
13
13
|
|
14
14
|
[Optional] - If you want to store files in your CMS with ActiveStorage: `rails active_storage:install`
|
15
15
|
[Mandatory] - Create the tables in your database: `rails db:migrate`
|
16
|
+
[Mandatory] - Run `rails comfy:compile_assets`
|
16
17
|
|
17
18
|
Then go to http://your-rails-app/admin to start adding content.
|
18
19
|
|
19
20
|
Default username and password are: user / pass
|
20
|
-
Change these defaults in config/initializers/
|
21
|
-
|
22
|
-
----------------------------
|
23
|
-
IF YOU ARE ON RAILS 6.x
|
24
|
-
----------------------------
|
25
|
-
and encounter errors referencing webpacker:
|
26
|
-
ensure that you have nvm installed, and then run
|
27
|
-
- nvm install 13.7 && nvm use 13.7
|
28
|
-
- rails webpacker:install
|
21
|
+
Change these defaults in config/initializers/comfortable_media_surfer.rb
|
@@ -11,14 +11,16 @@ module Comfy
|
|
11
11
|
source_root File.expand_path('../../../..', __dir__)
|
12
12
|
|
13
13
|
def generate_migration
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
%w[01_create_cms 02_add_markdown_to_snippets].each do |migration|
|
15
|
+
destination = File.expand_path("db/migrate/#{migration}.rb", destination_root)
|
16
|
+
migration_dir = File.dirname(destination)
|
17
|
+
destination = self.class.migration_exists?(migration_dir, migration)
|
17
18
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
if destination
|
20
|
+
puts "\e[0m\e[31mFound existing #{migration}.rb migration. Remove it if you want to regenerate.\e[0m"
|
21
|
+
else
|
22
|
+
migration_template "db/migrate/#{migration}.rb", "db/migrate/#{migration[3..]}.rb"
|
23
|
+
end
|
22
24
|
end
|
23
25
|
end
|
24
26
|
|
metadata
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: comfortable_media_surfer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oleg Khabarov
|
8
8
|
- Andrew vonderLuft
|
9
9
|
- ShakaCode
|
10
|
-
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: active_link_to
|
@@ -156,22 +155,22 @@ dependencies:
|
|
156
155
|
name: mini_magick
|
157
156
|
requirement: !ruby/object:Gem::Requirement
|
158
157
|
requirements:
|
159
|
-
- - "
|
158
|
+
- - ">="
|
160
159
|
- !ruby/object:Gem::Version
|
161
160
|
version: '4.12'
|
162
|
-
- - "
|
161
|
+
- - "<"
|
163
162
|
- !ruby/object:Gem::Version
|
164
|
-
version:
|
163
|
+
version: '6.0'
|
165
164
|
type: :runtime
|
166
165
|
prerelease: false
|
167
166
|
version_requirements: !ruby/object:Gem::Requirement
|
168
167
|
requirements:
|
169
|
-
- - "
|
168
|
+
- - ">="
|
170
169
|
- !ruby/object:Gem::Version
|
171
170
|
version: '4.12'
|
172
|
-
- - "
|
171
|
+
- - "<"
|
173
172
|
- !ruby/object:Gem::Version
|
174
|
-
version:
|
173
|
+
version: '6.0'
|
175
174
|
- !ruby/object:Gem::Dependency
|
176
175
|
name: rails
|
177
176
|
requirement: !ruby/object:Gem::Requirement
|
@@ -200,6 +199,20 @@ dependencies:
|
|
200
199
|
- - ">="
|
201
200
|
- !ruby/object:Gem::Version
|
202
201
|
version: 6.0.0
|
202
|
+
- !ruby/object:Gem::Dependency
|
203
|
+
name: sassc-rails
|
204
|
+
requirement: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: 2.1.2
|
209
|
+
type: :runtime
|
210
|
+
prerelease: false
|
211
|
+
version_requirements: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: 2.1.2
|
203
216
|
description: ComfortableMediaSurfer is a powerful Rails 7.0+ CMS Engine
|
204
217
|
email:
|
205
218
|
- justin@shakacode.com
|
@@ -209,6 +222,7 @@ extra_rdoc_files: []
|
|
209
222
|
files:
|
210
223
|
- ".codeclimate.yml"
|
211
224
|
- ".gitattributes"
|
225
|
+
- ".github/dependabot.yml"
|
212
226
|
- ".github/issue_template.md"
|
213
227
|
- ".github/pull_request_template.md"
|
214
228
|
- ".github/workflows/coveralls.yml"
|
@@ -552,6 +566,7 @@ files:
|
|
552
566
|
- db/cms_seeds/sample-site/snippets/default.html
|
553
567
|
- db/migrate/00_create_active_storage_tables.active_storage.rb
|
554
568
|
- db/migrate/01_create_cms.rb
|
569
|
+
- db/migrate/02_add_markdown_to_snippets.rb
|
555
570
|
- gemfiles/7.1.gemfile
|
556
571
|
- gemfiles/7.2.gemfile
|
557
572
|
- gemfiles/8.0.gemfile
|
@@ -654,8 +669,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
654
669
|
- !ruby/object:Gem::Version
|
655
670
|
version: '0'
|
656
671
|
requirements: []
|
657
|
-
rubygems_version: 3.
|
658
|
-
signing_key:
|
672
|
+
rubygems_version: 3.6.9
|
659
673
|
specification_version: 4
|
660
674
|
summary: Rails 7.0+ CMS Engine
|
661
675
|
test_files: []
|