obk 0.3.1 → 0.3.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3588c2aaa0acb3233db4a2f44e7cd97debdfe7ea43395810ab967daa20f14bda
4
- data.tar.gz: cb1a410f2f1e8ae32fdcb4454e7202971514ca39e3fee1a99a7ad90fc012f286
3
+ metadata.gz: ebe6cd0c3d7f5613623995b0510d62feb3080edaee7c5cf7782b7a6b52f54ed0
4
+ data.tar.gz: 1389f5b5cd116d774fd7866a2cf3dcc8b6e04bd52864feaac76ef5f91798ddba
5
5
  SHA512:
6
- metadata.gz: 8ce340dfaa95b7617bc4df8f329457610d6db9c6df4504177dc6a957d610d5bde9148fa0502a1f2a90adf10358b0820055abe4f22c5ad372ba4927f05edd7419
7
- data.tar.gz: 2452a0fd858c897a627a650fb1c119a67a85f47f36ca7ae9adcbb503e6994634069c2a46c61547cb200aee5e66349f6c6c9eb042faaa868f604fc9f364904c7f
6
+ metadata.gz: c1becac99d9ba6b60962317988dc3f554e635f42778505d9daeba8aae61a3c9e4ef381b1a5d0ad4508f8a2ea6432cd7c8a6bffbfe0a14ffc9bacdec2a61d99c2
7
+ data.tar.gz: 37cda76d3a5d8c95c0a9cad871fbf0a13ee48c2be269342816ed8b965ca4be01b446047dc5f20372a8eb06c5ae574fdf7d9deb3e7e81e399f5a067c3759dd275
data/.0pdd.yml CHANGED
@@ -1,9 +1,8 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
3
+ ---
1
4
  errors:
2
5
  - yegor256@gmail.com
3
- # alerts:
4
- # github:
5
- # - yegor256
6
-
7
6
  tags:
8
7
  - pdd
9
8
  - bug
@@ -0,0 +1,25 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
3
+ ---
4
+ # yamllint disable rule:line-length
5
+ name: actionlint
6
+ 'on':
7
+ push:
8
+ branches:
9
+ - master
10
+ pull_request:
11
+ branches:
12
+ - master
13
+ jobs:
14
+ actionlint:
15
+ timeout-minutes: 15
16
+ runs-on: ubuntu-24.04
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - name: Download actionlint
20
+ id: get_actionlint
21
+ run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
22
+ shell: bash
23
+ - name: Check workflow files
24
+ run: ${{ steps.get_actionlint.outputs.executable }} -color
25
+ shell: bash
@@ -1,21 +1,27 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
1
3
  ---
4
+ # yamllint disable rule:line-length
2
5
  name: codecov
3
- on:
6
+ 'on':
4
7
  push:
5
8
  branches:
6
9
  - master
7
10
  jobs:
8
11
  codecov:
9
- runs-on: ubuntu-22.04
12
+ timeout-minutes: 15
13
+ runs-on: ubuntu-24.04
10
14
  steps:
11
15
  - uses: actions/checkout@v4
12
16
  - uses: ruby/setup-ruby@v1
13
17
  with:
14
18
  ruby-version: 3.3
15
- - run: bundle update
19
+ bundler-cache: true
20
+ - run: bundle config set --global path "$(pwd)/vendor/bundle"
21
+ - run: bundle install --no-color
16
22
  - run: bundle exec rake
17
- - uses: codecov/codecov-action@v4
23
+ - uses: codecov/codecov-action@v5
18
24
  with:
19
25
  token: ${{ secrets.CODECOV_TOKEN }}
20
- file: coverage/.resultset.json
26
+ files: coverage/.resultset.json
21
27
  fail_ci_if_error: true
@@ -0,0 +1,19 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
3
+ ---
4
+ # yamllint disable rule:line-length
5
+ name: copyrights
6
+ 'on':
7
+ push:
8
+ branches:
9
+ - master
10
+ pull_request:
11
+ branches:
12
+ - master
13
+ jobs:
14
+ copyrights:
15
+ timeout-minutes: 15
16
+ runs-on: ubuntu-24.04
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - uses: yegor256/copyrights-action@0.0.8
@@ -1,19 +1,19 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
1
3
  ---
4
+ # yamllint disable rule:line-length
2
5
  name: markdown-lint
3
- on:
6
+ 'on':
4
7
  push:
5
8
  branches:
6
9
  - master
7
10
  pull_request:
8
11
  branches:
9
12
  - master
10
- paths-ignore: [ 'paper/**', 'sandbox/**' ]
11
- concurrency:
12
- group: markdown-lint-${{ github.ref }}
13
- cancel-in-progress: true
14
13
  jobs:
15
14
  markdown-lint:
16
- runs-on: ubuntu-22.04
15
+ timeout-minutes: 15
16
+ runs-on: ubuntu-24.04
17
17
  steps:
18
- - uses: actions/checkout@b32f140b0c872d58512e0a66172253c302617b90
18
+ - uses: actions/checkout@v4
19
19
  - uses: articulate/actions-markdownlint@v1
@@ -1,6 +1,9 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
1
3
  ---
4
+ # yamllint disable rule:line-length
2
5
  name: pdd
3
- on:
6
+ 'on':
4
7
  push:
5
8
  branches:
6
9
  - master
@@ -9,7 +12,8 @@ on:
9
12
  - master
10
13
  jobs:
11
14
  pdd:
12
- runs-on: ubuntu-22.04
15
+ timeout-minutes: 15
16
+ runs-on: ubuntu-24.04
13
17
  steps:
14
18
  - uses: actions/checkout@v4
15
19
  - uses: volodya-lombrozo/pdd-action@master
@@ -1,6 +1,9 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
1
3
  ---
4
+ # yamllint disable rule:line-length
2
5
  name: rake
3
- on:
6
+ 'on':
4
7
  push:
5
8
  branches:
6
9
  - master
@@ -9,16 +12,17 @@ on:
9
12
  - master
10
13
  jobs:
11
14
  rake:
12
- name: rake
13
15
  strategy:
14
16
  matrix:
15
- os: [ubuntu-22.04]
16
- ruby: [2.7, 3.3]
17
+ os: [ubuntu-24.04]
18
+ ruby: [3.3]
17
19
  runs-on: ${{ matrix.os }}
18
20
  steps:
19
21
  - uses: actions/checkout@v4
20
22
  - uses: ruby/setup-ruby@v1
21
23
  with:
22
24
  ruby-version: ${{ matrix.ruby }}
23
- - run: bundle update
25
+ bundler-cache: true
26
+ - run: bundle config set --global path "$(pwd)/vendor/bundle"
27
+ - run: bundle install --no-color
24
28
  - run: bundle exec rake
@@ -0,0 +1,19 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
3
+ ---
4
+ # yamllint disable rule:line-length
5
+ name: reuse
6
+ 'on':
7
+ push:
8
+ branches:
9
+ - master
10
+ pull_request:
11
+ branches:
12
+ - master
13
+ jobs:
14
+ reuse:
15
+ timeout-minutes: 15
16
+ runs-on: ubuntu-24.04
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - uses: fsfe/reuse-action@v5
@@ -1,4 +1,7 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
1
3
  ---
4
+ # yamllint disable rule:line-length
2
5
  name: xcop
3
6
  "on":
4
7
  push:
@@ -9,7 +12,8 @@ name: xcop
9
12
  - master
10
13
  jobs:
11
14
  xcop:
12
- runs-on: ubuntu-22.04
15
+ timeout-minutes: 15
16
+ runs-on: ubuntu-24.04
13
17
  steps:
14
18
  - uses: actions/checkout@v4
15
19
  - uses: g4s8/xcop-action@master
@@ -0,0 +1,19 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
3
+ ---
4
+ # yamllint disable rule:line-length
5
+ name: yamllint
6
+ 'on':
7
+ push:
8
+ branches:
9
+ - master
10
+ pull_request:
11
+ branches:
12
+ - master
13
+ jobs:
14
+ yamllint:
15
+ timeout-minutes: 15
16
+ runs-on: ubuntu-24.04
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - uses: ibiqlik/action-yamllint@v3
data/.gitignore CHANGED
@@ -1,7 +1,10 @@
1
- Gemfile.lock
2
1
  *.gem
3
- .bundle/
4
2
  .DS_Store
5
- rdoc/
3
+ .bundle/
6
4
  .idea/
7
- coverage/
5
+ .yardoc/
6
+ coverage/
7
+ doc/
8
+ node_modules/
9
+ rdoc/
10
+ vendor/
data/.rubocop.yml CHANGED
@@ -1,9 +1,17 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
3
+ ---
1
4
  AllCops:
2
5
  DisplayCopNames: true
