Skip to content

Commit

Permalink
chore: housekeeping
Browse files Browse the repository at this point in the history
- Drop Dip

- Drop Appraisals
  • Loading branch information
palkan committed Feb 14, 2025
1 parent 48cce77 commit c2dda2f
Show file tree
Hide file tree
Showing 24 changed files with 197 additions and 136 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build

on:
push:
branches:
- master
pull_request:

jobs:
rspec:
runs-on: ubuntu-latest
env:
BUNDLE_JOBS: 4
BUNDLE_RETRY: 3
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
CI: true
strategy:
fail-fast: false
matrix:
ruby: ["3.2"]
gemfile: [
"gemfiles/rails71.gemfile",
]
include:
- ruby: "3.4"
gemfile: "gemfiles/railsmaster.gemfile"
- ruby: "3.3"
gemfile: "gemfiles/rails8.gemfile"
- ruby: "3.1"
gemfile: "gemfiles/rails7.gemfile"
- ruby: "3.0"
gemfile: "gemfiles/rails7.gemfile"
- ruby: "2.7"
gemfile: "gemfiles/rails6.gemfile"
steps:
- uses: actions/checkout@v2
- name: Install system deps
run: |
sudo apt-get update
sudo apt-get install libsqlite3-dev
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run RSpec
run: |
bundle exec rspec
22 changes: 22 additions & 0 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Lint Ruby

on:
push:
branches:
- master
pull_request:

jobs:
rubocop:
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: gemfiles/rubocop.gemfile
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- name: Lint Ruby code with RuboCop
run: |
bundle exec rubocop
32 changes: 0 additions & 32 deletions .github/workflows/ruby.yml

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
/_yardoc/
/coverage/
/doc/
/gemfiles/
/pkg/
/spec/reports/
tmp/
Expand Down
12 changes: 12 additions & 0 deletions .rubocop-md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
inherit_from: ".rubocop.yml"

require:
- rubocop-md

AllCops:
Include:
- '**/*.md'

Naming/FileName:
Exclude:
- '**/*.md'
16 changes: 13 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
require: standard
require:
- standard/cop/block_single_line_braces

inherit_gem:
standard: config/base.yml

AllCops:
TargetRubyVersion: 2.6
Exclude:
- 'gemfiles/*'
- 'bin/*'
- 'tmp/**/*'
- 'Gemfile'
- 'vendor/**/*'
- 'gemfiles/**/*'
- 'lib/.rbnext/**/*'
- 'lib/generators/**/templates/*.rb'
- 'spec/internal/db/**/*'
DisplayCopNames: true
SuggestExtensions: false
NewCops: disable

Standard/BlockSingleLineBraces:
Enabled: false

Style/FrozenStringLiteralComment:
Enabled: true
9 changes: 0 additions & 9 deletions Appraisals

This file was deleted.

13 changes: 13 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,17 @@

source "https://rubygems.org"

gem "debug", platform: :mri

gemspec

eval_gemfile "gemfiles/rubocop.gemfile"

local_gemfile = "#{File.dirname(__FILE__)}/Gemfile.local"

