-
Notifications
You must be signed in to change notification settings - Fork 529
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
97 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,9 +9,9 @@ Gem::Specification.new do |s| | |
s.email = %w([email protected] [email protected]) | ||
s.homepage = "https://github.com/rubysherpas/paranoia" | ||
s.license = 'MIT' | ||
s.summary = "Paranoia is a re-implementation of acts_as_paranoid for Rails 3, 4, and 5, using much, much, much less code." | ||
s.summary = "Paranoia is a re-implementation of acts_as_paranoid for Rails 3, 4, 5, 6, 7, and 8, using much, much, much less code." | ||
s.description = <<-DSC | ||
Paranoia is a re-implementation of acts_as_paranoid for Rails 5, 6, and 7, | ||
Paranoia is a re-implementation of acts_as_paranoid for Rails 5, 6, 7, and 8, | ||
using much, much, much less code. You would use either plugin / gem if you | ||
wished that when you called destroy on an Active Record object that it | ||
didn't actually destroy it, but just "hid" the record. Paranoia does this | ||
|
@@ -22,9 +22,10 @@ Gem::Specification.new do |s| | |
|
||
s.required_rubygems_version = ">= 1.3.6" | ||
|
||
s.required_ruby_version = '>= 2.7' | ||
s.required_ruby_version = '>= 2.7.0' # Base requirement for Rails 6.1 | ||
s.required_ruby_version = '>= 3.2.0' if ENV['RAILS']&.start_with?('~> 8') # Rails 8.0 requirement | ||
|
||
s.add_dependency 'activerecord', '>= 6', '< 8.1' | ||
s.add_dependency 'activerecord', '>= 6.1', '< 9' | ||
|
||
s.add_development_dependency "bundler", ">= 1.0.0" | ||
s.add_development_dependency "rake" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/bin/bash | ||
|
||
set -e # Exit on error | ||
|
||
# Colors for output | ||
GREEN='\033[0;32m' | ||
RED='\033[0;31m' | ||
NC='\033[0m' # No Color | ||
|
||
# Rails versions to test | ||
RAILS_VERSIONS=( | ||
"~> 6.1.0" | ||
"~> 7.0.0" | ||
"~> 7.1.0" | ||
"~> 7.2.0" | ||
"~> 8.0.0" | ||
) | ||
|
||
# Function to run tests for a specific Rails version | ||
test_rails_version() { | ||
local version=$1 | ||
echo -e "\n${GREEN}Testing Rails ${version}...${NC}" | ||
|
||
# Update Rails and sqlite3 | ||
RAILS="$version" bundle update rails sqlite3 | ||
if [ $? -ne 0 ]; then | ||
echo -e "${RED}Failed to update Rails ${version}${NC}" | ||
return 1 | ||
fi | ||
|
||
# Run tests | ||
RAILS="$version" bundle exec rake test | ||
if [ $? -ne 0 ]; then | ||
echo -e "${RED}Tests failed for Rails ${version}${NC}" | ||
return 1 | ||
fi | ||
|
||
echo -e "${GREEN}Rails ${version} tests passed successfully!${NC}" | ||
return 0 | ||
} | ||
|
||
# Main execution | ||
failed_versions=() | ||
|
||
for version in "${RAILS_VERSIONS[@]}"; do | ||
if ! test_rails_version "$version"; then | ||
failed_versions+=("$version") | ||
fi | ||
done | ||
|
||
# Summary | ||
echo -e "\n${GREEN}Test Summary:${NC}" | ||
if [ ${#failed_versions[@]} -eq 0 ]; then | ||
echo -e "${GREEN}All Rails versions tested successfully!${NC}" | ||
exit 0 | ||
else | ||
echo -e "${RED}Tests failed for the following Rails versions:${NC}" | ||
printf "${RED}%s${NC}\n" "${failed_versions[@]}" | ||
exit 1 | ||
fi |