3
6
  TargetRubyVersion: 2.3
4
7
  NewCops: enable
5
8
  SuggestExtensions: false
6
-
9
+ plugins:
10
+ - rubocop-rake
11
+ - rubocop-minitest
12
+ - rubocop-performance
13
+ Minitest/EmptyLineBeforeAssertionMethods:
14
+ Enabled: false
7
15
  Layout/EndOfLine:
8
16
  EnforcedStyle: lf
9
17
  Style/OptionalBooleanParameter:
data/.rultor.yml CHANGED
@@ -1,13 +1,18 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
3
+ ---
4
+ # yamllint disable rule:line-length
1
5
  docker:
2
- image: yegor256/rultor-image:1.22.0
6
+ image: yegor256/ruby
3
7
  assets:
4
8
  rubygems.yml: yegor256/home#assets/rubygems.yml
5
9
  install: |
6
10
  pdd -f /dev/null
7
11
  bundle install --no-color
8
12
  release:
13
+ pre: false
9
14
  script: |-
10
- bundle exec rake clean test rubocop copyright
15
+ bundle exec rake
11
16
  sed -i "s/0\.0\.0/${tag}/g" obk.gemspec
12
17
  git add obk.gemspec
13
18
  git commit -m "version set to ${tag}"
@@ -16,4 +21,4 @@ release:
16
21
  gem push *.gem --config-file ../rubygems.yml
17
22
  merge:
18
23
  script: |-
19
- bundle exec rake clean test rubocop copyright
24
+ bundle exec rake
data/Gemfile CHANGED
@@ -1,31 +1,19 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2021-2024 Yegor Bugayenko
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.
3
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 Yegor Bugayenko
4
+ # SPDX-License-Identifier: MIT
22
5
 
23
6
  source 'https://rubygems.org'
24
7
  gemspec
25
8
 
