Skip to content

Commit

Permalink
Genesis commit
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrudall committed Oct 26, 2023
0 parents commit b2f95ae
Show file tree
Hide file tree
Showing 37 changed files with 1,488 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
version: 2.1 # Use 2.1 to enable using orbs and other features.

# Declare the orbs that we'll use in our config.
orbs:
ruby: circleci/ruby@1.0

jobs:
rubocop:
parallelism: 1
docker:
- image: cimg/ruby:3.1-node
steps:
- checkout
- ruby/install-deps
- run:
name: Run Rubocop
command: bundle exec rubocop
test:
parameters:
ruby-image:
type: string
parallelism: 1
docker:
- image: << parameters.ruby-image >>
steps:
- checkout
- ruby/install-deps
- run:
name: Run tests
command: bundle exec rspec -fd

workflows:
version: 2
checks:
jobs:
- rubocop
- test:
matrix:
parameters:
ruby-image:
- cimg/ruby:2.6-node
- cimg/ruby:2.7-node
- cimg/ruby:3.0-node
- cimg/ruby:3.1-node
- cimg/ruby:3.2-node
16 changes: 16 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM ruby:3.2.2-slim-bullseye

ENV TZ="Europe/London"

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
apt-utils \
build-essential \
curl \
git \
vim \
zsh

RUN gem install bundler

WORKDIR /workspace
36 changes: 36 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/ruby-rails-postgres
// Update the VARIANT arg in docker-compose.yml to pick a Ruby version
{
"name": "superagi",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace",
"containerEnv": {
"GITHUB_TOKEN": "${localEnv:GITHUB_TOKEN}",
"GITHUB_USER": "${localEnv:GITHUB_USER}"
},
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"rebornix.Ruby",
"sleistner.vscode-fileutils",
"ms-azuretools.vscode-docker",
"samverschueren.final-newline",
"GitHub.copilot",
"usernamehw.remove-empty-lines",
"wingrunr21.vscode-ruby",
]
}
},
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "bundle install",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"features": {
"git": "os-provided",
"github-cli": "latest"
}
}
19 changes: 19 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: "3"

services:
app:
build:
context: ..
dockerfile: .devcontainer/Dockerfile

volumes:
- ..:/workspace:cached
- bundle_cache:/bundle

command: sleep infinity

environment:
TZ: Europe/London

volumes:
bundle_cache:
13 changes: 13 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# These are supported funding model platforms

github: alexrudall
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2
updates:
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
ignore:
- dependency-name: webmock
versions:
- 3.11.1
- 3.11.3
- dependency-name: rspec
versions:
- 3.10.0
74 changes: 74 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
### Ruby ###
*.gem
*.rbc
/.config
/coverage/
/InstalledFiles
/pkg/
/spec/reports/
/spec/examples.txt
/test/tmp/
/test/version_tmp/
/tmp/
/.bundle/
/.yardoc
/_yardoc/
/doc/


# Used by dotenv library to load environment variables.
.env

# Ignore Byebug command history file.
.byebug_history

## Specific to RubyMotion:
.dat*
.repl_history
build/
*.bridgesupport
build-iPhoneOS/
build-iPhoneSimulator/

## Specific to RubyMotion (use of CocoaPods):
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
# vendor/Pods/

## Documentation cache and generated files:
/.yardoc/
/_yardoc/
/doc/
/rdoc/

## Environment normalization:
/.bundle/
/vendor/bundle
/lib/bundler/man/

# for a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# Gemfile.lock
# .ruby-version
# .ruby-gemset

# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc

# Used by RuboCop. Remote config files pulled in from inherit_from directive.
# .rubocop-https?--*

# rspec failure tracking
.rspec_status

# IDE
.idea
.idea/
.idea/*
.vscode
.vs/

# Mac
.DS_Store
3 changes: 3 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--format documentation
--color
--require spec_helper
31 changes: 31 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
AllCops:
TargetRubyVersion: 2.6
NewCops: enable
SuggestExtensions: false

Style/Documentation:
# Skips checking to make sure top level modules / classes have a comment.
Enabled: false

Layout/LineLength:
Max: 100
Exclude:
- "**/*.gemspec"

Lint/AmbiguousOperator:
# https://github.com/rubocop/rubocop/issues/4294
Exclude:
- "lib/superagi/client.rb"

Metrics/AbcSize:
Max: 20

Metrics/BlockLength:
Exclude:
- "spec/**/*"

Style/StringLiterals:
EnforcedStyle: double_quotes

Style/FrozenStringLiteralComment:
Enabled: false
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.0] - 2023-10-25

### Added

- Initialise repository.
- Add SuperAGI::Client to connect to SuperAGI API using user credentials.
- Add spec for Client with a cached response using VCR.
- Add CircleCI to run the specs on pull requests.
Loading

0 comments on commit b2f95ae

Please sign in to comment.