fantastic_robot 0.1.1 → 0.1.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
  SHA1:
3
- metadata.gz: 70e7924cf945c7d75a688d2e6ddd86b8e4214978
4
- data.tar.gz: 6a2385d639bb2a72ab956396fa68a633b5465185
3
+ metadata.gz: 3c4ca947bbf4e006a798fc5c505217160a49b252
4
+ data.tar.gz: 7b71b6fc87b60d117f5c8d9fb9c8e22c60618d0a
5
5
  SHA512:
6
- metadata.gz: 99031d282478178e085e21cea7e3fb5551d536c140da3c5ea7a03e5efb29e68e1a4f7be42c199c83c9323d661c396b6d78e72d4e2e468e004ff12bc430007365
7
- data.tar.gz: f353a05df9aa13c2646fa3ffa159427c9317040c24932e72e60b4b804490eeb8566a1a0b89025440bc09f4fe0ff0c43aa4108f5c32bbfbb3f35052ca65b3f957
6
+ metadata.gz: b791d1548a6942f336f870ccd90a909025fea6144b59bb3759c9a842a4172efc56b427e780609dbe861b355c670bcd5f52661fb33435e15e76dd57ade7aa81d1
7
+ data.tar.gz: 8d15bdf32ff492ff6524356ed0d6963c0bc04c91779b4a9eebe7a80becf996dfc2198563c6094a3be36c8db36a95c61af56cb14c792e569c1d752b2204535d8b
@@ -33,6 +33,8 @@ module FantasticRobot
33
33
  end
34
34
  end
35
35
 
36
+ attributes = attributes.delete_if{|k, v| !self.respond_to?("#{k}=")}
37
+
36
38
  super(attributes)
37
39
  end
38
40
 
@@ -11,12 +11,12 @@ require 'fantastic_robot/model/attachment/voice'
11
11
  module FantasticRobot
12
12
  class Model::Message < Model::Base
13
13
 
14
- attr_accessor :message_id, :from, :date, :chat, :forward_from, :fordward_date,
14
+ attr_accessor :message_id, :from, :date, :chat, :forward_from, :forward_date,
15
15
  :reply_to_message
16
16
 
17
17
  validates :message_id, :date, :chat, presence: true
18
18
  validates :message_id, :date, numericality: true
19
- validates :fordward_date, numericality: true, unless: 'fordward_date.blank?'
19
+ validates :forward_date, numericality: true, allow_blank: true
20
20
 
21
21
  attr_accessor :text, :audio, :document, :photo, :sticker, :video, :voice,
22
22
  :caption, :contact, :location
@@ -25,8 +25,8 @@ module FantasticRobot
25
25
  :delete_chat_photo, :group_chat_created, :supergroup_chat_created,
26
26
  :channel_chat_created, :migrate_to_chat_id, :migrate_from_chat_id
27
27
 
28
- validates :migrate_to_chat_id, numericality: true, unless: 'migrate_to_chat_id.blank?'
29
- validates :migrate_from_chat_id, numericality: true, unless: 'migrate_from_chat_id.blank?'
28
+ validates :migrate_to_chat_id, numericality: true, allow_blank: true
29
+ validates :migrate_from_chat_id, numericality: true, allow_blank: true
30
30
 
31
31
  # Field conversions of this model
32
32
  FIELD_CONVERSIONS = {
@@ -1,3 +1,3 @@
1
1
  module FantasticRobot
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fantastic_robot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Óscar de Arriba
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-16 00:00:00.000000000 Z
11
+ date: 2016-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel