telegram-bot-ruby 0.3.9 → 0.3.10

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
  SHA1:
3
- metadata.gz: acfa3e9b5c13d6bd0380f4765d38226620d7d6f2
4
- data.tar.gz: 98a4a97c49a593c5e23a35e9c2764b52cf73331e
3
+ metadata.gz: 968de661bcb24792c23f4175f4c5fb8a81e212d4
4
+ data.tar.gz: 560ea1d83cd207f0cefbce917abfefed5abb7a1b
5
5
  SHA512:
6
- metadata.gz: 92113d38862a8d76f5e2ca6ea48fd6859829ebb90f853e5b64c29196c4cce9c9768c6474fca600d2abc8b0e2d1a1964717143925c10c388420a93b8254310f6a
7
- data.tar.gz: 7fbace804596b81113e474b5a212d5405e8b1d073aef5850daf160136e1adcb60112c70b279cd7d3462cf53b6619221a74f6b52a93fb6b637f76bd812ef1c7cc
6
+ metadata.gz: 5cddca05d497a882643eb3e724a0c068045da110526722fdef129fb6ec0e2e0bdcb60a22ce33c75f06f7835690138de8b01da93a79059b4c356dcf7028da2270
7
+ data.tar.gz: 7f15ee25c0e53145b8f76b99daca43b6dfc1c4dd13fe1e82bc5ebd21c3e85b1278de526222ae42ed8ff7a211971c71fefff004bd359e35fd3c2d515eef2234bf
@@ -1,6 +1,5 @@
1
1
  require 'telegram/bot/types/base'
2
2
  require 'telegram/bot/types/user'
3
- require 'telegram/bot/types/group_chat'
4
3
  require 'telegram/bot/types/audio'
5
4
  require 'telegram/bot/types/photo_size'
6
5
  require 'telegram/bot/types/document'
@@ -9,6 +8,7 @@ require 'telegram/bot/types/video'
9
8
  require 'telegram/bot/types/voice'
10
9
  require 'telegram/bot/types/contact'
11
10
  require 'telegram/bot/types/location'
11
+ require 'telegram/bot/types/chat'
12
12
  require 'telegram/bot/types/message'
13
13
  require 'telegram/bot/types/update'
14
14
  require 'telegram/bot/types/reply_keyboard_markup'
@@ -0,0 +1,14 @@
1
+ module Telegram
2
+ module Bot
3
+ module Types
4
+ class Chat < Base
5
+ attribute :id, Integer
6
+ attribute :type, String
7
+ attribute :title, String
8
+ attribute :username, String
9
+ attribute :first_name, String
10
+ attribute :last_name, String
11
+ end
12
+ end
13
+ end
14
+ end
@@ -2,8 +2,6 @@ module Telegram
2
2
  module Bot
3
3
  module Types
4
4
  class Message < Base
5
- attr_accessor :chat
6
-
7
5
  attribute :message_id, Integer
8
6
  attribute :from, User
9
7
  attribute :date, Integer
@@ -26,15 +24,7 @@ module Telegram
26
24
  attribute :new_chat_photo, Array[PhotoSize]
27
25
  attribute :delete_chat_photo, Boolean
28
26
  attribute :group_chat_created, Boolean
29
-
30
- def chat=(value)
31
- @chat =
32
- if value.key?('first_name')
33
- User.new(value)
34
- elsif value.key?('title')
35
- GroupChat.new(value)
36
- end
37
- end
27
+ attribute :chat, Chat
38
28
  end
39
29
  end
40
30
  end
@@ -1,5 +1,5 @@
1
1
  module Telegram
2
2
  module Bot
3
- VERSION = '0.3.9'
3
+ VERSION = '0.3.10'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telegram-bot-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.3.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Tipugin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-09-30 00:00:00.000000000 Z
11
+ date: 2015-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httmultiparty
@@ -136,11 +136,11 @@ files:
136
136
  - lib/telegram/bot/types.rb
137
137
  - lib/telegram/bot/types/audio.rb
138
138
  - lib/telegram/bot/types/base.rb
139
+ - lib/telegram/bot/types/chat.rb
139
140
  - lib/telegram/bot/types/contact.rb
140
141
  - lib/telegram/bot/types/document.rb
141
142
  - lib/telegram/bot/types/file.rb
142
143
  - lib/telegram/bot/types/force_reply.rb
143
- - lib/telegram/bot/types/group_chat.rb
144
144
  - lib/telegram/bot/types/location.rb
145
145
  - lib/telegram/bot/types/message.rb
146
146
  - lib/telegram/bot/types/photo_size.rb
@@ -1,10 +0,0 @@
1
- module Telegram
2
- module Bot
3
- module Types
4
- class GroupChat < Base
5
- attribute :id, Integer
6
- attribute :title, String
7
- end
8
- end
9
- end
10
- end