microsoft_graph_beta 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 500bce1c3a3628b0319762ff103f8bf2e6cf7676bf1317ea28274986efcd0887
4
+ data.tar.gz: 100ba2953720e089a5986a821015cd5e2a1cf5e9e379e7b727683bc1cc784ceb
5
+ SHA512:
6
+ metadata.gz: cb0c17d45a62779e1c45768e9930dbf5d657f91ddd67274998314a97c0f8325c84ee78af1aec15134039962f758463a04da1c7923b43f1beedaa7a1622a60908
7
+ data.tar.gz: 57e05674ba7f7dbf9d86387c69b1daa8fad2b1bf4b78d96c38526f754a01e0c75b763b065f33c484c973deed76f6ed91942b8dde21e609362f7e4d9c3375e301
@@ -0,0 +1 @@
1
+ * @microsoftgraph/msgraph-devx-ruby-write
@@ -0,0 +1,12 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ open-pull-requests-limit: 10
8
+ - package-ecosystem: github-actions
9
+ directory: "/"
10
+ schedule:
11
+ interval: daily
12
+ open-pull-requests-limit: 10
@@ -0,0 +1,42 @@
1
+ # Copyright (c) Microsoft Corporation.
2
+ # Licensed under the MIT License.
3
+
4
+ # File initially created using https://github.com/MIchaelMainer/policyservicetoolkit/blob/main/branch_protection_export.ps1.
5
+
6
+ name: msgraph-beta-sdk-ruby-branch-protection
7
+ description: Branch protection policy for the msgraph-beta-sdk-ruby repository
8
+ resource: repository
9
+ configuration:
10
+ branchProtectionRules:
11
+
12
+ - branchNamePattern: main
13
+ # This branch pattern applies to the following branches as of 06/09/2023 14:08:45:
14
+ # main
15
+
16
+ # Specifies whether this branch can be deleted. boolean
17
+ allowsDeletions: false
18
+ # Specifies whether forced pushes are allowed on this branch. boolean
19
+ allowsForcePushes: false
20
+ # Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean
21
+ dismissStaleReviews: true
22
+ # Specifies whether admins can overwrite branch protection. boolean
23
+ isAdminEnforced: false
24
+ # Indicates whether "Require a pull request before merging" is enabled. boolean
25
+ requiresPullRequestBeforeMerging: true
26
+ # Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required
27
+ requiredApprovingReviewsCount: 1
28
+ # Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean
29
+ requireCodeOwnersReview: true
30
+ # Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines.
31
+ requiresCommitSignatures: false
32
+ # Are conversations required to be resolved before merging? boolean
33
+ requiresConversationResolution: true
34
+ # Are merge commits prohibited from being pushed to this branch. boolean
35
+ requiresLinearHistory: false
36
+ # Require branches to be up to date before merging. This should be false since the repo contains autogenerated files. boolean
37
+ requiresStrictStatusChecks: false
38
+ # Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
39
+ restrictsPushes: false
40
+ # Restrict who can dismiss pull request reviews. boolean
41
+ restrictsReviewDismissals: false
42
+
@@ -0,0 +1,156 @@
1
+ id:
2
+ name: GitOps.PullRequestIssueManagement
3
+ description: GitOps.PullRequestIssueManagement primitive
4
+ owner:
5
+ resource: repository
6
+ disabled: false
7
+ where:
8
+ configuration:
9
+ resourceManagementConfiguration:
10
+ scheduledSearches:
11
+ - description:
12
+ frequencies:
13
+ - hourly:
14
+ hour: 1
15
+ filters:
16
+ - isIssue
17
+ - isOpen
18
+ - hasLabel:
19
+ label: 'Needs: Author Feedback'
20
+ - hasLabel:
21
+ label: 'Status: No Recent Activity'
22
+ - noActivitySince:
23
+ days: 3
24
+ - isNotLabeledWith:
25
+ label: Service Bug
26
+ actions:
27
+ - closeIssue
28
+ - description:
29
+ frequencies:
30
+ - hourly:
31
+ hour: 1
32
+ filters:
33
+ - isIssue
34
+ - isOpen
35
+ - hasLabel:
36
+ label: 'Needs: Author Feedback'
37
+ - noActivitySince:
38
+ days: 4
39
+ - isNotLabeledWith:
40
+ label: 'Status: No Recent Activity'
41
+ - isNotLabeledWith:
42
+ label: Service Bug
43
+ actions:
44
+ - addLabel:
45
+ label: 'Status: No Recent Activity'
46
+ - addReply:
47
+ reply: This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
48
+ - description:
49
+ frequencies:
50
+ - hourly:
51
+ hour: 1
52
+ filters:
53
+ - isIssue
54
+ - isOpen
55
+ - hasLabel:
56
+ label: duplicate
57
+ - noActivitySince:
58
+ days: 1
59
+ actions:
60
+ - addReply:
61
+ reply: This issue has been marked as duplicate and has not had any activity for **1 day**. It will be closed for housekeeping purposes.
62
+ - closeIssue
63
+ - description:
64
+ frequencies:
65
+ - hourly:
66
+ hour: 1
67
+ filters:
68
+ - isOpen
69
+ - hasLabel:
70
+ label: 'API: Graph'
71
+ - noActivitySince:
72
+ days: 14
73
+ actions:
74
+ - addLabel:
75
+ label: Service issue
76
+ - addReply:
77
+ reply: >-
78
+ Hello @${issueAuthor}
79
+
80
+
81
+ Thank you for reporting your concern. If you report this issue in the Microsoft Q&A forum, it will get routed to the appropriate team for them to triage.
82
+
83
+
84
+ https://aka.ms/askgraph
85
+ eventResponderTasks:
86
+ - if:
87
+ - payloadType: Issues
88
+ - and:
89
+ - isOpen
90
+ - not:
91
+ and:
92
+ - isAssignedToSomeone
93
+ - isLabeled
94
+ then:
95
+ - addLabel:
96
+ label: 'ToTriage'
97
+ - if:
98
+ - payloadType: Issue_Comment
99
+ - isAction:
100
+ action: Created
101
+ - isActivitySender:
102
+ issueAuthor: True
103
+ - hasLabel:
104
+ label: 'Needs: Author Feedback'
105
+ then:
106
+ - addLabel:
107
+ label: "Needs: Attention \U0001F44B"
108
+ - removeLabel:
109
+ label: 'Needs: Author Feedback'
110
+ description:
111
+ - if:
112
+ - payloadType: Issues
113
+ - not:
114
+ isAction:
115
+ action: Closed
116
+ - hasLabel:
117
+ label: 'Status: No Recent Activity'
118
+ then:
119
+ - removeLabel:
120
+ label: 'Status: No Recent Activity'
121
+ description:
122
+ - if:
123
+ - payloadType: Issue_Comment
124
+ - activitySenderHasAssociation:
125
+ association: Contributor
126
+ - bodyContains:
127
+ pattern: '?'
128
+ isRegex: False
129
+ - bodyContains:
130
+ pattern: '@'
131
+ isRegex: False
132
+ then:
133
+ - addLabel:
134
+ label: 'Needs: Author Feedback'
135
+ description:
136
+ - if:
137
+ - payloadType: Issue_Comment
138
+ - hasLabel:
139
+ label: 'API: Graph'
140
+ then:
141
+ - addReply:
142
+ reply: >-
143
+ Hello @${issueAuthor}
144
+
145
+
146
+ Thank you for reporting your concern. If you report this issue in the Microsoft Q&A forum, it will get routed to the appropriate team for them to triage.
147
+
148
+ https://aka.ms/askgraph
149
+
150
+ This issue will now be closed. If you encounter any issues in the future, please feel free to open an issue.
151
+ - addLabel:
152
+ label: Service issue
153
+ - closeIssue
154
+ description:
155
+ onFailure:
156
+ onSuccess:
@@ -0,0 +1,32 @@
1
+ name: Auto-merge dependabot updates
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [ main ]
6
+
7
+ permissions:
8
+ pull-requests: write
9
+ contents: write
10
+
11
+ jobs:
12
+
13
+ dependabot-merge:
14
+
15
+ runs-on: ubuntu-latest
16
+
17
+ if: ${{ github.actor == 'dependabot[bot]' }}
18
+
19
+ steps:
20
+ - name: Dependabot metadata
21
+ id: metadata
22
+ uses: dependabot/fetch-metadata@v1.6.0
23
+ with:
24
+ github-token: "${{ secrets.GITHUB_TOKEN }}"
25
+
26
+ - name: Enable auto-merge for Dependabot PRs
27
+ # Only if version bump is not a major version change
28
+ if: ${{steps.metadata.outputs.update-type != 'version-update:semver-major'}}
29
+ run: gh pr merge --auto --merge "$PR_URL"
30
+ env:
31
+ PR_URL: ${{github.event.pull_request.html_url}}
32
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
@@ -0,0 +1,76 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL"
13
+
14
+ on:
15
+ push:
16
+ branches: [ "master", main ]
17
+ pull_request:
18
+ # The branches below must be a subset of the branches above
19
+ branches: [ "master" ]
20
+ schedule:
21
+ - cron: '41 2 * * 0'
22
+
23
+ jobs:
24
+ analyze:
25
+ name: Analyze
26
+ runs-on: ubuntu-latest
27
+ permissions:
28
+ actions: read
29
+ contents: read
30
+ security-events: write
31
+
32
+ strategy:
33
+ fail-fast: false
34
+ matrix:
35
+ language: [ 'ruby' ]
36
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37
+ # Use only 'java' to analyze code written in Java, Kotlin or both
38
+ # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
39
+ # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
40
+
41
+ steps:
42
+ - name: Checkout repository
43
+ uses: actions/checkout@v4
44
+
45
+ # Initializes the CodeQL tools for scanning.
46
+ - name: Initialize CodeQL
47
+ uses: github/codeql-action/init@v3
48
+ with:
49
+ languages: ${{ matrix.language }}
50
+ # If you wish to specify custom queries, you can do so here or in a config file.
51
+ # By default, queries listed here will override any specified in a config file.
52
+ # Prefix the list here with "+" to use these queries and those in the config file.
53
+
54
+ # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
55
+ # queries: security-extended,security-and-quality
56
+
57
+
58
+ # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
59
+ # If this step fails, then you should remove it and run the build manually (see below)
60
+ - name: Autobuild
61
+ uses: github/codeql-action/autobuild@v3
62
+
63
+ # ℹ️ Command-line programs to run using the OS shell.
64
+ # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
65
+
66
+ # If the Autobuild fails above, remove it and uncomment the following three lines.
67
+ # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
68
+
69
+ # - run: |
70
+ # echo "Run, Build Application using script"
71
+ # ./location_of_script_within_repo/buildscript.sh
72
+
73
+ - name: Perform CodeQL Analysis
74
+ uses: github/codeql-action/analyze@v3
75
+ with:
76
+ category: "/language:${{matrix.language}}"
@@ -0,0 +1,34 @@
1
+ # This is a basic workflow to help you get started with Actions
2
+
3
+ name: PullRequestConflicting
4
+
5
+ # Controls when the action will run. Triggers the workflow on push or pull request
6
+ # events but only for the master branch
7
+ on:
8
+ push:
9
+ branches: [ main ]
10
+ pull_request:
11
+ types: [synchronize]
12
+ branches: [ main ]
13
+
14
+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
15
+ jobs:
16
+ # This workflow contains a single job called "build"
17
+ build:
18
+ # The type of runner that the job will run on
19
+ runs-on: ubuntu-latest
20
+
21
+ # Steps represent a sequence of tasks that will be executed as part of the job
22
+ steps:
23
+ - name: check if prs are dirty
24
+ uses: eps1lon/actions-label-merge-conflict@releases/2.x
25
+ if: env.LABELING_TOKEN != '' && env.LABELING_TOKEN != null
26
+ id: check
27
+ with:
28
+ dirtyLabel: "conflicting"
29
+ repoToken: "${{ secrets.GITHUB_TOKEN }}"
30
+ continueOnMissingPermissions: true
31
+ commentOnDirty: 'This pull request has conflicting changes, the author must resolve the conflicts before this pull request can be merged.'
32
+ commentOnClean: 'Conflicts have been resolved. A maintainer will take a look shortly.'
33
+ env:
34
+ LABELING_TOKEN: ${{secrets.GITHUB_TOKEN }}
@@ -0,0 +1,81 @@
1
+ # This workflow is used to add new issues to GitHub Projects (Beta)
2
+
3
+ name: Add PR to project
4
+ on:
5
+ issues:
6
+ types: [opened]
7
+ jobs:
8
+ track_issue:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: Generate token
12
+ id: generate_token
13
+ uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
14
+ with:
15
+ app_id: ${{ secrets.GRAPHBOT_APP_ID }}
16
+ private_key: ${{ secrets.GRAPHBOT_APP_PEM }}
17
+
18
+ - name: Get project data
19
+ env:
20
+ GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
21
+ ORGANIZATION: microsoftgraph
22
+ PROJECT_NUMBER: 38
23
+ run: |
24
+ gh api graphql -f query='
25
+ query($org: String!, $number: Int!) {
26
+ organization(login: $org){
27
+ projectNext(number: $number) {
28
+ id
29
+ fields(first:20) {
30
+ nodes {
31
+ id
32
+ name
33
+ settings
34
+ }
35
+ }
36
+ }
37
+ }
38
+ }' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json
39
+
40
+ echo 'PROJECT_ID='$(jq '.data.organization.projectNext.id' project_data.json) >> $GITHUB_ENV
41
+ echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV
42
+ echo 'TRIAGE_OPTION_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") |.settings | fromjson.options[] | select(.name=="Needs Triage 🔍") |.id' project_data.json) >> $GITHUB_ENV
43
+
44
+ - name: Add Issue to project
45
+ env:
46
+ GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
47
+ ISSUE_ID: ${{ github.event.issue.node_id }}
48
+ run: |
49
+ item_id="$( gh api graphql -f query='
50
+ mutation($project:ID!, $issue:ID!) {
51
+ addProjectNextItem(input: {projectId: $project, contentId: $issue}) {
52
+ projectNextItem {
53
+ id
54
+ }
55
+ }
56
+ }' -f project=$PROJECT_ID -f issue=$ISSUE_ID --jq '.data.addProjectNextItem.projectNextItem.id')"
57
+
58
+ echo 'ITEM_ID='$item_id >> $GITHUB_ENV
59
+
60
+ - name: Set Triage
61
+ env:
62
+ GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
63
+ run: |
64
+ gh api graphql -f query='
65
+ mutation (
66
+ $project: ID!
67
+ $item: ID!
68
+ $status_field: ID!
69
+ $status_value: String!
70
+ ) {
71
+ set_status: updateProjectNextItemField(input: {
72
+ projectId: $project
73
+ itemId: $item
74
+ fieldId: $status_field
75
+ value: $status_value
76
+ }) {
77
+ projectNextItem {
78
+ id
79
+ }
80
+ }
81
+ }' -f project=$PROJECT_ID -f item=$ITEM_ID -f status_field=$STATUS_FIELD_ID -f status_value=${{ env.TRIAGE_OPTION_ID }} --silent
@@ -0,0 +1,45 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v[0-9]+.[0-9]+.[0-9]+"
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ Git_Release:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - name: Github Release
15
+ uses: anton-yurchenko/git-release@v5.0
16
+ env:
17
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
18
+ DRAFT_RELEASE: "false"
19
+ PRE_RELEASE: "false"
20
+ CHANGELOG_FILE: "CHANGELOG.md"
21
+ ALLOW_EMPTY_CHANGELOG: "true"
22
+
23
+ deploy_prod:
24
+ environment:
25
+ name: production_feeds
26
+ runs-on: ubuntu-latest
27
+ steps:
28
+ - uses: actions/checkout@v4
29
+ - uses: ruby/setup-ruby@v1
30
+ with:
31
+ ruby-version: '3.2'
32
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
33
+ bundler: 'latest'
34
+ cache-version: 1
35
+ - run: bundle exec rake
36
+ - name: Publish to RubyGems
37
+ run: |
38
+ mkdir -p $HOME/.gem
39
+ touch $HOME/.gem/credentials
40
+ chmod 0600 $HOME/.gem/credentials
41
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
42
+ gem build *.gemspec
43
+ gem push *.gem
44
+ env:
45
+ GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
@@ -0,0 +1,37 @@
1
+ name: Ruby
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ branches: [ main ]
7
+ pull_request:
8
+
9
+ jobs:
10
+ build:
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ os: [ubuntu-latest, macos-latest]
15
+ ruby-version: ['3.0', '3.1', '3.2', head, jruby, jruby-head, truffleruby, truffleruby-head]
16
+ runs-on: ${{ matrix.os }}
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - uses: ruby/setup-ruby@v1
20
+ with:
21
+ ruby-version: ${{ matrix.ruby-version }}
22
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
23
+ bundler: 'latest'
24
+ cache-version: 1
25
+ - name: Run tests
26
+ run: bundle exec rake
27
+ - name: Build the gem
28
+ run: gem build *.gemspec
29
+ - name: Upload artifacts for ruby version 3 and ubuntu
30
+ if: ${{ matrix.os == 'ubuntu-latest' && matrix.ruby-version == '3.2'}}
31
+ uses: actions/upload-artifact@v4
32
+ with:
33
+ name: drop
34
+ path: |
35
+ ./Gemfile.lock
36
+ ./README.md
37
+ *.gem
data/.gitignore ADDED
@@ -0,0 +1,60 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+
13
+ # Used by dotenv library to load environment variables.
14
+ # .env
15
+
16
+ # Ignore Byebug command history file.
17
+ .byebug_history
18
+
19
+ ## Specific to RubyMotion:
20
+ .dat*
21
+ .repl_history
22
+ build/
23
+ *.bridgesupport
24
+ build-iPhoneOS/
25
+ build-iPhoneSimulator/
26
+
27
+ ## Specific to RubyMotion (use of CocoaPods):
28
+ #
29
+ # We recommend against adding the Pods directory to your .gitignore. However
30
+ # you should judge for yourself, the pros and cons are mentioned at:
31
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
32
+ #
33
+ # vendor/Pods/
34
+
35
+ ## Documentation cache and generated files:
36
+ /.yardoc/
37
+ /_yardoc/
38
+ /doc/
39
+ /rdoc/
40
+
41
+ ## Environment normalization:
42
+ /.bundle/
43
+ /vendor/bundle
44
+ /lib/bundler/man/
45
+
46
+ # for a library or gem, you might want to ignore these files since the code is
47
+ # intended to run in multiple environments; otherwise, check them in:
48
+ Gemfile.lock
49
+ .ruby-version
50
+ .ruby-gemset
51
+
52
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
53
+ .rvmrc
54
+
55
+ # Used by RuboCop. Remote config files pulled in from inherit_from directive.
56
+ # .rubocop-https?--*
57
+
58
+ .rspec_status
59
+
60
+ *.log
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,5 @@
1
+ {
2
+ "cSpell.words": [
3
+ "kiota"
4
+ ]
5
+ }
data/CHANGELOG.md ADDED
@@ -0,0 +1,23 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+
12
+ ### Changed
13
+
14
+ ## [0.11.0] - 2023-08-10
15
+
16
+ ### Added
17
+
18
+ - Initial release
19
+
20
+ ### Changed
21
+
22
+ - Weekly generation.
23
+ - BREAKING: models that were in subnamespaces are now in the main model namespace to avoid circular dependencies. e.g. `MicrosoftGraph::Models::CallRecords::CallRecord` in now `MicrosoftGraph::Models::CallRecordsCallRecord`.
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,21 @@
1
+ # Contributing to the Microsoft Graph Beta SDK for Ruby
2
+
3
+ The Microsoft Graph Beta SDK for Ruby is available for all manner of contribution. There are a couple of different recommended paths to get contributions into the released version of this SDK.
4
+
5
+ __NOTE__ A signed a contribution license agreement is required for all contributions, and is checked automatically on new pull requests. Please read and sign [the agreement](https://cla.microsoft.com/) before starting any work for this repository.
6
+
7
+ ## File issues
8
+
9
+ The best way to get started with a contribution is to start a dialog with the owners of this repository. Sometimes features will be under development or out of scope for this SDK and it's best to check before starting work on contribution.
10
+
11
+ ## Submit pull requests for trivial changes
12
+
13
+ If you are making a change that does not affect the interface components and does not affect other downstream callers, feel free to make a pull request against the __main__ branch. The main branch will be updated frequently.
14
+
15
+ Revisions of this nature will result in a 0.0.X change of the version number.
16
+
17
+ ## Submit pull requests for features
18
+
19
+ If major functionality is being added, or there will need to be gestation time for a change, it should be submitted against the __feature__ branch.
20
+
21
+ Revisions of this nature will result in a 0.X.X change of the version number.
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in microsoft_graph_sdk.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Microsoft Graph
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,88 @@
1
+ # Microsoft Graph Beta SDK for Ruby
2
+
3
+ Get started with the Microsoft Graph Beta SDK for Ruby by integrating the [Microsoft Graph API](https://learn.microsoft.com/graph/overview) into your Ruby application!
4
+
5
+ > **Note:** this SDK allows you to build applications using the [beta](https://docs.microsoft.com/en-us/graph/use-the-api#version) of Microsoft Graph. If you want to use the production supported Microsoft Graph APIs under v1.0, use our [v1.0 SDK](https://github.com/microsoftgraph/msgraph-beta-sdk-ruby) instead.
6
+ >
7
+ > **Note:** the Microsoft Graph Ruby SDK is currently in Community Preview. During this period we're expecting breaking changes to happen to the SDK based on community's feedback. Checkout the [known limitations](https://github.com/microsoftgraph/msgraph-beta-sdk-ruby-core/issues/1).
8
+
9
+ ## 1. Installation
10
+
11
+ run `gem install microsoft_graph_beta` or include `gem microsoft_graph_beta` in your gemfile.
12
+
13
+ ## 2. Getting started
14
+
15
+ ### 2.1 Register your application
16
+
17
+ Register your application by following the steps at [Register your app with the Microsoft Identity Platform](https://learn.microsoft.com/graph/auth-register-app-v2).
18
+
19
+ ### 2.2 Create an AuthenticationProvider object
20
+
21
+ An instance of the **MicrosoftGraphServiceClient** class handles building client. To create a new instance of this class, you need to provide an instance of **AuthenticationProvider**, which can authenticate requests to Microsoft Graph.
22
+
23
+ For an example of how to get an authentication provider, see [choose a Microsoft Graph authentication provider](https://learn.microsoft.com/graph/sdks/choose-authentication-providers?tabs=Ruby).
24
+
25
+ > Note: we are working to add the getting started information for Ruby to our public documentation, in the meantime the following sample should help you getting started.
26
+
27
+ ```Ruby
28
+ require "microsoft_kiota_authentication_oauth"
29
+ require "microsoft_graph_core"
30
+
31
+ context = MicrosoftKiotaAuthenticationOAuth::ClientCredentialContext.new("<the tenant id from your app registration>", "<the client id from your app registration>", "<the client secret from your app registration>")
32
+
33
+ authentication_provider = MicrosoftGraphCore::Authentication::OAuthAuthenticationProvider.new(context, nil, ["Files.Read"])
34
+ ```
35
+
36
+ ### 2.3 Get a Graph Service Client and Adapter object
37
+
38
+ You must get a **MicrosoftGraphServiceClient** object to make requests against the service.
39
+
40
+ ```ruby
41
+ require "microsoft_graph_beta"
42
+
43
+ adapter = MicrosoftGraphBeta::MicrosoftGraphRequestAdapter.new(authentication_provider)
44
+ client = MicrosoftGraphBeta::MicrosoftGraphServiceClient.new(adapter)
45
+ ```
46
+
47
+ ## 3. Make requests against the service
48
+
49
+ After you have a **MicrosoftGraphServiceClient** that is authenticated, you can begin making calls against the service. The requests against the service look like our [REST API](https://learn.microsoft.com/graph/api/overview?view=graph-rest-1.0).
50
+
51
+ ### 3.1 Get the user's drive
52
+
53
+ To retrieve the user's drive:
54
+
55
+ ```ruby
56
+ result = client.me.drive.get.resume
57
+ puts "Found Drive : " + result.id
58
+ ```
59
+
60
+ ## 4. Getting results that span across multiple pages
61
+
62
+ Automatic paging is currently not supported with the Ruby SDK, we're working to enable this feature.
63
+
64
+ ## 5. Documentation
65
+
66
+ For more detailed documentation, see:
67
+
68
+ * [Overview](https://learn.microsoft.com/graph/overview)
69
+ * [Collections](https://learn.microsoft.com/graph/sdks/paging)
70
+ * [Making requests](https://learn.microsoft.com/graph/sdks/create-requests)
71
+ * [Known issues](https://github.com/MicrosoftGraph/msgraph-beta-sdk-ruby/issues)
72
+ * [Contributions](https://github.com/microsoftgraph/msgraph-beta-sdk-ruby/blob/main/CONTRIBUTING.md)
73
+
74
+ ## 6. Issues
75
+
76
+ For known issues, see [issues](https://github.com/MicrosoftGraph/msgraph-beta-sdk-ruby/issues).
77
+
78
+ ## 7. Contributions
79
+
80
+ The Microsoft Graph SDK is open for contribution. To contribute to this project, see [Contributing](https://github.com/microsoftgraph/msgraph-beta-sdk-ruby/blob/main/CONTRIBUTING.md).
81
+
82
+ ## 8. License
83
+
84
+ Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the [MIT license](LICENSE).
85
+
86
+ ## 9. Third-party notices
87
+
88
+ [Third-party notices](THIRD%20PARTY%20NOTICES)
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: :spec
data/SECURITY.md ADDED
@@ -0,0 +1,41 @@
1
+ <!-- BEGIN MICROSOFT SECURITY.MD V0.0.8 BLOCK -->
2
+
3
+ ## Security
4
+
5
+ Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
6
+
7
+ If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
8
+
9
+ ## Reporting Security Issues
10
+
11
+ **Please do not report security vulnerabilities through public GitHub issues.**
12
+
13
+ Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
14
+
15
+ If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
16
+
17
+ You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
18
+
19
+ Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
20
+
21
+ * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22
+ * Full paths of source file(s) related to the manifestation of the issue
23
+ * The location of the affected source code (tag/branch/commit or direct URL)
24
+ * Any special configuration required to reproduce the issue
25
+ * Step-by-step instructions to reproduce the issue
26
+ * Proof-of-concept or exploit code (if possible)
27
+ * Impact of the issue, including how an attacker might exploit the issue
28
+
29
+ This information will help us triage your report more quickly.
30
+
31
+ If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
32
+
33
+ ## Preferred Languages
34
+
35
+ We prefer all communications to be in English.
36
+
37
+ ## Policy
38
+
39
+ Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
40
+
41
+ <!-- END MICROSOFT SECURITY.MD BLOCK -->
@@ -0,0 +1,8 @@
1
+ This file is based on or incorporates material from the projects listed below
2
+ (Third Party IP). The original copyright notice and the license under which
3
+ Microsoft received such Third Party IP, are set forth below. Such licenses and
4
+ notices are provided for informational purposes only. Microsoft licenses the
5
+ Third Party IP to you under the licensing terms for the Microsoft product.
6
+ Microsoft reserves all other rights not expressly granted under this agreement,
7
+ whether by implication, estoppel or otherwise.
8
+
@@ -0,0 +1,13 @@
1
+ require 'microsoft_graph_core'
2
+ require 'microsoft_kiota_abstractions'
3
+ require_relative 'version_information'
4
+ module MicrosoftGraphBeta
5
+ class GraphRequestAdapter < MicrosoftGraphCore::GraphRequestAdapterBase
6
+ def initialize(authentication_provider, client_options=MicrosoftGraphCore::GraphClientOptions.new, parse_node_factory=MicrosoftKiotaAbstractions::ParseNodeFactoryRegistry.default_instance, serialization_writer_factory=MicrosoftKiotaAbstractions::SerializationWriterFactoryRegistry.default_instance, client = nil)
7
+ options = MicrosoftGraphCore::GraphClientOptions.new
8
+ options.graph_service_library_version = "v" + MicrosoftGraphBeta::VersionInformation::VERSION
9
+ options.graph_service_version = "beta"
10
+ super(authentication_provider, options, parse_node_factory, serialization_writer_factory, client)
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,7 @@
1
+ # require_relative 'graph_base_service_client'
2
+ # module MicrosoftGraphBeta
3
+ # class GraphServiceClient < MicrosoftGraphBeta::GraphBaseServiceClient
4
+ # #TODO define sugar constructors acception the authentication provider
5
+ # #TODO shim me
6
+ # end
7
+ # end
@@ -0,0 +1,31 @@
1
+ {
2
+ "descriptionHash": "8125B8F31FD753B7F1991DFCE7834F62D8D92D20BB952989DE8929CD4528A1632F2AA9AC10820852183D494FE2187A45999D976B6B4A577BAA2C6F3DC8A9E29C",
3
+ "descriptionLocation": "/mnt/vss/_work/1/s/msgraph-metadata/clean_beta_openapi/openapi.yaml",
4
+ "lockFileVersion": "1.0.0",
5
+ "kiotaVersion": "1.6.0",
6
+ "clientClassName": "GraphBaseServiceClient",
7
+ "clientNamespaceName": "MicrosoftGraphBeta",
8
+ "language": "Ruby",
9
+ "usesBackingStore": false,
10
+ "includeAdditionalData": true,
11
+ "serializers": [
12
+ "Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory",
13
+ "Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory",
14
+ "Microsoft.Kiota.Serialization.Form.FormSerializationWriterFactory",
15
+ "Microsoft.Kiota.Serialization.Multipart.MultipartSerializationWriterFactory"
16
+ ],
17
+ "deserializers": [
18
+ "Microsoft.Kiota.Serialization.Json.JsonParseNodeFactory",
19
+ "Microsoft.Kiota.Serialization.Text.TextParseNodeFactory",
20
+ "Microsoft.Kiota.Serialization.Form.FormParseNodeFactory"
21
+ ],
22
+ "structuredMimeTypes": [
23
+ "application/json",
24
+ "text/plain",
25
+ "application/x-www-form-urlencoded",
26
+ "multipart/form-data"
27
+ ],
28
+ "includePatterns": [],
29
+ "excludePatterns": [],
30
+ "disabledValidationRules": []
31
+ }
@@ -0,0 +1,3 @@
1
+ # require_relative 'graph_service_client'
2
+ require_relative 'graph_request_adapter'
3
+ # require_relative 'models/models'
@@ -0,0 +1,6 @@
1
+ module MicrosoftGraphBeta
2
+ class VersionInformation
3
+ VERSION = "0.11.0"
4
+ end
5
+ end
6
+
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+ require_relative 'lib/version_information'
3
+
4
+ Gem::Specification.new do |spec|
5
+ spec.name = "microsoft_graph_beta"
6
+ spec.version = MicrosoftGraphBeta::VersionInformation::VERSION
7
+ spec.authors = 'Microsoft Corporation'
8
+ spec.email = 'graphsdkpub+ruby@microsoft.com'
9
+
10
+ spec.summary = "Ruby SDK for Microsoft Graph Beta"
11
+ spec.description = "The Microsoft Graph Ruby SDK enables you to use Microsoft Graph beta in your Ruby apps."
12
+ spec.homepage = "https://graph.microsoft.com"
13
+ spec.license = 'MIT'
14
+ spec.metadata = {
15
+ 'bug_tracker_uri' => 'https://github.com/microsoftgraph/msgraph-beta-sdk-ruby/issues',
16
+ 'changelog_uri' => 'https://github.com/microsoftgraph/msgraph-beta-sdk-ruby/blob/main/CHANGELOG.md',
17
+ 'homepage_uri' => spec.homepage,
18
+ 'source_code_uri' => 'https://github.com/microsoftgraph/msgraph-beta-sdk-ruby',
19
+ 'github_repo' => 'ssh://github.com/microsoftgraph/msgraph-beta-sdk-ruby'
20
+ }
21
+ spec.required_ruby_version = '>= 3.0.0'
22
+
23
+ # Specify which files should be added to the gem when it is released.
24
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
27
+ end
28
+ spec.bindir = "bin"
29
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ["lib"]
31
+
32
+ spec.add_runtime_dependency 'microsoft_graph_core', '>= 0.1', '< 0.4'
33
+ spec.add_development_dependency 'rake', '~> 13.0'
34
+ spec.add_development_dependency "rspec", "~> 3.0"
35
+ end
@@ -0,0 +1,14 @@
1
+ page_type: sample
2
+ products:
3
+ - office-365
4
+ - ms-graph
5
+ languages:
6
+ - ruby
7
+ extensions:
8
+ contentType: sdks
9
+ technologies:
10
+ - Microsoft Graph
11
+ - Microsoft identity platform
12
+ createdDate: '5/11/2016 10:11:20 AM'
13
+ title: Microsoft Graph Beta Client Library for Ruby
14
+ description: Microsoft Graph Beta SDK for Ruby.
@@ -0,0 +1,41 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ <#
5
+ .Synopsis
6
+ Increment the minor version string in the gradle.properties if the major,
7
+ minor, or patch version hasn't been manually updated.
8
+ .Description
9
+ Assumptions:
10
+ This script assumes it is run from the repo root.
11
+ Minor version is typically auto-incremented.
12
+
13
+ #>
14
+
15
+ function Update-TelemetryVersion([string]$telemetryFilePath, [version]$version) {
16
+ $telemetryFileContent = Get-Content -Path $telemetryFilePath -Raw
17
+ $telemetryFileContent = $telemetryFileContent -replace "\d{1,}\.\d{1,}\.\d{1,}", $version.ToString()
18
+ Set-Content -Path $telemetryFilePath $telemetryFileContent
19
+ }
20
+
21
+ function Get-CurrentTelemetryVersion([string]$telemetryFilePath) {
22
+ $telemetryFileContent = Get-Content -Path $telemetryFilePath -Raw
23
+ if($telemetryFileContent -match "(\d{1,}\.\d{1,}\.\d{1,})") {
24
+ return [version]::Parse($Matches[1])
25
+ } else {
26
+ Write-Error "Invalid version number format"
27
+ return $null;
28
+ }
29
+ }
30
+
31
+ function Update-MinorVersionNumber([version]$currentVersion) {
32
+ return [version]::new($currentVersion.Major, $currentVersion.Minor + 1, 0);
33
+ }
34
+
35
+ function Update-MinorVersion() {
36
+ $telemetryFilePath = Join-Path -Path $PWD.ToString() -ChildPath "../lib/version_information.rb"
37
+ $currentVersion = Get-CurrentTelemetryVersion -telemetryFilePath $telemetryFilePath
38
+ $nextVersion = Update-MinorVersionNumber -currentVersion $currentVersion
39
+ Update-TelemetryVersion -version $nextVersion -telemetryFilePath $telemetryFilePath
40
+ }
41
+ Update-MinorVersion
metadata ADDED
@@ -0,0 +1,125 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: microsoft_graph_beta
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.11.0
5
+ platform: ruby
6
+ authors:
7
+ - Microsoft Corporation
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-12-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: microsoft_graph_core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0.1'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '0.4'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '0.1'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '0.4'
33
+ - !ruby/object:Gem::Dependency
34
+ name: rake
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '13.0'
40
+ type: :development
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '13.0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: rspec
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '3.0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '3.0'
61
+ description: The Microsoft Graph Ruby SDK enables you to use Microsoft Graph beta
62
+ in your Ruby apps.
63
+ email: graphsdkpub+ruby@microsoft.com
64
+ executables: []
65
+ extensions: []
66
+ extra_rdoc_files: []
67
+ files:
68
+ - ".github/CODEOWNERS"
69
+ - ".github/dependabot.yml"
70
+ - ".github/policies/msgraph-beta-sdk-ruby-branch-protection.yml"
71
+ - ".github/policies/resourceManagement.yml"
72
+ - ".github/workflows/auto-merge-dependabot.yml"
73
+ - ".github/workflows/code-ql.yml"
74
+ - ".github/workflows/conflicting-pr-label.yml"
75
+ - ".github/workflows/projectsbot.yml"
76
+ - ".github/workflows/release.yml"
77
+ - ".github/workflows/ruby.yml"
78
+ - ".gitignore"
79
+ - ".rspec"
80
+ - ".vscode/settings.json"
81
+ - CHANGELOG.md
82
+ - CONTRIBUTING.md
83
+ - Gemfile
84
+ - LICENSE
85
+ - README.md
86
+ - Rakefile
87
+ - SECURITY.md
88
+ - THIRD PARTY NOTICES
89
+ - lib/graph_request_adapter.rb
90
+ - lib/graph_service_client.rb
91
+ - lib/kiota-lock.json
92
+ - lib/microsoft_graph_beta.rb
93
+ - lib/version_information.rb
94
+ - microsoft_graph_beta.gemspec
95
+ - msgraph-beta-sdk-ruby.yml
96
+ - scripts/incrementMinorVersion.ps1
97
+ homepage: https://graph.microsoft.com
98
+ licenses:
99
+ - MIT
100
+ metadata:
101
+ bug_tracker_uri: https://github.com/microsoftgraph/msgraph-beta-sdk-ruby/issues
102
+ changelog_uri: https://github.com/microsoftgraph/msgraph-beta-sdk-ruby/blob/main/CHANGELOG.md
103
+ homepage_uri: https://graph.microsoft.com
104
+ source_code_uri: https://github.com/microsoftgraph/msgraph-beta-sdk-ruby
105
+ github_repo: ssh://github.com/microsoftgraph/msgraph-beta-sdk-ruby
106
+ post_install_message:
107
+ rdoc_options: []
108
+ require_paths:
109
+ - lib
110
+ required_ruby_version: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: 3.0.0
115
+ required_rubygems_version: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ requirements: []
121
+ rubygems_version: 3.4.10
122
+ signing_key:
123
+ specification_version: 4
124
+ summary: Ruby SDK for Microsoft Graph Beta
125
+ test_files: []