Skip to content

Commit

Permalink
"Modernize" dev stack onto Ruby 3.2
Browse files Browse the repository at this point in the history
No changes to the code that should change its behavior, but gets the dev build working under 3.2 successfully

Required killing the example app unfortunately. No way to get Rails < 5 to work on Bundler 2
  • Loading branch information
searls committed Sep 26, 2023
1 parent 91e0c71 commit c172ced
Show file tree
Hide file tree
Showing 72 changed files with 117 additions and 1,096 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Ruby

on:
push:
branches:
- main

pull_request:

jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby:
- '3.2.1'

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/.bundle/
/.yardoc
/Dockerfile
/Gemfile.lock
/_yardoc/
/coverage/
/doc/
Expand Down
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

3 changes: 0 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,3 @@
- Create/Initialize a sqlite database [\#2](https://github.com/testdouble/suture/issues/2)
- Create a new Suture [\#1](https://github.com/testdouble/suture/issues/1)



\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ source "https://rubygems.org"

# Specify your gem's dependencies in suture.gemspec
gemspec

gem "rake"
gem "minitest"
gem "gimme"
gem "standard"
76 changes: 76 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
PATH
remote: .
specs:
suture (1.1.2)
backports
bar-of-progress (>= 0.1.3)
sqlite3

GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
backports (3.24.1)
bar-of-progress (0.1.3)
base64 (0.1.1)
gimme (0.5.0)
json (2.6.3)
language_server-protocol (3.17.0.3)
lint_roller (1.1.0)
minitest (5.20.0)
parallel (1.23.0)
parser (3.2.2.3)
ast (~> 2.4.1)
racc
racc (1.7.1)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.8.1)
rexml (3.2.6)
rubocop (1.56.3)
base64 (~> 0.1.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.3)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
rubocop-performance (1.19.1)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
ruby-progressbar (1.13.0)
sqlite3 (1.6.6-arm64-darwin)
sqlite3 (1.6.6-x86_64-linux)
standard (1.31.1)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.56.2)
standard-custom (~> 1.0.0)
standard-performance (~> 1.2)
standard-custom (1.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50)
standard-performance (1.2.0)
lint_roller (~> 1.1)
rubocop-performance (~> 1.19.0)
unicode-display_width (2.4.2)

PLATFORMS
arm64-darwin-22
x86_64-linux

DEPENDENCIES
gimme
minitest
rake
standard
suture!

BUNDLED WITH
2.4.19
33 changes: 2 additions & 31 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,41 +18,12 @@ Rake::TestTask.new(:test) do |t|
t.libs << "safe"
t.libs << "lib"
t.test_files = FileList[
"safe/support/code_climate",
"test/helper.rb",
"test/**/*_test.rb",
"safe/helper.rb",
"safe/**/*_test.rb"
]
end

task :example do
Dir.chdir("example/rails_app") do
passed = system <<-SH
BUNDLE_GEMFILE="$PWD/Gemfile" bundle install --quiet
BUNDLE_GEMFILE="$PWD/Gemfile" bundle exec rake suture
SH
unless passed
raise StandardError, "Rails example failed!"
end
end
end

if Gem.ruby_version >= Gem::Version.new("2.2.2")
require "github_changelog_generator/task"
GitHubChangelogGenerator::RakeTask.new :changelog
task :changelog_commit do
require "suture"
cmd = "git commit -m \"Changelog for #{Suture::VERSION}\" -- CHANGELOG.md"
puts "-------> #{cmd}"
system cmd
end
Rake::Task["release:rubygem_push"].enhance([:changelog, :changelog_commit])
end

if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2")
task :default => [:test, :example]
else
require "standard/rake"
task :default => [:test, :"standard:fix", :example]
end
require "standard/rake"
task :default => [:test, :"standard:fix"]
4 changes: 0 additions & 4 deletions bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,5 @@ require "suture"
# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.

# (If you use this, don't forget to add pry to your Gemfile!)
# require "pry"
# Pry.start

require "irb"
IRB.start
16 changes: 0 additions & 16 deletions example/rails_app/.gitignore

This file was deleted.

14 changes: 0 additions & 14 deletions example/rails_app/Gemfile

This file was deleted.

106 changes: 0 additions & 106 deletions example/rails_app/Gemfile.lock

This file was deleted.

Loading

0 comments on commit c172ced

Please sign in to comment.