-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 938d658
Showing
41 changed files
with
3,374 additions
and
0 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,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
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,37 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby: ['3.1', '3.0', '2.7', '2.6'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
|
||
- name: Build gem | ||
run: bundle exec rake | ||
|
||
- name: Run RuboCop | ||
run: bundle exec rake rubocop | ||
|
||
- name: Run tests | ||
run: bundle exec rake 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,12 @@ | ||
/.bundle/ | ||
/.yardoc | ||
/_yardoc/ | ||
/coverage/ | ||
/doc/ | ||
/pkg/ | ||
/rbi/ | ||
/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,12 @@ | ||
parser: false | ||
|
||
requires: | ||
- sord | ||
|
||
excluded_modules: | ||
- OrkaAPI::AuthMiddleware | ||
|
||
plugins: | ||
Sord::ParlourPlugin: | ||
exclude_untyped: yes | ||
rbi: yes |
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 @@ | ||
--format documentation | ||
--color | ||
--require spec_helper |
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,76 @@ | ||
AllCops: | ||
NewCops: enable | ||
|
||
Layout/CaseIndentation: | ||
EnforcedStyle: end | ||
|
||
Layout/EndAlignment: | ||
EnforcedStyleAlignWith: start_of_line | ||
|
||
Layout/FirstArrayElementIndentation: | ||
EnforcedStyle: consistent | ||
|
||
Layout/FirstHashElementIndentation: | ||
EnforcedStyle: consistent | ||
|
||
Layout/HashAlignment: | ||
EnforcedHashRocketStyle: table | ||
EnforcedColonStyle: table | ||
|
||
Layout/LineLength: | ||
Max: 118 | ||
|
||
Metrics/AbcSize: | ||
Max: 50 | ||
|
||
Metrics/ClassLength: | ||
Max: 500 | ||
|
||
Metrics/CyclomaticComplexity: | ||
Max: 20 | ||
|
||
Metrics/MethodLength: | ||
Max: 50 | ||
|
||
Metrics/ParameterLists: | ||
CountKeywordArgs: false | ||
|
||
Style/AndOr: | ||
EnforcedStyle: always | ||
|
||
Style/AutoResourceCleanup: | ||
Enabled: true | ||
|
||
Style/CollectionMethods: | ||
Enabled: true | ||
|
||
Style/MutableConstant: | ||
EnforcedStyle: strict | ||
|
||
Style/StringLiterals: | ||
EnforcedStyle: double_quotes | ||
|
||
Style/StringLiteralsInInterpolation: | ||
EnforcedStyle: double_quotes | ||
|
||
Style/StringMethods: | ||
Enabled: true | ||
|
||
Style/SymbolArray: | ||
EnforcedStyle: brackets | ||
|
||
Style/TernaryParentheses: | ||
EnforcedStyle: require_parentheses_when_complex | ||
|
||
Style/TrailingCommaInArguments: | ||
EnforcedStyleForMultiline: comma | ||
|
||
Style/TrailingCommaInArrayLiteral: | ||
EnforcedStyleForMultiline: comma | ||
|
||
Style/TrailingCommaInHashLiteral: | ||
EnforcedStyleForMultiline: comma | ||
|
||
Style/UnlessLogicalOperators: | ||
Enabled: true | ||
EnforcedStyle: forbid_logical_operators |
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 @@ | ||
--no-private | ||
lib/orka_api_client/models/attr_predicate.rb | ||
lib/orka_api_client/models/lazy_model.rb | ||
lib/orka_api_client/client.rb | ||
lib/**/*.rb |
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 | ||
|
||
source "https://rubygems.org" | ||
|
||
# Specify your gem's dependencies in orka_api_client.gemspec | ||
gemspec | ||
|
||
gem "parlour" | ||
gem "rake" | ||
gem "rspec" | ||
gem "rubocop" | ||
gem "rubocop-performance" | ||
gem "rubocop-rake" | ||
gem "rubocop-rspec" | ||
gem "sord", git: "https://github.com/AaronC81/sord", | ||
ref: "25c77951f8d20f73ad336e5d0eb13d0eaad14200" | ||
gem "yard" |
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,101 @@ | ||
GIT | ||
remote: https://github.com/AaronC81/sord | ||
revision: 25c77951f8d20f73ad336e5d0eb13d0eaad14200 | ||
ref: 25c77951f8d20f73ad336e5d0eb13d0eaad14200 | ||
specs: | ||
sord (3.0.1) | ||
commander (~> 4.5) | ||
parlour (~> 5.0) | ||
sorbet-runtime | ||
yard | ||
|
||
PATH | ||
remote: . | ||
specs: | ||
orka_api_client (0.1.0) | ||
faraday (~> 2.0) | ||
faraday-multipart (~> 1.0) | ||
|
||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
ast (2.4.2) | ||
commander (4.6.0) | ||
highline (~> 2.0.0) | ||
diff-lcs (1.5.0) | ||
faraday (2.1.0) | ||
faraday-net_http (~> 2.0) | ||
ruby2_keywords (>= 0.0.4) | ||
faraday-multipart (1.0.3) | ||
multipart-post (>= 1.2, < 3) | ||
faraday-net_http (2.0.1) | ||
highline (2.0.3) | ||
multipart-post (2.1.1) | ||
parallel (1.21.0) | ||
parlour (5.0.0) | ||
commander (~> 4.5) | ||
parser | ||
rainbow (~> 3.0) | ||
sorbet-runtime (>= 0.5) | ||
parser (3.1.0.0) | ||
ast (~> 2.4.1) | ||
rainbow (3.1.1) | ||
rake (13.0.6) | ||
regexp_parser (2.2.0) | ||
rexml (3.2.5) | ||
rspec (3.10.0) | ||
rspec-core (~> 3.10.0) | ||
rspec-expectations (~> 3.10.0) | ||
rspec-mocks (~> 3.10.0) | ||
rspec-core (3.10.1) | ||
rspec-support (~> 3.10.0) | ||
rspec-expectations (3.10.2) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.10.0) | ||
rspec-mocks (3.10.2) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.10.0) | ||
rspec-support (3.10.3) | ||
rubocop (1.25.0) | ||
parallel (~> 1.10) | ||
parser (>= 3.1.0.0) | ||
rainbow (>= 2.2.2, < 4.0) | ||
regexp_parser (>= 1.8, < 3.0) | ||
rexml | ||
rubocop-ast (>= 1.15.1, < 2.0) | ||
ruby-progressbar (~> 1.7) | ||
unicode-display_width (>= 1.4.0, < 3.0) | ||
rubocop-ast (1.15.1) | ||
parser (>= 3.0.1.1) | ||
rubocop-performance (1.13.2) | ||
rubocop (>= 1.7.0, < 2.0) | ||
rubocop-ast (>= 0.4.0) | ||
rubocop-rake (0.6.0) | ||
rubocop (~> 1.0) | ||
rubocop-rspec (2.8.0) | ||
rubocop (~> 1.19) | ||
ruby-progressbar (1.11.0) | ||
ruby2_keywords (0.0.5) | ||
sorbet-runtime (0.5.9566) | ||
unicode-display_width (2.1.0) | ||
webrick (1.7.0) | ||
yard (0.9.27) | ||
webrick (~> 1.7.0) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
orka_api_client! | ||
parlour | ||
rake | ||
rspec | ||
rubocop | ||
rubocop-performance | ||
rubocop-rake | ||
rubocop-rspec | ||
sord! | ||
yard | ||
|
||
BUNDLED WITH | ||
2.2.32 |
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,41 @@ | ||
# orka_api_client | ||
|
||
This is a Ruby library for interacting with MacStadium's [Orka](https://www.macstadium.com/orka) API. | ||
|
||
⚠️⚠️⚠️ **This gem is largely untested beyond basic read-only operations. API stability is not guaranteed at this time.** ⚠️⚠️⚠️ | ||
|
||
## Installation | ||
|
||
**This gem is not yet available on RubyGems.** | ||
|
||
Add this line to your application's Gemfile: | ||
|
||
```ruby | ||
gem 'orka_api_client', git: "https://github.com/Homebrew/orka_api_client" | ||
``` | ||
|
||
And then execute: | ||
|
||
$ bundle install | ||
|
||
## Usage | ||
|
||
TODO: examples | ||
|
||
Documentation is in the `docs` folder after running `bundle exec rake yard`. | ||
|
||
A Sorbet RBI file is available for this gem. | ||
|
||
## Development | ||
|
||
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment. | ||
|
||
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org). | ||
|
||
RuboCop can be run via `bundle exec rake rubocop`. | ||
|
||
## Tests | ||
|
||
This is non-existent at the moment. Ideally this would involve a real Orka test environment, but I don't have one readily available that's not already being used for real CI. | ||
|
||
When they exist, `bundle exec rake spec` can be used to run the tests. |
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,22 @@ | ||
# 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 | ||
|
||
require "yard" | ||
YARD::Rake::YardocTask.new | ||
|
||
task build: [:date_epoch, :parlour] | ||
task :date_epoch do | ||
ENV["SOURCE_DATE_EPOCH"] = IO.popen(%W[git -C #{__dir__} log -1 --format=%ct], &:read).chomp | ||
end | ||
|
||
task :parlour do | ||
system("bundle exec parlour") || abort | ||
end | ||
|
||
task default: :build |
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,15 @@ | ||
#!/usr/bin/env ruby | ||
# frozen_string_literal: true | ||
|
||
require "bundler/setup" | ||
require "orka_api_client" | ||
|
||
# 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. | ||
|
||
# (If you use this, don't forget to add pry to your Gemfile!) | ||
# require "pry" | ||
# Pry.start | ||
|
||
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,4 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative "orka_api_client/version" | ||
require_relative "orka_api_client/client" |
Oops, something went wrong.