yandex360 1.1.3 โ 1.1.4
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 +4 -4
- data/.github/changelog_config.json +47 -0
- data/.github/markdown-link-check.json +38 -0
- data/.github/workflows/ci.yml +150 -43
- data/.github/workflows/codeql.yml +84 -0
- data/.github/workflows/dependency-updates.yml +72 -0
- data/.github/workflows/docs.yml +73 -0
- data/.github/workflows/health-check.yml +80 -0
- data/.github/workflows/release.yml +52 -0
- data/.gitignore +3 -1
- data/.rubocop.yml +14 -2
- data/CHANGELOG.md +76 -0
- data/Gemfile.lock +65 -57
- data/README.md +46 -1
- data/Rakefile +4 -7
- data/lib/yandex360/client.rb +38 -3
- data/lib/yandex360/collection.rb +31 -3
- data/lib/yandex360/error.rb +18 -0
- data/lib/yandex360/object.rb +5 -3
- data/lib/yandex360/objects/types.rb +7 -0
- data/lib/yandex360/param_builder.rb +13 -0
- data/lib/yandex360/resource.rb +59 -16
- data/lib/yandex360/resources/antispam.rb +12 -3
- data/lib/yandex360/resources/audit.rb +17 -0
- data/lib/yandex360/resources/departments.rb +36 -24
- data/lib/yandex360/resources/dns.rb +30 -0
- data/lib/yandex360/resources/domains.rb +34 -0
- data/lib/yandex360/resources/groups.rb +27 -14
- data/lib/yandex360/resources/organizations.rb +15 -0
- data/lib/yandex360/resources/post_settings.rb +35 -0
- data/lib/yandex360/resources/two_fa.rb +31 -0
- data/lib/yandex360/resources/users.rb +28 -14
- data/lib/yandex360/version.rb +1 -4
- data/lib/yandex360.rb +23 -0
- data/yandex360.gemspec +8 -5
- metadata +76 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d27dba00d6e5bb3236607537f8e71dc1740d8160985a874186df77b95693edb
|
4
|
+
data.tar.gz: b84556494a51270fdeb7826dadc836cef03760583eeda056f2d5000e78cd49f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5868aadd613d71da0f068995f6e5572f68113146e4027014e01cc0ee6bf02ef8e2974811ec6886096c40b997f66c1cbe32ed0ceb8957f7b5693ce89a8edf4664
|
7
|
+
data.tar.gz: 9994de3e41c20765005b6693ef1e9fcc4c8e4539bcf4b18b4af19216d5850d15c4fee25fbc621b032744b2bd3a57852ac8b843c4df493ffe527b5d0c4b2142a3
|
@@ -0,0 +1,47 @@
|
|
1
|
+
{
|
2
|
+
"categories": [
|
3
|
+
{
|
4
|
+
"title": "## ๐ Features",
|
5
|
+
"labels": ["feature", "enhancement"]
|
6
|
+
},
|
7
|
+
{
|
8
|
+
"title": "## ๐ Bug Fixes",
|
9
|
+
"labels": ["bug", "fix"]
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"title": "## ๐งน Maintenance",
|
13
|
+
"labels": ["maintenance", "chore", "dependencies"]
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"title": "## ๐ Documentation",
|
17
|
+
"labels": ["documentation", "docs"]
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"title": "## โก Performance",
|
21
|
+
"labels": ["performance"]
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"title": "## ๐ Security",
|
25
|
+
"labels": ["security"]
|
26
|
+
}
|
27
|
+
],
|
28
|
+
"ignore_labels": [
|
29
|
+
"ignore",
|
30
|
+
"wontfix",
|
31
|
+
"invalid",
|
32
|
+
"duplicate"
|
33
|
+
],
|
34
|
+
"sort": "ASC",
|
35
|
+
"template": "${{CHANGELOG}}",
|
36
|
+
"pr_template": "- ${{TITLE}} by @${{AUTHOR}} in #${{NUMBER}}",
|
37
|
+
"empty_template": "- No changes",
|
38
|
+
"label_extractor": [
|
39
|
+
{
|
40
|
+
"pattern": "\\[(.+)\\]",
|
41
|
+
"target": "$1"
|
42
|
+
}
|
43
|
+
],
|
44
|
+
"max_tags_to_fetch": 200,
|
45
|
+
"max_pull_requests": 200,
|
46
|
+
"max_back_track_time_days": 90
|
47
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
{
|
2
|
+
"ignorePatterns": [
|
3
|
+
{
|
4
|
+
"pattern": "^http://localhost"
|
5
|
+
},
|
6
|
+
{
|
7
|
+
"pattern": "^https://localhost"
|
8
|
+
}
|
9
|
+
],
|
10
|
+
"replacementPatterns": [
|
11
|
+
{
|
12
|
+
"pattern": "^/",
|
13
|
+
"replacement": "https://github.com/ruby-api-client/yandex360/blob/main/"
|
14
|
+
}
|
15
|
+
],
|
16
|
+
"httpHeaders": [
|
17
|
+
{
|
18
|
+
"urls": ["https://github.com/", "https://api.github.com/"],
|
19
|
+
"headers": {
|
20
|
+
"Accept-Encoding": "zstd, br, gzip, deflate"
|
21
|
+
}
|
22
|
+
}
|
23
|
+
],
|
24
|
+
"timeout": "10s",
|
25
|
+
"retryOn429": true,
|
26
|
+
"retryCount": 3,
|
27
|
+
"fallbackHttpStatus": [
|
28
|
+
400,
|
29
|
+
401,
|
30
|
+
403,
|
31
|
+
404,
|
32
|
+
405,
|
33
|
+
500,
|
34
|
+
502,
|
35
|
+
503,
|
36
|
+
504
|
37
|
+
]
|
38
|
+
}
|
data/.github/workflows/ci.yml
CHANGED
@@ -1,51 +1,158 @@
|
|
1
|
-
name:
|
2
|
-
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [main, develop]
|
6
|
+
pull_request:
|
7
|
+
branches: [main]
|
8
|
+
|
9
|
+
env:
|
10
|
+
COVERAGE: true
|
11
|
+
|
3
12
|
jobs:
|
13
|
+
lint:
|
14
|
+
name: Lint & Security
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
steps:
|
17
|
+
- name: Checkout code
|
18
|
+
uses: actions/checkout@v5
|
19
|
+
|
20
|
+
- name: Set up Ruby
|
21
|
+
uses: ruby/setup-ruby@v1.257.0
|
22
|
+
with:
|
23
|
+
ruby-version: "3.1"
|
24
|
+
bundler-cache: true
|
25
|
+
|
26
|
+
- name: Run RuboCop
|
27
|
+
run: bundle exec rubocop --format github
|
28
|
+
|
29
|
+
- name: Run security audit
|
30
|
+
run: |
|
31
|
+
gem install bundler-audit
|
32
|
+
bundle audit --update
|
33
|
+
|
4
34
|
test:
|
5
|
-
name:
|
35
|
+
name: Test (Ruby ${{ matrix.ruby }} on ${{ matrix.os }})
|
36
|
+
runs-on: ${{ matrix.os }}
|
6
37
|
strategy:
|
7
38
|
fail-fast: false
|
8
39
|
matrix:
|
9
|
-
os: [ubuntu-latest, macos-latest]
|
10
|
-
ruby: [
|
11
|
-
|
12
|
-
|
40
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
41
|
+
ruby: ["3.1", "3.2", "3.3"]
|
42
|
+
exclude:
|
43
|
+
# Windows has issues with older Ruby versions
|
44
|
+
- os: windows-latest
|
45
|
+
ruby: "2.6"
|
46
|
+
# macOS ARM64 runners have limited Ruby version support
|
47
|
+
- os: macos-latest
|
48
|
+
ruby: "2.6"
|
49
|
+
|
13
50
|
steps:
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
51
|
+
- name: Checkout code
|
52
|
+
uses: actions/checkout@v5
|
53
|
+
|
54
|
+
- name: Set up Ruby
|
55
|
+
uses: ruby/setup-ruby@v1.257.0
|
56
|
+
with:
|
57
|
+
ruby-version: ${{ matrix.ruby }}
|
58
|
+
bundler-cache: true
|
59
|
+
|
60
|
+
- name: Run tests
|
61
|
+
run: bundle exec rspec --format progress
|
62
|
+
|
63
|
+
- name: Upload coverage (Ubuntu Ruby 3.1 only)
|
64
|
+
if: matrix.os == 'ubuntu-latest' && matrix.ruby == '3.1'
|
65
|
+
uses: coverallsapp/github-action@v2.3.6
|
66
|
+
with:
|
67
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
68
|
+
path-to-lcov: ./coverage/lcov/yandex360.lcov
|
69
|
+
|
70
|
+
integration:
|
71
|
+
name: Integration Tests
|
72
|
+
runs-on: ubuntu-latest
|
73
|
+
if: github.event_name == 'pull_request'
|
74
|
+
steps:
|
75
|
+
- name: Checkout code
|
76
|
+
uses: actions/checkout@v5
|
77
|
+
|
78
|
+
- name: Set up Ruby
|
79
|
+
uses: ruby/setup-ruby@v1.257.0
|
80
|
+
with:
|
81
|
+
ruby-version: "3.1"
|
82
|
+
bundler-cache: true
|
83
|
+
|
84
|
+
- name: Test gem installation
|
85
|
+
run: |
|
86
|
+
gem build yandex360.gemspec
|
87
|
+
gem install yandex360-*.gem
|
88
|
+
|
89
|
+
- name: Test require
|
90
|
+
run: ruby -e "require 'yandex360'; puts 'Gem loads successfully'"
|
91
|
+
|
92
|
+
dependency-check:
|
93
|
+
name: Dependency Review
|
94
|
+
runs-on: ubuntu-latest
|
95
|
+
if: github.event_name == 'pull_request'
|
96
|
+
steps:
|
97
|
+
- name: Checkout code
|
98
|
+
uses: actions/checkout@v5
|
99
|
+
|
100
|
+
- name: Dependency Review
|
101
|
+
uses: actions/dependency-review-action@v4
|
102
|
+
with:
|
103
|
+
fail-on-severity: moderate
|
104
|
+
|
105
|
+
performance:
|
106
|
+
name: Performance Benchmark
|
107
|
+
runs-on: ubuntu-latest
|
108
|
+
if: github.event_name == 'pull_request'
|
109
|
+
steps:
|
110
|
+
- name: Checkout code
|
111
|
+
uses: actions/checkout@v5
|
112
|
+
|
113
|
+
- name: Set up Ruby
|
114
|
+
uses: ruby/setup-ruby@v1.257.0
|
115
|
+
with:
|
116
|
+
ruby-version: "3.1"
|
117
|
+
bundler-cache: true
|
118
|
+
|
119
|
+
- name: Run benchmark
|
120
|
+
run: |
|
121
|
+
echo "Running basic performance check..."
|
122
|
+
time bundle exec ruby -e "
|
123
|
+
require 'yandex360'
|
124
|
+
start = Time.now
|
125
|
+
1000.times { Yandex360::Client.new(token: 'test') }
|
126
|
+
puts \"Client creation time: #{Time.now - start}s\"
|
127
|
+
"
|
128
|
+
|
129
|
+
release-dry-run:
|
130
|
+
name: Release Dry Run
|
131
|
+
runs-on: ubuntu-latest
|
132
|
+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
133
|
+
steps:
|
134
|
+
- name: Checkout code
|
135
|
+
uses: actions/checkout@v5
|
136
|
+
|
137
|
+
- name: Set up Ruby
|
138
|
+
uses: ruby/setup-ruby@v1.257.0
|
139
|
+
with:
|
140
|
+
ruby-version: "3.1"
|
141
|
+
bundler-cache: true
|
142
|
+
|
143
|
+
- name: Build gem
|
144
|
+
run: gem build yandex360.gemspec
|
145
|
+
|
146
|
+
- name: Check gem contents
|
147
|
+
run: |
|
148
|
+
gem spec yandex360-*.gem
|
149
|
+
tar -tf yandex360-*.gem | head -20
|
150
|
+
|
151
|
+
notify:
|
152
|
+
name: Notify Success
|
44
153
|
runs-on: ubuntu-latest
|
154
|
+
needs: [lint, test, integration]
|
155
|
+
if: always() && (needs.lint.result == 'success' && needs.test.result == 'success' && needs.integration.result == 'success')
|
45
156
|
steps:
|
46
|
-
|
47
|
-
|
48
|
-
with:
|
49
|
-
github-token: ${{ secrets.github_token }}
|
50
|
-
path-to-lcov: ${{ github.workspace }}/coverage/lcov.info
|
51
|
-
parallel-finished: true
|
157
|
+
- name: Success notification
|
158
|
+
run: echo "โ
All CI checks passed successfully!"
|
@@ -0,0 +1,84 @@
|
|
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: "Security Analysis"
|
13
|
+
|
14
|
+
on:
|
15
|
+
push:
|
16
|
+
branches: [ "main" ]
|
17
|
+
pull_request:
|
18
|
+
branches: [ "main" ]
|
19
|
+
schedule:
|
20
|
+
- cron: '0 6 * * 1' # Weekly on Monday at 6 AM UTC
|
21
|
+
|
22
|
+
permissions:
|
23
|
+
security-events: write
|
24
|
+
actions: read
|
25
|
+
contents: read
|
26
|
+
packages: read
|
27
|
+
|
28
|
+
jobs:
|
29
|
+
codeql:
|
30
|
+
name: CodeQL Analysis
|
31
|
+
runs-on: ubuntu-latest
|
32
|
+
timeout-minutes: 30
|
33
|
+
|
34
|
+
strategy:
|
35
|
+
fail-fast: false
|
36
|
+
matrix:
|
37
|
+
include:
|
38
|
+
- language: ruby
|
39
|
+
build-mode: none
|
40
|
+
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
|
41
|
+
# Use `c-cpp` to analyze code written in C, C++ or both
|
42
|
+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
43
|
+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
44
|
+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
45
|
+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
46
|
+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
47
|
+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
48
|
+
steps:
|
49
|
+
- name: Checkout repository
|
50
|
+
uses: actions/checkout@v5
|
51
|
+
|
52
|
+
- name: Initialize CodeQL
|
53
|
+
uses: github/codeql-action/init@v3
|
54
|
+
with:
|
55
|
+
languages: ${{ matrix.language }}
|
56
|
+
build-mode: ${{ matrix.build-mode }}
|
57
|
+
queries: security-extended,security-and-quality
|
58
|
+
|
59
|
+
- name: Perform CodeQL Analysis
|
60
|
+
uses: github/codeql-action/analyze@v3
|
61
|
+
with:
|
62
|
+
category: "/language:${{matrix.language}}"
|
63
|
+
|
64
|
+
dependency-scanning:
|
65
|
+
name: Dependency Scanning
|
66
|
+
runs-on: ubuntu-latest
|
67
|
+
if: github.event_name == 'pull_request'
|
68
|
+
steps:
|
69
|
+
- name: Checkout repository
|
70
|
+
uses: actions/checkout@v5
|
71
|
+
|
72
|
+
- name: Run Trivy vulnerability scanner
|
73
|
+
uses: aquasecurity/trivy-action@master
|
74
|
+
with:
|
75
|
+
scan-type: 'fs'
|
76
|
+
scan-ref: '.'
|
77
|
+
format: 'sarif'
|
78
|
+
output: 'trivy-results.sarif'
|
79
|
+
|
80
|
+
- name: Upload Trivy scan results
|
81
|
+
uses: github/codeql-action/upload-sarif@v3
|
82
|
+
if: always()
|
83
|
+
with:
|
84
|
+
sarif_file: 'trivy-results.sarif'
|
@@ -0,0 +1,72 @@
|
|
1
|
+
name: Dependency Updates
|
2
|
+
|
3
|
+
on:
|
4
|
+
schedule:
|
5
|
+
# Run weekly on Mondays at 9 AM UTC
|
6
|
+
- cron: '0 9 * * 1'
|
7
|
+
workflow_dispatch: # Allow manual trigger
|
8
|
+
|
9
|
+
permissions:
|
10
|
+
contents: write
|
11
|
+
pull-requests: write
|
12
|
+
|
13
|
+
jobs:
|
14
|
+
update-dependencies:
|
15
|
+
name: Update Dependencies
|
16
|
+
runs-on: ubuntu-latest
|
17
|
+
steps:
|
18
|
+
- name: Checkout code
|
19
|
+
uses: actions/checkout@v5
|
20
|
+
with:
|
21
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
22
|
+
|
23
|
+
- name: Set up Ruby
|
24
|
+
uses: ruby/setup-ruby@v1.257.0
|
25
|
+
with:
|
26
|
+
ruby-version: '3.1'
|
27
|
+
|
28
|
+
- name: Update Bundler
|
29
|
+
run: gem update bundler
|
30
|
+
|
31
|
+
- name: Update dependencies
|
32
|
+
run: |
|
33
|
+
bundle update --conservative
|
34
|
+
bundle clean
|
35
|
+
|
36
|
+
- name: Run tests
|
37
|
+
run: |
|
38
|
+
bundle install
|
39
|
+
bundle exec rspec
|
40
|
+
|
41
|
+
- name: Run security audit
|
42
|
+
run: |
|
43
|
+
gem install bundler-audit
|
44
|
+
bundle audit --update
|
45
|
+
|
46
|
+
- name: Create Pull Request
|
47
|
+
uses: peter-evans/create-pull-request@v6
|
48
|
+
with:
|
49
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
50
|
+
commit-message: "chore: update dependencies"
|
51
|
+
title: "๐ Weekly dependency updates"
|
52
|
+
body: |
|
53
|
+
## Dependency Updates
|
54
|
+
|
55
|
+
This PR updates project dependencies to their latest compatible versions.
|
56
|
+
|
57
|
+
### Changes
|
58
|
+
- Updated gems in Gemfile.lock
|
59
|
+
- Ran security audit
|
60
|
+
- All tests passing โ
|
61
|
+
|
62
|
+
### Verification
|
63
|
+
- [x] Tests pass
|
64
|
+
- [x] Security audit clean
|
65
|
+
- [x] No breaking changes detected
|
66
|
+
|
67
|
+
Auto-generated by dependency update workflow.
|
68
|
+
branch: dependency-updates
|
69
|
+
delete-branch: true
|
70
|
+
labels: |
|
71
|
+
dependencies
|
72
|
+
automated
|
@@ -0,0 +1,73 @@
|
|
1
|
+
name: Documentation
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [main]
|
6
|
+
paths:
|
7
|
+
- "lib/**"
|
8
|
+
- "README.md"
|
9
|
+
- ".github/workflows/docs.yml"
|
10
|
+
pull_request:
|
11
|
+
paths:
|
12
|
+
- "lib/**"
|
13
|
+
- "README.md"
|
14
|
+
|
15
|
+
jobs:
|
16
|
+
validate-docs:
|
17
|
+
name: Validate Documentation
|
18
|
+
runs-on: ubuntu-latest
|
19
|
+
steps:
|
20
|
+
- name: Checkout code
|
21
|
+
uses: actions/checkout@v5
|
22
|
+
|
23
|
+
- name: Set up Ruby
|
24
|
+
uses: ruby/setup-ruby@v1.257.0
|
25
|
+
with:
|
26
|
+
ruby-version: "3.1"
|
27
|
+
bundler-cache: true
|
28
|
+
|
29
|
+
- name: Install YARD for documentation
|
30
|
+
run: gem install yard
|
31
|
+
|
32
|
+
- name: Generate API documentation
|
33
|
+
run: yard doc --no-output --fail-on-warning
|
34
|
+
|
35
|
+
- name: Check README links
|
36
|
+
uses: tcort/github-action-markdown-link-check@v1
|
37
|
+
with:
|
38
|
+
use-quiet-mode: "yes"
|
39
|
+
use-verbose-mode: "yes"
|
40
|
+
config-file: ".github/markdown-link-check.json"
|
41
|
+
|
42
|
+
- name: Validate code examples in README
|
43
|
+
run: |
|
44
|
+
echo "Extracting and testing Ruby code examples from README..."
|
45
|
+
# Extract Ruby code blocks and test basic syntax
|
46
|
+
grep -A 20 '```ruby' README.md | grep -v '```' | ruby -c
|
47
|
+
|
48
|
+
update-changelog:
|
49
|
+
name: Update Changelog
|
50
|
+
runs-on: ubuntu-latest
|
51
|
+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
52
|
+
steps:
|
53
|
+
- name: Checkout code
|
54
|
+
uses: actions/checkout@v5
|
55
|
+
with:
|
56
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
57
|
+
fetch-depth: 0
|
58
|
+
|
59
|
+
- name: Generate changelog
|
60
|
+
uses: mikepenz/release-changelog-builder-action@v4
|
61
|
+
with:
|
62
|
+
configuration: ".github/changelog_config.json"
|
63
|
+
outputFile: "CHANGELOG.md"
|
64
|
+
fromTag: ""
|
65
|
+
toTag: "HEAD"
|
66
|
+
|
67
|
+
- name: Commit changelog
|
68
|
+
run: |
|
69
|
+
git config --local user.email "action@github.com"
|
70
|
+
git config --local user.name "GitHub Action"
|
71
|
+
git add CHANGELOG.md
|
72
|
+
git diff --staged --quiet || git commit -m "docs: update changelog"
|
73
|
+
git push
|
@@ -0,0 +1,80 @@
|
|
1
|
+
name: Repository Health Check
|
2
|
+
|
3
|
+
on:
|
4
|
+
schedule:
|
5
|
+
# Run daily at 2 AM UTC
|
6
|
+
- cron: '0 2 * * *'
|
7
|
+
workflow_dispatch:
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
health-check:
|
11
|
+
name: Repository Health
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
steps:
|
14
|
+
- name: Checkout code
|
15
|
+
uses: actions/checkout@v5
|
16
|
+
|
17
|
+
- name: Check for outdated actions
|
18
|
+
run: |
|
19
|
+
echo "Checking for outdated GitHub Actions..."
|
20
|
+
find .github/workflows -name "*.yml" -exec grep -l "uses:" {} \; | \
|
21
|
+
xargs grep "uses:" | \
|
22
|
+
sed 's/.*uses: //' | \
|
23
|
+
sort | uniq | \
|
24
|
+
while read action; do
|
25
|
+
echo "Action: $action"
|
26
|
+
done
|
27
|
+
|
28
|
+
- name: Check repository size
|
29
|
+
run: |
|
30
|
+
echo "Repository size check..."
|
31
|
+
du -sh .
|
32
|
+
echo "Large files (>1MB):"
|
33
|
+
find . -type f -size +1M -not -path "./.git/*" | head -10
|
34
|
+
|
35
|
+
- name: Check for security issues
|
36
|
+
run: |
|
37
|
+
echo "Security check..."
|
38
|
+
# Check for potential secret patterns
|
39
|
+
if grep -r "password\|secret\|key\|token" --include="*.rb" --include="*.yml" . | grep -v "spec\|test\|example"; then
|
40
|
+
echo "โ ๏ธ Potential secrets found in code"
|
41
|
+
else
|
42
|
+
echo "โ
No obvious secrets in code"
|
43
|
+
fi
|
44
|
+
|
45
|
+
- name: Performance metrics
|
46
|
+
run: |
|
47
|
+
echo "Performance metrics..."
|
48
|
+
echo "Number of Ruby files: $(find . -name "*.rb" | wc -l)"
|
49
|
+
echo "Lines of code: $(find . -name "*.rb" -exec wc -l {} \; | awk '{sum+=$1} END {print sum}')"
|
50
|
+
echo "Test coverage: Check CI results"
|
51
|
+
|
52
|
+
- name: Dependencies health
|
53
|
+
run: |
|
54
|
+
echo "Dependencies health check..."
|
55
|
+
if [ -f "Gemfile.lock" ]; then
|
56
|
+
echo "Gemfile.lock exists โ
"
|
57
|
+
echo "Number of dependencies: $(grep -c "^ " Gemfile.lock)"
|
58
|
+
fi
|
59
|
+
|
60
|
+
- name: Create health report
|
61
|
+
run: |
|
62
|
+
cat > health-report.md << 'EOF'
|
63
|
+
# Repository Health Report
|
64
|
+
|
65
|
+
Generated on: $(date)
|
66
|
+
|
67
|
+
## Metrics
|
68
|
+
- Repository size: $(du -sh . | cut -f1)
|
69
|
+
- Ruby files: $(find . -name "*.rb" | wc -l)
|
70
|
+
- Total LOC: $(find . -name "*.rb" -exec wc -l {} \; | awk '{sum+=$1} END {print sum}')
|
71
|
+
- Dependencies: $(grep -c "^ " Gemfile.lock 2>/dev/null || echo "N/A")
|
72
|
+
|
73
|
+
## Status
|
74
|
+
- Security: โ
No obvious issues
|
75
|
+
- Performance: โ
Within normal ranges
|
76
|
+
- Dependencies: โ
Managed with Bundler
|
77
|
+
|
78
|
+
EOF
|
79
|
+
|
80
|
+
echo "Health report generated"
|
@@ -0,0 +1,52 @@
|
|
1
|
+
name: Release
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- "v*"
|
7
|
+
|
8
|
+
permissions:
|
9
|
+
contents: write
|
10
|
+
packages: write
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
release:
|
14
|
+
name: Release Gem
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
steps:
|
17
|
+
- name: Checkout code
|
18
|
+
uses: actions/checkout@v5
|
19
|
+
|
20
|
+
- name: Set up Ruby
|
21
|
+
uses: ruby/setup-ruby@v1.257.0
|
22
|
+
with:
|
23
|
+
ruby-version: "3.1"
|
24
|
+
bundler-cache: true
|
25
|
+
|
26
|
+
- name: Configure gem credentials
|
27
|
+
run: |
|
28
|
+
mkdir -p ~/.gem
|
29
|
+
cat > ~/.gem/credentials << EOF
|
30
|
+
---
|
31
|
+
:rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}
|
32
|
+
EOF
|
33
|
+
chmod 600 ~/.gem/credentials
|
34
|
+
|
35
|
+
- name: Build gem
|
36
|
+
run: gem build yandex360.gemspec
|
37
|
+
|
38
|
+
- name: Publish to RubyGems
|
39
|
+
run: gem push yandex360-*.gem
|
40
|
+
|
41
|
+
- name: Create GitHub Release
|
42
|
+
uses: softprops/action-gh-release@v2
|
43
|
+
with:
|
44
|
+
files: yandex360-*.gem
|
45
|
+
generate_release_notes: true
|
46
|
+
draft: false
|
47
|
+
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
|
48
|
+
|
49
|
+
- name: Update release notes
|
50
|
+
run: |
|
51
|
+
echo "โ
Gem version $(ruby -e "require './lib/yandex360/version'; puts Yandex360::VERSION") published successfully!"
|
52
|
+
echo "๐ฆ Available at: https://rubygems.org/gems/yandex360"
|