telepost 0.3.1 → 0.3.2

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: bbc37984476cf3d64a3039dbd68ad44889fa627c09d924d46abcb65da238f8cf
4
- data.tar.gz: c28bc273e8f02f0792f05009075f3c3b40846a5ac32aad73f1acd6b7e40be219
3
+ metadata.gz: cdead157318cc6dc047c19b372c7f488d111e869a86bfd435d9e5577fc3c07f9
4
+ data.tar.gz: e13c181e9352426f91c6d61c11fde3a9e5997eaf8a79156a328cfb16c552a96f
5
5
  SHA512:
6
- metadata.gz: a21791cb28c2bd45ce02aff4c29b8105e66127259a5a797a2da2305b0759a587ad0b46fb3d6e129fc63c4cb5783b83c7e25d7b08656a55c28ca4856b9099c059
7
- data.tar.gz: 934514efb52ddbe4ad11fbf27eacddf54cd3f60d20bf79131baeeab900010ec4a9fca9cab937ef7a71068850f2490beb31cc1bc2ab4184009175f84048609a62
6
+ metadata.gz: 7d31175e0889f2f5842101116165c3bf3fe0c646d8dec336f48a289a69a23914e32dc966b57990d1148ba46a95c7b888324f344bcb3501f10483407f551340ef
7
+ data.tar.gz: 8c348b5bf2b689d4f9ac4bd17f772721c785f7fb482004ff967c5ffc66b66a0d42287b5b3b77b470378f372b7886a4d99ca95ee40a2eb3555682c0359871a487
@@ -1,5 +1,5 @@
1
1
  assets:
2
- rubygems.yml: zerocracy/home#assets/rubygems.yml
2
+ rubygems.yml: yegor256/home#assets/rubygems.yml
3
3
  install: |-
4
4
  export GEM_HOME=~/.ruby
5
5
  export GEM_PATH=$GEM_HOME:$GEM_PATH
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 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,12 +1,16 @@
1
- [![EO principles respected here](http://www.elegantobjects.org/badge.svg)](http://www.elegantobjects.org)
1
+ <img src="/logo.svg" width="64px" height="64px"/>
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](http://www.elegantobjects.org/rubymine.svg)](https://www.jetbrains.com/ruby/)
5
+ [![We recommend RubyMine](https://www.elegantobjects.org/rubymine.svg)](https://www.jetbrains.com/ruby/)
4
6
 
5
7
  [![Build Status](https://travis-ci.org/yegor256/telepost.svg)](https://travis-ci.org/yegor256/telepost)
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)
9
11
 
12
+ [![Hits-of-Code](https://hitsofcode.com/github/yegor256/telepost)](https://hitsofcode.com/view/github/yegor256/telepost)
13
+
10
14
  Telepost is a simple gateway to Telegram, which can post messages and respond to primitive requests.
11
15
 
12
16
  First, get your token from [@BotFather](https://t.me/BotFather).
@@ -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: chat, 'Thanks for talking to me!')
31
+ tp.post(chat, 'Thanks for talking to me!')
28
32
  end
29
33
  end
30
- tp.post(chat: 12345, 'How are you?', 'How are you doing?')
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,7 +48,7 @@ tp.spam('How are you?')
44
48
 
45
49
  That's it.
46
50
 
47
- # How to contribute
51
+ ## How to contribute
48
52
 
49
53
  Read [these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).
50
54
  Make sure you build is green before you contribute
@@ -57,27 +61,3 @@ $ bundle exec rake
57
61
  ```
58
62
 
59
63
  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.
@@ -84,8 +84,8 @@ class Telepost
84
84
  id = message.chat.id
85
85
  if id.positive?
86
86
  post(
87
- "This is your chat ID: `#{message.chat.id}`.",
88
- chat: message.chat.id
87
+ message.chat.id,
88
+ "This is your chat ID: `#{message.chat.id}`."
89
89
  )
90
90
  end
91
91
  end
@@ -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>
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
31
31
  s.rubygems_version = '2.5.1'
32
32
  s.required_ruby_version = '>=2.5'
33
33
  s.name = 'telepost'
34
- s.version = '0.3.1'
34
+ s.version = '0.3.2'
35
35
  s.license = 'MIT'
36
36
  s.summary = 'Simple Telegram posting Ruby gem'
37
37
  s.description = 'Simple Telegram posting Ruby gem'
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.1
4
+ version: 0.3.2
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-04-09 00:00:00.000000000 Z
11
+ date: 2019-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: telebot
@@ -108,10 +108,12 @@ files:
108
108
  - ".rultor.yml"
109
109
  - ".travis.yml"
110
110
  - Gemfile
111
+ - LICENSE.txt
111
112
  - README.md
112
113
  - Rakefile
113
114
  - appveyor.yml
114
115
  - lib/telepost.rb
116
+ - logo.svg
115
117
  - telepost.gemspec
116
118
  - test/test_telepost.rb
117
119
  homepage: http://github.com/yegor256/telepost