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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e13956535a432a90cf4905da00b95ed763fcf7045666eb2951fa0e61cda1687
4
- data.tar.gz: ffb8456f3b63e657765e1f99f3063cd10e4358fb1ffb8edf889d2d51858618c9
3
+ metadata.gz: 4a85a3f0b343392faa4c1a694a01ed10f22a2bbc4a0226457ccc4477560ca3d4
4
+ data.tar.gz: 637c668f4813532a4c184b7513b72497c636ff3d507d0f165b586b580cf3f536
5
5
  SHA512:
6
- metadata.gz: b457c2eaad7e7f76d3f8ae944d9f7dc7f28dbb1a4892e08f4ba3369f4037ab8818c26084abaf84d0e5aee897f9a723d9c5d84616031fb8ad4b70cdf338a29a80
7
- data.tar.gz: bd40c8934a344398aaa8d89be7191ca5d7d0391f1ad544cc9c3faa5e26c91db0dc86f9314cc356b2095ad1e1c474bbb479795dbe348e864e957af79537a8db04
6
+ metadata.gz: 2f48fbc4b720a10e251a088d125a0e3e45e4539a7f2e5d697209f8ba21afa7f206a875e53702ed87f2819391886e344c32fc2cb3b170dd32a53e68c6a6b275cb
7
+ data.tar.gz: 78dbda62d0289007c4cf021866585057b4448a1452f06dd1b97d718b0ce597dc98b5a31fcf54962e13662bf0da012aa2106b0a5ebad0d1406e525b9ff7e8bd1c
@@ -0,0 +1,7 @@
1
+ version: 2
2
+ updates:
3
+ # Enable version updates for npm
4
+ - package-ecosystem: "bundler"
5
+ directory: "/" # The root directory where your Gemfile is located
6
+ schedule:
7
+ interval: "monthly" # Options: "daily", "weekly", "monthly"
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.16.0'
12
- gem 'byebug', '~> 11.1.0', platforms: %i[mri mingw x64_mingw]
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', '~> 6.1.2'
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.63.0', require: false
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
- rake db:migrate
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 = $('li#comfy_cms_page_<%=@page.id%>');
3
- li.find('.item .toggle').first().toggleClass('open');
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.find('ul.children')[0]) {
7
- li.append('<ul class="children sortable pl-md-3"><%= escape_javascript(render partial: "index_branch", collection: @page.children) %></ul>');
8
- CMS.sortableList.dispose();
9
- CMS.sortableList.init();
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.find('ul.children').remove();
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', '~> 4.12', '>= 4.12.0'
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
@@ -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
 
@@ -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
@@ -0,0 +1,5 @@
1
+ class AddMarkdownToSnippets < ActiveRecord::Migration[7.1]
2
+ def change
3
+ add_column :comfy_cms_snippets, :markdown, :boolean, default: false
4
+ end
5
+ end
@@ -30,7 +30,7 @@ class ComfortableMediaSurfer::Content::Tags::Audio < ComfortableMediaSurfer::Con
30
30
  end
31
31
 
32
32
  def content
33
- format("#{@style}<audio controls class=\"audioplayer\" src=#{@path}></audio>")
33
+ "#{@style}<audio controls class=\"audioplayer\" src=#{@path}></audio>"
34
34
  end
35
35
  end
36
36
 
@@ -34,7 +34,7 @@ class ComfortableMediaSurfer::Content::Tags::Breadcrumbs < ComfortableMediaSurfe
34
34
  end
35
35
 
36
36
  def content
37
- format("#{@style}#{@links}")
37
+ "#{@style}#{@links}"
38
38
  end
39
39
  end
40
40
 
@@ -43,7 +43,7 @@ class ComfortableMediaSurfer::Content::Tags::Children < ComfortableMediaSurfer::
43
43
  end
44
44
  @list += '</ul>'
45
45
  end
46
- format("#{@style}#{@list}")
46
+ "#{@style}#{@list}"
47
47
  end
48
48
  end
49
49
 
@@ -57,7 +57,7 @@ class ComfortableMediaSurfer::Content::Tags::Siblings < ComfortableMediaSurfer::
57
57
  end
58
58
  @links += '</div>'
59
59
  end
60
- format("#{@style}#{@links}")
60
+ "#{@style}#{@links}"
61
61
  end
62
62
  end
63
63
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ComfortableMediaSurfer
4
- VERSION = '3.1.1'
4
+ VERSION = '3.1.2'
5
5
  end
@@ -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/occams.rb
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
- destination = File.expand_path('db/migrate/01_create_cms.rb', destination_root)
15
- migration_dir = File.dirname(destination)
16
- destination = self.class.migration_exists?(migration_dir, 'create_cms')
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
- if destination
19
- puts "\e[0m\e[31mFound existing cms_create.rb migration. Remove it if you want to regenerate.\e[0m"
20
- else
21
- migration_template 'db/migrate/01_create_cms.rb', 'db/migrate/create_cms.rb'
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.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: 2025-02-10 00:00:00.000000000 Z
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: 4.12.0
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: 4.12.0
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.5.11
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: []