tago 0.0.2 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0127fd10025c451f556575af7705a2956defe95bca254d3c6e15fd340b23c0b1
4
- data.tar.gz: 00e85043722bb7b4a1303954ecd6df39f8b3bd001090cfe61d14235b3b0bfdd3
3
+ metadata.gz: d92c21f9247d8a68c330dc5b284b80ecadda5908269fd86481899c9e2721bc4a
4
+ data.tar.gz: f19e8b1f5e94b9283f814c043e64e00889b3a6158cc479610769dd0b9673f27e
5
5
  SHA512:
6
- metadata.gz: ec9090a17889ec2cb4ebbf66323ccf678bcd668c82320731bf1c00f23a1fb5d348f76c50f16d03ff0967ae8ffae99340b1ed6f9ce08e7488914a0b6ef5647552
7
- data.tar.gz: c84b2694de35f985e1150d5464c186ac61c3b6155ff2ba0a7e97a72cbab5945dffdb2d8363ca992d423c96308756fba7964454516afa7125e052d1b81e4b709e
6
+ metadata.gz: ab867b4a97707d94d6130eec6ca85b115816639121de3580220938d3645f28779f13d78118fc1f38d23e4bdd0ea5605f717d3b0b204f9f1c8df742d10fc0648c
7
+ data.tar.gz: 4c2066c510e0971367382881e8fe0770b65e672512bf47a569d0fea39c2a87039a38204326d7b96be121a9695aa3c872d0b35c2a29dac208e34b6aba5220f7a0
data/.0pdd.yml CHANGED
@@ -1,22 +1,5 @@
1
- # Copyright (c) 2024 Yegor Bugayenko
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the 'Software'), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in all
11
- # copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- # SOFTWARE.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2024-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
  ---
21
4
  errors:
22
5
  - yegor256@gmail.com
@@ -1,23 +1,7 @@
1
- # Copyright (c) 2024 Yegor Bugayenko
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the 'Software'), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in all
11
- # copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- # SOFTWARE.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2024-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
  ---
4
+ # yamllint disable rule:line-length
21
5
  name: actionlint
22
6
  'on':
23
7
  push:
@@ -28,12 +12,12 @@ name: actionlint
28
12
  - master
29
13
  jobs:
30
14
  actionlint:
31
- runs-on: ubuntu-22.04
15
+ timeout-minutes: 15
16
+ runs-on: ubuntu-24.04
32
17
  steps:
33
18
  - uses: actions/checkout@v4
34
19
  - name: Download actionlint
35
20
  id: get_actionlint
36
- # yamllint disable-line rule:line-length
37
21
  run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
38
22
  shell: bash
39
23
  - name: Check workflow files
@@ -1,23 +1,7 @@
1
- # Copyright (c) 2024 Yegor Bugayenko
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the 'Software'), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in all
11
- # copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- # SOFTWARE.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2024-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
  ---
4
+ # yamllint disable rule:line-length
21
5
  name: codecov
22
6
  'on':
23
7
  push:
@@ -25,15 +9,17 @@ name: codecov
25
9
  - master
26
10
  jobs:
27
11
  codecov:
28
- runs-on: ubuntu-22.04
12
+ timeout-minutes: 15
13
+ runs-on: ubuntu-24.04
29
14
  steps:
30
15
  - uses: actions/checkout@v4
31
16
  - uses: ruby/setup-ruby@v1
32
17
  with:
33
- ruby-version: 3.2
18
+ ruby-version: 3.3
34
19
  bundler-cache: true
35
- - run: bundle install
20
+ - run: bundle config set --global path "$(pwd)/vendor/bundle"
21
+ - run: bundle install --no-color
36
22
  - run: bundle exec rake
37
- - uses: codecov/codecov-action@v4.0.0-beta.3
23
+ - uses: codecov/codecov-action@v5
38
24
  with:
39
25
  token: ${{ secrets.CODECOV_TOKEN }}
@@ -1,30 +1,15 @@
1
- # Copyright (c) 2024 Yegor Bugayenko
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the 'Software'), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in all
11
- # copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- # SOFTWARE.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2024-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
  ---
4
+ # yamllint disable rule:line-length
21
5
  name: copyrights
22
6
  'on':
23
7
  push:
24
8
  pull_request:
25
9
  jobs:
26
10
  copyrights:
27
- runs-on: ubuntu-22.04
11
+ timeout-minutes: 15
12
+ runs-on: ubuntu-24.04
28
13
  steps:
29
14
  - uses: actions/checkout@v4
30
- - uses: yegor256/copyrights-action@0.0.4
15
+ - uses: yegor256/copyrights-action@0.0.8
@@ -1,23 +1,7 @@
1
- # Copyright (c) 2024 Yegor Bugayenko
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the 'Software'), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in all
11
- # copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- # SOFTWARE.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2024-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
  ---
4
+ # yamllint disable rule:line-length
21
5
  name: markdown-lint
22
6
  'on':
23
7
  push:
@@ -32,7 +16,8 @@ concurrency:
32
16
  cancel-in-progress: true
33
17
  jobs:
34
18
  markdown-lint:
35
- runs-on: ubuntu-22.04
19
+ timeout-minutes: 15
20
+ runs-on: ubuntu-24.04
36
21
  steps:
37
22
  - uses: actions/checkout@v4
38
23
  - uses: articulate/actions-markdownlint@v1
@@ -1,23 +1,7 @@
1
- # Copyright (c) 2024 Yegor Bugayenko
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the 'Software'), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in all
11
- # copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- # SOFTWARE.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2024-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
  ---
4
+ # yamllint disable rule:line-length
21
5
  name: pdd
22
6
  'on':
23
7
  push:
@@ -28,7 +12,8 @@ name: pdd
28
12
  - master
29
13
  jobs:
30
14
  pdd:
31
- runs-on: ubuntu-22.04
15
+ timeout-minutes: 15
16
+ runs-on: ubuntu-24.04
32
17
  steps:
33
18
  - uses: actions/checkout@v4
34
19
  - uses: volodya-lombrozo/pdd-action@master
@@ -1,23 +1,7 @@
1
- # Copyright (c) 2024 Yegor Bugayenko
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the 'Software'), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in all
11
- # copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- # SOFTWARE.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2024-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
  ---
4
+ # yamllint disable rule:line-length
21
5
  name: rake
22
6
  'on':
23
7
  push:
@@ -28,11 +12,10 @@ name: rake
28
12
  - master
29
13
  jobs:
30
14
  rake:
31
- name: test
32
15
  strategy:
33
16
  matrix:
34
- os: [ubuntu-20.04, macos-12, windows-2022]
35
- ruby: [3.2, 3.3]
17
+ os: [ubuntu-24.04, macos-15, windows-2022]
18
+ ruby: [3.3]
36
19
  runs-on: ${{ matrix.os }}
37
20
  steps:
38
21
  - uses: actions/checkout@v4
@@ -40,5 +23,6 @@ jobs:
40
23
  with:
41
24
  ruby-version: ${{ matrix.ruby }}
42
25
  bundler-cache: true
43
- - run: bundle install
26
+ - run: bundle config set --global path "$(pwd)/vendor/bundle"
27
+ - run: bundle install --no-color
44
28
  - run: bundle exec rake
@@ -0,0 +1,19 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2024-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,30 +1,15 @@
1
- # Copyright (c) 2024 Yegor Bugayenko
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the 'Software'), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in all
11
- # copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- # SOFTWARE.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2024-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
  ---
4
+ # yamllint disable rule:line-length
21
5
  name: xcop
22
6
  'on':
23
7
  push:
24
8
  pull_request:
25
9
  jobs:
26
10
  xcop:
27
- runs-on: ubuntu-22.04
11
+ timeout-minutes: 15
12
+ runs-on: ubuntu-24.04
28
13
  steps:
29
14
  - uses: actions/checkout@v4
30
15
  - uses: g4s8/xcop-action@master
@@ -1,23 +1,7 @@
1
- # Copyright (c) 2024 Yegor Bugayenko
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the 'Software'), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in all
11
- # copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- # SOFTWARE.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2024-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
  ---
4
+ # yamllint disable rule:line-length
21
5
  name: yamllint
22
6
  'on':
23
7
  push:
@@ -28,7 +12,8 @@ name: yamllint
28
12
  - master
29
13
  jobs:
30
14
  yamllint:
31
- runs-on: ubuntu-22.04
15
+ timeout-minutes: 15
16
+ runs-on: ubuntu-24.04
32
17
  steps:
33
18
  - uses: actions/checkout@v4
34
19
  - uses: ibiqlik/action-yamllint@v3
data/.gitignore CHANGED
@@ -1,8 +1,10 @@
1
- coverage/
2
- .idea/
3
1
  *.gem
4
- .bundle/
5
2
  .DS_Store