if File.exist?(local_gemfile)
eval(File.read(local_gemfile)) # rubocop:disable Security/Eval
else
gem "sqlite3", "~> 1.4"
gem "rails", "~> 7.0"
end
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ end
# for asynchronous subscriptions
it "is subscribed to some event" do
event = MyEvent.new(some: "data")
expect { Downstream.publish event }.
to have_enqueued_async_subscriber_for(MySubscriberService).
with(event)
expect { Downstream.publish event }
.to have_enqueued_async_subscriber_for(MySubscriberService)
.with(event)
end
```

Expand Down
26 changes: 25 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# frozen_string_literal: true

require "bundler/gem_tasks"
require "rake/testtask"
require "rspec/core/rake_task"

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

begin
require "rubocop/rake_task"
RuboCop::RakeTask.new

RuboCop::RakeTask.new("rubocop:md") do |task|
task.options << %w[-c .rubocop-md.yml]
end
rescue LoadError
task(:rubocop) {}
task("rubocop:md") {}
end

Rake::TestTask.new(:test) do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/**/*_test.rb"]
t.warning = false
end

task default: %w[rubocop rubocop:md spec test]
11 changes: 0 additions & 11 deletions bin/rails

This file was deleted.

43 changes: 0 additions & 43 deletions dip.yml

This file was deleted.

16 changes: 0 additions & 16 deletions docker-compose.yml

This file was deleted.

17 changes: 9 additions & 8 deletions downstream.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ Gem::Specification.new do |spec|
spec.homepage = "https://github.com/palkan/downstream"
spec.license = "MIT"

spec.metadata = {
"bug_tracker_uri" => "http://github.com/palkan/downstream/issues",
"changelog_uri" => "https://github.com/palkan/downstream/blob/master/CHANGELOG.md",
"documentation_uri" => "http://github.com/palkan/downstream",
"homepage_uri" => "http://github.com/palkan/downstream",
"source_code_uri" => "http://github.com/palkan/downstream"
}

# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
# to allow pushing to a single host or delete this section to allow pushing to any host.
if spec.respond_to?(:metadata)
Expand All @@ -20,22 +28,15 @@ Gem::Specification.new do |spec|
end

spec.files = Dir.glob("lib/**/*") + %w[LICENSE.txt README.md]
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
spec.required_ruby_version = ">= 2.7"

spec.add_dependency "after_commit_everywhere", "~> 1.0"
spec.add_dependency "globalid", "~> 1.0"
spec.add_dependency "rails", ">= 6"

spec.add_development_dependency "appraisal", "~> 2.2"
spec.add_development_dependency "bundler", ">= 1.16"
spec.add_development_dependency "combustion", "~> 1.3"
spec.add_development_dependency "debug", "~> 1.3"
spec.add_development_dependency "rake", "~> 13.0"
spec.add_development_dependency "rspec", "~> 3.0"
spec.add_development_dependency "rake", ">= 13.0"
spec.add_development_dependency "rspec-rails", "~> 6.0"
spec.add_development_dependency "sqlite3", "~> 1.4.0"
spec.add_development_dependency "standard", "~> 1.3"
end
6 changes: 6 additions & 0 deletions gemfiles/rails6.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source 'https://rubygems.org'

gem 'sqlite3', '~> 1.4.0'
gem 'rails', '~> 6.0'

gemspec path: '..'
6 changes: 6 additions & 0 deletions gemfiles/rails7.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source 'https://rubygems.org'

gem 'sqlite3', '~> 1.4'
gem 'rails', '~> 7.0.0'

gemspec path: '..'
6 changes: 6 additions & 0 deletions gemfiles/rails71.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source 'https://rubygems.org'

gem 'sqlite3', '~> 1.4'
gem 'rails', '~> 7.1.0'

gemspec path: '..'
6 changes: 6 additions & 0 deletions gemfiles/rails8.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source 'https://rubygems.org'

gem 'sqlite3', '~> 2.0'
gem 'rails', '~> 8.0'

gemspec path: '..'
7 changes: 7 additions & 0 deletions gemfiles/railsmaster.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source 'https://rubygems.org'

gem 'sqlite3', '~> 2.0'
gem 'rails', github: 'rails/rails'
gem 'activerecord-import', github: 'zdennis/activerecord-import'

gemspec path: '..'
7 changes: 7 additions & 0 deletions gemfiles/resmaster.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source 'https://rubygems.org'

gem 'sqlite3', '~> 1.4'
gem 'rails', '~> 7.0'
gem 'rails_event_store', github: 'RailsEventStore/rails_event_store'

gemspec path: '..'
4 changes: 4 additions & 0 deletions gemfiles/rubocop.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source "https://rubygems.org" do
gem "rubocop-md", "~> 1.0"
gem "standard", "~> 1.0"
end
4 changes: 0 additions & 4 deletions lefthook-local.dip_example.yml

This file was deleted.

4 changes: 2 additions & 2 deletions lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ pre-commit:
commands:
rubocop:
tags: backend
glob: "{**/*.rb,*.rb,Gemfile,Rakefile,Appraisals}"
runner: bundle exec rubocop -A --force-exclusion {staged_files} && git add {staged_files}
glob: "{**/*.rb,*.rb,Gemfile,Rakefile}"
run: bundle exec rubocop -A --force-exclusion {staged_files} && git add {staged_files}
Loading

0 comments on commit c2dda2f

Please sign in to comment.