diff --git a/Appraisals b/Appraisals
index f307c24..ded12be 100644
--- a/Appraisals
+++ b/Appraisals
@@ -1,5 +1,5 @@
appraise "rails-6.0" do
- gem 'rails', '~> 6.0'
+ gem 'rails', '6.0.6.1'
end
appraise "rails-6.1" do
@@ -7,7 +7,7 @@ appraise "rails-6.1" do
end
appraise "rails-7.0" do
- gem 'rails', '~> 7.0'
+ gem 'rails', '7.0.8.4'
end
appraise "rails-7.1" do
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d0777a9..219d114 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,19 @@
### Unreleased
+### Version 6.0.0
+
+- Furthermore support Rails 7.0
+- Removing the dependencies for sprocket-rails as a consequences of that gem no longer needed in Rails 7
+
+### Version 5.0.0
+
+- Add dependencies to support Rails 6.1
+- parent_name is deprecated in rails 6 and gone in 6.1
+- Update I18n translation function
+- Change assertion function in spec
+- Bump ruby version to be at least 3.0
+
### Version 4.0.0
- [Pull Request 28](https://github.com/winston/rails_utils/pull/28) - [Development] remove `.ruby-version` file - by @JuanitoFatas
diff --git a/README.md b/README.md
index 040c137..b514c5d 100644
--- a/README.md
+++ b/README.md
@@ -3,6 +3,20 @@
Rails helpers based on opinionated project practices. Useful for structuring CSS and JavaScript,
display title of the page, and flash messages with Bootstrap.
+## Forkception
+
+This repo is a fork of:
+
+- The [fonglh](https://github.com/fonglh/rails_utils) gem
+- which is the fork of the original gem maintained by [Winston](https://github.com/winston/rails_utils)
+
+## Requirements
+
+- Ruby >= 3.0, <= 3.2
+- Rails >= 6.0, <= 7.1
+
+The library might work for the higher version, however it's only tested for the specs mentioned above.
+
## Installation
Add rails_utils to your application's Gemfile:
@@ -36,7 +50,7 @@ you can use `page_class` to include the controller name and action name as CSS c
becomes
```html
-
+
...
```
@@ -79,9 +93,7 @@ When controller and action is `animes#show` you can easily use `page_title` like
becomes
```html
-
- Animes Show
-
+Animes Show
```
Besides, it supports I18n and interpolation:
@@ -104,9 +116,7 @@ Pass in `anime_name`:
becomes
```html
-
- Showing anime of: Frozen
-
+Showing anime of: Frozen
```
### #`javascript_initialization`
@@ -130,13 +140,17 @@ compiles to:
```html
```
@@ -196,7 +210,7 @@ Minitest-ed. To run all tests, just run `rake` or `rake test`.
## Author
-Rails Utils is maintained by [Winston Teo](mailto:winstonyw+rails_utils@gmail.com).
+Rails Utils is originally maintained by [Winston Teo](mailto:winstonyw+rails_utils@gmail.com).
[You should follow Winston on Twitter](https://www.twitter.com/winstonyw), or find out more on [WinstonYW](http://www.winstonyw.com) and [LinkedIn](http://sg.linkedin.com/in/winstonyw).
@@ -204,8 +218,5 @@ Rails Utils is maintained by [Winston Teo](mailto:winstonyw+rails_utils@gmail.co
Copyright © 2013-2016 Winston Teo Yong Wei. Free software, released under the MIT license.
-
[version-badge]: https://badge.fury.io/rb/rails_utils.svg
[rubygems]: https://rubygems.org/gems/rails_utils
-[travis-badge]: https://travis-ci.org/winston/rails_utils.svg
-[travis]: https://travis-ci.org/winston/rails_utils
diff --git a/gemfiles/rails_6.0.gemfile b/gemfiles/rails_6.0.gemfile
index 10c6284..e050d93 100644
--- a/gemfiles/rails_6.0.gemfile
+++ b/gemfiles/rails_6.0.gemfile
@@ -2,6 +2,6 @@
source "https://rubygems.org"
-gem "rails", "~> 6.0"
+gem "rails", "6.0.6.1"
gemspec path: "../"
diff --git a/gemfiles/rails_7.0.gemfile b/gemfiles/rails_7.0.gemfile
index 9d2735b..af711ee 100644
--- a/gemfiles/rails_7.0.gemfile
+++ b/gemfiles/rails_7.0.gemfile
@@ -2,6 +2,6 @@
source "https://rubygems.org"
-gem "rails", "~> 7.0"
+gem "rails", "7.0.8.4"
gemspec path: "../"
diff --git a/lib/rails_utils/version.rb b/lib/rails_utils/version.rb
index 9c04fbb..0de1fe9 100644
--- a/lib/rails_utils/version.rb
+++ b/lib/rails_utils/version.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
module RailsUtils
- VERSION = "5.0.0"
+ VERSION = "6.0.0"
end
diff --git a/rails_utils.gemspec b/rails_utils.gemspec
index e18faf9..dc2d011 100644
--- a/rails_utils.gemspec
+++ b/rails_utils.gemspec
@@ -20,8 +20,6 @@ Gem::Specification.new do |s|
s.add_dependency "rails", ">= 6"
s.add_development_dependency "minitest" , ">= 4.7.5"
- s.add_development_dependency "sprockets-rails", '~>3.0'
- s.add_development_dependency "sprockets", '~>3.0'
s.add_development_dependency "appraisal", "~> 2.1"
s.add_development_dependency "mocha"
diff --git a/test/dummy/config/application.rb b/test/dummy/config/application.rb
index dd719fe..71e68c6 100644
--- a/test/dummy/config/application.rb
+++ b/test/dummy/config/application.rb
@@ -1,10 +1,8 @@
require File.expand_path('../boot', __FILE__)
# Pick the frameworks you want:
-# require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
-require "sprockets/railtie"
require "rails/test_unit/railtie"
Bundler.require(*Rails.groups)
@@ -55,10 +53,10 @@ class Application < Rails::Application
# config.active_record.whitelist_attributes = true
# Enable the asset pipeline
- config.assets.enabled = true
+ # config.assets.enabled = true
# Version of your assets, change this if you want to expire all your assets
- config.assets.version = '1.0'
+ # config.assets.version = '1.0'
end
end
diff --git a/test/rails_utils_test.rb b/test/rails_utils_test.rb
index 93ff40c..9eaf191 100644
--- a/test/rails_utils_test.rb
+++ b/test/rails_utils_test.rb
@@ -3,7 +3,13 @@
describe "RailsUtils::ActionViewExtensions" do
let(:controller) { ActionController::Base.new }
let(:request) { ActionDispatch::Request.new(flash: {}) }
- let(:view) { ActionView::Base.new({}, {}, "") }
+ let(:view) do
+ if Rails::VERSION::MAJOR == 6 && Rails::VERSION::MINOR == 0
+ ActionView::Base.new
+ else
+ ActionView::Base.new({}, {}, "")
+ end
+ end
before do
controller.request = request