6
- rdoc/
3
+ .bundle/
4
+ .idea/
5
+ .yardoc/
6
+ coverage/
7
7
  doc/
8
- .yardoc/
8
+ node_modules/
9
+ rdoc/
10
+ vendor/
data/.rubocop.yml CHANGED
@@ -1,22 +1,5 @@
1
- # Copyright (c) 2024 Yegor Bugayenko
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the 'Software'), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in all
11
- # copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- # SOFTWARE.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2024-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
  ---
21
4
  AllCops:
22
5
  Exclude:
@@ -27,7 +10,12 @@ AllCops:
27
10
  TargetRubyVersion: 3.2
28
11
  SuggestExtensions: false
29
12
  NewCops: enable
30
-
13
+ plugins:
14
+ - rubocop-rake
15
+ - rubocop-minitest
16
+ - rubocop-performance
17
+ Minitest/EmptyLineBeforeAssertionMethods:
18
+ Enabled: false
31
19
  Gemspec/RequiredRubyVersion:
32
20
  Enabled: false
33
21
  Metrics/AbcSize:
data/.rultor.yml CHANGED
@@ -1,25 +1,9 @@
1
- # Copyright (c) 2024 Yegor Bugayenko
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the 'Software'), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in all
11
- # copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- # SOFTWARE.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2024-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
  ---
4
+ # yamllint disable rule:line-length
21
5
  docker:
22
- image: yegor256/rultor-image:1.23.1
6
+ image: yegor256/ruby
23
7
  assets:
24
8
  rubygems.yml: yegor256/home#assets/rubygems.yml
25
9
  install: |
data/.simplecov CHANGED
@@ -1,25 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  #
4
- # Copyright (c) 2024 Yegor Bugayenko
5
- #
6
- # Permission is hereby granted, free of charge, to any person obtaining a copy
7
- # of this software and associated documentation files (the 'Software'), to deal
8
- # in the Software without restriction, including without limitation the rights
9
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- # copies of the Software, and to permit persons to whom the Software is
11
- # furnished to do so, subject to the following conditions:
12
- #
13
- # The above copyright notice and this permission notice shall be included in all
14
- # copies or substantial portions of the Software.
15
- #
16
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
19
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- # SOFTWARE.
4
+ # SPDX-FileCopyrightText: Copyright (c) 2024-2025 Yegor Bugayenko
5
+ # SPDX-License-Identifier: MIT
23
6
 
24
7
  if Gem.win_platform?
25
8
  SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
data/.yamllint.yml CHANGED
@@ -1,22 +1,5 @@
1
- # Copyright (c) 2024 Yegor Bugayenko
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the 'Software'), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in all
11
- # copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- # SOFTWARE.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2024-2025 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
  ---
21
4
  rules:
22
5
  line-length:
data/Gemfile CHANGED
@@ -1,32 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 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) 2024-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.23.1', require: false
27
- gem 'rake', '13.2.1', require: false
28
- gem 'rubocop', '1.64.1', require: false
29
- gem 'rubocop-rspec', '3.0.1', require: false
30
- gem 'simplecov', '0.22.0', require: false
31
- gem 'simplecov-cobertura', '2.1.0', require: false
32
- gem 'yard', '0.9.36', require: false
9
+ gem 'minitest', '~>5.24', require: false
10
+ gem 'rake', '~>13.2', require: false
11
+ gem 'rubocop', '1.74.0', require: false
12
+ gem 'rubocop-minitest', '>0', require: false
13
+ gem 'rubocop-performance', '>0', require: false
14
+ gem 'rubocop-rake', '>0', require: false
15
+ gem 'rubocop-rspec', '>0', require: false
16
+ gem 'simplecov', '~>0.22', require: false
17
+ gem 'simplecov-cobertura', '~>2.1', require: false
18
+ gem 'yard', '~>0.9', require: false
data/Gemfile.lock CHANGED
@@ -7,35 +7,47 @@ GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
9
  ast (2.4.2)
10
- docile (1.4.0)
11
- json (2.7.2)
12
- language_server-protocol (3.17.0.3)
13
- minitest (5.23.1)
14
- parallel (1.25.1)
15
- parser (3.3.2.0)
10
+ docile (1.4.1)
11
+ json (2.10.2)
12
+ language_server-protocol (3.17.0.4)
13
+ lint_roller (1.1.0)
14
+ minitest (5.25.5)
15
+ parallel (1.26.3)
16
+ parser (3.3.7.1)
16
17
  ast (~> 2.4.1)
17
18
  racc
18
- racc (1.8.0)
19
+ racc (1.8.1)
19
20
  rainbow (3.1.1)
20
21
  rake (13.2.1)
21
- regexp_parser (2.9.2)
22
- rexml (3.3.0)
23
- strscan
24
- rubocop (1.64.1)
22
+ regexp_parser (2.10.0)
23
+ rexml (3.4.1)
24
+ rubocop (1.74.0)
25
25
  json (~> 2.3)
26
- language_server-protocol (>= 3.17.0)
26
+ language_server-protocol (~> 3.17.0.2)
27
+ lint_roller (~> 1.1.0)
27
28
  parallel (~> 1.10)
28
29
  parser (>= 3.3.0.2)
29
30
  rainbow (>= 2.2.2, < 4.0)
30
- regexp_parser (>= 1.8, < 3.0)
31
- rexml (>= 3.2.5, < 4.0)
32
- rubocop-ast (>= 1.31.1, < 2.0)
31
+ regexp_parser (>= 2.9.3, < 3.0)
32
+ rubocop-ast (>= 1.38.0, < 2.0)
33
33
  ruby-progressbar (~> 1.7)
34
- unicode-display_width (>= 2.4.0, < 3.0)
35
- rubocop-ast (1.31.3)
34
+ unicode-display_width (>= 2.4.0, < 4.0)
35
+ rubocop-ast (1.40.0)
36
36
  parser (>= 3.3.1.0)
37
- rubocop-rspec (3.0.1)
38
- rubocop (~> 1.61)
37
+ rubocop-minitest (0.37.1)
38
+ lint_roller (~> 1.1)
39
+ rubocop (>= 1.72.1, < 2.0)
40
+ rubocop-ast (>= 1.38.0, < 2.0)
41
+ rubocop-performance (1.24.0)
42
+ lint_roller (~> 1.1)
43
+ rubocop (>= 1.72.1, < 2.0)
44
+ rubocop-ast (>= 1.38.0, < 2.0)
45
+ rubocop-rake (0.7.1)
46
+ lint_roller (~> 1.1)
47
+ rubocop (>= 1.72.1)
48
+ rubocop-rspec (3.5.0)
49
+ lint_roller (~> 1.1)
50
+ rubocop (~> 1.72, >= 1.72.1)
39
51
  ruby-progressbar (1.13.0)
40
52
  simplecov (0.22.0)
41
53
  docile (~> 1.1)
@@ -44,27 +56,33 @@ GEM
44
56
  simplecov-cobertura (2.1.0)
45
57
  rexml
46
58
  simplecov (~> 0.19)
47
- simplecov-html (0.12.3)
59
+ simplecov-html (0.13.1)
48
60
  simplecov_json_formatter (0.1.4)
49
- strscan (3.1.0)
50
- unicode-display_width (2.5.0)
51
- yard (0.9.36)
61
+ unicode-display_width (3.1.4)
62
+ unicode-emoji (~> 4.0, >= 4.0.4)
63
+ unicode-emoji (4.0.4)
64
+ yard (0.9.37)
52
65
 
53
66
  PLATFORMS
54
67
  arm64-darwin-22
68
+ arm64-darwin-23
69
+ arm64-darwin-24
55
70
  x64-mingw-ucrt
56
71
  x86_64-darwin-20
57
72
  x86_64-linux
58
73
 
59
74
  DEPENDENCIES
60
- minitest (= 5.23.1)
61
- rake (= 13.2.1)
62
- rubocop (= 1.64.1)
63
- rubocop-rspec (= 3.0.1)
64
- simplecov (= 0.22.0)
65
- simplecov-cobertura (= 2.1.0)
75
+ minitest (~> 5.24)
76
+ rake (~> 13.2)
77
+ rubocop (= 1.74.0)
78
+ rubocop-minitest (> 0)
79
+ rubocop-performance (> 0)
80
+ rubocop-rake (> 0)
81
+ rubocop-rspec (> 0)
82
+ simplecov (~> 0.22)
83
+ simplecov-cobertura (~> 2.1)
66
84
  tago!
67
- yard (= 0.9.36)
85
+ yard (~> 0.9)
68
86
 
69
87
  BUNDLED WITH
