Skip to content

Commit b23032f

Browse files
authored
Merge pull request #23 from rickreyhsig/rickreyhsig-patch-4
Update Gemfile again
2 parents 1fd8828 + 376171f commit b23032f

File tree

3 files changed

+198
-161
lines changed

3 files changed

+198
-161
lines changed

.github/workflows/update-gemfile-lock.yml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
paths:
66
- 'Gemfile'
7-
- '.github/workflows/update-gemfile-lock.yml'
7+
- 'Gemfile.lock'
88

99
jobs:
1010
update-gemfile-lock:
@@ -22,20 +22,32 @@ jobs:
2222
with:
2323
ruby-version: '2.4.2' # Match your Gemfile
2424

25-
- name: Install dependencies and update Gemfile.lock
25+
- name: Install dependencies (ignore lock conflict)
2626
run: |
27-
bundle install
27+
bundle install || true
28+
29+
# Try to resolve lockfile conflicts
30+
- name: Update lockfile if install failed
31+
run: |
32+
if ! bundle install; then
33+
echo "bundle install failed, trying bundle update"
34+
bundle update
35+
fi
2836
2937
- name: Check if Gemfile.lock changed
38+
id: lock_changed
3039
run: |
31-
git diff --exit-code Gemfile.lock || echo "Gemfile.lock updated"
40+
if ! git diff --quiet Gemfile.lock; then
41+
echo "changed=true" >> $GITHUB_OUTPUT
42+
else
43+
echo "changed=false" >> $GITHUB_OUTPUT
44+
fi
3245
3346
- name: Commit and push if Gemfile.lock changed
47+
if: steps.lock_changed.outputs.changed == 'true'
3448
run: |
3549
git config --global user.name "github-actions[bot]"
3650
git config --global user.email "github-actions[bot]@users.noreply.github.com"
37-
if ! git diff --quiet Gemfile.lock; then
38-
git add Gemfile.lock
39-
git commit -m "Update Gemfile.lock via GitHub Actions"
40-
git push
41-
fi
51+
git add Gemfile.lock
52+
git commit -m "Update Gemfile.lock via GitHub Actions (auto-resolve)"
53+
git push

Gemfile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
source 'https://rubygems.org'
22

33
#ruby '2.2.2'
4+
#ruby '2.3.2'
45
ruby '2.4.2'
56

67
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
@@ -27,7 +28,9 @@ gem 'will_paginate', '~> 3.0.6'
2728
gem 'bootstrap-will_paginate'
2829

2930
# Authentication gem
30-
gem 'devise'
31+
# gem 'devise'
32+
gem 'devise', '4.7.1' # This version is known to have vulnerabilities
33+
3134

3235
# I18n gem
3336
gem 'rails-i18n'
@@ -56,7 +59,9 @@ gem 'sdoc', '~> 0.4.0', group: :doc
5659
gem 'prawn'
5760
gem 'prawn-table'
5861
gem 'rollbar'
59-
gem 'loofah', '2.2.2' # This version is known to have vulnerabilities
62+
# gem 'loofah', '2.2.2' # This version is known to have vulnerabilities
63+
gem 'nokogiri', '1.10.10' # This version is known to have vulnerabilities
64+
6065

6166
group :development, :test do
6267
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
@@ -71,7 +76,7 @@ group :development, :test do
7176
gem 'factory_girl_rails'
7277
gem "better_errors"
7378
gem "binding_of_caller"
74-
gem 'json', '2.2.9' # This version is known to have vulnerabilities
79+
gem 'json', '1.8.6' # This version is known to have vulnerabilities
7580
end
7681

7782
group :test do
@@ -86,7 +91,7 @@ end
8691
group :development do
8792
# Access an IRB console on exception pages or by using <%= console %> in views
8893
gem 'web-console', '~> 2.0'
89-
gem 'rack', '2.2.3' # This version is known to have vulnerabilities
94+
gem 'rack', '1.6.13' # This version is known to have vulnerabilities
9095
end
9196

9297
group :production do

0 commit comments

Comments
 (0)