Skip to content

Commit 9954058

Browse files
committed
Release 0.0.0
1 parent c533c00 commit 9954058

File tree

542 files changed

+61730
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

542 files changed

+61730
-2
lines changed

.fernignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Specify files that shouldn't be modified by Fern

.github/workflows/publish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Publish
2+
3+
on: [push]
4+
jobs:
5+
publish:
6+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout repo
10+
uses: actions/checkout@v3
11+
12+
- uses: ruby/setup-ruby@v1
13+
with:
14+
ruby-version: 2.7
15+
bundler-cache: true
16+
17+
- name: Test gem
18+
run: bundle install && bundle exec rake test
19+
20+
- name: Build and Push Gem
21+
env:
22+
GEM_HOST_API_KEY: ${{ secrets.RUBY_GEMS_API_KEY }}
23+
run: |
24+
gem build vapi.gemspec
25+
26+
gem push vapi-*.gem --host https://rubygems.org/

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/.bundle/
2+
/.yardoc
3+
/_yardoc/
4+
/coverage/
5+
/doc/
6+
/pkg/
7+
/spec/reports/
8+
/tmp/
9+
*.gem
10+
.env

.rubocop.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
AllCops:
2+
TargetRubyVersion: 2.7
3+
4+
Style/StringLiterals:
5+
Enabled: true
6+
EnforcedStyle: double_quotes
7+
8+
Style/StringLiteralsInInterpolation:
9+
Enabled: true
10+
EnforcedStyle: double_quotes
11+
12+
Layout/FirstHashElementLineBreak:
13+
Enabled: true
14+
15+
Layout/MultilineHashKeyLineBreaks:
16+
Enabled: true
17+
18+
# Generated files may be more complex than standard, disable
19+
# these rules for now as a known limitation.
20+
Metrics/ParameterLists:
21+
Enabled: false
22+
23+
Metrics/MethodLength:
24+
Enabled: false
25+
26+
Metrics/AbcSize:
27+
Enabled: false
28+
29+
Metrics/ClassLength:
30+
Enabled: false
31+
32+
Metrics/CyclomaticComplexity:
33+
Enabled: false
34+
35+
Metrics/PerceivedComplexity:
36+
Enabled: false

Gemfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
4+
5+
gemspec
6+
7+
gem "minitest", "~> 5.0"
8+
gem "rake", "~> 13.0"
9+
gem "rubocop", "~> 1.21"

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
# vapi-ruby-sdk
2-
The official Ruby SDK for accessing Vapi's API

Rakefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# frozen_string_literal: true
2+
3+
require "rake/testtask"
4+
require "rubocop/rake_task"
5+
6+
task default: %i[test rubocop]
7+
8+
Rake::TestTask.new do |t|
9+
t.pattern = "./test/**/test_*.rb"
10+
end
11+
12+
RuboCop::RakeTask.new

lib/core/file_utilities.rb

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# frozen_string_literal: true
2+
3+
require "faraday/multipart"
4+
require "mini_mime"
5+
6+
module Vapi
7+
# Utility class for managing files.
8+
class FileUtilities
9+
# @param file_like [String, IO] The file to be uploaded, or a string path to the file.
10+
# @return [Faraday::Multipart::FilePart]
11+
def self.as_faraday_multipart(file_like:)
12+
path = if file_like.is_a?(String)
13+
file_like
14+
else
15+
file_like.path
16+
end
17+
mime_type = MiniMime.lookup_by_filename(path)
18+
mime_type = if mime_type.nil?
19+
"application/octet-stream"
20+
else
21+
mime_type.content_type
22+
end
23+
Faraday::Multipart::FilePart.new(file_like, mime_type)
24+
end
25+
end
26+
end

lib/environment.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
module Vapi
4+
class Environment
5+
DEFAULT = "https://api.vapi.ai"
6+
end
7+
end

lib/gemconfig.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# frozen_string_literal: true
2+
3+
module Vapi
4+
module Gemconfig
5+
VERSION = ""
6+
AUTHORS = [""].freeze
7+
EMAIL = ""
8+
SUMMARY = ""
9+
DESCRIPTION = ""
10+
HOMEPAGE = "https://github.com/fern-demo/vapi-ruby-sdk"
11+
SOURCE_CODE_URI = "https://github.com/fern-demo/vapi-ruby-sdk"
12+
CHANGELOG_URI = "https://github.com/fern-demo/vapi-ruby-sdk/blob/master/CHANGELOG.md"
13+
end
14+
end

0 commit comments

Comments
 (0)