Skip to content

Commit

Permalink
chore: housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
palkan committed Apr 26, 2024
1 parent cffc5f7 commit f8ac771
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 13 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release gems
on:
workflow_dispatch:
push:
tags:
- v*

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch current tag as annotated. See https://github.com/actions/checkout/issues/290
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
- name: Configure RubyGems Credentials
uses: rubygems/configure-rubygems-credentials@main
- name: Publish to RubyGems
run: |
gem install gem-release
gem release
4 changes: 2 additions & 2 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [ '2.6', '2.7', '3.0' ]
ruby: [ '2.7', '3.0', '3.1', '3.2', '3.3' ]
env:
RUBY_IMAGE: ${{ matrix.ruby }}
name: Ruby ${{ matrix.ruby }}
Expand All @@ -21,7 +21,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 3.2
- name: Install dependencies
run: |
gem install dip
Expand Down
6 changes: 2 additions & 4 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ appraise "rails-6" do
gem "rails", "~> 6.0"
end

if RUBY_VERSION >= "2.7"
appraise "rails-7" do
gem "rails", "~> 7.0"
end
appraise "rails-7" do
gem "rails", "~> 7.0"
end
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Change log

## master

- Require Ruby 2.7.
8 changes: 3 additions & 5 deletions downstream.gemspec
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# frozen_string_literal: true

lib = File.expand_path("lib", __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "downstream/version"
require_relative "lib/downstream/version"

Gem::Specification.new do |spec|
spec.name = "downstream"
Expand All @@ -25,7 +23,7 @@ Gem::Specification.new do |spec|
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
spec.required_ruby_version = ">= 2.5"
spec.required_ruby_version = ">= 2.7"

spec.add_dependency "after_commit_everywhere", "~> 1.0"
spec.add_dependency "globalid", "~> 1.0"
Expand All @@ -38,6 +36,6 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "rake", "~> 13.0"
spec.add_development_dependency "rspec", "~> 3.0"
spec.add_development_dependency "rspec-rails", "~> 5.0"
spec.add_development_dependency "sqlite3", "~> 1.4"
spec.add_development_dependency "sqlite3", "~> 1.4.0"
spec.add_development_dependency "standard", "~> 1.3"
end
2 changes: 1 addition & 1 deletion lib/downstream.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def construct_identifier(subscriber, to)
"Please, specify event using `to:` option"
end

identifier = if to.is_a?(Class) && Event >= to
identifier = if to.is_a?(Class) && Event >= to # rubocop:disable Style/YodaCondition
to.identifier
else
to
Expand Down
2 changes: 1 addition & 1 deletion lib/downstream/rspec/have_published_event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def set_expected_number(relativity, count)
end

def message_expectation_modifier
number_modifier = @expected_number == 1 ? "once" : "#{@expected_number} times"
number_modifier = (@expected_number == 1) ? "once" : "#{@expected_number} times"
case @expectation_type
when :exactly then "exactly #{number_modifier}"
when :at_most then "at most #{number_modifier}"
Expand Down

0 comments on commit f8ac771

Please sign in to comment.