Skip to content

Commit

Permalink
start greenfield project for v2
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronmallen committed Sep 12, 2023
1 parent 9b7be5e commit 1739500
Show file tree
Hide file tree
Showing 122 changed files with 55 additions and 7,361 deletions.
4 changes: 1 addition & 3 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,12 @@ plugins:
enabled: true
rubocop:
enabled: true
channel: rubocop-1-9-1
channel: rubocop-1-50-2
config:
file: .rubocop-codeclimate.yml
exclude_patterns:
- .github/PULL_REQUEST_TEMPLATE.md
- .github/ISSUE_TEMPLATE/*
- .mdlrc
- .yardopts
- '/bin/*'
- '**/spec/'
- '**/vendor/'
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: 🐞 Bug Report
about: Report a bug to help us improve.
title: '[Bug Report]'
labels: bug, unverified
assignees: ''
assignees: 'aaronmallen'
---

<!--- ⚠️ If you do not respect this template your issue will be closed. -->
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: 🚀 Feature Request
about: Propose a change.
title: '[Feature Request]'
labels: feature
assignees: ''
assignees: 'aaronmallen'
---

<!--- ⚠️ If you do not respect this template your issue will be closed. -->
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: ❓ Question
about: Ask a question that isn't a feature request a bug report.
title: '[Question]'
labels: question
assignees: ''
assignees: 'aaronmallen'
---

<!-- ⚠️ Make sure to browse the opened and closed issues before submitting your issue. -->
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Build

on:
pull_request:
Expand All @@ -18,10 +18,10 @@ on:

jobs:
lint:
uses: aaronmallen/activeinteractor/.github/workflows/lint.yml@main
uses: aaronmallen/activeinteractor/.github/workflows/lint.yml@2-0-alpha
test:
uses: aaronmallen/activeinteractor/.github/workflows/test.yml@main
uses: aaronmallen/activeinteractor/.github/workflows/test.yml@2-0-alpha
secrets:
cc-test-reporter-id: ${{ secrets.CC_TEST_REPORTER_ID }}
build:
uses: aaronmallen/activeinteractor/.github/workflows/build_gem.yml@main
uses: aaronmallen/activeinteractor/.github/workflows/build_gem.yml@2-0-alpha
6 changes: 3 additions & 3 deletions .github/workflows/build_gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
strategy:
matrix:
ruby-version:
- '2.5'
- '2.6'
- '2.7'
- '3.0'
- '3.1'
- '3.2'
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ on:

jobs:
lint:
uses: aaronmallen/activeinteractor/.github/workflows/lint.yml@main
uses: aaronmallen/activeinteractor/.github/workflows/lint.yml@2-0-alpha
test:
if: success()
needs:
- lint
uses: aaronmallen/activeinteractor/.github/workflows/test.yml@main
uses: aaronmallen/activeinteractor/.github/workflows/test.yml@2-0-alpha
secrets:
cc-test-reporter-id: ${{ secrets.CC_TEST_REPORTER_ID }}
build:
if: success()
needs:
- test
uses: aaronmallen/activeinteractor/.github/workflows/build_gem.yml@main
uses: aaronmallen/activeinteractor/.github/workflows/build_gem.yml@2-0-alpha
publish:
name: Publish
needs:
Expand All @@ -30,7 +30,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-ruby@v1.1.2
with:
ruby-version: 2.6
ruby-version: '3.0'
architecture: x64
- name: Publish to RubyGems
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.5
ruby-version: '3.0'
bundler-cache: true

- name: Run Rubocop
Expand Down
18 changes: 6 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,16 @@ jobs:
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
- name: Run Unit Tests
run: COVERAGE_TYPE=unit bundle exec rspec --tag \~type:integration --format documentation --order rand

- name: Run Integration Tests
run: COVERAGE_TYPE=integration bundle exec rspec --tag type:integration --format documentation --order rand
- name: Run Tests
run: bundle exec rspec --format documentation --order rand

- name: Report Coverage
if: success() && env.CC_TEST_REPORTER_ID != null
run: |
./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.unit.json coverage/unit_lcov.info
./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.integration.json coverage/integration_lcov.info
./cc-test-reporter sum-coverage coverage/codeclimate.*.json -p 2
./cc-test-reporter upload-coverage
./cc-test-reporter after-build
strategy:
matrix:
ruby-version:
- '2.5'
- '2.6'
- '2.7'
- '3.0'
- '3.1'
- '3.2'
2 changes: 1 addition & 1 deletion .github/workflows/upload_sarif.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set Up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.5
ruby-version: '3.0'
bundler-cache: true

- name: Generate Sarif Output
Expand Down
1 change: 0 additions & 1 deletion .mdlrc

This file was deleted.

1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ inherit_from:
- .rubocop/layout.yml
- .rubocop/metrics.yml
- .rubocop/performance.yml
- .rubocop/rake.yml
- .rubocop/rspec.yml
- .rubocop/style.yml
3 changes: 1 addition & 2 deletions .rubocop/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ AllCops:
Exclude:
- bin/**/*
- vendor/bundle/**/*
- spec/**/*
NewCops: enable
TargetRubyVersion: 2.5
TargetRubyVersion: 3.0
2 changes: 2 additions & 0 deletions .rubocop/rake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require:
- rubocop-rake
4 changes: 0 additions & 4 deletions .rubocop/rspec.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
require:
- rubocop-rspec

