-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Placeholder for a tool that will standardize API integration best practices --------- Co-authored-by: Carlos Palhares <[email protected]>
- Loading branch information
Showing
29 changed files
with
1,142 additions
and
23 deletions.
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,12 @@ | ||
name: api_chai | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
ruby: | ||
uses: powerhome/github-actions-workflows/.github/workflows/ruby-gem.yml@main | ||
with: | ||
package: ${{ github.workflow }} | ||
workdir: "packages/${{ github.workflow }}" | ||
secrets: inherit |
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
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 @@ | ||
/.bundle/ | ||
/.yardoc | ||
/_yardoc/ | ||
/coverage/ | ||
/pkg/ | ||
/spec/reports/ | ||
/tmp/ | ||
|
||
# rspec failure tracking | ||
.rspec_status |
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 @@ | ||
AllCops: | ||
TargetRubyVersion: 2.6 | ||
|
||
Style/StringLiterals: | ||
Enabled: true | ||
EnforcedStyle: double_quotes | ||
|
||
Style/StringLiteralsInInterpolation: | ||
Enabled: true | ||
EnforcedStyle: double_quotes | ||
|
||
Layout/LineLength: | ||
Max: 120 |
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 | ||
|
||
appraise "rails-6-0" do | ||
gem "rails", "6.0.6.1" | ||
end | ||
|
||
appraise "rails-6-1" do | ||
gem "rails", "6.1.7.4" | ||
end | ||
|
||
appraise "rails-7-0" do | ||
gem "rails", "7.0.6" | ||
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,12 @@ | ||
# frozen_string_literal: true | ||
|
||
source "https://rubygems.org" | ||
|
||
# Specify your gem's dependencies in api_chai.gemspec | ||
gemspec | ||
|
||
gem "rake", "~> 13.0" | ||
|
||
gem "rspec", "~> 3.0" | ||
|
||
gem "rubocop", "~> 1.21" |
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,130 @@ | ||
PATH | ||
remote: . | ||
specs: | ||
api_chai (0.0.1) | ||
|
||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
activesupport (7.1.2) | ||
base64 | ||
bigdecimal | ||
concurrent-ruby (~> 1.0, >= 1.0.2) | ||
connection_pool (>= 2.2.5) | ||
drb | ||
i18n (>= 1.6, < 2) | ||
minitest (>= 5.1) | ||
mutex_m | ||
tzinfo (~> 2.0) | ||
appraisal (2.5.0) | ||
bundler | ||
rake | ||
thor (>= 0.14.0) | ||
ast (2.4.2) | ||
base64 (0.2.0) | ||
bigdecimal (3.1.5) | ||
concurrent-ruby (1.2.2) | ||
connection_pool (2.4.1) | ||
diff-lcs (1.5.0) | ||
drb (2.2.0) | ||
ruby2_keywords | ||
i18n (1.14.1) | ||
concurrent-ruby (~> 1.0) | ||
json (2.7.1) | ||
language_server-protocol (3.17.0.3) | ||
license_finder (7.1.0) | ||
bundler | ||
rubyzip (>= 1, < 3) | ||
thor (~> 1.2) | ||
tomlrb (>= 1.3, < 2.1) | ||
with_env (= 1.1.0) | ||
xml-simple (~> 1.1.9) | ||
minitest (5.20.0) | ||
mutex_m (0.2.0) | ||
parallel (1.24.0) | ||
parser (3.2.2.4) | ||
ast (~> 2.4.1) | ||
racc | ||
racc (1.7.3) | ||
rack (3.0.8) | ||
rainbow (3.1.1) | ||
rake (13.1.0) | ||
regexp_parser (2.8.3) | ||
rexml (3.2.6) | ||
rspec (3.12.0) | ||
rspec-core (~> 3.12.0) | ||
rspec-expectations (~> 3.12.0) | ||
rspec-mocks (~> 3.12.0) | ||
rspec-core (3.12.2) | ||
rspec-support (~> 3.12.0) | ||
rspec-expectations (3.12.3) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.12.0) | ||
rspec-mocks (3.12.6) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.12.0) | ||
rspec-support (3.12.1) | ||
rubocop (1.59.0) | ||
json (~> 2.3) | ||
language_server-protocol (>= 3.17.0) | ||
parallel (~> 1.10) | ||
parser (>= 3.2.2.4) | ||
rainbow (>= 2.2.2, < 4.0) | ||
regexp_parser (>= 1.8, < 3.0) | ||
rexml (>= 3.2.5, < 4.0) | ||
rubocop-ast (>= 1.30.0, < 2.0) | ||
ruby-progressbar (~> 1.7) | ||
unicode-display_width (>= 2.4.0, < 3.0) | ||
rubocop-ast (1.30.0) | ||
parser (>= 3.2.1.0) | ||
rubocop-capybara (2.20.0) | ||
rubocop (~> 1.41) | ||
rubocop-factory_bot (2.24.0) | ||
rubocop (~> 1.33) | ||
rubocop-performance (1.20.1) | ||
rubocop (>= 1.48.1, < 2.0) | ||
rubocop-ast (>= 1.30.0, < 2.0) | ||
rubocop-powerhome (0.5.0) | ||
rubocop | ||
rubocop-performance | ||
rubocop-rails | ||
rubocop-rake | ||
rubocop-rspec | ||
rubocop-rails (2.23.1) | ||
activesupport (>= 4.2.0) | ||
rack (>= 1.1) | ||
rubocop (>= 1.33.0, < 2.0) | ||
rubocop-ast (>= 1.30.0, < 2.0) | ||
rubocop-rake (0.6.0) | ||
rubocop (~> 1.0) | ||
rubocop-rspec (2.25.0) | ||
rubocop (~> 1.40) | ||
rubocop-capybara (~> 2.17) | ||
rubocop-factory_bot (~> 2.22) | ||
ruby-progressbar (1.13.0) | ||
ruby2_keywords (0.0.5) | ||
rubyzip (2.3.2) | ||
thor (1.3.0) | ||
tomlrb (2.0.3) | ||
tzinfo (2.0.6) | ||
concurrent-ruby (~> 1.0) | ||
unicode-display_width (2.5.0) | ||
with_env (1.1.0) | ||
xml-simple (1.1.9) | ||
rexml | ||
|
||
PLATFORMS | ||
arm64-darwin-22 | ||
x86_64-linux | ||
|
||
DEPENDENCIES | ||
api_chai! | ||
appraisal (~> 2.5.0) | ||
license_finder (~> 7.0) | ||
rake (~> 13.0) | ||
rspec (~> 3.0) | ||
rubocop (~> 1.21) | ||
rubocop-powerhome (= 0.5.0) | ||
|
||
BUNDLED WITH | ||
2.4.22 |
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,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2024 Jill Klang | ||
|
||
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# frozen_string_literal: true | ||
|
||
require "bundler/gem_tasks" | ||
require "rspec/core/rake_task" | ||
|
||
RSpec::Core::RakeTask.new(:spec) | ||
|
||
require "rubocop/rake_task" | ||
|
||
RuboCop::RakeTask.new | ||
|
||
task default: %i[spec 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,39 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative "lib/api_chai/version" | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = "api_chai" | ||
spec.version = ApiChai::VERSION | ||
spec.authors = ["Jill Klang"] | ||
spec.email = ["[email protected]"] | ||
|
||
spec.summary = "net-http simplicity infused with error handling and reporting" | ||
spec.description = "Serve up smooth API integrations lightly steeped in graceful errors, Sentry & NewRelic reporting." | ||
spec.homepage = "https://github.com/powerhome/power-tools" | ||
spec.license = "MIT" | ||
spec.required_ruby_version = ">= 2.6.0" | ||
|
||
spec.metadata["rubygems_mfa_required"] = "true" | ||
spec.metadata["homepage_uri"] = spec.homepage | ||
spec.metadata["source_code_uri"] = spec.homepage | ||
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/packages/api_chai/docs/CHANGELOG.md" | ||
|
||
# Specify which files should be added to the gem when it is released. | ||
# The `git ls-files -z` loads the files in the RubyGem that have been added into git. | ||
spec.files = Dir.chdir(__dir__) do | ||
`git ls-files -z`.split("\x0").reject do |f| | ||
(File.expand_path(f) == __FILE__) || | ||
f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile]) | ||
end | ||
end | ||
spec.bindir = "exe" | ||
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) } | ||
spec.require_paths = ["lib"] | ||
|
||
spec.add_development_dependency "appraisal", "~> 2.5.0" | ||
|
||
spec.add_development_dependency "license_finder", "~> 7.0" | ||
|
||
spec.add_development_dependency "rubocop-powerhome", "0.5.0" | ||
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,11 @@ | ||
#!/usr/bin/env ruby | ||
# frozen_string_literal: true | ||
|
||
require "bundler/setup" | ||
require "api_chai" | ||
|
||
# You can add fixtures and/or initialization code here to make experimenting | ||
# with your gem easier. You can also use a different console, if you like. | ||
|
||
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,8 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
IFS=$'\n\t' | ||
set -vx | ||
|
||
bundle install | ||
|
||
# Do any other automated setup that you need to do here |
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 @@ | ||
--- | ||
- - :inherit_from | ||
- https://raw.githubusercontent.com/powerhome/oss-guide/master/license_rules.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,5 @@ | ||
## [Unreleased] | ||
|
||
## [0.0.1] - 2024-01-03 | ||
|
||
- Initial release |
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 @@ | ||
# ApiChai | ||
|
||
Serve up smooth API integrations with net-http, lightly steeped in graceful errors, Sentry & NewRelic reporting. | ||
|
||
More information coming soon. |
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 @@ | ||
--- | ||
BUNDLE_RETRY: "1" |
Oops, something went wrong.