telepost 0.3.2 → 0.4.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: cdead157318cc6dc047c19b372c7f488d111e869a86bfd435d9e5577fc3c07f9
4
- data.tar.gz: e13c181e9352426f91c6d61c11fde3a9e5997eaf8a79156a328cfb16c552a96f
3
+ metadata.gz: '0831c6d5e4388551579018345287cc6bc869610795abb994815ca530601c1eb3'
4
+ data.tar.gz: a90e179dc5b4241bb4ff3279542e8c3fc63dfc9bfbaa0313e3314ea392faf110
5
5
  SHA512:
6
- metadata.gz: 7d31175e0889f2f5842101116165c3bf3fe0c646d8dec336f48a289a69a23914e32dc966b57990d1148ba46a95c7b888324f344bcb3501f10483407f551340ef
7
- data.tar.gz: 8c348b5bf2b689d4f9ac4bd17f772721c785f7fb482004ff967c5ffc66b66a0d42287b5b3b77b470378f372b7886a4d99ca95ee40a2eb3555682c0359871a487
6
+ metadata.gz: 3736347a28810f3433c4319b16c46dc1d550e4ee85e9885a7540cd9c7b98fa1a9fca5da1b3ab4cdcc4631d121d591cc233f0f19d3cc68c08c8ab073eee24e4c5
7
+ data.tar.gz: 4fcc75ad584f8161de7bcf59dd18cee662f49840e3e2ebbdd9a80483225d7661ce02bc1db0cf3e874369c475a5ae6cc99b99ebe4a442bbe3390d477e64865285
data/.0pdd.yml CHANGED
@@ -1,8 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2018-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.
22
+ ---
1
23
  errors:
2
24
  - yegor256@gmail.com
3
- # alerts:
4
- # github:
5
- # - yegor256
6
25
 
7
26
  tags:
8
27
  - pdd
@@ -0,0 +1,41 @@
1
+ # Copyright (c) 2018-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.
20
+ ---
21
+ name: actionlint
22
+ 'on':
23
+ push:
24
+ branches:
25
+ - master
26
+ pull_request:
27
+ branches:
28
+ - master
29
+ jobs:
30
+ actionlint:
31
+ runs-on: ubuntu-22.04
32
+ steps:
33
+ - uses: actions/checkout@v4
34
+ - name: Download actionlint
35
+ id: get_actionlint
36
+ # yamllint disable-line rule:line-length
37
+ run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
38
+ shell: bash
39
+ - name: Check workflow files
40
+ run: ${{ steps.get_actionlint.outputs.executable }} -color
41
+ shell: bash
@@ -0,0 +1,38 @@
1
+ # Copyright (c) 2018-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.
20
+ ---
21
+ name: codecov
22
+ on:
23
+ push:
24
+ branches:
25
+ - master
26
+ jobs:
27
+ codecov:
28
+ runs-on: ubuntu-22.04
29
+ steps:
30
+ - uses: actions/checkout@v4
31
+ - uses: ruby/setup-ruby@v1
32
+ with:
33
+ ruby-version: 3.2
34
+ - run: bundle update
35
+ - run: bundle exec rake
36
+ - uses: codecov/codecov-action@v4
37
+ with:
38
+ token: ${{ secrets.CODECOV_TOKEN }}
@@ -0,0 +1,30 @@
1
+ # Copyright (c) 2018-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.
20
+ ---
21
+ name: copyrights
22
+ 'on':
23
+ push:
24
+ pull_request:
25
+ jobs:
26
+ copyrights:
27
+ runs-on: ubuntu-22.04
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+ - uses: yegor256/copyrights-action@0.0.4
@@ -0,0 +1,38 @@
1
+ # Copyright (c) 2018-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.
20
+ ---
21
+ name: markdown-lint
22
+ 'on':
23
+ push:
24
+ branches:
25
+ - master
26
+ pull_request:
27
+ branches:
28
+ - master
29
+ paths-ignore: ['paper/**', 'sandbox/**']
30
+ concurrency:
31
+ group: markdown-lint-${{ github.ref }}
32
+ cancel-in-progress: true
33
+ jobs:
34
+ markdown-lint:
35
+ runs-on: ubuntu-22.04
36
+ steps:
37
+ - uses: actions/checkout@v4
38
+ - uses: articulate/actions-markdownlint@v1
@@ -0,0 +1,34 @@
1
+ # Copyright (c) 2018-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.
20
+ ---
21
+ name: pdd
22
+ on:
23
+ push:
24
+ branches:
25
+ - master
26
+ pull_request:
27
+ branches:
28
+ - master
29
+ jobs:
30
+ pdd:
31
+ runs-on: ubuntu-22.04
32
+ steps:
33
+ - uses: actions/checkout@v4
34
+ - uses: volodya-lombrozo/pdd-action@master
@@ -0,0 +1,43 @@
1
+ # Copyright (c) 2018-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.
20
+ ---
21
+ name: rake
22
+ on:
23
+ push:
24
+ branches:
25
+ - master
26
+ pull_request:
27
+ branches:
28
+ - master
29
+ jobs:
30
+ test:
31
+ name: test
32
+ strategy:
33
+ matrix:
34
+ os: [ubuntu-20.04, macos-12, windows-2022]
35
+ ruby: [3.2, 3.3]
36
+ runs-on: ${{ matrix.os }}
37
+ steps:
38
+ - uses: actions/checkout@v4
39
+ - uses: ruby/setup-ruby@v1
40
+ with:
41
+ ruby-version: ${{ matrix.ruby }}
42
+ - run: bundle update
43
+ - run: bundle exec rake
@@ -0,0 +1,30 @@
1
+ # Copyright (c) 2018-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.
20
+ ---
21
+ name: xcop
22
+ on:
23
+ push:
24
+ pull_request:
25
+ jobs:
26
+ xcop:
27
+ runs-on: ubuntu-22.04
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+ - uses: g4s8/xcop-action@master
data/.gitignore CHANGED
@@ -1,6 +1,7 @@
1
- Gemfile.lock
2
1
  *.gem
