obk 0.1.0 → 0.3.1
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/workflows/codecov.yml +21 -0
- data/.github/workflows/markdown-lint.yml +19 -0
- data/.github/workflows/pdd.yml +15 -0
- data/.github/workflows/rake.yml +24 -0
- data/.github/workflows/xcop.yml +17 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +14 -16
- data/.rultor.yml +8 -13
- data/Gemfile +8 -2
- data/README.md +10 -11
- data/Rakefile +9 -1
- data/lib/obk.rb +21 -7
- data/obk.gemspec +6 -15
- data/renovate.json +6 -0
- data/test/test__helper.rb +30 -0
- data/test/test_obk.rb +29 -5
- metadata +17 -82
- data/.travis.yml +0 -12
- data/appveyor.yml +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3588c2aaa0acb3233db4a2f44e7cd97debdfe7ea43395810ab967daa20f14bda
|
4
|
+
data.tar.gz: cb1a410f2f1e8ae32fdcb4454e7202971514ca39e3fee1a99a7ad90fc012f286
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ce340dfaa95b7617bc4df8f329457610d6db9c6df4504177dc6a957d610d5bde9148fa0502a1f2a90adf10358b0820055abe4f22c5ad372ba4927f05edd7419
|
7
|
+
data.tar.gz: 2452a0fd858c897a627a650fb1c119a67a85f47f36ca7ae9adcbb503e6994634069c2a46c61547cb200aee5e66349f6c6c9eb042faaa868f604fc9f364904c7f
|
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
name: codecov
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
jobs:
|
8
|
+
codecov:
|
9
|
+
runs-on: ubuntu-22.04
|
10
|
+
steps:
|
11
|
+
- uses: actions/checkout@v4
|
12
|
+
- uses: ruby/setup-ruby@v1
|
13
|
+
with:
|
14
|
+
ruby-version: 3.3
|
15
|
+
- run: bundle update
|
16
|
+
- run: bundle exec rake
|
17
|
+
- uses: codecov/codecov-action@v4
|
18
|
+
with:
|
19
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
20
|
+
file: coverage/.resultset.json
|
21
|
+
fail_ci_if_error: true
|
@@ -0,0 +1,19 @@
|
|
1
|
+
---
|
2
|
+
name: markdown-lint
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
pull_request:
|
8
|
+
branches:
|
9
|
+
- master
|
10
|
+
paths-ignore: [ 'paper/**', 'sandbox/**' ]
|
11
|
+
concurrency:
|
12
|
+
group: markdown-lint-${{ github.ref }}
|
13
|
+
cancel-in-progress: true
|
14
|
+
jobs:
|
15
|
+
markdown-lint:
|
16
|
+
runs-on: ubuntu-22.04
|
17
|
+
steps:
|
18
|
+
- uses: actions/checkout@b32f140b0c872d58512e0a66172253c302617b90
|
19
|
+
- uses: articulate/actions-markdownlint@v1
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
name: rake
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
pull_request:
|
8
|
+
branches:
|
9
|
+
- master
|
10
|
+
jobs:
|
11
|
+
rake:
|
12
|
+
name: rake
|
13
|
+
strategy:
|
14
|
+
matrix:
|
15
|
+
os: [ubuntu-22.04]
|
16
|
+
ruby: [2.7, 3.3]
|
17
|
+
runs-on: ${{ matrix.os }}
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@v4
|
20
|
+
- uses: ruby/setup-ruby@v1
|
21
|
+
with:
|
22
|
+
ruby-version: ${{ matrix.ruby }}
|
23
|
+
- run: bundle update
|
24
|
+
- run: bundle exec rake
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,28 +1,26 @@
|
|
1
1
|
AllCops:
|
2
2
|
DisplayCopNames: true
|
3
3
|
TargetRubyVersion: 2.3
|
4
|
+
NewCops: enable
|
5
|
+
SuggestExtensions: false
|
4
6
|
|
5
7
|
Layout/EndOfLine:
|
6
8
|
EnforcedStyle: lf
|
7
|
-
Style/
|
9
|
+
Style/OptionalBooleanParameter:
|
8
10
|
Enabled: false
|
9
|
-
|
11
|
+
Lint/MissingSuper:
|
10
12
|
Enabled: false
|
11
|
-
|
13
|
+
Metrics/MethodLength:
|
14
|
+
Max: 50
|
15
|
+
Layout/EndAlignment:
|
16
|
+
Enabled: false
|
17
|
+
Layout/ElseAlignment:
|
18
|
+
Enabled: false
|
19
|
+
Layout/IndentationWidth:
|
12
20
|
Enabled: false
|
13
21
|
Metrics/AbcSize:
|
14
|
-
Max: 65
|
15
|
-
Metrics/BlockLength:
|
16
22
|
Max: 30
|
17
|
-
Metrics/MethodLength:
|
18
|
-
Max: 50
|
19
|
-
Metrics/ClassLength:
|
20
|
-
Max: 180
|
21
|
-
Metrics/CyclomaticComplexity:
|
22
|
-
Max: 10
|
23
23
|
Metrics/PerceivedComplexity:
|
24
|
-
Max:
|
25
|
-
Metrics/
|
26
|
-
Max:
|
27
|
-
Layout/AlignParameters:
|
28
|
-
Enabled: false
|
24
|
+
Max: 15
|
25
|
+
Metrics/CyclomaticComplexity:
|
26
|
+
Max: 15
|
data/.rultor.yml
CHANGED
@@ -1,24 +1,19 @@
|
|
1
|
+
docker:
|
2
|
+
image: yegor256/rultor-image:1.22.0
|
1
3
|
assets:
|
2
4
|
rubygems.yml: yegor256/home#assets/rubygems.yml
|
3
|
-
install:
|
4
|
-
|
5
|
-
|
6
|
-
sudo bundle install --no-color "--gemfile=$(pwd)/Gemfile"
|
5
|
+
install: |
|
6
|
+
pdd -f /dev/null
|
7
|
+
bundle install --no-color
|
7
8
|
release:
|
8
9
|
script: |-
|
9
|
-
bundle exec rake
|
10
|
-
rm -rf *.gem
|
10
|
+
bundle exec rake clean test rubocop copyright
|
11
11
|
sed -i "s/0\.0\.0/${tag}/g" obk.gemspec
|
12
12
|
git add obk.gemspec
|
13
|
-
git commit -m "
|
13
|
+
git commit -m "version set to ${tag}"
|
14
14
|
gem build obk.gemspec
|
15
15
|
chmod 0600 ../rubygems.yml
|
16
16
|
gem push *.gem --config-file ../rubygems.yml
|
17
17
|
merge:
|
18
18
|
script: |-
|
19
|
-
bundle
|
20
|
-
bundle exec rake
|
21
|
-
deploy:
|
22
|
-
script: |-
|
23
|
-
echo 'Nothing to deploy'
|
24
|
-
exit -1
|
19
|
+
bundle exec rake clean test rubocop copyright
|
data/Gemfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2021 Yegor Bugayenko
|
3
|
+
# Copyright (c) 2021-2024 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
|
@@ -21,5 +21,11 @@
|
|
21
21
|
# SOFTWARE.
|
22
22
|
|
23
23
|
source 'https://rubygems.org'
|
24
|
-
ruby '~>2.3'
|
25
24
|
gemspec
|
25
|
+
|
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
|
data/README.md
CHANGED
@@ -4,19 +4,18 @@
|
|
4
4
|
[](http://www.rultor.com/p/yegor256/obk)
|
5
5
|
[](https://www.jetbrains.com/ruby/)
|
6
6
|
|
7
|
-
[](https://github.com/yegor256/obk/actions/workflows/rake.yml)
|
8
|
+
[](https://codecov.io/github/yegor256/obk?branch=master)
|
9
9
|
[](http://badge.fury.io/rb/obk)
|
10
|
-
[](https://codeclimate.com/github/yegor256/obk/maintainability)
|
11
11
|
[](http://rubydoc.info/github/yegor256/obk/master/frames)
|
12
|
-
|
13
12
|
[](https://hitsofcode.com/view/github/yegor256/obk)
|
14
13
|
[](https://github.com/yegor256/obk/blob/master/LICENSE.txt)
|
15
14
|
|
16
15
|
First, install it:
|
17
16
|
|
18
17
|
```bash
|
19
|
-
|
18
|
+
gem install obk
|
20
19
|
```
|
21
20
|
|
22
21
|
Then, use it like this:
|
@@ -26,12 +25,12 @@ require 'obk'
|
|
26
25
|
obj = Obk.new(obj, pause: 500)
|
27
26
|
obj.foo
|
28
27
|
# Forced 500ms delay here
|
29
|
-
obj.
|
28
|
+
obj.bar
|
30
29
|
```
|
31
30
|
|
32
|
-
There will be a forced delay of 500 milliseconds between `.foo` calls.
|
31
|
+
There will be a forced delay of 500 milliseconds between `.foo` and `.bar` calls.
|
33
32
|
|
34
|
-
Keep in mind that `Obk` is thread-safe.
|
33
|
+
Keep in mind that `Obk` is _not_ thread-safe.
|
35
34
|
|
36
35
|
## How to contribute
|
37
36
|
|
@@ -40,9 +39,9 @@ Make sure you build is green before you contribute
|
|
40
39
|
your pull request. You will need to have [Ruby](https://www.ruby-lang.org/en/) 2.3+ and
|
41
40
|
[Bundler](https://bundler.io/) installed. Then:
|
42
41
|
|
43
|
-
```
|
44
|
-
|
45
|
-
|
42
|
+
```bash
|
43
|
+
bundle update
|
44
|
+
bundle exec rake
|
46
45
|
```
|
47
46
|
|
48
47
|
If it's clean and you don't see any error messages, submit your pull request.
|
data/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2021 Yegor Bugayenko
|
3
|
+
# Copyright (c) 2021-2024 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
|
@@ -55,3 +55,11 @@ RuboCop::RakeTask.new(:rubocop) do |task|
|
|
55
55
|
task.fail_on_error = true
|
56
56
|
task.requires << 'rubocop-rspec'
|
57
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
|
+
end
|
data/lib/obk.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# (The MIT License)
|
4
4
|
#
|
5
|
-
# Copyright (c) 2021 Yegor Bugayenko
|
5
|
+
# Copyright (c) 2021-2024 Yegor Bugayenko
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -28,22 +28,36 @@
|
|
28
28
|
# {README}[https://github.com/yegor256/obk/blob/master/README.md] file.
|
29
29
|
#
|
30
30
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
31
|
-
# Copyright:: Copyright (c) 2021 Yegor Bugayenko
|
31
|
+
# Copyright:: Copyright (c) 2021-2024 Yegor Bugayenko
|
32
32
|
# License:: MIT
|
33
33
|
class Obk
|
34
34
|
def initialize(origin, pause: 1000)
|
35
35
|
@origin = origin
|
36
|
-
@pause = pause
|
36
|
+
@pause = pause / 1000.0
|
37
|
+
@latest = Time.now
|
37
38
|
end
|
38
39
|
|
39
40
|
def method_missing(*args)
|
40
|
-
|
41
|
-
|
42
|
-
|
41
|
+
left = @pause - (Time.now - @latest)
|
42
|
+
sleep left if left.positive?
|
43
|
+
mtd = args.shift
|
44
|
+
result = if @origin.respond_to?(mtd)
|
45
|
+
params = @origin.method(mtd).parameters
|
46
|
+
reqs = params.count { |p| p[0] == :req }
|
47
|
+
if params.any? { |p| p[0] == :key } && args.size > reqs
|
48
|
+
@origin.__send__(mtd, *args[0...-1], **args.last) do |*a|
|
49
|
+
yield(*a) if block_given?
|
50
|
+
end
|
51
|
+
else
|
52
|
+
@origin.__send__(mtd, *args) do |*a|
|
53
|
+
yield(*a) if block_given?
|
54
|
+
end
|
43
55
|
end
|
44
56
|
else
|
45
|
-
|
57
|
+
super
|
46
58
|
end
|
59
|
+
@latest = Time.now
|
60
|
+
result
|
47
61
|
end
|
48
62
|
|
49
63
|
def respond_to?(method, include_private = false)
|
data/obk.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# (The MIT License)
|
4
4
|
#
|
5
|
-
# Copyright (c) 2021 Yegor Bugayenko
|
5
|
+
# Copyright (c) 2021-2024 Yegor Bugayenko
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -24,27 +24,18 @@
|
|
24
24
|
|
25
25
|
require 'English'
|
26
26
|
Gem::Specification.new do |s|
|
27
|
-
s.
|
28
|
-
if s.respond_to? :required_rubygems_version=
|
29
|
-
s.required_rubygems_version = Gem::Requirement.new('>= 0')
|
30
|
-
end
|
31
|
-
s.rubygems_version = '2.3.3'
|
27
|
+
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
|
32
28
|
s.required_ruby_version = '>=2.3'
|
33
29
|
s.name = 'obk'
|
34
|
-
s.version = '0.1
|
30
|
+
s.version = '0.3.1'
|
35
31
|
s.license = 'MIT'
|
36
|
-
s.summary = '
|
37
|
-
s.description = '
|
32
|
+
s.summary = 'Ruby decorator to throttle object method calls'
|
33
|
+
s.description = 'Ruby decorator to throttle object method calls'
|
38
34
|
s.authors = ['Yegor Bugayenko']
|
39
35
|
s.email = 'yegor256@gmail.com'
|
40
36
|
s.homepage = 'http://github.com/yegor256/obk'
|
41
37
|
s.files = `git ls-files`.split($RS)
|
42
|
-
s.test_files = s.files.grep(%r{^(test)/})
|
43
38
|
s.rdoc_options = ['--charset=UTF-8']
|
44
39
|
s.extra_rdoc_files = ['README.md']
|
45
|
-
s.
|
46
|
-
s.add_development_dependency 'rake', '12.3.3'
|
47
|
-
s.add_development_dependency 'rdoc', '4.3.0'
|
48
|
-
s.add_development_dependency 'rubocop', '0.62.0'
|
49
|
-
s.add_development_dependency 'rubocop-rspec', '1.31.0'
|
40
|
+
s.metadata['rubygems_mfa_required'] = 'true'
|
50
41
|
end
|
data/renovate.json
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
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.
|
24
|
+
|
25
|
+
$stdout.sync = true
|
26
|
+
|
27
|
+
require 'simplecov'
|
28
|
+
SimpleCov.start
|
29
|
+
|
30
|
+
require 'minitest/autorun'
|
data/test/test_obk.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# (The MIT License)
|
4
4
|
#
|
5
|
-
# Copyright (c) 2021 Yegor Bugayenko
|
5
|
+
# Copyright (c) 2021-2024 Yegor Bugayenko
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -28,7 +28,7 @@ require_relative '../lib/obk'
|
|
28
28
|
|
29
29
|
# Obk test.
|
30
30
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
31
|
-
# Copyright:: Copyright (c) 2021 Yegor Bugayenko
|
31
|
+
# Copyright:: Copyright (c) 2021-2024 Yegor Bugayenko
|
32
32
|
# License:: MIT
|
33
33
|
class ObkTest < Minitest::Test
|
34
34
|
def test_simple
|
@@ -36,8 +36,32 @@ class ObkTest < Minitest::Test
|
|
36
36
|
def obj.read(foo)
|
37
37
|
foo
|
38
38
|
end
|
39
|
-
|
40
|
-
|
41
|
-
assert_equal(42,
|
39
|
+
obj = Obk.new(obj, pause: 100)
|
40
|
+
start = Time.now
|
41
|
+
assert_equal(42, obj.read(42))
|
42
|
+
assert_equal(42, obj.read(42))
|
43
|
+
stop = Time.now
|
44
|
+
assert(stop - start > 0.1)
|
45
|
+
end
|
46
|
+
|
47
|
+
def test_works_with_optional_arguments
|
48
|
+
obj = Object.new
|
49
|
+
def obj.foo(first, _second, ext1: 'a', ext2: 'b')
|
50
|
+
first + ext1 + ext2
|
51
|
+
end
|
52
|
+
synced = Obk.new(obj, pause: 10)
|
53
|
+
assert_equal('.xy', synced.foo('.', {}, ext1: 'x', ext2: 'y'))
|
54
|
+
assert_equal('fzb', synced.foo('f', {}, ext1: 'z'))
|
55
|
+
assert_equal('-ab', synced.foo('-', {}))
|
56
|
+
end
|
57
|
+
|
58
|
+
def test_works_with_default_value
|
59
|
+
obj = Object.new
|
60
|
+
def obj.foo(first, second = 42)
|
61
|
+
first + second
|
62
|
+
end
|
63
|
+
synced = Obk.new(obj, pause: 10)
|
64
|
+
assert_equal(15, synced.foo(7, 8))
|
65
|
+
assert_equal(43, synced.foo(1))
|
42
66
|
end
|
43
67
|
end
|
metadata
CHANGED
@@ -1,86 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: obk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
13
|
-
|
14
|
-
name: minitest
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - '='
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 5.11.3
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - '='
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: 5.11.3
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - '='
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 12.3.3
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - '='
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 12.3.3
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rdoc
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - '='
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: 4.3.0
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - '='
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 4.3.0
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rubocop
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - '='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 0.62.0
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - '='
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: 0.62.0
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rubocop-rspec
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - '='
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: 1.31.0
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - '='
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: 1.31.0
|
83
|
-
description: Obk
|
11
|
+
date: 2024-03-05 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Ruby decorator to throttle object method calls
|
84
14
|
email: yegor256@gmail.com
|
85
15
|
executables: []
|
86
16
|
extensions: []
|
@@ -88,24 +18,30 @@ extra_rdoc_files:
|
|
88
18
|
- README.md
|
89
19
|
files:
|
90
20
|
- ".0pdd.yml"
|
21
|
+
- ".github/workflows/codecov.yml"
|
22
|
+
- ".github/workflows/markdown-lint.yml"
|
23
|
+
- ".github/workflows/pdd.yml"
|
24
|
+
- ".github/workflows/rake.yml"
|
25
|
+
- ".github/workflows/xcop.yml"
|
91
26
|
- ".gitignore"
|
92
27
|
- ".pdd"
|
93
28
|
- ".rubocop.yml"
|
94
29
|
- ".rultor.yml"
|
95
|
-
- ".travis.yml"
|
96
30
|
- Gemfile
|
97
31
|
- LICENSE.txt
|
98
32
|
- README.md
|
99
33
|
- Rakefile
|
100
|
-
- appveyor.yml
|
101
34
|
- lib/obk.rb
|
102
35
|
- logo.svg
|
103
36
|
- obk.gemspec
|
37
|
+
- renovate.json
|
38
|
+
- test/test__helper.rb
|
104
39
|
- test/test_obk.rb
|
105
40
|
homepage: http://github.com/yegor256/obk
|
106
41
|
licenses:
|
107
42
|
- MIT
|
108
|
-
metadata:
|
43
|
+
metadata:
|
44
|
+
rubygems_mfa_required: 'true'
|
109
45
|
post_install_message:
|
110
46
|
rdoc_options:
|
111
47
|
- "--charset=UTF-8"
|
@@ -122,9 +58,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
58
|
- !ruby/object:Gem::Version
|
123
59
|
version: '0'
|
124
60
|
requirements: []
|
125
|
-
rubygems_version: 3.
|
61
|
+
rubygems_version: 3.4.10
|
126
62
|
signing_key:
|
127
|
-
specification_version:
|
128
|
-
summary:
|
129
|
-
test_files:
|
130
|
-
- test/test_obk.rb
|
63
|
+
specification_version: 4
|
64
|
+
summary: Ruby decorator to throttle object method calls
|
65
|
+
test_files: []
|
data/.travis.yml
DELETED
data/appveyor.yml
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
version: '{build}'
|
2
|
-
skip_tags: true
|
3
|
-
clone_depth: 10
|
4
|
-
branches:
|
5
|
-
only:
|
6
|
-
- master
|
7
|
-
except:
|
8
|
-
- gh-pages
|
9
|
-
os: Windows Server 2012
|
10
|
-
environment:
|
11
|
-
matrix:
|
12
|
-
- ruby_version: "25-x64"
|
13
|
-
install:
|
14
|
-
- ps: |
|
15
|
-
$Env:PATH = "C:\Ruby${Env:ruby_version}\bin;${Env:PATH}"
|
16
|
-
- bundle config --local path vendor/bundle
|
17
|
-
- ruby -v
|
18
|
-
- bundle -v
|
19
|
-
build_script:
|
20
|
-
- bundle update
|
21
|
-
- bundle install
|
22
|
-
test_script:
|
23
|
-
- bundle exec rake --quiet
|
24
|
-
cache:
|
25
|
-
- vendor/bundle
|