next_rails 1.3.0 → 1.4.0
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/workflows/main.yml +2 -18
- data/CHANGELOG.md +9 -1
- data/README.md +8 -2
- data/exe/bundle_report +10 -1
- data/exe/deprecations +3 -1
- data/lib/deprecation_tracker.rb +3 -1
- data/lib/next_rails/bundle_report/ruby_version_compatibility.rb +46 -0
- data/lib/next_rails/bundle_report.rb +7 -3
- data/lib/next_rails/gem_info.rb +4 -0
- data/lib/next_rails/version.rb +1 -1
- data/lib/next_rails.rb +1 -0
- data/next_rails.gemspec +1 -1
- metadata +10 -11
- data/.travis.yml +0 -10
- data/CODEOWNERS +0 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7c82f6a12b6cd481313202fce9894ca2690c222d4397a14398f74c4dd0e6d31f
|
|
4
|
+
data.tar.gz: 546438cf1893b369c1f4c0d05f507a99c96a3dbd939b78b8e3bacbed560f2150
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a1330ca26c90f32978737bbf780156458bc8254377addbfdb860c63b1ff697f06a554e640d457bc7c7d1433a3baa7f2cd0115d4860bf451b85d468f8d0501eec
|
|
7
|
+
data.tar.gz: a5b5da58d00c288258931320c395cbccf1341f4eed15f56b680693f2ef3919d96ec97542a9bc2c3c11e5cf82ee5371f44d64162e9630901a4c702ded146e1415
|
data/.github/workflows/main.yml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: Continuous Integration
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
@@ -13,23 +13,7 @@ jobs:
|
|
|
13
13
|
runs-on: ubuntu-latest
|
|
14
14
|
strategy:
|
|
15
15
|
matrix:
|
|
16
|
-
ruby-version: [3.2, 3.1, 3.0, 2.7, 2.6
|
|
17
|
-
|
|
18
|
-
steps:
|
|
19
|
-
- uses: actions/checkout@v2
|
|
20
|
-
- name: Set up Ruby ${{ matrix.ruby-version }}
|
|
21
|
-
uses: ruby/setup-ruby@v1
|
|
22
|
-
with:
|
|
23
|
-
ruby-version: ${{ matrix.ruby-version }}
|
|
24
|
-
bundler-cache: true
|
|
25
|
-
- name: Run rake task
|
|
26
|
-
run: bundle exec rake
|
|
27
|
-
|
|
28
|
-
test_older:
|
|
29
|
-
runs-on: ubuntu-20.04
|
|
30
|
-
strategy:
|
|
31
|
-
matrix:
|
|
32
|
-
ruby-version: [2.2, 2.1, 2.0.0]
|
|
16
|
+
ruby-version: ["3.3", "3.2", "3.1", "3.0", "2.7", "2.6"]
|
|
33
17
|
|
|
34
18
|
steps:
|
|
35
19
|
- uses: actions/checkout@v2
|
data/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
# main [(unreleased)](https://github.com/fastruby/next_rails/compare/v1.
|
|
1
|
+
# main [(unreleased)](https://github.com/fastruby/next_rails/compare/v1.4.0...main)
|
|
2
2
|
|
|
3
3
|
* Your changes/patches go here.
|
|
4
4
|
|
|
5
|
+
# v1.4.0 / 2024-09-24 [(commits)](https://github.com/fastruby/next_rails/compare/v1.3.0...v1.4.0)
|
|
6
|
+
|
|
7
|
+
- [CHORE: Use next_rails namespace on spec tests.](https://github.com/fastruby/next_rails/pull/117)
|
|
8
|
+
- [CHORE: Remove 2.0.0, 2.1, 2.2 Ruby support](https://github.com/fastruby/next_rails/pull/126)
|
|
9
|
+
- [CHORE: Update compatibility for Ruby versions to use Rainbow](https://github.com/fastruby/next_rails/pull/125)
|
|
10
|
+
- [FEATURE: Support compatibility for Ruby versions](https://github.com/fastruby/next_rails/pull/116)
|
|
11
|
+
- [CHORE: Remove GPL licensed dependency Colorize and replace it with Rainbow]
|
|
12
|
+
|
|
5
13
|
# v1.3.0 / 2023-06-16 [(commits)](https://github.com/fastruby/next_rails/compare/v1.2.4...v1.3.0)
|
|
6
14
|
|
|
7
15
|
- [FEATURE: Add NextRails.next? for application usage (e.g. Rails shims)](https://github.com/fastruby/next_rails/pull/97)
|
data/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Next Rails
|
|
2
2
|
|
|
3
|
+
[](https://github.com/fastruby/next_rails/actions/workflows/main.yml)
|
|
4
|
+
|
|
3
5
|
This is a toolkit to upgrade your next Rails application. It will help you
|
|
4
6
|
set up dual booting, track deprecation warnings, and get a report on outdated
|
|
5
7
|
dependencies for any Rails application.
|
|
@@ -39,10 +41,14 @@ bundle_report outdated --json
|
|
|
39
41
|
# Show gems that don't work with Rails 5.2.0
|
|
40
42
|
bundle_report compatibility --rails-version=5.2.0
|
|
41
43
|
|
|
42
|
-
# Show
|
|
43
|
-
bundle_report --
|
|
44
|
+
# Show gems that don't work with Ruby 3.0
|
|
45
|
+
bundle_report compatibility --ruby-version=3.0
|
|
46
|
+
|
|
44
47
|
# Find minimum compatible ruby version with Rails 7.0.0
|
|
45
48
|
bundle_report ruby_check --rails-version=7.0.0
|
|
49
|
+
|
|
50
|
+
# Show the usual help message
|
|
51
|
+
bundle_report --help
|
|
46
52
|
```
|
|
47
53
|
|
|
48
54
|
### Application usage
|
data/exe/bundle_report
CHANGED
|
@@ -16,6 +16,7 @@ at_exit do
|
|
|
16
16
|
|
|
17
17
|
Examples:
|
|
18
18
|
#{$0} compatibility --rails-version 5.0
|
|
19
|
+
#{$0} compatibility --ruby-version 3.3
|
|
19
20
|
#{$0} outdated
|
|
20
21
|
#{$0} outdated --json
|
|
21
22
|
|
|
@@ -33,6 +34,10 @@ at_exit do
|
|
|
33
34
|
options[:rails_version] = rails_version
|
|
34
35
|
end
|
|
35
36
|
|
|
37
|
+
opts.on("--ruby-version [STRING]", "Ruby version to check compatibility against (defaults to 2.3)") do |ruby_version|
|
|
38
|
+
options[:ruby_version] = ruby_version
|
|
39
|
+
end
|
|
40
|
+
|
|
36
41
|
opts.on("--include-rails-gems", "Include Rails gems in compatibility report (defaults to false)") do
|
|
37
42
|
options[:include_rails_gems] = true
|
|
38
43
|
end
|
|
@@ -61,7 +66,11 @@ at_exit do
|
|
|
61
66
|
when "ruby_check" then NextRails::BundleReport.compatible_ruby_version(rails_version: options.fetch(:rails_version))
|
|
62
67
|
when "outdated" then NextRails::BundleReport.outdated(options.fetch(:format, nil))
|
|
63
68
|
else
|
|
64
|
-
|
|
69
|
+
if options[:ruby_version]
|
|
70
|
+
NextRails::BundleReport.compatibility(ruby_version: options.fetch(:ruby_version, "2.3"))
|
|
71
|
+
else
|
|
72
|
+
NextRails::BundleReport.compatibility(rails_version: options.fetch(:rails_version, "5.0"), include_rails_gems: options.fetch(:include_rails_gems, false))
|
|
73
|
+
end
|
|
65
74
|
end
|
|
66
75
|
end
|
|
67
76
|
|
data/exe/deprecations
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
require "json"
|
|
3
|
-
require "
|
|
3
|
+
require "rainbow/refinement"
|
|
4
4
|
require "optparse"
|
|
5
5
|
require "set"
|
|
6
6
|
|
|
7
|
+
using Rainbow
|
|
8
|
+
|
|
7
9
|
def run_tests(deprecation_warnings, opts = {})
|
|
8
10
|
tracker_mode = opts[:tracker_mode]
|
|
9
11
|
next_mode = opts[:next_mode]
|
data/lib/deprecation_tracker.rb
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
require "rainbow/refinement"
|
|
2
|
+
|
|
3
|
+
class NextRails::BundleReport::RubyVersionCompatibility
|
|
4
|
+
using Rainbow
|
|
5
|
+
|
|
6
|
+
MINIMAL_VERSION = 1.0
|
|
7
|
+
attr_reader :gems, :options
|
|
8
|
+
|
|
9
|
+
def initialize(gems: NextRails::GemInfo.all, options: {})
|
|
10
|
+
@gems = gems
|
|
11
|
+
@options = options
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def generate
|
|
15
|
+
return invalid_message unless valid?
|
|
16
|
+
|
|
17
|
+
message
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
private
|
|
21
|
+
|
|
22
|
+
def message
|
|
23
|
+
output = "=> Incompatible gems with Ruby #{ruby_version}:".white.bold
|
|
24
|
+
incompatible.each do |gem|
|
|
25
|
+
output += "\n#{gem.name} - required Ruby version: #{gem.gem_specification.required_ruby_version}".magenta
|
|
26
|
+
end
|
|
27
|
+
output += "\n\n#{incompatible.length} incompatible #{incompatible.one? ? 'gem' : 'gems' } with Ruby #{ruby_version}".red
|
|
28
|
+
output
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def incompatible
|
|
32
|
+
gems.reject { |gem| gem.compatible_with_ruby?(ruby_version) }
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def ruby_version
|
|
36
|
+
options[:ruby_version].to_f
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def invalid_message
|
|
40
|
+
"=> Invalid Ruby version: #{options[:ruby_version]}.".red.bold
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def valid?
|
|
44
|
+
ruby_version > MINIMAL_VERSION
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
require "
|
|
1
|
+
require "rainbow/refinement"
|
|
2
2
|
require "cgi"
|
|
3
3
|
require "erb"
|
|
4
4
|
require "json"
|
|
5
5
|
require "net/http"
|
|
6
6
|
|
|
7
|
+
using Rainbow
|
|
8
|
+
|
|
7
9
|
module NextRails
|
|
8
10
|
module BundleReport
|
|
9
11
|
extend self
|
|
10
12
|
|
|
11
|
-
def compatibility(rails_version: nil, include_rails_gems: nil)
|
|
13
|
+
def compatibility(rails_version: nil, ruby_version: nil, include_rails_gems: nil)
|
|
14
|
+
return puts RubyVersionCompatibility.new(options: { ruby_version: ruby_version }).generate if ruby_version
|
|
15
|
+
|
|
12
16
|
incompatible_gems = NextRails::GemInfo.all.reject do |gem|
|
|
13
17
|
gem.compatible_with_rails?(rails_version: rails_version) || (!include_rails_gems && gem.from_rails?)
|
|
14
18
|
end.sort_by { |gem| gem.name }
|
|
@@ -168,4 +172,4 @@ module NextRails
|
|
|
168
172
|
puts footer
|
|
169
173
|
end
|
|
170
174
|
end
|
|
171
|
-
end
|
|
175
|
+
end
|
data/lib/next_rails/gem_info.rb
CHANGED
|
@@ -147,5 +147,9 @@ module NextRails
|
|
|
147
147
|
rails_dependency.requirement.satisfied_by?(Gem::Version.new(rails_version))
|
|
148
148
|
end
|
|
149
149
|
end
|
|
150
|
+
|
|
151
|
+
def compatible_with_ruby?(ruby_version)
|
|
152
|
+
gem_specification.required_ruby_version.satisfied_by?(Gem::Version.new(ruby_version))
|
|
153
|
+
end
|
|
150
154
|
end
|
|
151
155
|
end
|
data/lib/next_rails/version.rb
CHANGED
data/lib/next_rails.rb
CHANGED
data/next_rails.gemspec
CHANGED
|
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
23
23
|
spec.require_paths = ["lib"]
|
|
24
24
|
|
|
25
|
-
spec.add_dependency "
|
|
25
|
+
spec.add_dependency "rainbow", ">= 3"
|
|
26
26
|
spec.add_development_dependency "bundler", ">= 1.16", "< 3.0"
|
|
27
27
|
spec.add_development_dependency "rake"
|
|
28
28
|
spec.add_development_dependency "rspec", "~> 3.0"
|
metadata
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: next_rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ernesto Tagwerker
|
|
8
8
|
- Luis Sagastume
|
|
9
|
-
autorequire:
|
|
9
|
+
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2024-09-25 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
|
-
name:
|
|
15
|
+
name: rainbow
|
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
|
17
17
|
requirements:
|
|
18
18
|
- - ">="
|
|
19
19
|
- !ruby/object:Gem::Version
|
|
20
|
-
version:
|
|
20
|
+
version: '3'
|
|
21
21
|
type: :runtime
|
|
22
22
|
prerelease: false
|
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
|
24
24
|
requirements:
|
|
25
25
|
- - ">="
|
|
26
26
|
- !ruby/object:Gem::Version
|
|
27
|
-
version:
|
|
27
|
+
version: '3'
|
|
28
28
|
- !ruby/object:Gem::Dependency
|
|
29
29
|
name: bundler
|
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -164,9 +164,7 @@ files:
|
|
|
164
164
|
- ".github/workflows/main.yml"
|
|
165
165
|
- ".gitignore"
|
|
166
166
|
- ".rspec"
|
|
167
|
-
- ".travis.yml"
|
|
168
167
|
- CHANGELOG.md
|
|
169
|
-
- CODEOWNERS
|
|
170
168
|
- CODE_OF_CONDUCT.md
|
|
171
169
|
- CONTRIBUTING.md
|
|
172
170
|
- Gemfile
|
|
@@ -185,6 +183,7 @@ files:
|
|
|
185
183
|
- lib/deprecation_tracker.rb
|
|
186
184
|
- lib/next_rails.rb
|
|
187
185
|
- lib/next_rails/bundle_report.rb
|
|
186
|
+
- lib/next_rails/bundle_report/ruby_version_compatibility.rb
|
|
188
187
|
- lib/next_rails/gem_info.rb
|
|
189
188
|
- lib/next_rails/version.rb
|
|
190
189
|
- next_rails.gemspec
|
|
@@ -193,7 +192,7 @@ homepage: https://github.com/fastruby/next_rails
|
|
|
193
192
|
licenses:
|
|
194
193
|
- MIT
|
|
195
194
|
metadata: {}
|
|
196
|
-
post_install_message:
|
|
195
|
+
post_install_message:
|
|
197
196
|
rdoc_options: []
|
|
198
197
|
require_paths:
|
|
199
198
|
- lib
|
|
@@ -208,8 +207,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
208
207
|
- !ruby/object:Gem::Version
|
|
209
208
|
version: '0'
|
|
210
209
|
requirements: []
|
|
211
|
-
rubygems_version: 3.
|
|
212
|
-
signing_key:
|
|
210
|
+
rubygems_version: 3.5.9
|
|
211
|
+
signing_key:
|
|
213
212
|
specification_version: 4
|
|
214
213
|
summary: A toolkit to upgrade your next Rails application
|
|
215
214
|
test_files: []
|
data/.travis.yml
DELETED
data/CODEOWNERS
DELETED