telepost 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f0edb0901c60fb97a116c0c8906d64533bec0d8fe2f4c1b801bcca26e877c44b
4
- data.tar.gz: b8ef137fbb03e9a3dc12373741ad12a56df81e7f139c24f8fbf1f91d5036b633
3
+ metadata.gz: b1bfc2471b076fe6343687400f3c9d199f4ba2c01fce7751e5b13d1db31ed29c
4
+ data.tar.gz: 94a7397bcf43afa770452170c918d672f0fbe47a59bff68d7842e9f3c94a9e45
5
5
  SHA512:
6
- metadata.gz: 86784f5f376383033d1c862993ea2426780b07bfbdc402ff17d7ea56ceeac8cec63e63e7077bd32475ed2fdfb395f08329144193cfd3d895d292479e5f8e3ebc
7
- data.tar.gz: 99501c8ec53323c14a0684eff1067bd89456285aa47344974de5ab1c860044f8afdc9959464e8ff9a9f5fb30cdeddc3a61dd9a434e6df796abcc8667f328f903
6
+ metadata.gz: 51fae734e3ab3403eaaa3b8d21ed201a3cbee2a10c9802905061fc2551c83063109ca76134a8fc0cd7ad921ce1d6ddd4d40c9774af7d783e7589a552b3bd37a6
7
+ data.tar.gz: ec5bb310af82d8ea9aaf82f5465fa7ce5fa7b7ba8559a4404f8dbaa5246e673b1d4300acf8f3d75e5a5aec257669f1ff7646cb314e9686542e3e55694496c2ec
data/lib/telepost.rb CHANGED
@@ -101,7 +101,7 @@ class Telepost
101
101
  # be the admin there). The lines provided will be
102
102
  # concatenated with a space between them.
103
103
  def post(chat, *lines)
104
- @bot.send_message(
104
+ @bot.api.send_message(
105
105
  chat_id: chat,
106
106
  parse_mode: 'Markdown',
107
107
  disable_web_page_preview: true,
data/telepost.gemspec CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
28
28
  s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
29
29
  s.required_ruby_version = '>=3.2'
30
30
  s.name = 'telepost'
31
- s.version = '0.5.0'
31
+ s.version = '0.5.1'
32
32
  s.license = 'MIT'
33
33
  s.summary = 'Simple Telegram posting Ruby gem'
34
34
  s.description = 'Simple Telegram posting Ruby gem'
@@ -23,6 +23,7 @@
23
23
  # SOFTWARE.
24
24
 
25
25
  require 'minitest/autorun'
26
+ require 'yaml'
26
27
  require_relative '../lib/telepost'
27
28
 
28
29
  # Telepost test.
@@ -38,11 +39,13 @@ class TelepostTest < Minitest::Test
38
39
  end
39
40
 
40
41
  def test_real_posting
41
- skip
42
+ cfg = '/code/home/assets/zerocracy/baza.yml'
43
+ skip unless File.exist?(cfg)
44
+ yaml = YAML.safe_load_file(cfg)
42
45
  tp = Telepost.new(
43
- '1088589765:...',
44
- chats: [-1_001_438_256_738] # codexia channel
46
+ yaml['tg']['token'],
47
+ chats: [yaml['tg']['admin_chat'].to_i]
45
48
  )
46
- tp.spam('This is just a test message')
49
+ tp.spam('This is just a test message from telepost test')
47
50
  end
48
51
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telepost
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko