Loading .gitlab-ci.yml +2 −2 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ ruby-versions: - name: redis:7-alpine alias: redis variables: LABKIT_TEST_REDIS_URL: redis://redis:6379/0 LABKIT_TEST_REDIS_URL: redis://redis parallel: matrix: - RUBY_VERSION: ["3.4"] Loading @@ -47,7 +47,7 @@ legacy-ruby-versions: - name: redis:7-alpine alias: redis variables: LABKIT_TEST_REDIS_URL: redis://redis:6379/0 LABKIT_TEST_REDIS_URL: redis://redis parallel: matrix: - RUBY_VERSION: ["3.3"] Loading .idea/workspace.xml +18 −20 Original line number Diff line number Diff line Loading @@ -2,11 +2,9 @@ <project version="4"> <component name="ChangeListManager"> <list default="true" id="eda9ef7d-e18e-4c0a-8966-bb3f714359b9" name="Changes" comment=""> <change afterPath="$PROJECT_DIR$/docker-compose.yml" afterDir="false" /> <change afterPath="$PROJECT_DIR$/spec/support/test_redis.rb" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.gitlab-ci.yml" beforeDir="false" afterPath="$PROJECT_DIR$/.gitlab-ci.yml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" /> <change beforePath="$PROJECT_DIR$/spec/labkit/rate_limit_spec.rb" beforeDir="false" afterPath="$PROJECT_DIR$/spec/labkit/rate_limit_spec.rb" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/spec/support/test_redis.rb" beforeDir="false" afterPath="$PROJECT_DIR$/spec/support/test_redis.rb" afterDir="false" /> </list> <option name="SHOW_DIALOG" value="false" /> <option name="HIGHLIGHT_CONFLICTS" value="true" /> Loading Loading @@ -34,23 +32,23 @@ <option name="hideEmptyMiddlePackages" value="true" /> <option name="showLibraryContents" value="true" /> </component> <component name="PropertiesComponent"><![CDATA[{ "keyToString": { "ModuleVcsDetector.initialDetectionPerformed": "true", "RSpec.Labkit::RateLimit::Rule.executor": "Run", "RunOnceActivity.ShowReadmeOnStart": "true", "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true", "RunOnceActivity.git.unshallow": "true", "RunOnceActivity.typescript.service.memoryLimit.init": "true", "com.intellij.lang.ruby.rbs.tools.collection.workspace.sync.RbsCollectionUpdateProjectActivity#LAST_UPDATE_TIMESTAMP": "1777386083040", "git-widget-placeholder": "Rebasing testing/docker-compose-redis-autostart", "last_opened_file_path": "/Users/maxwoolf/labkit-ruby", "nodejs_package_manager_path": "npm", "ruby.structure.view.model.defaults.configured": "true", "settings.editor.selected.configurable": "preferences.pluginManager", "vue.rearranger.settings.migration": "true" <component name="PropertiesComponent">{ "keyToString": { "ModuleVcsDetector.initialDetectionPerformed": "true", "RSpec.Labkit::RateLimit::Rule.executor": "Run", "RunOnceActivity.ShowReadmeOnStart": "true", "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true", "RunOnceActivity.git.unshallow": "true", "RunOnceActivity.typescript.service.memoryLimit.init": "true", "com.intellij.lang.ruby.rbs.tools.collection.workspace.sync.RbsCollectionUpdateProjectActivity#LAST_UPDATE_TIMESTAMP": "1777386083040", "git-widget-placeholder": "testing/docker-compose-redis-autostart", "last_opened_file_path": "/Users/maxwoolf/labkit-ruby", "nodejs_package_manager_path": "npm", "ruby.structure.view.model.defaults.configured": "true", "settings.editor.selected.configurable": "preferences.pluginManager", "vue.rearranger.settings.migration": "true" } }]]></component> }</component> <component name="RunManager"> <configuration name="Labkit::RateLimit::Rule" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true" nameIsGenerated="true"> <module name="labkit-ruby" /> Loading spec/support/test_redis.rb +6 −6 Original line number Diff line number Diff line Loading @@ -5,8 +5,8 @@ require "open3" # Shared Redis client for specs that hit a real Redis instance. # # On the first call to `reset!`, probes the configured URL and — when running # locally — spawns a redis container via `docker compose up -d redis` if no # On the first call to `reset!`, probes the configured URL and - when running # locally - spawns a redis container via `docker compose up -d redis` if no # instance is already reachable. Autostart is disabled in CI and when # LABKIT_TEST_REDIS_URL is explicitly set (assume the caller knows what they're # pointing at). Loading Loading @@ -49,7 +49,7 @@ module TestRedis cmd = compose_command raise_autostart_failed!("neither `docker compose` nor `docker-compose` found") if cmd.nil? warn "TestRedis: starting Redis via `#{cmd.join(" ")} up -d redis`..." warn "TestRedis: starting Redis via `#{cmd.join(' ')} up -d redis`..." output, status = Open3.capture2e(*cmd, "up", "-d", "redis", chdir: COMPOSE_DIR) raise_autostart_failed!(output) unless status.success? Loading Loading @@ -79,7 +79,7 @@ module TestRedis cmd = compose_command return unless cmd warn "TestRedis: stopping Redis via `#{cmd.join(" ")} down`..." warn "TestRedis: stopping Redis via `#{cmd.join(' ')} down`..." Open3.capture2e(*cmd, "down", chdir: COMPOSE_DIR) end Loading @@ -92,9 +92,9 @@ module TestRedis end def self.wait_until_reachable! deadline = Time.now + AUTOSTART_TIMEOUT deadline = Time.zone.now + AUTOSTART_TIMEOUT until reachable? raise "TestRedis: Redis at #{URL} not reachable within #{AUTOSTART_TIMEOUT}s of `docker compose up`" if Time.now > deadline raise "TestRedis: Redis at #{URL} not reachable within #{AUTOSTART_TIMEOUT}s of `docker compose up`" if Time.zone.now > deadline sleep 0.2 end Loading Loading
.gitlab-ci.yml +2 −2 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ ruby-versions: - name: redis:7-alpine alias: redis variables: LABKIT_TEST_REDIS_URL: redis://redis:6379/0 LABKIT_TEST_REDIS_URL: redis://redis parallel: matrix: - RUBY_VERSION: ["3.4"] Loading @@ -47,7 +47,7 @@ legacy-ruby-versions: - name: redis:7-alpine alias: redis variables: LABKIT_TEST_REDIS_URL: redis://redis:6379/0 LABKIT_TEST_REDIS_URL: redis://redis parallel: matrix: - RUBY_VERSION: ["3.3"] Loading
.idea/workspace.xml +18 −20 Original line number Diff line number Diff line Loading @@ -2,11 +2,9 @@ <project version="4"> <component name="ChangeListManager"> <list default="true" id="eda9ef7d-e18e-4c0a-8966-bb3f714359b9" name="Changes" comment=""> <change afterPath="$PROJECT_DIR$/docker-compose.yml" afterDir="false" /> <change afterPath="$PROJECT_DIR$/spec/support/test_redis.rb" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.gitlab-ci.yml" beforeDir="false" afterPath="$PROJECT_DIR$/.gitlab-ci.yml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" /> <change beforePath="$PROJECT_DIR$/spec/labkit/rate_limit_spec.rb" beforeDir="false" afterPath="$PROJECT_DIR$/spec/labkit/rate_limit_spec.rb" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/spec/support/test_redis.rb" beforeDir="false" afterPath="$PROJECT_DIR$/spec/support/test_redis.rb" afterDir="false" /> </list> <option name="SHOW_DIALOG" value="false" /> <option name="HIGHLIGHT_CONFLICTS" value="true" /> Loading Loading @@ -34,23 +32,23 @@ <option name="hideEmptyMiddlePackages" value="true" /> <option name="showLibraryContents" value="true" /> </component> <component name="PropertiesComponent"><![CDATA[{ "keyToString": { "ModuleVcsDetector.initialDetectionPerformed": "true", "RSpec.Labkit::RateLimit::Rule.executor": "Run", "RunOnceActivity.ShowReadmeOnStart": "true", "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true", "RunOnceActivity.git.unshallow": "true", "RunOnceActivity.typescript.service.memoryLimit.init": "true", "com.intellij.lang.ruby.rbs.tools.collection.workspace.sync.RbsCollectionUpdateProjectActivity#LAST_UPDATE_TIMESTAMP": "1777386083040", "git-widget-placeholder": "Rebasing testing/docker-compose-redis-autostart", "last_opened_file_path": "/Users/maxwoolf/labkit-ruby", "nodejs_package_manager_path": "npm", "ruby.structure.view.model.defaults.configured": "true", "settings.editor.selected.configurable": "preferences.pluginManager", "vue.rearranger.settings.migration": "true" <component name="PropertiesComponent">{ "keyToString": { "ModuleVcsDetector.initialDetectionPerformed": "true", "RSpec.Labkit::RateLimit::Rule.executor": "Run", "RunOnceActivity.ShowReadmeOnStart": "true", "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true", "RunOnceActivity.git.unshallow": "true", "RunOnceActivity.typescript.service.memoryLimit.init": "true", "com.intellij.lang.ruby.rbs.tools.collection.workspace.sync.RbsCollectionUpdateProjectActivity#LAST_UPDATE_TIMESTAMP": "1777386083040", "git-widget-placeholder": "testing/docker-compose-redis-autostart", "last_opened_file_path": "/Users/maxwoolf/labkit-ruby", "nodejs_package_manager_path": "npm", "ruby.structure.view.model.defaults.configured": "true", "settings.editor.selected.configurable": "preferences.pluginManager", "vue.rearranger.settings.migration": "true" } }]]></component> }</component> <component name="RunManager"> <configuration name="Labkit::RateLimit::Rule" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true" nameIsGenerated="true"> <module name="labkit-ruby" /> Loading
spec/support/test_redis.rb +6 −6 Original line number Diff line number Diff line Loading @@ -5,8 +5,8 @@ require "open3" # Shared Redis client for specs that hit a real Redis instance. # # On the first call to `reset!`, probes the configured URL and — when running # locally — spawns a redis container via `docker compose up -d redis` if no # On the first call to `reset!`, probes the configured URL and - when running # locally - spawns a redis container via `docker compose up -d redis` if no # instance is already reachable. Autostart is disabled in CI and when # LABKIT_TEST_REDIS_URL is explicitly set (assume the caller knows what they're # pointing at). Loading Loading @@ -49,7 +49,7 @@ module TestRedis cmd = compose_command raise_autostart_failed!("neither `docker compose` nor `docker-compose` found") if cmd.nil? warn "TestRedis: starting Redis via `#{cmd.join(" ")} up -d redis`..." warn "TestRedis: starting Redis via `#{cmd.join(' ')} up -d redis`..." output, status = Open3.capture2e(*cmd, "up", "-d", "redis", chdir: COMPOSE_DIR) raise_autostart_failed!(output) unless status.success? Loading Loading @@ -79,7 +79,7 @@ module TestRedis cmd = compose_command return unless cmd warn "TestRedis: stopping Redis via `#{cmd.join(" ")} down`..." warn "TestRedis: stopping Redis via `#{cmd.join(' ')} down`..." Open3.capture2e(*cmd, "down", chdir: COMPOSE_DIR) end Loading @@ -92,9 +92,9 @@ module TestRedis end def self.wait_until_reachable! deadline = Time.now + AUTOSTART_TIMEOUT deadline = Time.zone.now + AUTOSTART_TIMEOUT until reachable? raise "TestRedis: Redis at #{URL} not reachable within #{AUTOSTART_TIMEOUT}s of `docker compose up`" if Time.now > deadline raise "TestRedis: Redis at #{URL} not reachable within #{AUTOSTART_TIMEOUT}s of `docker compose up`" if Time.zone.now > deadline sleep 0.2 end Loading