-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from rinsed-org/feat/create-gem
feat/create gem
- Loading branch information
Showing
15 changed files
with
143 additions
and
2 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,40 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: "*" | ||
pull_request: | ||
branches: "*" | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@904f3fef85a9c80a3750cbe7d5159268fd5caa9f | ||
with: | ||
ruby-version: '3.0.6' | ||
- name: Install dependencies | ||
run: bundle install | ||
- name: Build gem | ||
run: rake build | ||
# Enable this section to allow debugging via SSH | ||
#- name: Setup upterm session | ||
#uses: lhotari/action-upterm@v1 | ||
#with: | ||
### limits ssh access and adds the ssh public key for the user which triggered the workflow | ||
#limit-access-to-actor: true | ||
- name: Install gem | ||
run: cd pkg && gem install --local *.gem | ||
- name: Run tests | ||
run: ruby -rrb_snowflake_client spec/test.rb | ||
env: # Or as an environment variable | ||
SNOWFLAKE_ACCOUNT: ${{ secrets.SNOWFLAKE_ACCOUNT }} | ||
SNOWFLAKE_USER: ${{ secrets.SNOWFLAKE_USER }} | ||
SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }} | ||
SNOWFLAKE_WAREHOUSE: ${{ secrets.SNOWFLAKE_WAREHOUSE }} |
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,23 @@ | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- "master" | ||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@904f3fef85a9c80a3750cbe7d5159268fd5caa9f | ||
with: | ||
ruby-version: '3.0.6' | ||
- name: Install dependencies | ||
run: bundle install | ||
- name: Build gem | ||
run: rake build | ||
- name: Build and publish to GitHub Package | ||
uses: actionshub/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
owner: rinsed-org |
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 @@ | ||
/.project | ||
/.rakeTasks | ||
.idea/* | ||
|
||
# ruby gems | ||
*.gem | ||
/.DS_Store | ||
.env | ||
|
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 |
---|---|---|
@@ -1,19 +1,29 @@ | ||
PATH | ||
remote: . | ||
specs: | ||
rb_snowflake_client (0.0.1) | ||
|
||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
concurrent-ruby (1.2.2) | ||
connection_pool (2.4.1) | ||
jwt (2.7.1) | ||
oj (3.16.1) | ||
rake (13.1.0) | ||
|
||
PLATFORMS | ||
arm64-darwin-21 | ||
arm64-darwin-22 | ||
|
||
DEPENDENCIES | ||
bundler | ||
concurrent-ruby | ||
connection_pool | ||
jwt | ||
oj | ||
rake | ||
rb_snowflake_client! | ||
|
||
BUNDLED WITH | ||
2.4.14 | ||
2.4.19 |
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) 2015 Dotan Nahum | ||
|
||
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,3 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'bundler/gem_tasks' |
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 @@ | ||
# frozen_string_literal: true | ||
|
||
require "rb_snowflake_client/snowflake_client" | ||
|
||
module RbSnowflakeClient | ||
end |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 @@ | ||
module RbSnowflakeClient | ||
VERSION = '0.0.2' | ||
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,21 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative "lib/rb_snowflake_client/version" | ||
|
||
Gem::Specification.new do |s| | ||
s.name = "rb_snowflake_client" | ||
s.version = RbSnowflakeClient::VERSION | ||
s.summary = "Snowflake connector for Ruby" | ||
s.author = "Rinsed" | ||
s.email = ["[email protected]", "[email protected]"] | ||
s.description = <<~DESC | ||
Using the HTTP V2 Api for Snowflake runs queries & creates native Ruby objects. | ||
DESC | ||
s.license = "MIT" # TODO: double check | ||
|
||
s.files = Dir.chdir(File.expand_path(__dir__)) do | ||
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features|vendor)/}) } | ||
end | ||
|
||
s.require_paths = ["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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
require "benchmark" | ||
require_relative "snowflake_client" | ||
require "rb_snowflake_client" | ||
|
||
|
||
def new_client | ||
|