Skip to content

Commit

Permalink
ability to switch to the ibotta-gem
Browse files Browse the repository at this point in the history
  • Loading branch information
onyxraven committed Nov 8, 2024
1 parent 43e8474 commit 1af4745
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-scheduler-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
resque-lock-timeout-version:
- "latest"
- "https://github.com/Ibotta/[email protected]"
- "https://github.com/Ibotta/resque-lock-timeout.git@tests-with-scheduler"
- "ibotta-resque-lock-timeout:https://github.com/Ibotta/resque-lock-timeout.git@v0.5.1"
exclude:
# resque-scheduler (= 4.3.0) depends on redis (~> 3.3)
- redis-version: "~> 4.8"
Expand Down
21 changes: 16 additions & 5 deletions scheduler-lock/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,28 @@ else
gem "resque-scheduler", *versions
end

case resque_lock_timeout_version = ENV.fetch("RESQUE_LOCK_TIMEOUT_VERSION", "latest")
resque_lock_timeout_version = ENV.fetch("RESQUE_LOCK_TIMEOUT_VERSION", "latest")
capture_resque_lock_timeout = resque_lock_timeout_version.split(":", 2)
resque_lock_timeout_gem = if capture_resque_lock_timeout[1]
resque_lock_timeout_version = capture_resque_lock_timeout[1]
capture_resque_lock_timeout[0]
else
"resque-lock-timeout"
end
puts "resque_lock_timeout_gem: #{resque_lock_timeout_gem}"
puts "resque_lock_timeout_version: #{resque_lock_timeout_version}"

case resque_lock_timeout_version
when "master"
gem "resque-lock-timeout", git: "https://github.com/Ibotta/resque-lock-timeout.git"
gem resque_lock_timeout_gem, git: "https://github.com/Ibotta/resque-lock-timeout.git"
when /^git:/, /^https:/
repo, ref = resque_lock_timeout_version.split("@", 2)
gem "resque-lock-timeout", git: repo, ref: ref
gem resque_lock_timeout_gem, git: repo, ref: ref
when "latest"
gem "resque-lock-timeout"
gem resque_lock_timeout_gem
else
versions = resque_lock_timeout_version.split(",")
gem "resque-lock-timeout", *versions
gem resque_lock_timeout_gem, *versions
end

gem "rake"
Expand Down

0 comments on commit 1af4745

Please sign in to comment.