api-moip-assinaturas 0.2.10 → 0.2.11

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTM2YjYyM2QwNWRkZTY4MjEzMjdhYzhiMmE3ZDc2ZThmYmUyNzEwYQ==
4
+ MDAwMmM0YTQzNzg0YmQ5NTQxMjEwNzBkN2Q2YWI1NDhiMWFhZDRmMw==
5
5
  data.tar.gz: !binary |-
6
- YjllZmJjMDczNjM3M2FjNzFmNmYzZWRhNTQ3MTRhYmRlMjk1MmRkMA==
6
+ ZDU5MWFjZjc5MGVkMWUzZTRmOWQxZGFhOTc4MWM2ZDM0NjMwNjgwMQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZDZkYTg5NTMxZjE4NWQyOGVjYWRkMDQyNDNkMTUyNzRhMTU4NmRlOWFmOGJj
10
- Y2E0MTQ5YjhmOTEyYzM3ZjMzNjgwZGI3OWFmMGNhOGQxOTM5ODYwNmFhYWY1
11
- YzNmN2RkOGQxOTM2MGY1Y2UzMjE1YjdhMjZjYmZlY2VlZGFhZGQ=
9
+ MDMzZjhmNmRlZDJkODdjMTBiYTUxMWE1N2YyZTM5OTVjYjQ0MDY0YTRkNjYx
10
+ NjYwNGE5MTc2MGQ5ZGE4ZjdiZGM3OTY1Y2ZiNDgyNzM1NGViOGFmZDViYTVm
11
+ YjVhMmRhZGI4NDZmYmY2OGQyOWE4NDdmZmE2OTdjOWI5ODYxNGE=
12
12
  data.tar.gz: !binary |-
13
- NzhiZGI5NWVlNGIyOTc5NDUzZTI4MTZmM2Y3NzUxYzJhMzRjN2YyYWQxMTBk
14
- NjhiZDYwZWFhZDI1YzQ2OGM3MTM2YzUzNDVhYWE5ZTJlYmYxZjNhNDY2MGY5
15
- ZjU5NzAyZmQ0NzAxZDUwODBiYThjNTM5NjA4NWRhNmNjYWFiNDk=
13
+ ODEwYWQ3MTNlM2UzZGVlNjhjMjFmYTZlN2UwYTEzNmY1ZjkzMTA1ODhmNGNk
14
+ NDc4YTFjOGEyMzNlZmI2YjcwYjljYjc4N2IyZGQ5ZjRiMDBkMzNmMGE3MjQx
15
+ ZmU1MzRjYzhkMWQ5Y2FiZjUyOWIzNzYwZDUxZDVlZjkwNWU3Zjg=
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'api-moip-assinaturas'
6
- s.version = '0.2.10'
6
+ s.version = '0.2.11'
7
7
  s.date = '2013-07-02'
8
8
  s.summary = "Moip Assinaturas by Pixxel"
9
9
  s.description = "Gem desenvolvida para atender aos requisitos do moip api de assinaturas"
@@ -1,4 +1,6 @@
1
1
  en:
2
- presence_of_address: "can't be blank"
3
- presence_of_billing_info: "can't be blank"
4
- invalid_format: "invalid format"
2
+ moip:
3
+ errors:
4
+ presence_of_address: "can't be blank"
5
+ presence_of_billing_info: "can't be blank"
6
+ invalid_format: "invalid format"
@@ -12,7 +12,7 @@ class Moip::Customer < Moip::Model
12
12
  :phone_number, :birthdate_day, :birthdate_month,
13
13
  :birthdate_year, :presence => true
14
14
 
15
- validates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i, :message => I18n.t("invalid_format")
15
+ validates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i, :message => I18n.t("moip.errors.invalid_format")
16
16
 
17
17
  validate :validates_presence_of_address, :validates_presence_of_billing_info
18
18
 
@@ -53,7 +53,7 @@ class Moip::Customer < Moip::Model
53
53
  end
54
54
 
55
55
  def validates_presence_of_address
56
- self.errors.add :address, I18n.t("presence_of_address") and return if @address.nil?
56
+ self.errors.add :address, I18n.t("moip.errors.presence_of_address") and return if @address.nil?
57
57
 
58
58
  if @address.valid?
59
59
  true
@@ -63,7 +63,7 @@ class Moip::Customer < Moip::Model
63
63
  end
64
64
 
65
65
  def validates_presence_of_billing_info
66
- self.errors.add :billing_info, I18n.t("presence_of_billing_info") and return if @billing_info.nil?
66
+ self.errors.add :billing_info, I18n.t("moip.errors.presence_of_billing_info") and return if @billing_info.nil?
67
67
 
68
68
  if @billing_info.valid?
69
69
  true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api-moip-assinaturas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.10
4
+ version: 0.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Douglas Rossignolli