3
2
  .bundle/
4
3
  .DS_Store
5
4
  rdoc/
6
5
  .idea/
6
+ .yardoc/
7
+ doc/
data/.rubocop.yml CHANGED
@@ -1,6 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2018-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.
22
+ ---
1
23
  AllCops:
24
+ Exclude:
25
+ - 'bin/**/*'
26
+ - 'assets/**/*'
27
+ - 'vendor/**/*'
28
+ - 'j/**/*'
2
29
  DisplayCopNames: true
3
- TargetRubyVersion: 2.5
30
+ TargetRubyVersion: 3.2
31
+ NewCops: enable
32
+ SuggestExtensions: false
4
33
 
5
34
  Layout/EmptyLineAfterGuardClause:
6
35
  Enabled: false
@@ -16,5 +45,5 @@ Metrics/PerceivedComplexity:
16
45
  Max: 10
17
46
  Metrics/ParameterLists:
18
47
  Max: 10
19
- Layout/AlignParameters:
48
+ Layout/ParameterAlignment:
20
49
  Enabled: false
data/.rultor.yml CHANGED
@@ -1,12 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2018-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.
22
+ ---
23
+ docker:
24
+ image: yegor256/rultor-image:1.23.1
1
25
  assets:
2
26
  rubygems.yml: yegor256/home#assets/rubygems.yml
3
27
  install: |-
4
- export GEM_HOME=~/.ruby
5
- export GEM_PATH=$GEM_HOME:$GEM_PATH
28
+ pdd -f /dev/null
29
+ sudo bundle install --no-color "--gemfile=$(pwd)/Gemfile"
6
30
  release:
31
+ pre: false
7
32
  script: |-
8
- bundle install
9
- rake
33
+ bundle exec rake
10
34
  rm -rf *.gem
11
35
  sed -i "s/0\.0\.0/${tag}/g" telepost.gemspec
12
36
  git add telepost.gemspec
@@ -14,13 +38,6 @@ release:
14
38
  gem build telepost.gemspec
15
39
  chmod 0600 ../rubygems.yml
16
40
  gem push *.gem --config-file ../rubygems.yml
17
- commanders:
18
- - yegor256
19
- architect:
20
- - yegor256
21
41
  merge:
22
- commanders: []
23
42
  script: |-
24
- bundle install
25
43
  bundle exec rake
