Skip to content

Commit

Permalink
Merge pull request #1053 from evemonk/updates
Browse files Browse the repository at this point in the history
Use: ruby file: ".ruby-version"
  • Loading branch information
biow0lf authored Oct 3, 2023
2 parents 6c32532 + a5b3422 commit 0234c7e
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/bundler-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: "Bundler Audit"
uses: andrewmcodes/bundler-audit-action@main
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: bin/bundle-audit update
- run: bin/bundle-audit check
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

ruby File.read(".ruby-version")
ruby file: ".ruby-version"

gem "rails", "7.0.8"
gem "sprockets-rails"
Expand Down Expand Up @@ -34,4 +34,5 @@ group :development do
gem "standard", "1.31.1", require: false
gem "brakeman", require: false
gem "fasterer", require: false
gem "bundler-audit", require: false
end
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ GEM
msgpack (~> 1.2)
brakeman (6.0.1)
builder (3.2.4)
bundler-audit (0.9.1)
bundler (>= 1.2.0, < 3)
thor (~> 1.0)
coderay (1.1.3)
colorize (0.8.1)
concurrent-ruby (1.2.2)
Expand Down Expand Up @@ -287,6 +290,7 @@ PLATFORMS
DEPENDENCIES
bootsnap
brakeman
bundler-audit
dotenv-rails
fasterer
license_finder
Expand Down
27 changes: 27 additions & 0 deletions bin/bundle-audit
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

#
# This file was generated by Bundler.
#
# The application 'bundle-audit' is installed as part of a gem, and
# this file is here to facilitate running it.
#

ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)

bundle_binstub = File.expand_path("bundle", __dir__)

if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end

require "rubygems"
require "bundler/setup"

load Gem.bin_path("bundler-audit", "bundle-audit")
27 changes: 27 additions & 0 deletions bin/bundler-audit
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

#
# This file was generated by Bundler.
#
# The application 'bundler-audit' is installed as part of a gem, and
# this file is here to facilitate running it.
#

ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)

bundle_binstub = File.expand_path("bundle", __dir__)

if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end

require "rubygems"
require "bundler/setup"

load Gem.bin_path("bundler-audit", "bundler-audit")

0 comments on commit 0234c7e

Please sign in to comment.