Skip to content

Commit

Permalink
Merge pull request #1 from bdurand/re-release
Browse files Browse the repository at this point in the history
Re release
  • Loading branch information
bdurand committed Nov 11, 2023
2 parents 82bba69 + d2ad9b1 commit 3007202
Show file tree
Hide file tree
Showing 18 changed files with 295 additions and 153 deletions.
12 changes: 12 additions & 0 deletions .github/dependabot.yml
@@ -0,0 +1,12 @@
# Dependabot update strategy
version: 2
updates:
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
allow:
# Automatically keep all runtime dependencies updated
- dependency-name: "*"
dependency-type: "production"
versioning-strategy: lockfile-only
41 changes: 41 additions & 0 deletions .github/workflows/continuous_integration.yml
@@ -0,0 +1,41 @@
name: Continuous Integration
on:
push:
branches:
- master
- actions-*
tags:
- v*
pull_request:
env:
BUNDLE_CLEAN: "true"
BUNDLE_PATH: vendor/bundle
BUNDLE_JOBS: 3
BUNDLE_RETRY: 3
jobs:
specs:
name: Run specs
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: checkout
uses: actions/checkout@v4
- name: set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "2.5"
- name: setup bundler
run: bundle update
- name: specs
run: bundle exec rake spec
- name: standardrb
run: bundle exec rake standard
39 changes: 39 additions & 0 deletions .github/workflows/regression_test.yml
@@ -0,0 +1,39 @@
name: Regression Test
on:
workflow_dispatch:
schedule:
- cron: "0 15 * * 1"
env:
BUNDLE_CLEAN: "true"
BUNDLE_PATH: vendor/bundle
BUNDLE_JOBS: 3
BUNDLE_RETRY: 3
jobs:
specs:
name: Run specs
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ruby
- name: Install bundler
run: |
bundle update
- name: Run specs
run: |
bundle exec rake spec
15 changes: 11 additions & 4 deletions .gitignore
@@ -1,6 +1,13 @@
pkg
tmp
rdoc
*.rbc
.tm_properties
.bundle
/gemfiles/*.lock
.yardoc
/_yardoc/
/coverage/
/doc/
/pkg/
/spec/reports/
/tmp/
.DS_Store
Gemfile.lock
.ruby-version
7 changes: 7 additions & 0 deletions .standard.yml
@@ -0,0 +1,7 @@
ruby_version: 2.5

format: progress

ignore:
- 'spec/**/*':
- Lint/UselessAssignment
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

33 changes: 33 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,33 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.1.2

### Changed
- Redis instance will now default to a Redis instance with the default options
instead of throwing an error if it was not set.
- Minumum Ruby version set to 2.5

## 1.1.1

### Fixed
- Circular reference warning

## 1.1.0

### Added
- Expose manually locking and unlocking processes.
- Allow passing in a redis connection in the constructor.

## 1.0.1

### Fixed
- Use Lua script to avoid race conditions and ensure no extra processes slip through.

## 1.0.0

### Added
- Initial release.
13 changes: 0 additions & 13 deletions CHANGE_LOG.md

This file was deleted.

12 changes: 11 additions & 1 deletion Gemfile
@@ -1,2 +1,12 @@
source 'https://rubygems.org'
source "https://rubygems.org"

gemspec

gem "timecop"

gem "dotenv"
gem "rspec", "~> 3.10"
gem "appraisal"
gem "standard", "~> 1.0"
gem "simplecov", "~> 0.21", require: false
gem "yard"
39 changes: 0 additions & 39 deletions Gemfile.lock

This file was deleted.

2 changes: 1 addition & 1 deletion MIT_LICENSE.txt
@@ -1,4 +1,4 @@
Copyright (c) 2015 WHI, Inc.
Copyright (c) 2015 Brian Durand

MIT License

Expand Down
3 changes: 1 addition & 2 deletions README.md
@@ -1,5 +1,4 @@
[![Build Status](https://travis-ci.org/weheartit/restrainer.svg?branch=master)](https://travis-ci.org/weheartit/restrainer)
[![Maintainability](https://api.codeclimate.com/v1/badges/03b5e55a9ca6b3023e6f/maintainability)](https://codeclimate.com/github/weheartit/restrainer/maintainability)
[![Ruby Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/testdouble/standard)

This gem provides a method of throttling calls across processes that can be very useful if you have to call an external service with limited resources.

Expand Down
22 changes: 21 additions & 1 deletion Rakefile
@@ -1,6 +1,26 @@
begin
require "bundler/setup"
rescue LoadError
puts "You must `gem install bundler` and `bundle install` to run rake tasks"
end

require "yard"

YARD::Rake::YardocTask.new(:yard)

require "bundler/gem_tasks"

task :release do
unless `git rev-parse --abbrev-ref HEAD`.chomp == "main"
warn "Gem can only be released from the main branch"
exit 1
end
end

require "rspec/core/rake_task"

RSpec::Core::RakeTask.new(:spec)

task :default => :spec
task default: :spec

require "standard/rake"
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
1.1.1
1.1.2

0 comments on commit 3007202

Please sign in to comment.