telepost 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.0pdd.yml +22 -3
- data/.github/workflows/actionlint.yml +41 -0
- data/.github/workflows/codecov.yml +38 -0
- data/.github/workflows/copyrights.yml +30 -0
- data/.github/workflows/markdown-lint.yml +38 -0
- data/.github/workflows/pdd.yml +34 -0
- data/.github/workflows/rake.yml +43 -0
- data/.github/workflows/xcop.yml +30 -0
- data/.gitignore +2 -1
- data/.rubocop.yml +31 -2
- data/.rultor.yml +29 -12
- data/Gemfile +8 -2
- data/Gemfile.lock +110 -0
- data/LICENSE.txt +21 -0
- data/README.md +19 -37
- data/Rakefile +8 -9
- data/lib/telepost.rb +6 -5
- data/logo.svg +19 -0
- data/renovate.json +6 -0
- data/telepost.gemspec +7 -15
- data/test/test_telepost.rb +11 -2
- metadata +19 -80
- data/.travis.yml +0 -12
- data/appveyor.yml +0 -38
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0831c6d5e4388551579018345287cc6bc869610795abb994815ca530601c1eb3'
|
4
|
+
data.tar.gz: a90e179dc5b4241bb4ff3279542e8c3fc63dfc9bfbaa0313e3314ea392faf110
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
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
|
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/
|
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
|
-
rubygems.yml:
|
26
|
+
rubygems.yml: yegor256/home#assets/rubygems.yml
|
3
27
|
install: |-
|
4
|
-
|
5
|
-
|
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
|
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-
|
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
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
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
|
13
|
+
in all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
@@ -1,20 +1,24 @@
|
|
1
|
-
|
1
|
+
# Ruby Telegram Client
|
2
|
+
|
3
|
+
[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)
|
2
4
|
[![DevOps By Rultor.com](http://www.rultor.com/b/yegor256/telepost)](http://www.rultor.com/p/yegor256/telepost)
|
3
|
-
[![We recommend RubyMine](
|
5
|
+
[![We recommend RubyMine](https://www.elegantobjects.org/rubymine.svg)](https://www.jetbrains.com/ruby/)
|
4
6
|
|
5
|
-
[![
|
7
|
+
[![rake](https://github.com/yegor256/telepost/actions/workflows/rake.yml/badge.svg)](https://github.com/yegor256/telepost/actions/workflows/rake.yml)
|
6
8
|
[![Gem Version](https://badge.fury.io/rb/telepost.svg)](http://badge.fury.io/rb/telepost)
|
7
9
|
[![Maintainability](https://api.codeclimate.com/v1/badges/21aec58faee3866bdfbb/maintainability)](https://codeclimate.com/github/yegor256/telepost/maintainability)
|
8
10
|
[![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/github/yegor256/telepost/master/frames)
|
11
|
+
[![Hits-of-Code](https://hitsofcode.com/github/yegor256/telepost)](https://hitsofcode.com/view/github/yegor256/telepost)
|
9
12
|
|
10
|
-
Telepost is a simple gateway to Telegram, which can post messages
|
13
|
+
Telepost is a simple gateway to Telegram, which can post messages
|
14
|
+
and respond to primitive requests.
|
11
15
|
|
12
16
|
First, get your token from [@BotFather](https://t.me/BotFather).
|
13
17
|
|
14
18
|
Then, install it:
|
15
19
|
|
16
20
|
```bash
|
17
|
-
|
21
|
+
gem install telepost
|
18
22
|
```
|
19
23
|
|
20
24
|
Then, use it like this:
|
@@ -24,10 +28,10 @@ require 'telepost'
|
|
24
28
|
tp = Telepost.new('..token..')
|
25
29
|
Thread.start do
|
26
30
|
tp.run do |chat, msg|
|
27
|
-
tp.post(chat
|
31
|
+
tp.post(chat, 'Thanks for talking to me!')
|
28
32
|
end
|
29
33
|
end
|
30
|
-
tp.post(
|
34
|
+
tp.post(12345, 'How are you?', 'How are you doing?')
|
31
35
|
```
|
32
36
|
|
33
37
|
All lines you provide to the `post()` method will be concatenated
|
@@ -44,40 +48,18 @@ tp.spam('How are you?')
|
|
44
48
|
|
45
49
|
That's it.
|
46
50
|
|
47
|
-
|
51
|
+
## How to contribute
|
48
52
|
|
49
|
-
Read
|
53
|
+
Read
|
54
|
+
[these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).
|
50
55
|
Make sure you build is green before you contribute
|
51
|
-
your pull request. You will need to have
|
56
|
+
your pull request. You will need to have
|
57
|
+
[Ruby](https://www.ruby-lang.org/en/) 2.3+ and
|
52
58
|
[Bundler](https://bundler.io/) installed. Then:
|
53
59
|
|
54
|
-
```
|
55
|
-
|
56
|
-
|
60
|
+
```bash
|
61
|
+
bundle update
|
62
|
+
bundle exec rake
|
57
63
|
```
|
58
64
|
|
59
65
|
If it's clean and you don't see any error messages, submit your pull request.
|
60
|
-
|
61
|
-
# License
|
62
|
-
|
63
|
-
(The MIT License)
|
64
|
-
|
65
|
-
Copyright (c) 2018-2019 Yegor Bugayenko
|
66
|
-
|
67
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
68
|
-
of this software and associated documentation files (the 'Software'), to deal
|
69
|
-
in the Software without restriction, including without limitation the rights
|
70
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
71
|
-
copies of the Software, and to permit persons to whom the Software is
|
72
|
-
furnished to do so, subject to the following conditions:
|
73
|
-
|
74
|
-
The above copyright notice and this permission notice shall be included in all
|
75
|
-
copies or substantial portions of the Software.
|
76
|
-
|
77
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
78
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
79
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
80
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
81
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
82
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
83
|
-
SOFTWARE.
|
data/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2018-
|
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-
|
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-
|
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
|
@@ -84,8 +85,8 @@ class Telepost
|
|
84
85
|
id = message.chat.id
|
85
86
|
if id.positive?
|
86
87
|
post(
|
87
|
-
|
88
|
-
chat: message.chat.id
|
88
|
+
message.chat.id,
|
89
|
+
"This is your chat ID: `#{message.chat.id}`."
|
89
90
|
)
|
90
91
|
end
|
91
92
|
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/logo.svg
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<svg width="314px" height="314px" viewBox="0 0 314 314" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
+
<!-- Generator: Sketch 43.2 (39069) - http://www.bohemiancoding.com/sketch -->
|
4
|
+
<title>Group 2</title>
|
5
|
+
<desc>Created with Sketch.</desc>
|
6
|
+
<defs></defs>
|
7
|
+
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
8
|
+
<g id="Group-2">
|
9
|
+
<g id="Group">
|
10
|
+
<circle id="Oval" fill="#053C5E" cx="157" cy="157" r="157"></circle>
|
11
|
+
<rect id="Rectangle" fill="#2B2B2B" x="0" y="234" width="300" height="68"></rect>
|
12
|
+
<text id="telepost" font-family="CourierNewPS-BoldMT, Courier New" font-size="60" font-weight="bold" fill="#FFFFFF">
|
13
|
+
<tspan x="6.4765625" y="284">telepost</tspan>
|
14
|
+
</text>
|
15
|
+
<path d="M135.676765,111.215287 C135.211714,113.540467 132.770932,120.688823 130.252813,127.100603 C127.734621,133.512383 125.2898,140.431445 124.819828,142.476214 C123.6868,147.405663 121.517836,147.185477 119.69487,141.95608 C116.899865,133.938362 105.171362,111.043501 103.859129,111.043501 C100.420089,111.043501 101.508757,114.986149 109.1771,130.30227 C113.739327,139.414532 118.032086,147.448041 118.716515,148.15443 C120.694817,150.196115 120.172626,154.319657 117.358599,158.877992 C113.567467,165.019055 107.570942,183.721189 108.054206,187.896804 C108.804956,194.383204 112.436054,192.210274 113.355359,184.724515 C114.48376,175.535577 120.945556,159.641154 124.897459,156.333653 C127.109021,154.482778 128.268636,151.905536 128.573284,148.163978 C128.818001,145.157747 131.906711,135.560972 135.437115,126.837819 C138.96752,118.114666 141.511492,110.079835 141.090434,108.982574 C139.755727,105.504315 136.554941,106.824333 135.676765,111.215287 M174.714659,126.841564 C169.37392,129.699438 169.197653,130.049915 167.452978,141.283475 C165.577352,153.360398 165.225112,168.513913 166.548289,180.203784 L167.566817,189.202501 L161.346213,191.9541 C154.601949,194.937416 150.91195,200.302465 153.156708,203.861146 C155.104824,206.949562 157.09025,206.70198 157.571826,203.310532 C158.083734,199.706169 166.097413,193.204052 170.29418,192.987978 C172.116999,192.894116 173.522874,191.717021 173.97823,189.903529 C174.383277,188.290613 177.740353,184.944554 181.438431,182.467858 C188.546172,177.707551 194.317883,170.450278 194.317883,166.273341 C194.317883,162.684548 189.493165,158.361603 185.487795,158.361603 C180.701636,158.361603 180.027195,155.239403 183.731222,150.229385 C188.308065,144.038966 188.284856,130.867646 183.690534,127.147387 C179.896537,124.075276 179.885006,124.074836 174.714659,126.841564 M182.67318,134.240439 C184.752542,140.153164 174.808961,161.185104 171.588639,157.68562 C169.868715,155.81653 172.863122,135.012708 175.266374,132.134564 C177.872553,129.013319 181.163896,129.949075 182.67318,134.240439 M184.854262,162.269586 C190.589839,163.855621 189.673839,167.881335 181.645765,176.371155 C177.281618,180.986262 173.904933,183.573859 173.371946,182.711474 C172.876636,181.91012 172.127869,176.711937 171.707987,171.159972 L170.944531,161.065463 L176.209475,161.200234 C179.105172,161.274339 182.995308,161.755548 184.854262,162.269586 M132.642184,172.492256 C131.593837,175.224098 133.152917,177.288844 136.264027,177.288844 C139.014965,177.288844 139.431396,176.221769 138.067531,172.667568 C137.039234,169.987871 133.645289,169.878218 132.642184,172.492256 M203.781503,185.840798 C203.781503,187.657595 209.264724,193.512152 210.966361,193.512152 C212.534035,193.512152 211.991059,187.391138 210.270768,185.670847 C208.092403,183.492409 203.781503,183.605293 203.781503,185.840798" id="Fill-6" fill="#427B8A" fill-rule="nonzero"></path>
|
16
|
+
</g>
|
17
|
+
</g>
|
18
|
+
</g>
|
19
|
+
</svg>
|
data/renovate.json
ADDED
data/telepost.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# (The MIT License)
|
4
4
|
#
|
5
|
-
# Copyright (c) 2018-
|
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.
|
28
|
-
|
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.
|
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.
|
46
|
-
s.
|
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
|
data/test/test_telepost.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# (The MIT License)
|
4
4
|
#
|
5
|
-
# Copyright (c) 2018-
|
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-
|
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.
|
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:
|
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,22 +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
|
48
|
+
- LICENSE.txt
|
111
49
|
- README.md
|
112
50
|
- Rakefile
|
113
|
-
- appveyor.yml
|
114
51
|
- lib/telepost.rb
|
52
|
+
- logo.svg
|
53
|
+
- renovate.json
|
115
54
|
- telepost.gemspec
|
116
55
|
- test/test_telepost.rb
|
117
56
|
homepage: http://github.com/yegor256/telepost
|
118
57
|
licenses:
|
119
58
|
- MIT
|
120
|
-
metadata:
|
59
|
+
metadata:
|
60
|
+
rubygems_mfa_required: 'true'
|
121
61
|
post_install_message:
|
122
62
|
rdoc_options:
|
123
63
|
- "--charset=UTF-8"
|
@@ -127,16 +67,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
127
67
|
requirements:
|
128
68
|
- - ">="
|
129
69
|
- !ruby/object:Gem::Version
|
130
|
-
version: '2
|
70
|
+
version: '3.2'
|
131
71
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
72
|
requirements:
|
133
73
|
- - ">="
|
134
74
|
- !ruby/object:Gem::Version
|
135
75
|
version: '0'
|
136
76
|
requirements: []
|
137
|
-
rubygems_version: 3.
|
77
|
+
rubygems_version: 3.4.10
|
138
78
|
signing_key:
|
139
|
-
specification_version:
|
79
|
+
specification_version: 4
|
140
80
|
summary: Simple Telegram posting Ruby gem
|
141
|
-
test_files:
|
142
|
-
- test/test_telepost.rb
|
81
|
+
test_files: []
|
data/.travis.yml
DELETED
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
|