Skip to content

Commit 1a72571

Browse files
bivanalharcysjonathan
authored andcommitted
chore(ver): bump to 6.0.0
- include forkception - add specs requirements - fix rails version and edit CHANGELOG
1 parent e9c3b88 commit 1a72571

File tree

9 files changed

+56
-30
lines changed

9 files changed

+56
-30
lines changed

Appraisals

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
appraise "rails-6.0" do
2-
gem 'rails', '~> 6.0'
2+
gem 'rails', '6.0.6.1'
33
end
44

55
appraise "rails-6.1" do
66
gem 'rails', '~> 6.1'
77
end
88

99
appraise "rails-7.0" do
10-
gem 'rails', '~> 7.0'
10+
gem 'rails', '7.0.8.4'
1111
end
1212

1313
appraise "rails-7.1" do

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
### Unreleased
44

5+
### Version 6.0.0
6+
7+
- Furthermore support Rails 7.0
8+
- Removing the dependencies for sprocket-rails as a consequences of that gem no longer needed in Rails 7
9+
10+
### Version 5.0.0
11+
12+
- Add dependencies to support Rails 6.1
13+
- parent_name is deprecated in rails 6 and gone in 6.1
14+
- Update I18n translation function
15+
- Change assertion function in spec
16+
- Bump ruby version to be at least 3.0
17+
518
### Version 4.0.0
619

720
- [Pull Request 28](https://github.com/winston/rails_utils/pull/28) - [Development] remove `.ruby-version` file - by @JuanitoFatas

README.md

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@
33
Rails helpers based on opinionated project practices. Useful for structuring CSS and JavaScript,
44
display title of the page, and flash messages with Bootstrap.
55

6+
## Forkception
7+
8+
This repo is a fork of:
9+
10+
- The [fonglh](https://github.com/fonglh/rails_utils) gem
11+
- which is the fork of the original gem maintained by [Winston](https://github.com/winston/rails_utils)
12+
13+
## Requirements
14+
15+
- Ruby >= 3.0, <= 3.2
16+
- Rails >= 6.0, <= 7.1
17+
18+
The library might work for the higher version, however it's only tested for the specs mentioned above.
19+
620
## Installation
721

822
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
3650
becomes
3751

3852
```html
39-
<body class='animes show'>
53+
<body class="animes show">
4054
...
4155
</body>
4256
```
@@ -79,9 +93,7 @@ When controller and action is `animes#show` you can easily use `page_title` like
7993
becomes
8094

8195
```html
82-
<div class="page-title">
83-
Animes Show
84-
</div>
96+
<div class="page-title">Animes Show</div>
8597
```
8698

8799
Besides, it supports I18n and interpolation:
@@ -104,9 +116,7 @@ Pass in `anime_name`:
104116
becomes
105117

106118
```html
107-
<div class="page-title">
108-
Showing anime of: Frozen
109-
</div>
119+
<div class="page-title">Showing anime of: Frozen</div>
110120
```
111121

112122
### #`javascript_initialization`
@@ -130,13 +140,17 @@ compiles to:
130140

131141
```html
132142
<script type="text/javascript">
133-
//<![CDATA[
134-
MyApp.init();
135-
if(MyApp.animes) {
136-
if(MyApp.animes.init) { MyApp.animes.init(); }
137-
if(MyApp.animes.show && MyApp.animes.show.init) { MyApp.animes.show.init(); }
138-
}
139-
//]]>
143+
//<![CDATA[
144+
MyApp.init();
145+
if (MyApp.animes) {
146+
if (MyApp.animes.init) {
147+
MyApp.animes.init();
148+
}
149+
if (MyApp.animes.show && MyApp.animes.show.init) {
150+
MyApp.animes.show.init();
151+
}
152+
}
153+
//]]>
140154
</script>
141155
```
142156

@@ -196,16 +210,13 @@ Minitest-ed. To run all tests, just run `rake` or `rake test`.
196210

197211
## Author
198212

199-
Rails Utils is maintained by [Winston Teo](mailto:winstonyw+rails_utils@gmail.com).
213+
Rails Utils is originally maintained by [Winston Teo](mailto:winstonyw+rails_utils@gmail.com).
200214

201215
[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).
202216

203217
## License
204218

205219
Copyright © 2013-2016 Winston Teo Yong Wei. Free software, released under the MIT license.
206220

207-
208221
[version-badge]: https://badge.fury.io/rb/rails_utils.svg
209222
[rubygems]: https://rubygems.org/gems/rails_utils
210-
[travis-badge]: https://travis-ci.org/winston/rails_utils.svg
211-
[travis]: https://travis-ci.org/winston/rails_utils

gemfiles/rails_6.0.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
source "https://rubygems.org"
44

5-
gem "rails", "~> 6.0"
5+
gem "rails", "6.0.6.1"
66

77
gemspec path: "../"

gemfiles/rails_7.0.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
source "https://rubygems.org"
44

5-
gem "rails", "~> 7.0"
5+
gem "rails", "7.0.8.4"
66

77
gemspec path: "../"

lib/rails_utils/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module RailsUtils
4-
VERSION = "5.0.0"
4+
VERSION = "6.0.0"
55
end

rails_utils.gemspec

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ Gem::Specification.new do |s|
2020
s.add_dependency "rails", ">= 6"
2121

2222
s.add_development_dependency "minitest" , ">= 4.7.5"
23-
s.add_development_dependency "sprockets-rails", '~>3.0'
24-
s.add_development_dependency "sprockets", '~>3.0'
2523
s.add_development_dependency "appraisal", "~> 2.1"
2624
s.add_development_dependency "mocha"
2725

test/dummy/config/application.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
require File.expand_path('../boot', __FILE__)
22

33
# Pick the frameworks you want:
4-
# require "active_record/railtie"
54
require "action_controller/railtie"
65
require "action_mailer/railtie"
7-
require "sprockets/railtie"
86
require "rails/test_unit/railtie"
97

108
Bundler.require(*Rails.groups)
@@ -55,10 +53,10 @@ class Application < Rails::Application
5553
# config.active_record.whitelist_attributes = true
5654

5755
# Enable the asset pipeline
58-
config.assets.enabled = true
56+
# config.assets.enabled = true
5957

6058
# Version of your assets, change this if you want to expire all your assets
61-
config.assets.version = '1.0'
59+
# config.assets.version = '1.0'
6260
end
6361
end
6462

test/rails_utils_test.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
describe "RailsUtils::ActionViewExtensions" do
44
let(:controller) { ActionController::Base.new }
55
let(:request) { ActionDispatch::Request.new(flash: {}) }
6-
let(:view) { ActionView::Base.new({}, {}, "") }
6+
let(:view) do
7+
if Rails::VERSION::MAJOR == 6 && Rails::VERSION::MINOR == 0
8+
ActionView::Base.new
9+
else
10+
ActionView::Base.new({}, {}, "")
11+
end
12+
end
713

814
before do
915
controller.request = request

0 commit comments

Comments
 (0)