-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generated with link:https://alchemists.io/projects/gemsmith[Gemsmith] 20.3.0.
- Loading branch information
Showing
24 changed files
with
308 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
github: hanami |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
## Overview | ||
<!-- Required. Describe, briefly, the behavior experienced and desired. --> | ||
|
||
## Screenshots/Screencasts | ||
<!-- Optional. Attach screenshot(s) and/or screencast(s) that demo the behavior. --> | ||
|
||
## Steps to Recreate | ||
<!-- Required. List exact steps (numbered list) to reproduce errant behavior. --> | ||
|
||
## Environment | ||
<!-- Required. What is your operating system, software version(s), etc. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## Overview | ||
<!-- Required. Why is this important/necessary and what is the overarching architecture. --> | ||
|
||
## Screenshots/Screencasts | ||
<!-- Optional. Provide supporting image/video. --> | ||
|
||
## Details | ||
<!-- Optional. List the key features/highlights as bullet points. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Continuous Integration | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: '0' | ||
ref: ${{github.head_ref}} | ||
|
||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
|
||
- name: Rake | ||
run: bundle exec rake | ||
|
||
- name: Archive SimpleCov Report | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage | ||
path: coverage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*.gem | ||
.bundle | ||
Gemfile.lock | ||
pkg | ||
tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
exclude_paths: | ||
- tmp | ||
- vendor | ||
|
||
detectors: | ||
LongParameterList: | ||
enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
inherit_gem: | ||
caliber: config/all.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.2.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# frozen_string_literal: true | ||
|
||
ruby File.read(".ruby-version").strip | ||
|
||
source "https://rubygems.org" | ||
|
||
gemspec | ||
|
||
group :code_quality do | ||
gem "caliber", "~> 0.35" | ||
gem "git-lint", "~> 6.0" | ||
gem "reek", "~> 6.1", require: false | ||
gem "simplecov", "~> 0.22", require: false | ||
end | ||
|
||
group :development do | ||
gem "rake", "~> 13.0" | ||
end | ||
|
||
group :test do | ||
gem "guard-rspec", "~> 4.7", require: false | ||
gem "rspec", "~> 3.12" | ||
end | ||
|
||
group :tools do | ||
gem "amazing_print", "~> 1.4" | ||
gem "debug", "~> 1.8" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# frozen_string_literal: true | ||
|
||
guard :rspec, cmd: "NO_COVERAGE=true bin/rspec --format documentation" do | ||
watch %r(^spec/.+_spec\.rb$) | ||
watch(%r(^lib/(.+)\.rb$)) { |m| "spec/lib/#{m[1]}_spec.rb" } | ||
watch("spec/spec_helper.rb") { "spec" } | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015-2023 dry-rb team | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,22 @@ | ||
# dry-operation | ||
<!--- this file is synced from dry-rb/template-gem project --> | ||
[gem]: https://rubygems.org/gems/dry-operation | ||
[actions]: https://github.com/dry-rb/dry-operation/actions | ||
|
||
# dry-operation [![Gem Version](https://badge.fury.io/rb/dry-operation.svg)][gem] [![CI Status](https://github.com/dry-rb/dry-operation/workflows/ci/badge.svg)][actions] | ||
|
||
## Links | ||
|
||
* [User documentation](https://dry-rb.org/gems/dry-operation) | ||
* [API documentation](http://rubydoc.info/gems/dry-operation) | ||
* [Forum](https://discourse.dry-rb.org) | ||
|
||
## Supported Ruby versions | ||
|
||
This library officially supports the following Ruby versions: | ||
|
||
* MRI `>= 3.0.0` | ||
* jruby `>= 9.4` (not tested on CI) | ||
|
||
## License | ||
|
||
See `LICENSE` file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
require "bundler/setup" | ||
require "git/lint/rake/register" | ||
require "reek/rake/task" | ||
require "rspec/core/rake_task" | ||
require "rubocop/rake_task" | ||
|
||
Git::Lint::Rake::Register.call | ||
Reek::Rake::Task.new | ||
RSpec::Core::RakeTask.new { |task| task.verbose = false } | ||
RuboCop::RakeTask.new | ||
|
||
desc "Run code quality checks" | ||
task code_quality: %i[git_lint reek rubocop] | ||
|
||
task default: %i[code_quality spec] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
= Versions | ||
|
||
== 0.0.0 (2023-09-26) | ||
|
||
* Added initial implementation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#! /usr/bin/env ruby | ||
# frozen_string_literal: true | ||
|
||
require "bundler/setup" | ||
Bundler.require :tools | ||
|
||
require "dry/operation" | ||
require "irb" | ||
|
||
IRB.start __FILE__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#! /usr/bin/env ruby | ||
# frozen_string_literal: true | ||
|
||
require "bundler/setup" | ||
|
||
load Gem.bin_path "guard", "guard" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#! /usr/bin/env ruby | ||
# frozen_string_literal: true | ||
|
||
require "bundler/setup" | ||
|
||
load Gem.bin_path "rake", "rake" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#! /usr/bin/env ruby | ||
# frozen_string_literal: true | ||
|
||
require "bundler/setup" | ||
|
||
load Gem.bin_path "rspec-core", "rspec" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#! /usr/bin/env ruby | ||
# frozen_string_literal: true | ||
|
||
require "bundler/setup" | ||
|
||
load Gem.bin_path "rubocop", "rubocop" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#! /usr/bin/env bash | ||
|
||
set -o nounset | ||
set -o errexit | ||
set -o pipefail | ||
IFS=$'\n\t' | ||
|
||
bundle install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# frozen_string_literal: true | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = "dry-operation" | ||
spec.version = "0.0.0" | ||
spec.authors = ["Tim Riley", "Marc Busque", "Brooke Kuhlmann"] | ||
spec.email = ["tim@riley.id.au", "marc@lamarciana.com", "brooke@alchemists.io"] | ||
spec.homepage = "https://dry-rb.org/gems/dry-operation" | ||
spec.summary = "A domain specific language for composable business transaction workflows." | ||
spec.license = "MIT" | ||
|
||
spec.metadata = { | ||
"bug_tracker_uri" => "https://github.com/dry-rb/dry-operation/issues", | ||
"changelog_uri" => "https://github.com/dry-rb/dry-operation/blob/main/CHANGELOG.md", | ||
"documentation_uri" => "https://dry-rb.org/gems/dry-operation", | ||
"funding_uri" => "https://github.com/sponsors/hanami", | ||
"label" => "Dry Operation", | ||
"rubygems_mfa_required" => "true", | ||
"source_code_uri" => "https://github.com/dry-rb/dry-operation" | ||
} | ||
|
||
spec.signing_key = Gem.default_key_path | ||
spec.cert_chain = [Gem.default_cert_path] | ||
|
||
spec.required_ruby_version = "~> 3.2" | ||
spec.add_dependency "refinements", "~> 11.0" | ||
spec.add_dependency "zeitwerk", "~> 2.6" | ||
|
||
spec.extra_rdoc_files = Dir["README*", "LICENSE*"] | ||
spec.files = Dir["*.gemspec", "lib/**/*"] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# frozen_string_literal: true | ||
|
||
require "zeitwerk" | ||
|
||
Zeitwerk::Loader.new.then do |loader| | ||
loader.push_dir "#{__dir__}/.." | ||
loader.setup | ||
end | ||
|
||
module Dry | ||
# Main namespace. | ||
module Operation | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# frozen_string_literal: true | ||
|
||
require "simplecov" | ||
|
||
unless ENV["NO_COVERAGE"] | ||
SimpleCov.start do | ||
add_filter %r(^/spec/) | ||
enable_coverage :branch | ||
enable_coverage_for_eval | ||
minimum_coverage_by_file line: 95, branch: 95 | ||
end | ||
end | ||
|
||
Bundler.require :tools | ||
|
||
require "dry/operation" | ||
require "refinements" | ||
|
||
SPEC_ROOT = Pathname(__dir__).realpath.freeze | ||
|
||
using Refinements::Pathnames | ||
|
||
Pathname.require_tree SPEC_ROOT.join("support/shared_contexts") | ||
|
||
RSpec.configure do |config| | ||
config.color = true | ||
config.disable_monkey_patching! | ||
config.example_status_persistence_file_path = "./tmp/rspec-examples.txt" | ||
config.filter_run_when_matching :focus | ||
config.formatter = ENV.fetch("CI", false) == "true" ? :progress : :documentation | ||
config.order = :random | ||
config.shared_context_metadata_behavior = :apply_to_host_groups | ||
config.warnings = true | ||
|
||
config.expect_with :rspec do |expectations| | ||
expectations.syntax = :expect | ||
expectations.include_chain_clauses_in_custom_matcher_descriptions = true | ||
end | ||
|
||
config.mock_with :rspec do |mocks| | ||
mocks.verify_doubled_constant_names = true | ||
mocks.verify_partial_doubles = true | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# frozen_string_literal: true | ||
|
||
RSpec.shared_context "with temporary directory" do | ||
using Refinements::Pathnames | ||
|
||
let(:temp_dir) { Bundler.root.join "tmp/rspec" } | ||
|
||
around do |example| | ||
temp_dir.make_path | ||
example.run | ||
temp_dir.remove_tree | ||
end | ||
end |