From 707f5e6f77af266eed0bacc2ff55cab3d55f5d8d Mon Sep 17 00:00:00 2001
From: simukappu <shota.yamazaki.8@gmail.com>
Date: Mon, 23 Sep 2024 00:26:33 +0900
Subject: [PATCH] Allow use with Rails 7.2 - #180 #181

---
 .github/workflows/build.yml   |  5 +++++
 activity_notification.gemspec |  2 +-
 gemfiles/Gemfile.rails-7.2    | 25 +++++++++++++++++++++++++
 3 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 gemfiles/Gemfile.rails-7.2

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index f52604e..7fbcfba 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -24,6 +24,7 @@ jobs:
           - gemfiles/Gemfile.rails-6.1
           - gemfiles/Gemfile.rails-7.0
           - gemfiles/Gemfile.rails-7.1
+          - gemfiles/Gemfile.rails-7.2
         orm:
           - active_record
           - mongoid
@@ -44,6 +45,8 @@ jobs:
             ruby-version: 3.1.6
           - gemfile: gemfiles/Gemfile.rails-7.1
             ruby-version: 3.2.4
+          - gemfile: gemfiles/Gemfile.rails-7.2
+            ruby-version: 3.3.4
           - gemfile: Gemfile
             ruby-version: 3.3.3
             orm: active_record
@@ -69,6 +72,8 @@ jobs:
             orm: dynamoid
           - gemfile: gemfiles/Gemfile.rails-7.1
             orm: dynamoid
+          - gemfile: gemfiles/Gemfile.rails-7.2
+            orm: dynamoid
 
     env:
       RAILS_ENV: test
diff --git a/activity_notification.gemspec b/activity_notification.gemspec
index 611ea57..dab6aa4 100644
--- a/activity_notification.gemspec
+++ b/activity_notification.gemspec
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
   s.require_paths = ["lib"]
   s.required_ruby_version = '>= 2.1.0'
 
-  s.add_dependency 'railties', '>= 5.0.0', '< 7.2'
+  s.add_dependency 'railties', '>= 5.0.0', '< 7.3'
   s.add_dependency 'i18n', '>= 0.5.0'
   s.add_dependency 'jquery-rails', '>= 3.1.1'
   s.add_dependency 'swagger-blocks', '>= 3.0.0'
diff --git a/gemfiles/Gemfile.rails-7.2 b/gemfiles/Gemfile.rails-7.2
new file mode 100644
index 0000000..1158280
--- /dev/null
+++ b/gemfiles/Gemfile.rails-7.2
@@ -0,0 +1,25 @@
+source 'https://rubygems.org'
+
+gemspec path: '../'
+
+gem 'rails', '~> 7.2.0'
+gem 'sprockets-rails'
+# https://github.com/lynndylanhurley/devise_token_auth/pull/1632
+gem 'devise_token_auth', git: 'https://github.com/lynndylanhurley/devise_token_auth.git'
+
+group :development do
+  gem 'bullet'
+  gem 'rack-cors'
+end
+
+group :test do
+  gem 'rails-controller-testing'
+  gem 'ammeter'
+  gem 'timecop'
+  gem 'committee'
+  gem 'committee-rails', '< 0.6'
+  # gem 'coveralls', require: false
+  gem 'coveralls_reborn', require: false
+end
+
+gem 'dotenv-rails', groups: [:development, :test]