70
- 2.4.22
88
+ 2.5.16
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2024 Yegor Bugayenko
3
+ Copyright (c) 2024-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)
2
+
3
+ Copyright (c) 2024-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 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 CHANGED
@@ -11,6 +11,12 @@
11
11
  [![Hits-of-Code](https://hitsofcode.com/github/yegor256/tago)](https://hitsofcode.com/view/github/yegor256/tago)
12
12
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/tago/blob/master/LICENSE.txt)
13
13
 
14
+ First, install it:
15
+
16
+ ```bash
17
+ gem install tago
18
+ ```
19
+
14
20
  Here is how you use it:
15
21
 
16
22
  ```ruby
@@ -19,11 +25,20 @@ start = Time.now
19
25
  puts "It took #{start.ago} to do it"
20
26
  ```
21
27
 
28
+ It's also possible to convert Float seconds to text:
29
+
30
+ ```ruby
31
+ s = Time.now - start
32
+ puts "It took #{s.seconds}"
33
+ ```
34
+
35
+ The gem basically extends the `Float` and `Time` classes with new methods.
36
+
22
37
  ## How to contribute
23
38
 
24
39
  Read
25
40
  [these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).
26
- Make sure you build is green before you contribute
41
+ Make sure your build is green before you contribute
27
42
  your pull request. You will need to have
28
43
  [Ruby](https://www.ruby-lang.org/en/) 3.2+ and
29
44
  [Bundler](https://bundler.io/) installed. Then:
data/REUSE.toml ADDED
@@ -0,0 +1,34 @@
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
+ "**.txt",
10
+ "**/*.csv",
11
+ "**/*.jpg",
12
+ "**/*.json",
13
+ "**/*.md",
14
+ "**/*.pdf",
15
+ "**/*.png",
16
+ "**/*.svg",
17
+ "**/*.txt",
18
+ "**/*.vm",
19
+ "**/.DS_Store",
20
+ "**/.gitignore",
21
+ "**/.pdd",
22
+ "**/CNAME",
23
+ "**/Gemfile.lock",
24
+ ".DS_Store",
25
+ ".gitattributes",
26
+ ".gitignore",
27
+ ".pdd",
28
+ "Gemfile.lock",
29
+ "README.md",
30
+ "renovate.json",
31
+ ]
32
+ precedence = "override"
33
+ SPDX-FileCopyrightText = "Copyright (c) 2025 Yegor Bugayenko"
34
+ SPDX-License-Identifier = "MIT"
data/Rakefile CHANGED
@@ -1,24 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 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) 2024-2025 Yegor Bugayenko
4
+ # SPDX-License-Identifier: MIT
22
5
 
23
6
  require 'rubygems'
24
7
  require 'rake'
@@ -32,7 +15,7 @@ def version
32
15
  Gem::Specification.load(Dir['*.gemspec'].first).version
33
16
  end
34
17
 
35
- task default: %i[clean test rubocop yard copyright]
18
+ task default: %i[clean test rubocop yard]
36
19
 
37
20
  require 'rake/testtask'
38
21
  desc 'Run all unit tests'
@@ -56,11 +39,3 @@ RuboCop::RakeTask.new(:rubocop) do |task|
56
39
  task.fail_on_error = true
57
40
  task.requires << 'rubocop-rspec'
58
41
  end
59
-
60
- task :copyright do
61
- sh "grep -q -r '#{Date.today.strftime('%Y')}' \
62
- --include '*.rb' \
63
- --include '*.txt' \
64
- --include 'Rakefile' \
65
- ."
66
- end
data/lib/tago.rb CHANGED
@@ -1,35 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2024 Yegor Bugayenko
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software ansassociatesdocumentation 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, ansto permit persons to whom the Software is
10
- # furnishesto do so, subject to the following conditions:
11
- #
12
- # The above copyright notice ansthis permission notice shall be includesin 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 NONINFINGEMENT. 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) 2024-2025 Yegor Bugayenko
4
+ # SPDX-License-Identifier: MIT
22
5
 
23
6
  require 'time'
24
7
 
25
- # A new methosto print time as text.
8
+ # A new method to print time as text.
26
9
  #
27
10
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
28
- # Copyright:: Copyright (c) 2024 Yegor Bugayenko
11
+ # Copyright:: Copyright (c) 2024-2025 Yegor Bugayenko
29
12
  # License:: MIT
30
- class Time
31
- def ago(now = Time.now)
32
- s = now - self
13
+ class Float
14
+ def seconds
15
+ s = self
33
16
  s = -s if s.negative?
34
17
  if s < 0.001
35
18
  format('%dμs', s * 1000 * 1000)
@@ -55,3 +38,14 @@ class Time
55
38
  end
56
39
  end
57
40
  end
41
+
42
+ # A new method to print time as text.
43
+ #
44
+ # Author:: Yegor Bugayenko (yegor256@gmail.com)
45
+ # Copyright:: Copyright (c) 2024-2025 Yegor Bugayenko
46
+ # License:: MIT
47
+ class Time
48
+ def ago(now = Time.now)
49
+ (now - self).seconds
50
+ end
51
+ end
data/tago.gemspec CHANGED
@@ -1,24 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 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) 2024-2025 Yegor Bugayenko
4
+ # SPDX-License-Identifier: MIT
22
5
 
