Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copilot Instructions for Kiota Abstractions Ruby
# Copilot Instructions for Kiota Ruby

## Commit Messages

Expand Down
23 changes: 22 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,28 @@ updates:
cooldown:
default-days: 7
- package-ecosystem: bundler
directory: /
directory: /components/abstractions
schedule:
interval: daily
open-pull-requests-limit: 10
cooldown:
default-days: 7
- package-ecosystem: bundler
directory: /components/serialization/json
schedule:
interval: daily
open-pull-requests-limit: 10
cooldown:
default-days: 7
- package-ecosystem: bundler
directory: /components/http
schedule:
interval: daily
open-pull-requests-limit: 10
cooldown:
default-days: 7
- package-ecosystem: bundler
directory: /components/authentication/oauth
schedule:
interval: daily
open-pull-requests-limit: 10
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

name: kiota-abstractions-ruby-branch-protection
description: Branch protection policy for the kiota-abstractions-ruby repository
name: kiota-ruby-branch-protection
description: Branch protection policy for the kiota-ruby repository
resource: repository
configuration:
branchProtectionRules:
Expand Down
48 changes: 45 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:
contents: read

jobs:
deploy_prod:
publish-abstractions:
environment:
name: production_feeds
runs-on: ubuntu-latest
Expand All @@ -23,8 +23,50 @@ jobs:
bundler-cache: true
bundler: 'latest'
cache-version: 1
- run: bundle exec rake
- name: Publish to RubyGems
working-directory: components/abstractions
- name: Run tests
working-directory: components/abstractions
run: bundle exec rake
- name: Publish microsoft_kiota_abstractions to RubyGems
working-directory: components/abstractions
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"

publish-downstream:
needs: publish-abstractions
environment:
name: production_feeds
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
component:
- { name: serialization-json, dir: components/serialization/json }
- { name: http, dir: components/http }
- { name: authentication-oauth, dir: components/authentication/oauth }
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.ref }}
- uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
with:
ruby-version: '3.4'
bundler-cache: true
bundler: 'latest'
cache-version: 1
working-directory: ${{ matrix.component.dir }}
- name: Run tests
working-directory: ${{ matrix.component.dir }}
run: bundle exec rake
- name: Publish ${{ matrix.component.name }} to RubyGems
working-directory: ${{ matrix.component.dir }}
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
Expand Down
33 changes: 22 additions & 11 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,48 @@ on:
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
with:
ruby-version: '3.4'
bundler-cache: true
bundler: 'latest'
- name: Run rubocop
run: bundle exec rubocop

build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
ruby-version: ['3.3', '3.4', '4.0', head, jruby, jruby-head, truffleruby, truffleruby-head]
component:
- { name: abstractions, dir: components/abstractions }
- { name: serialization-json, dir: components/serialization/json }
- { name: http, dir: components/http }
- { name: authentication-oauth, dir: components/authentication/oauth }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
bundler-cache: true
bundler: 'latest'
cache-version: 2
- name: Run tests
working-directory: ${{ matrix.component.dir }}
- name: Run tests for ${{ matrix.component.name }}
working-directory: ${{ matrix.component.dir }}
run: bundle exec rake
- name: Upload artifacts for ruby version 3 and ubuntu
if: ${{ matrix.os == 'ubuntu-latest' && matrix.ruby-version == '3.4'}}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: drop
path: |
./Gemfile.lock
./README.md

# The check-ruby-version-matrix returns success if all matrix jobs in build are successful; otherwise, it returns a failure.
# Use this as a PR status check for GitHub Policy Service instead of individual matrix entry checks.
check-ruby-version-matrix:
runs-on: ubuntu-latest
needs: [build]
needs: [lint, build]
if: always()
steps:
- name: All build matrix options are successful
Expand Down
32 changes: 16 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
*.gem
*.rbc
/.config
/coverage/
/InstalledFiles
/pkg/
/spec/reports/
/spec/examples.txt
/test/tmp/
/test/version_tmp/
/tmp/
.config
coverage/
InstalledFiles
pkg/
spec/reports/
spec/examples.txt
test/tmp/
test/version_tmp/
tmp/

# Used by dotenv library to load environment variables.
# .env
Expand All @@ -33,15 +33,15 @@ build-iPhoneSimulator/
# vendor/Pods/

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

## Environment normalization:
/.bundle/
/vendor/bundle
/lib/bundler/man/
.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:
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.16.0"
".": "0.17.0"
}
12 changes: 12 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
inherit_from: .rubocop_todo.yml

AllCops:
TargetRubyVersion: 3.3
NewCops: enable
SuggestExtensions: false

Style/StringLiterals:
EnforcedStyle: single_quotes

Style/FrozenStringLiteralComment:
Enabled: true
Loading
Loading