26
- deploy: {}
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2018-2019 Yegor Bugayenko
3
+ # Copyright (c) 2018-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.24.1', require: false
27
+ gem 'rake', '13.2.1', require: false
28
+ gem 'rubocop', '1.65.0', require: false
29
+ gem 'rubocop-rspec', '3.0.2', require: false
30
+ gem 'simplecov', '0.22.0', require: false
31
+ gem 'yard', '0.9.36', require: false
data/Gemfile.lock ADDED
@@ -0,0 +1,110 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ telepost (0.0.0)
5
+ telebot (= 0.1.2)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ ast (2.4.2)
11
+ axiom-types (0.1.1)
12
+ descendants_tracker (~> 0.0.4)
13
+ ice_nine (~> 0.11.0)
14
+ thread_safe (~> 0.3, >= 0.3.1)
15
+ coercible (1.0.0)
16
+ descendants_tracker (~> 0.0.1)
17
+ descendants_tracker (0.0.4)
18
+ thread_safe (~> 0.3, >= 0.3.1)
19
+ docile (1.4.0)
20
+ faraday (1.10.3)
21
+ faraday-em_http (~> 1.0)
22
+ faraday-em_synchrony (~> 1.0)
23
+ faraday-excon (~> 1.1)
24
+ faraday-httpclient (~> 1.0)
25
+ faraday-multipart (~> 1.0)
26
+ faraday-net_http (~> 1.0)
27
+ faraday-net_http_persistent (~> 1.0)
28
+ faraday-patron (~> 1.0)
29
+ faraday-rack (~> 1.0)
30
+ faraday-retry (~> 1.0)
31
+ ruby2_keywords (>= 0.0.4)
32
+ faraday-em_http (1.0.0)
33
+ faraday-em_synchrony (1.0.0)
34
+ faraday-excon (1.1.0)
35
+ faraday-httpclient (1.0.1)
36
+ faraday-multipart (1.0.4)
37
+ multipart-post (~> 2)
38
+ faraday-net_http (1.0.1)
39
+ faraday-net_http_persistent (1.2.0)
40
+ faraday-patron (1.0.0)
41
+ faraday-rack (1.0.0)
42
+ faraday-retry (1.0.3)
43
+ faraday_middleware (1.2.0)
44
+ faraday (~> 1.0)
45
+ ice_nine (0.11.2)
46
+ json (2.7.2)
47
+ language_server-protocol (3.17.0.3)
48
+ minitest (5.24.1)
49
+ multipart-post (2.4.1)
50
+ parallel (1.25.1)
51
+ parser (3.3.4.0)
52
+ ast (~> 2.4.1)
53
+ racc
54
+ racc (1.8.0)
55
+ rainbow (3.1.1)
56
+ rake (13.2.1)
57
+ regexp_parser (2.9.2)
58
+ rexml (3.3.1)
59
+ strscan
60
+ rubocop (1.65.0)
61
+ json (~> 2.3)
62
+ language_server-protocol (>= 3.17.0)
63
+ parallel (~> 1.10)
64
+ parser (>= 3.3.0.2)
65
+ rainbow (>= 2.2.2, < 4.0)
66
+ regexp_parser (>= 2.4, < 3.0)
67
+ rexml (>= 3.2.5, < 4.0)
68
+ rubocop-ast (>= 1.31.1, < 2.0)
69
+ ruby-progressbar (~> 1.7)
70
+ unicode-display_width (>= 2.4.0, < 3.0)
71
+ rubocop-ast (1.31.3)
72
+ parser (>= 3.3.1.0)
73
+ rubocop-rspec (3.0.2)
74
+ rubocop (~> 1.61)
75
+ ruby-progressbar (1.13.0)
76
+ ruby2_keywords (0.0.5)
77
+ simplecov (0.22.0)
78
+ docile (~> 1.1)
79
+ simplecov-html (~> 0.11)
80
+ simplecov_json_formatter (~> 0.1)
81
+ simplecov-html (0.12.3)
82
+ simplecov_json_formatter (0.1.4)
83
+ strscan (3.1.0)
84
+ telebot (0.1.2)
85
+ faraday
86
+ faraday_middleware
87
+ virtus
88
+ thread_safe (0.3.6)
89
+ unicode-display_width (2.5.0)
90
+ virtus (2.0.0)
91
+ axiom-types (~> 0.1)
92
+ coercible (~> 1.0)
93
+ descendants_tracker (~> 0.0, >= 0.0.3)
94
+ yard (0.9.36)
95
+
96
+ PLATFORMS
97
+ arm64-darwin-22
98
+ ruby
99
+
100
+ DEPENDENCIES
101
+ minitest (= 5.24.1)
102
+ rake (= 13.2.1)
103
+ rubocop (= 1.65.0)
104
+ rubocop-rspec (= 3.0.2)
105
+ simplecov (= 0.22.0)
106
+ telepost!
107
+ yard (= 0.9.36)
108
+
109
+ BUNDLED WITH
110
+ 2.5.6
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) 2018-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
data/README.md CHANGED
@@ -1,24 +1,24 @@
1
- <img src="/logo.svg" width="64px" height="64px"/>
1
+ # Ruby Telegram Client
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/telepost)](http://www.rultor.com/p/yegor256/telepost)
5
5
  [![We recommend RubyMine](https://www.elegantobjects.org/rubymine.svg)](https://www.jetbrains.com/ruby/)
6
6
 
7
- [![Build Status](https://travis-ci.org/yegor256/telepost.svg)](https://travis-ci.org/yegor256/telepost)
7
+ [![rake](https://github.com/yegor256/telepost/actions/workflows/rake.yml/badge.svg)](https://github.com/yegor256/telepost/actions/workflows/rake.yml)
8
8
  [![Gem Version](https://badge.fury.io/rb/telepost.svg)](http://badge.fury.io/rb/telepost)
9
9
  [![Maintainability](https://api.codeclimate.com/v1/badges/21aec58faee3866bdfbb/maintainability)](https://codeclimate.com/github/yegor256/telepost/maintainability)
10
10
  [![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/github/yegor256/telepost/master/frames)
11
-
12
11
  [![Hits-of-Code](https://hitsofcode.com/github/yegor256/telepost)](https://hitsofcode.com/view/github/yegor256/telepost)
13
12
 
14
- Telepost is a simple gateway to Telegram, which can post messages and respond to primitive requests.
13
+ Telepost is a simple gateway to Telegram, which can post messages
14
+ and respond to primitive requests.
15
15
 
16
16
  First, get your token from [@BotFather](https://t.me/BotFather).
17
17
 
18
18
  Then, install it:
19
19
 
20
20
  ```bash
21
- $ gem install telepost
21
+ gem install telepost
22
22
  ```
23
23
 
24
24
  Then, use it like this:
@@ -50,14 +50,16 @@ That's it.
50
50
 
51
51
  ## How to contribute
52
52
 
53
- Read [these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).
53
+ Read
54
+ [these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).
54
55
  Make sure you build is green before you contribute
55
- your pull request. You will need to have [Ruby](https://www.ruby-lang.org/en/) 2.3+ and
56
+ your pull request. You will need to have
57
+ [Ruby](https://www.ruby-lang.org/en/) 2.3+ and
56
58
  [Bundler](https://bundler.io/) installed. Then:
57
59
 
58
- ```
59
- $ bundle update
60
- $ bundle exec rake
60
+ ```bash
61
+ bundle update
62
+ bundle exec rake
61
63
  ```
62
64
 
63
65
  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) 2018-2019 Yegor Bugayenko
3
+ # Copyright (c) 2018-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
@@ -34,7 +34,7 @@ def version
34
34
  Gem::Specification.load(Dir['*.gemspec'].first).version
35
35
  end
36
36
 
37
- task default: %i[clean test rubocop]
37
+ task default: %i[clean test yard rubocop]
38
38
 
39
39
  require 'rake/testtask'
40
40
  desc 'Run all unit tests'
@@ -44,16 +44,15 @@ Rake::TestTask.new(:test) do |test|
44
44
  test.verbose = false
45
45
  end
46
46
 
47
- require 'rdoc/task'
48
- RDoc::Task.new do |rdoc|
49
- rdoc.main = 'README.md'
50
- rdoc.rdoc_dir = 'rdoc'
51
- rdoc.rdoc_files.include('README.md', 'lib/**/*.rb')
52
- end
53
-
54
47
  require 'rubocop/rake_task'
55
48
  desc 'Run RuboCop on all directories'
56
49
  RuboCop::RakeTask.new(:rubocop) do |task|
57
50
  task.fail_on_error = true
58
51
  task.requires << 'rubocop-rspec'
59
52
  end
53
+
54
+ require 'yard'
55
+ desc 'Build Yard documentation'
56
+ YARD::Rake::YardocTask.new do |t|
57
+ t.files = ['lib/**/*.rb']
58
+ end
data/lib/telepost.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # (The MIT License)
4
4
  #
5
- # Copyright (c) 2018-2019 Yegor Bugayenko
5
+ # Copyright (c) 2018-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
@@ -37,12 +37,13 @@ require 'telebot'
37
37
  # {README}[https://github.com/yegor256/telepost/blob/master/README.md] file.
38
38
  #
39
39
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
40
- # Copyright:: Copyright (c) 2018-2019 Yegor Bugayenko
40
+ # Copyright:: Copyright (c) 2018-2024 Yegor Bugayenko
41
41
  # License:: MIT
42
42
  class Telepost
43
43
  # Fake one
44
44
  class Fake
45
45
  attr_reader :sent
46
+
46
47
  def initialize
47
48
  @sent = []
48
49
  end
@@ -117,6 +118,6 @@ class Telepost
117
118
  text: msg
118
119
  )
119
120
  rescue Telebot::Error => e
120
- raise CantPost, "#{e.message}: \"#{msg}\""
121
+ raise CantPost, "#{e.message}, can't post this message: \"#{msg}\""
121
122
  end
122
123
  end
data/renovate.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "extends": [
4
+ "config:base"
5
+ ]
6
+ }
data/telepost.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # (The MIT License)
4
4
  #
5
- # Copyright (c) 2018-2019 Yegor Bugayenko
5
+ # Copyright (c) 2018-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
@@ -23,15 +23,12 @@
23
23
  # SOFTWARE.
24
24
 
25
25
  require 'English'
26
+
26
27
  Gem::Specification.new do |s|
27
- s.specification_version = 2 if s.respond_to? :specification_version=
28
- if s.respond_to? :required_rubygems_version=
29
- s.required_rubygems_version = Gem::Requirement.new('>= 0')
30
- end
31
- s.rubygems_version = '2.5.1'
32
- s.required_ruby_version = '>=2.5'
28
+ s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
29
+ s.required_ruby_version = '>=3.2'
33
30
  s.name = 'telepost'
34
- s.version = '0.3.2'
31
+ s.version = '0.4.0'
35
32
  s.license = 'MIT'
36
33
  s.summary = 'Simple Telegram posting Ruby gem'
37
34
  s.description = 'Simple Telegram posting Ruby gem'
@@ -39,13 +36,8 @@ Gem::Specification.new do |s|
39
36
  s.email = 'yegor256@gmail.com'
40
37
  s.homepage = 'http://github.com/yegor256/telepost'
41
38
  s.files = `git ls-files`.split($RS)
42
- s.test_files = s.files.grep(%r{^(test)/})
43
39
  s.rdoc_options = ['--charset=UTF-8']
44
40
  s.extra_rdoc_files = ['README.md']
45
- s.add_runtime_dependency 'telebot', '0.1.2'
46
- s.add_development_dependency 'minitest', '5.11.3'
47
- s.add_development_dependency 'rake', '12.3.1'
48
- s.add_development_dependency 'rdoc', '4.3.0'
49
- s.add_development_dependency 'rubocop', '0.62.0'
50
- s.add_development_dependency 'rubocop-rspec', '1.31.0'
41
+ s.add_dependency 'telebot', '0.1.2'
42
+ s.metadata['rubygems_mfa_required'] = 'true'
51
43
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  # (The MIT License)
4
4
  #
5
- # Copyright (c) 2018-2019 Yegor Bugayenko
5
+ # Copyright (c) 2018-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
@@ -27,7 +27,7 @@ require_relative '../lib/telepost'
27
27
 
28
28
  # Telepost test.
29
29
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
30
- # Copyright:: Copyright (c) 2018-2019 Yegor Bugayenko
30
+ # Copyright:: Copyright (c) 2018-2024 Yegor Bugayenko
31
31
  # License:: MIT
32
32
  class TelepostTest < Minitest::Test
33
33
  def test_fake_posting
@@ -36,4 +36,13 @@ class TelepostTest < Minitest::Test
36
36
  tp.post('This is', 'a simple', 'message')
37
37
  assert_equal(1, tp.sent.count)
38
38
  end
39
+
40
+ def test_real_posting
41
+ skip
42
+ tp = Telepost.new(
43
+ '1088589765:...',
44
+ chats: [-1_001_438_256_738] # codexia channel
45
+ )
46
+ tp.spam('This is just a test message')
47
+ end
39
48
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telepost
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-13 00:00:00.000000000 Z
11
+ date: 2024-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: telebot
@@ -24,76 +24,6 @@ dependencies:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.1.2
27
- - !ruby/object:Gem::Dependency
28
- name: minitest
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - '='
32
- - !ruby/object:Gem::Version
33
- version: 5.11.3
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - '='
39
- - !ruby/object:Gem::Version
40
- version: 5.11.3
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - '='
46
- - !ruby/object:Gem::Version
47
- version: 12.3.1
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - '='
53
- - !ruby/object:Gem::Version
54
- version: 12.3.1
55
- - !ruby/object:Gem::Dependency
56
- name: rdoc
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - '='
60
- - !ruby/object:Gem::Version
61
- version: 4.3.0
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - '='
67
- - !ruby/object:Gem::Version
68
- version: 4.3.0
69
- - !ruby/object:Gem::Dependency
70
- name: rubocop
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - '='
74
- - !ruby/object:Gem::Version
75
- version: 0.62.0
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - '='
81
- - !ruby/object:Gem::Version
82
- version: 0.62.0
83
- - !ruby/object:Gem::Dependency
84
- name: rubocop-rspec
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - '='
88
- - !ruby/object:Gem::Version
89
- version: 1.31.0
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - '='
95
- - !ruby/object:Gem::Version
96
- version: 1.31.0
97
27
  description: Simple Telegram posting Ruby gem
98
28
  email: yegor256@gmail.com
99
29
  executables: []
@@ -102,24 +32,32 @@ extra_rdoc_files:
102
32
  - README.md
103
33
  files:
104
34
  - ".0pdd.yml"
35
+ - ".github/workflows/actionlint.yml"
36
+ - ".github/workflows/codecov.yml"
37
+ - ".github/workflows/copyrights.yml"
38
+ - ".github/workflows/markdown-lint.yml"
39
+ - ".github/workflows/pdd.yml"
40
+ - ".github/workflows/rake.yml"
41
+ - ".github/workflows/xcop.yml"
105
42
  - ".gitignore"
106
43
  - ".pdd"
107
44
  - ".rubocop.yml"
108
45
  - ".rultor.yml"
109
- - ".travis.yml"
110
46
  - Gemfile
47
+ - Gemfile.lock
111
48
  - LICENSE.txt
112
49
  - README.md
113
50
  - Rakefile
114
- - appveyor.yml
115
51
  - lib/telepost.rb
116
52
  - logo.svg
53
+ - renovate.json
117
54
  - telepost.gemspec
118
55
  - test/test_telepost.rb
119
56
  homepage: http://github.com/yegor256/telepost
120
57
  licenses:
121
58
  - MIT
122
- metadata: {}
59
+ metadata:
60
+ rubygems_mfa_required: 'true'
123
61
  post_install_message:
124
62
  rdoc_options:
125
63
  - "--charset=UTF-8"
@@ -129,16 +67,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
129
67
  requirements:
130
68
  - - ">="
131
69
  - !ruby/object:Gem::Version
132
- version: '2.5'
70
+ version: '3.2'
133
71
  required_rubygems_version: !ruby/object:Gem::Requirement
134
72
  requirements:
135
73
  - - ">="
136
74
  - !ruby/object:Gem::Version
137
75
  version: '0'
138
76
  requirements: []
139
- rubygems_version: 3.0.1
77
+ rubygems_version: 3.4.10
140
78
  signing_key:
141
- specification_version: 2
79
+ specification_version: 4
142
80
  summary: Simple Telegram posting Ruby gem
143
- test_files:
144
- - test/test_telepost.rb
81
+ test_files: []
data/.travis.yml DELETED
@@ -1,12 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.6.0
4
- branches:
5
- only:
6
- - master
7
- install:
8
- - bundle install
9
- script:
10
- - set -e
11
- - rake
12
-
data/appveyor.yml DELETED
@@ -1,38 +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: "23-x64"
13
- - ruby_version: "24-x64"
14
- - ruby_version: "25-x64"
15
- install:
16
- - ps: |
17
- $Env:PATH = "C:\Ruby${Env:ruby_version}\bin;${Env:PATH}"
18
- if ($Env:ruby_version -match "^23" ) {
19
- # RubyInstaller; download OpenSSL headers from OpenKnapsack Project
20
- $Env:openssl_dir = "C:\Ruby${Env:ruby_version}"
21
- appveyor DownloadFile http://dl.bintray.com/oneclick/OpenKnapsack/x64/openssl-1.0.2j-x64-windows.tar.lzma
22
- 7z e openssl-1.0.2j-x64-windows.tar.lzma
23
- 7z x -y -oC:\Ruby${Env:ruby_version} openssl-1.0.2j-x64-windows.tar
24
- } else {
25
- # RubyInstaller2; openssl package seems to be installed already
26
- $Env:openssl_dir = "C:\msys64\mingw64"
27
- }
28
- - bundle config --local path vendor/bundle
29
- - bundle config build.openssl --with-openssl-dir=%openssl_dir%
30
- - ruby -v
31
- - bundle -v
32
- build_script:
33
- - bundle update
34
- - bundle install
35
- test_script:
36
- - bundle exec rake --quiet
37
- cache:
38
- - vendor/bundle