23
6
  require 'English'
24
7
  require_relative 'lib/tago'
@@ -27,7 +10,7 @@ Gem::Specification.new do |s|
27
10
  s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
28
11
  s.required_ruby_version = '>=3.0'
29
12
  s.name = 'tago'
30
- s.version = '0.0.2'
13
+ s.version = '0.1.0'
31
14
  s.license = 'MIT'
32
15
  s.summary = 'A new .ago() method for the Time class'
33
16
  s.description =
data/test/test__helper.rb CHANGED
@@ -1,24 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 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 NONINFINGEMENT. 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) 2024-2025 Yegor Bugayenko
4
+ # SPDX-License-Identifier: MIT
22
5
 
23
6
  $stdout.sync = true
24
7
 
data/test/test_tago.rb CHANGED
@@ -1,31 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 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 NONINFINGEMENT. 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) 2024-2025 Yegor Bugayenko
4
+ # SPDX-License-Identifier: MIT
22
5
 
23
6
  require 'minitest/autorun'
24
7
  require_relative '../lib/tago'
25
8
 
26
9
  # Main test.
27
10
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
28
- # Copyright:: Copyright (c) 2024 Yegor Bugayenko
11
+ # Copyright:: Copyright (c) 2024-2025 Yegor Bugayenko
29
12
  # License:: MIT
30
13
  class TestTago < Minitest::Test
31
14
  def test_simple_printing
@@ -50,4 +33,13 @@ class TestTago < Minitest::Test
50
33
  assert_equal('5d0h', (t + (5 * 24 * 60 * 60)).ago(t))
51
34
  assert_equal('22w1d', (t + (155 * 24 * 60 * 60)).ago(t))
52
35
  end
36
+
37
+ def test_float_to_seconds
38
+ assert_equal('18ms', 0.018.seconds)
39
+ assert_equal('2s330ms', 2.33.seconds)
40
+ assert_equal('69s', 69.17.seconds)
41
+ assert_equal('12h6m', (12.1 * 60 * 60).seconds)
42
+ assert_equal('5d7h', (5.3 * 24 * 60 * 60).seconds)
43
+ assert_equal('19w0d', ((132.6 * 24 * 60 * 60) + (23 * 60 * 60)).seconds)
44
+ end
53
45
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tago
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-06-13 00:00:00.000000000 Z
10
+ date: 2025-03-19 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: This simple gem adds a new supplementary method .ago() to the existing
14
13
  class Time, thus making logging more convenient
@@ -27,6 +26,7 @@ files:
27
26
  - ".github/workflows/markdown-lint.yml"
28
27
  - ".github/workflows/pdd.yml"
29
28
  - ".github/workflows/rake.yml"
29
+ - ".github/workflows/reuse.yml"
30
30
  - ".github/workflows/xcop.yml"
31
31
  - ".github/workflows/yamllint.yml"
32
32
  - ".gitignore"
@@ -38,7 +38,9 @@ files:
38
38
  - Gemfile
39
39
  - Gemfile.lock
40
40
  - LICENSE.txt
41
+ - LICENSES/MIT.txt
41
42
  - README.md
43
+ - REUSE.toml
42
44
  - Rakefile
43
45
  - lib/tago.rb
44
46
  - renovate.json
@@ -50,7 +52,6 @@ licenses:
50
52
  - MIT
51
53
  metadata:
52
54
  rubygems_mfa_required: 'true'
53
- post_install_message:
54
55
  rdoc_options:
55
56
  - "--charset=UTF-8"
56
57
  require_paths:
@@ -66,8 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
67
  - !ruby/object:Gem::Version
67
68
  version: '0'
68
69
  requirements: []
69
- rubygems_version: 3.4.10
70
- signing_key:
70
+ rubygems_version: 3.6.2
71
71
  specification_version: 4
72
72
  summary: A new .ago() method for the Time class
73
73
  test_files: []