26
- gem 'minitest', '5.22.2', require: false
27
- gem 'rake', '13.1.0', require: false
28
- gem 'rdoc', '6.6.2', require: false
29
- gem 'rubocop', '1.61.0', require: false
30
- gem 'rubocop-rspec', '2.27.1', require: false
31
- gem 'simplecov', '0.22.0', require: false
9
+ gem 'minitest', '~>5.25', require: false
10
+ gem 'minitest-reporters', '~>1.7', require: false
11
+ gem 'rake', '~>13.2', require: false
12
+ gem 'rdoc', '~>6.11', require: false
13
+ gem 'rubocop', '~>1.71', require: false
14
+ gem 'rubocop-minitest', '>0', require: false
15
+ gem 'rubocop-performance', '>0', require: false
16
+ gem 'rubocop-rake', '>0', require: false
17
+ gem 'rubocop-rspec', '>0', require: false
18
+ gem 'simplecov', '~>0.22', require: false
19
+ gem 'simplecov-cobertura', '~>2.1', require: false
data/Gemfile.lock ADDED
@@ -0,0 +1,103 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ obk (0.0.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ansi (1.5.0)
10
+ ast (2.4.3)
11
+ builder (3.3.0)
12
+ date (3.4.1)
13
+ docile (1.4.1)
14
+ json (2.10.2)
15
+ language_server-protocol (3.17.0.4)
16
+ lint_roller (1.1.0)
17
+ minitest (5.25.5)
18
+ minitest-reporters (1.7.1)
19
+ ansi
20
+ builder
21
+ minitest (>= 5.0)
22
+ ruby-progressbar
23
+ parallel (1.26.3)
24
+ parser (3.3.7.4)
25
+ ast (~> 2.4.1)
26
+ racc
27
+ prism (1.4.0)
28
+ psych (5.2.3)
29
+ date
30
+ stringio
31
+ racc (1.8.1)
32
+ rainbow (3.1.1)
33
+ rake (13.2.1)
34
+ rdoc (6.13.1)
35
+ psych (>= 4.0.0)
36
+ regexp_parser (2.10.0)
37
+ rexml (3.4.1)
38
+ rubocop (1.75.2)
39
+ json (~> 2.3)
40
+ language_server-protocol (~> 3.17.0.2)
41
+ lint_roller (~> 1.1.0)
42
+ parallel (~> 1.10)
43
+ parser (>= 3.3.0.2)
44
+ rainbow (>= 2.2.2, < 4.0)
45
+ regexp_parser (>= 2.9.3, < 3.0)
46
+ rubocop-ast (>= 1.44.0, < 2.0)
47
+ ruby-progressbar (~> 1.7)
48
+ unicode-display_width (>= 2.4.0, < 4.0)
49
+ rubocop-ast (1.44.0)
50
+ parser (>= 3.3.7.2)
51
+ prism (~> 1.4)
52
+ rubocop-minitest (0.38.0)
53
+ lint_roller (~> 1.1)
54
+ rubocop (>= 1.75.0, < 2.0)
55
+ rubocop-ast (>= 1.38.0, < 2.0)
56
+ rubocop-performance (1.25.0)
57
+ lint_roller (~> 1.1)
58
+ rubocop (>= 1.75.0, < 2.0)
59
+ rubocop-ast (>= 1.38.0, < 2.0)
60
+ rubocop-rake (0.7.1)
61
+ lint_roller (~> 1.1)
62
+ rubocop (>= 1.72.1)
63
+ rubocop-rspec (3.5.0)
64
+ lint_roller (~> 1.1)
65
+ rubocop (~> 1.72, >= 1.72.1)
66
+ ruby-progressbar (1.13.0)
67
+ simplecov (0.22.0)
68
+ docile (~> 1.1)
69
+ simplecov-html (~> 0.11)
70
+ simplecov_json_formatter (~> 0.1)
71
+ simplecov-cobertura (2.1.0)
72
+ rexml
73
+ simplecov (~> 0.19)
74
+ simplecov-html (0.13.1)
75
+ simplecov_json_formatter (0.1.4)
76
+ stringio (3.1.6)
77
+ unicode-display_width (3.1.4)
78
+ unicode-emoji (~> 4.0, >= 4.0.4)
79
+ unicode-emoji (4.0.4)
80
+
81
+ PLATFORMS
82
+ arm64-darwin-22
83
+ arm64-darwin-23
84
+ arm64-darwin-24
85
+ x64-mingw-ucrt
86
+ x86_64-linux
87
+
88
+ DEPENDENCIES
89
+ minitest (~> 5.25)
90
+ minitest-reporters (~> 1.7)
91
+ obk!
92
+ rake (~> 13.2)
93
+ rdoc (~> 6.11)
94
+ rubocop (~> 1.71)
95
+ rubocop-minitest (> 0)
96
+ rubocop-performance (> 0)
97
+ rubocop-rake (> 0)
98
+ rubocop-rspec (> 0)
99
+ simplecov (~> 0.22)
100
+ simplecov-cobertura (~> 2.1)
101
+
102
+ BUNDLED WITH
103
+ 2.5.16
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2019 Yegor Bugayenko
3
+ Copyright (c) 2021-2025 Yegor Bugayenko
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/LICENSES/MIT.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021-2025 Yegor Bugayenko
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
13
+ in all 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 NON-INFRINGEMENT. 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 CHANGED
@@ -1,4 +1,4 @@
1
- <img src="/logo.svg" width="64px" height="64px"/>
1
+ # Throttle Ruby Method Calls
2
2
 
3
3
  [![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)
4
4
  [![DevOps By Rultor.com](http://www.rultor.com/b/yegor256/obk)](http://www.rultor.com/p/yegor256/obk)
@@ -35,8 +35,9 @@ Keep in mind that `Obk` is _not_ thread-safe.
35
35
  ## How to contribute
36
36
 
37
37
  Read [these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).
38
- Make sure you build is green before you contribute
39
- your pull request. You will need to have [Ruby](https://www.ruby-lang.org/en/) 2.3+ and
38
+ Make sure your build is green before you contribute
39
+ your pull request. You will need to have
40
+ [Ruby](https://www.ruby-lang.org/en/) 2.3+ and
40
41
  [Bundler](https://bundler.io/) installed. Then:
41
42
 
42
43
  ```bash
data/REUSE.toml ADDED
@@ -0,0 +1,35 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
3
+
4
+ version = 1
5
+ [[annotations]]
6
+ path = [
7
+ "**.json",
8
+ "**.md",
9
+ "**.png",
10
+ "**.txt",
11
+ "**/*.csv",
12
+ "**/*.jpg",
13
+ "**/*.json",
14
+ "**/*.md",
15
+ "**/*.pdf",
16
+ "**/*.png",
17
+ "**/*.svg",
18
+ "**/*.txt",
19
+ "**/*.vm",
20
+ "**/.DS_Store",
21
+ "**/.gitignore",
22
+ "**/.pdd",
23
+ "**/CNAME",
24
+ "**/Gemfile.lock",
25
+ ".DS_Store",
26
+ ".gitattributes",
27
+ ".gitignore",
28
+ ".pdd",
29
+ "Gemfile.lock",
30
+ "README.md",
31
+ "renovate.json",
32
+ ]
33
+ precedence = "override"
34
+ SPDX-FileCopyrightText = "Copyright (c) 2025 Yegor Bugayenko"
35
+ SPDX-License-Identifier = "MIT"
data/Rakefile CHANGED
@@ -1,24 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2021-2024 Yegor Bugayenko
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.
3
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 Yegor Bugayenko
4
+ # SPDX-License-Identifier: MIT
22
5
 
23
6
  require 'rubygems'
24
7
  require 'rake'
@@ -53,13 +36,4 @@ require 'rubocop/rake_task'
53
36
  desc 'Run RuboCop on all directories'
54
37
  RuboCop::RakeTask.new(:rubocop) do |task|
55
38
  task.fail_on_error = true
56
- task.requires << 'rubocop-rspec'
57
- end
58
-
59
- task :copyright do
60
- sh "grep -q -r '2021-#{Date.today.strftime('%Y')}' \
61
- --include '*.rb' \
62
- --include '*.txt' \
63
- --include 'Rakefile' \
64
- ."
65
39
  end
data/lib/obk.rb CHANGED
@@ -1,26 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # (The MIT License)
4
- #
5
- # Copyright (c) 2021-2024 Yegor Bugayenko
6
- #
7
- # Permission is hereby granted, free of charge, to any person obtaining a copy
8
- # of this software and associated documentation files (the 'Software'), to deal
9
- # in the Software without restriction, including without limitation the rights
10
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- # copies of the Software, and to permit persons to whom the Software is
12
- # furnished to do so, subject to the following conditions:
13
- #
14
- # The above copyright notice and this permission notice shall be included in all
15
- # copies or substantial portions of the Software.
16
- #
17
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- # SOFTWARE.
3
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 Yegor Bugayenko
4
+ # SPDX-License-Identifier: MIT
24
5
 
25
6
  # Obk is a decorator that adds delays between object method calls.
26
7
  #
@@ -28,7 +9,7 @@
28
9
  # {README}[https://github.com/yegor256/obk/blob/master/README.md] file.
29
10
  #
30
11
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
31
- # Copyright:: Copyright (c) 2021-2024 Yegor Bugayenko
12
+ # Copyright:: Copyright (c) 2021-2025 Yegor Bugayenko
32
13
  # License:: MIT
33
14
  class Obk
34
15
  def initialize(origin, pause: 1000)
data/obk.gemspec CHANGED
@@ -1,33 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # (The MIT License)
4
- #
5
- # Copyright (c) 2021-2024 Yegor Bugayenko
6
- #
7
- # Permission is hereby granted, free of charge, to any person obtaining a copy
8
- # of this software and associated documentation files (the 'Software'), to deal
9
- # in the Software without restriction, including without limitation the rights
10
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- # copies of the Software, and to permit persons to whom the Software is
12
- # furnished to do so, subject to the following conditions:
13
- #
14
- # The above copyright notice and this permission notice shall be included in all
15
- # copies or substantial portions of the Software.
16
- #
17
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- # SOFTWARE.
3
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 Yegor Bugayenko
4
+ # SPDX-License-Identifier: MIT
24
5
 
25
6
  require 'English'
26
7
  Gem::Specification.new do |s|
27
8
  s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
28
9
  s.required_ruby_version = '>=2.3'
29
10
  s.name = 'obk'
30
- s.version = '0.3.1'
11
+ s.version = '0.3.2'
31
12
  s.license = 'MIT'
32
13
  s.summary = 'Ruby decorator to throttle object method calls'
33
14
  s.description = 'Ruby decorator to throttle object method calls'
data/test/test__helper.rb CHANGED
@@ -1,30 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # (The MIT License)
4
- #
5
- # Copyright (c) 2021-2024 Yegor Bugayenko
6
- #
7
- # Permission is hereby granted, free of charge, to any person obtaining a copy
8
- # of this software and associated documentation files (the 'Software'), to deal
9
- # in the Software without restriction, including without limitation the rights
10
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- # copies of the Software, and to permit persons to whom the Software is
12
- # furnished to do so, subject to the following conditions:
13
- #
14
- # The above copyright notice and this permission notice shall be included in all
15
- # copies or substantial portions of the Software.
16
- #
17
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- # SOFTWARE.
3
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 Yegor Bugayenko
4
+ # SPDX-License-Identifier: MIT
24
5
 
25
6
  $stdout.sync = true
26
7
 
27
8
  require 'simplecov'
9
+ SimpleCov.external_at_exit = true
28
10
  SimpleCov.start
29
11
 
12
+ require 'simplecov-cobertura'
13
+ SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter
14
+
30
15
  require 'minitest/autorun'
16
+
17
+ require 'minitest/reporters'
18
+ Minitest::Reporters.use! [Minitest::Reporters::SpecReporter.new]
data/test/test_obk.rb CHANGED
@@ -1,34 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # (The MIT License)
4
- #
5
- # Copyright (c) 2021-2024 Yegor Bugayenko
6
- #
7
- # Permission is hereby granted, free of charge, to any person obtaining a copy
8
- # of this software and associated documentation files (the 'Software'), to deal
9
- # in the Software without restriction, including without limitation the rights
10
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- # copies of the Software, and to permit persons to whom the Software is
12
- # furnished to do so, subject to the following conditions:
13
- #
14
- # The above copyright notice and this permission notice shall be included in all
15
- # copies or substantial portions of the Software.
16
- #
17
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- # SOFTWARE.
3
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 Yegor Bugayenko
4
+ # SPDX-License-Identifier: MIT
24
5
 
25
6
  require 'minitest/autorun'
26
7
  require 'json'
8
+ require_relative '../test/test__helper'
27
9
  require_relative '../lib/obk'
28
10
 
29
11
  # Obk test.
30
12
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
31
- # Copyright:: Copyright (c) 2021-2024 Yegor Bugayenko
13
+ # Copyright:: Copyright (c) 2021-2025 Yegor Bugayenko
32
14
  # License:: MIT
33
15
  class ObkTest < Minitest::Test
34
16
  def test_simple
@@ -41,7 +23,7 @@ class ObkTest < Minitest::Test
41
23
  assert_equal(42, obj.read(42))
42
24
  assert_equal(42, obj.read(42))
43
25
  stop = Time.now
44
- assert(stop - start > 0.1)
26
+ assert_operator(stop - start, :>, 0.1)
45
27
  end
46
28
 
47
29
  def test_works_with_optional_arguments
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: obk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-03-05 00:00:00.000000000 Z
10
+ date: 2025-04-05 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: Ruby decorator to throttle object method calls
14
13
  email: yegor256@gmail.com
@@ -18,21 +17,27 @@ extra_rdoc_files:
18
17
  - README.md
19
18
  files:
20
19
  - ".0pdd.yml"
20
+ - ".github/workflows/actionlint.yml"
21
21
  - ".github/workflows/codecov.yml"
22
+ - ".github/workflows/copyrights.yml"
22
23
  - ".github/workflows/markdown-lint.yml"
23
24
  - ".github/workflows/pdd.yml"
24
25
  - ".github/workflows/rake.yml"
26
+ - ".github/workflows/reuse.yml"
25
27
  - ".github/workflows/xcop.yml"
28
+ - ".github/workflows/yamllint.yml"
26
29
  - ".gitignore"
27
30
  - ".pdd"
28
31
  - ".rubocop.yml"
29
32
  - ".rultor.yml"
30
33
  - Gemfile
34
+ - Gemfile.lock
31
35
  - LICENSE.txt
36
+ - LICENSES/MIT.txt
32
37
  - README.md
38
+ - REUSE.toml
33
39
  - Rakefile
34
40
  - lib/obk.rb
35
- - logo.svg
36
41
  - obk.gemspec
37
42
  - renovate.json
38
43
  - test/test__helper.rb
@@ -42,7 +47,6 @@ licenses:
42
47
  - MIT
43
48
  metadata:
44
49
  rubygems_mfa_required: 'true'
45
- post_install_message:
46
50
  rdoc_options:
47
51
  - "--charset=UTF-8"
48
52
  require_paths:
@@ -58,8 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
58
62
  - !ruby/object:Gem::Version
59
63
  version: '0'
60
64
  requirements: []
61
- rubygems_version: 3.4.10
62
- signing_key:
65
+ rubygems_version: 3.6.2
63
66
  specification_version: 4
64
67
  summary: Ruby decorator to throttle object method calls
65
68
  test_files: []
data/logo.svg DELETED
@@ -1,19 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="314px" height="314px" viewBox="0 0 314 314" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <!-- Generator: Sketch 43.2 (39069) - http://www.bohemiancoding.com/sketch -->
4
- <title>Group 2</title>
5
- <desc>Created with Sketch.</desc>
6
- <defs></defs>
7
- <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
8
- <g id="Group-2">
9
- <g id="Group">
10
- <circle id="Oval" fill="#053C5E" cx="157" cy="157" r="157"></circle>
11
- <rect id="Rectangle" fill="#2B2B2B" x="0" y="234" width="212" height="68"></rect>
12
- <text id="obk" font-family="CourierNewPS-BoldMT, Courier New" font-size="50" font-weight="bold" fill="#FFFFFF">
13
- <tspan x="28" y="282">obk</tspan>
14
- </text>
15
- <path d="M135.676765,111.215287 C135.211714,113.540467 132.770932,120.688823 130.252813,127.100603 C127.734621,133.512383 125.2898,140.431445 124.819828,142.476214 C123.6868,147.405663 121.517836,147.185477 119.69487,141.95608 C116.899865,133.938362 105.171362,111.043501 103.859129,111.043501 C100.420089,111.043501 101.508757,114.986149 109.1771,130.30227 C113.739327,139.414532 118.032086,147.448041 118.716515,148.15443 C120.694817,150.196115 120.172626,154.319657 117.358599,158.877992 C113.567467,165.019055 107.570942,183.721189 108.054206,187.896804 C108.804956,194.383204 112.436054,192.210274 113.355359,184.724515 C114.48376,175.535577 120.945556,159.641154 124.897459,156.333653 C127.109021,154.482778 128.268636,151.905536 128.573284,148.163978 C128.818001,145.157747 131.906711,135.560972 135.437115,126.837819 C138.96752,118.114666 141.511492,110.079835 141.090434,108.982574 C139.755727,105.504315 136.554941,106.824333 135.676765,111.215287 M174.714659,126.841564 C169.37392,129.699438 169.197653,130.049915 167.452978,141.283475 C165.577352,153.360398 165.225112,168.513913 166.548289,180.203784 L167.566817,189.202501 L161.346213,191.9541 C154.601949,194.937416 150.91195,200.302465 153.156708,203.861146 C155.104824,206.949562 157.09025,206.70198 157.571826,203.310532 C158.083734,199.706169 166.097413,193.204052 170.29418,192.987978 C172.116999,192.894116 173.522874,191.717021 173.97823,189.903529 C174.383277,188.290613 177.740353,184.944554 181.438431,182.467858 C188.546172,177.707551 194.317883,170.450278 194.317883,166.273341 C194.317883,162.684548 189.493165,158.361603 185.487795,158.361603 C180.701636,158.361603 180.027195,155.239403 183.731222,150.229385 C188.308065,144.038966 188.284856,130.867646 183.690534,127.147387 C179.896537,124.075276 179.885006,124.074836 174.714659,126.841564 M182.67318,134.240439 C184.752542,140.153164 174.808961,161.185104 171.588639,157.68562 C169.868715,155.81653 172.863122,135.012708 175.266374,132.134564 C177.872553,129.013319 181.163896,129.949075 182.67318,134.240439 M184.854262,162.269586 C190.589839,163.855621 189.673839,167.881335 181.645765,176.371155 C177.281618,180.986262 173.904933,183.573859 173.371946,182.711474 C172.876636,181.91012 172.127869,176.711937 171.707987,171.159972 L170.944531,161.065463 L176.209475,161.200234 C179.105172,161.274339 182.995308,161.755548 184.854262,162.269586 M132.642184,172.492256 C131.593837,175.224098 133.152917,177.288844 136.264027,177.288844 C139.014965,177.288844 139.431396,176.221769 138.067531,172.667568 C137.039234,169.987871 133.645289,169.878218 132.642184,172.492256 M203.781503,185.840798 C203.781503,187.657595 209.264724,193.512152 210.966361,193.512152 C212.534035,193.512152 211.991059,187.391138 210.270768,185.670847 C208.092403,183.492409 203.781503,183.605293 203.781503,185.840798" id="Fill-6" fill="#427B8A" fill-rule="nonzero"></path>
16
- </g>
17
- </g>
18
- </g>
19
- </svg>