RSpec/DescribeClass:
Exclude:
- spec/integration/**/*_spec.rb
RSpec/MultipleExpectations:
Max: 3
12 changes: 0 additions & 12 deletions .yardopts

This file was deleted.

21 changes: 8 additions & 13 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,21 @@ source 'https://rubygems.org'
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }

group :development, :test do
gem 'code-scanning-rubocop'
gem 'mdl'
gem 'rails'
gem 'code-scanning-rubocop', '~> 0.6'
gem 'rake', '~> 13.0'
gem 'rspec', '~> 3.11'
gem 'rubocop', '0.92.0'
gem 'rubocop-performance'
gem 'rubocop-rspec'
gem 'solargraph'
gem 'rspec', '~> 3.12'
gem 'rubocop', '~> 1.56'
gem 'rubocop-performance', '~> 1.19'
gem 'rubocop-rake', '~> 0.6'
gem 'rubocop-rspec', '~> 2.21'
end

group :test do
gem 'simplecov'
gem 'simplecov-lcov'
gem 'simplecov', '~> 0.22'
end

group :doc do
gem 'github-markup'
gem 'redcarpet'
gem 'yard'
gem 'yard', '~> 0.9'
end

# Specify your gem's dependencies in activeinteractor.gemspec
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2019 Aaron Allen
Copyright (c) 2023 Aaron Allen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ActiveInteractor

[![Version](https://img.shields.io/gem/v/activeinteractor.svg?logo=ruby)](https://rubygems.org/gems/activeinteractor)
[![Build Status](https://github.com/aaronmallen/activeinteractor/workflows/Build/badge.svg)](https://github.com/aaronmallen/activeinteractor/actions)
[![Build](https://github.com/aaronmallen/activeinteractor/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/aaronmallen/activeinteractor/actions/workflows/build.yml)
[![Maintainability](https://api.codeclimate.com/v1/badges/2f1cb318f681a1eebb27/maintainability)](https://codeclimate.com/github/aaronmallen/activeinteractor/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/2f1cb318f681a1eebb27/test_coverage)](https://codeclimate.com/github/aaronmallen/activeinteractor/test_coverage)
[![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](https://www.rubydoc.info/gems/activeinteractor)
Expand Down
29 changes: 0 additions & 29 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,32 +1,3 @@
# frozen_string_literal: true

require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'active_interactor/version'

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

begin
require 'mdl'
require 'rubocop/rake_task'
require 'yard'

RuboCop::RakeTask.new do |task|
task.options << '-D'
end

task :mdl do
puts 'Linting markdown documents...'
MarkdownLint.run(Dir['*.md'])
# MarkdownLint#run calls system exit regardless of status.
rescue SystemExit # rubocop:disable Lint/SuppressedException
end

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

Rake::Task[:spec].clear.enhance %i[mdl rubocop rspec]
task default: %i[spec doc build]
rescue LoadError
Rake::Task[:spec].clear.enhance %i[rspec]
task default: %i[spec build]
end
13 changes: 6 additions & 7 deletions activeinteractor.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ Gem::Specification.new do |spec|
Rich support for attributes, callbacks, and validations, and thread safe performance methods.
DESC

spec.required_ruby_version = '>= 2.5.0'
spec.required_ruby_version = '>= 3.0'

spec.license = 'MIT'

spec.authors = ['Aaron Allen']
spec.email = ['hello@aaronmallen.me']
spec.homepage = 'https://github.com/aaronmallen/activeinteractor'

spec.files = Dir['.yardopts', 'CHANGELOG.md', 'LICENSE', 'README.md', 'lib/**/*']
spec.files = Dir['CHANGELOG.md', 'LICENSE', 'README.md', 'lib/**/*']
spec.require_paths = ['lib']

spec.metadata = {
Expand All @@ -30,11 +30,10 @@ Gem::Specification.new do |spec|
'documentation_uri' => "https://www.rubydoc.info/gems/activeinteractor/#{ActiveInteractor::Version.gem_version}",
'hompage_uri' => spec.homepage,
'source_code_uri' => "https://github.com/aaronmallen/activeinteractor/tree/v#{ActiveInteractor::Version.semver}",
'wiki_uri' => 'https://github.com/aaronmallen/activeinteractor/wiki'
'wiki_uri' => 'https://github.com/aaronmallen/activeinteractor/wiki',
'rubygems_mfa_required' => 'true'
}

spec.add_dependency 'activemodel', '>= 4.2', '< 8'
spec.add_dependency 'activesupport', '>= 4.2', '< 8'

spec.add_development_dependency 'bundler', '~> 2.3'
spec.add_dependency 'activemodel', '>= 6.1', '< 8'
spec.add_dependency 'activesupport', '>= 6.1', '< 8'
end
3 changes: 0 additions & 3 deletions bin/rubocop

This file was deleted.

Loading

0 comments on commit 1739500

Please sign in to comment.