diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..a2c2935d --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,48 @@ +# Changelog + +All notable changes to this project's source code will be documented in this file. Items under `Unreleased` are upcoming features that will be out in the next version. + +## Contributors + +Please follow the recommendations outlined at [keepachangelog.com](https://keepachangelog.com). Please use the existing headings and styling as a guide, and add a link for the version diff at the bottom of the file. Also, please update the `Unreleased` link to compare it to the latest release version. + +For all changes prior to the inception of this project, see the [Release History](https://github.com/comfy/comfortable-mexican-sofa/releases) of ComfortableMexicanSofa. + +## Versions + +## [Unreleased] + +Changes since the last non-beta release. + +_Please add entries here for your pull requests that have not yet been released._ + +## [3.0.1] - 2024-12-01 + +### Added + +- Added this CHANGELOG +- Added badges to README for CI build, Test Coverage, Gem version, Gem downloads, and last release + +## [3.0.0] - 2024-11-30 + +First release of `comfortable_media_surfer`. This new gem is a revival of [ComfortableMexicanSofa](https://github.com/comfy/comfortable-mexican-sofa) which had been dormant for nearly 5 years. + +### Fixed + +- Fixed all broken tests to now pass on Rails 6.x and 7.x +- Rubocop linting + +### Added + +- Rails 7 compatibility, including many config and code changes. See the [PR](https://github.com/shakacode/comfortable-media-surfer/pull/1/files) for full details +- Added github actions workflows for CI build and test coverage +- Added CMS tags for navigation: children, siblings, breadcrumbs, with tests +- Added CMS tag for embedded audio, with tests +- Added CMS tag for image, with tests +- Added ability to write CMS snippets in Markdown, with tests + +### Changed + +- Rebranded ComfortableMexicanSofa as ComfortableMediaSurfer in to publish gem. All database table names and schema remain unchanged +- Rails 5 compatibility dropped, as it is EOL + \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 55f86fa6..e81fdc41 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,7 +27,7 @@ Fork the project. Optionally, create a branch you want to work on. ### 4. Make a pull request - If you never done it before read this: https://help.github.com/articles/using-pull-requests -- When PR is submitted check if TravisCI ran all tests successfully and Rubocop didn't raise any issues +- When PR is submitted check if Github actions CI ran all tests successfully ### 5. Done! diff --git a/Gemfile b/Gemfile index 9fb971d9..76d35285 100644 --- a/Gemfile +++ b/Gemfile @@ -10,6 +10,7 @@ gem 'rails', '~> 7.2' group :development, :test do gem 'autoprefixer-rails', '~> 10.4.16.0' gem 'byebug', '~> 11.1.0', platforms: %i[mri mingw x64_mingw] + gem 'gem-release' gem 'image_processing', '>= 1.12.0' gem 'sqlite3', '~> 1.6.7' # gem 'mysql2', '~> 0.5' diff --git a/README.md b/README.md index 72a4712d..7984ef24 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ +[![Rails CI](https://github.com/shakacode/comfortable-media-surfer/actions/workflows/rubyonrails.yml/badge.svg)](https://github.com/shakacode/comfortable-media-surfer/actions/workflows/rubyonrails.yml) +[![Coverage Status](https://coveralls.io/repos/github/shakacode/comfortable-media-surfer/badge.svg?branch=master)](https://coveralls.io/github/shakacode/comfortable-media-surfer?branch=master) +[![Gem Version](https://img.shields.io/gem/v/comfortable_media_surfer.svg?style=flat)](http://rubygems.org/gems/comfortable_media_surfer) +[![Gem Downloads](https://img.shields.io/gem/dt/comfortable_media_surfer.svg?style=flat)](http://rubygems.org/gems/comfortable_media_surfer) +[![GitHub Release Date - Published_At](https://img.shields.io/github/release-date/shakacode/comfortable-media-surfer?label=last%20release&color=seagreen)](https://github.com/shakacode/comfortable-media-surfer/releases) + # ComfortableMediaSurfer ComfortableMediaSurfer is a powerful Ruby 6.1+ CMS (Content Management System) Engine, picking up where [ComfortableMexicanSofa](https://github.com/comfy/comfortable-mexican-sofa) left off. @@ -88,9 +94,8 @@ in Github releases. #### Contributing -ComfortableMediaSurfer repository can be ran like a regular Rails application in -development environment. It's as easy to work on as any other Rails app out there. -For more detail take a look at [CONTRIBUTING](CONTRIBUTING.md) +ComfortableMediaSurfer can run like any Rails application in development. It's as easy to work on as any other Rails app. For more detail see [CONTRIBUTING](CONTRIBUTING.md) + #### Testing diff --git a/comfortable_media_surfer.gemspec b/comfortable_media_surfer.gemspec index c21c3937..0993d478 100644 --- a/comfortable_media_surfer.gemspec +++ b/comfortable_media_surfer.gemspec @@ -33,5 +33,4 @@ Gem::Specification.new do |spec| spec.add_dependency 'rails-i18n', '>= 6.0.0' spec.add_dependency 'sassc-rails', '~> 2.1', '>= 2.1.2' spec.add_dependency 'sprockets-rails', '~> 3.4', '>= 3.4.2' - spec.add_development_dependency "gem-release" end diff --git a/lib/comfortable_media_surfer/version.rb b/lib/comfortable_media_surfer/version.rb index 0ad97fe0..9b38f7b6 100644 --- a/lib/comfortable_media_surfer/version.rb +++ b/lib/comfortable_media_surfer/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module ComfortableMediaSurfer - VERSION = '3.0.0' + VERSION = '3.0.1' end diff --git a/rakelib/create_release.rake b/rakelib/create_release.rake index 96aab8b1..6d6d33c9 100644 --- a/rakelib/create_release.rake +++ b/rakelib/create_release.rake @@ -1,6 +1,6 @@ # frozen_string_literal: true -require "English" +require 'English' desc("Releases the gem package using the given version. @@ -17,16 +17,16 @@ task :create_release, %i[gem_version dry_run] do |_t, args| args_hash = args.to_hash is_dry_run = Release.object_to_boolean(args_hash[:dry_run]) - gem_version = args_hash.fetch(:gem_version, "").strip + gem_version = args_hash.fetch(:gem_version, '').strip gem_root = Release.gem_root Release.update_the_local_project Release.ensure_there_is_nothing_to_commit Release.sh_in_dir(gem_root, "gem bump --no-commit #{gem_version == '' ? '' : %(--version #{gem_version})}") - Release.sh_in_dir(gem_root, "bundle install") + Release.sh_in_dir(gem_root, 'bundle install') Release.sh_in_dir(gem_root, "git commit -am 'Bump version to #{gem_version}'") - Release.sh_in_dir(gem_root, "git push") + Release.sh_in_dir(gem_root, 'git push') # See https://github.com/svenfuchs/gem-release Release.release_the_new_gem_version unless is_dry_run @@ -36,7 +36,7 @@ module Release extend FileUtils class << self def gem_root - File.expand_path("..", __dir__) + File.expand_path('..', __dir__) end # Executes a string or an array of strings in a shell in the given directory in an unbundled environment @@ -47,35 +47,35 @@ module Release def ensure_there_is_nothing_to_commit status = `git status --porcelain` - return if $CHILD_STATUS.success? && status == "" + return if $CHILD_STATUS.success? && status == '' error = if $CHILD_STATUS.success? - "You have uncommitted code. Please commit or stash your changes before continuing" + 'You have uncommitted code. Please commit or stash your changes before continuing' else - "You do not have Git installed. Please install Git, and commit your changes before continuing" + 'You do not have Git installed. Please install Git, and commit your changes before continuing' end raise(error) end def object_to_boolean(value) - [true, "true", "yes", 1, "1", "t"].include?(value.instance_of?(String) ? value.downcase : value) + [true, 'true', 'yes', 1, '1', 't'].include?(value.instance_of?(String) ? value.downcase : value) end def update_the_local_project - puts "Pulling latest commits from remote repository" + puts 'Pulling latest commits from remote repository' - sh_in_dir(gem_root, "git pull --rebase") - raise "Failed in pulling latest changes from default remote repository." unless $CHILD_STATUS.success? + sh_in_dir(gem_root, 'git pull --rebase') + raise 'Failed in pulling latest changes from default remote repository.' unless $CHILD_STATUS.success? rescue Errno::ENOENT - raise "Ensure you have Git and Bundler installed before continuing." + raise 'Ensure you have Git and Bundler installed before continuing.' end def release_the_new_gem_version - puts "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ" - puts "Use the OTP for RubyGems!" - puts "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ" + puts 'ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ' + puts 'Use the OTP for RubyGems!' + puts 'ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ' - sh_in_dir(gem_root, "gem release --push --tag") + sh_in_dir(gem_root, 'gem release --push --tag') end end end