api-moip-assinaturas 0.2.5 → 0.2.6

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
- NjlhZWJjNGNjY2MyODVkMjkwNTMxNjIwYzYxNTg0NGI5Mjc5ZjVlMA==
4
+ ZWE4NjcyNmRlZDQzNDQxY2IwNmNmMjZiNGZkN2M3NzQ2OTc2ZWNkZQ==
5
5
  data.tar.gz: !binary |-
6
- MWI0NzhiNzUxNDNlMDQ5MzA3MmJjYTI4MGFiZTNjZWMyYWQ1MmRmZg==
6
+ ZmY0MTIyNzg1YmI5Y2MxZmRiYTg1Y2EzNjgxNjYzZjFlNGFhY2RlNQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NzU4MjBhY2E1MzI0NzE1MzEyODhlMDQwY2M5ZDY4YmVkZTkwOTM1NzBiNTkx
10
- MmE3MmViMjQwODYxYjBhOGQ3NmMwYWY0N2M3ZmQzZjM1NTg0MjhkYTk1MjUz
11
- YWM0ZWMyM2Q5M2FkNjUxNDc0MWJiMDI3OTViOGFhN2FlZjBhZWM=
9
+ YTQ5NmQ0NTU3OTE3ZGUxMTRjOWUyMzgwN2VjMWU3YjAwYmI0NWNkNDBmMGE5
10
+ N2Y5NWMzYWI0OTRkYjNmNjQ5NjIxNzA2MThlOWM4ZDQ5MzhkYzllNTBmNjVj
11
+ YTEyYjRjOWZmYzMyOWEzOWYxY2U5ZTZhOTE5ZmM0NDRmZjE5ZWU=
12
12
  data.tar.gz: !binary |-
13
- MGJhODgwNjc3ZjA2M2FkMmU1OTc0NzEyYjdkMDA2NDE4MDJlYTFkNzA3Yjk1
14
- ZTZiYjE0YjRjOWJmNmEwMzlkYTA0NWMwMzc1YmM1OTdmODMyZjAzYjY3NjFl
15
- ZjMxZTA1YWUxMjE3NmYxZDMxZjEzOTdjYmE2M2UyZjFmY2JkNjc=
13
+ MTk1ZGJhNDlkZTU0N2EzNjEzZjA1MzZiMTVhNzg1OWQyYjEwZDJlODFkOGMy
14
+ ZWFkMzFiNWE4ODY3ZDc5YTkzMDdiOTNjNzM3ZWZjMjU1MDJkMjE2NDg1Njkw
15
+ NzFhOTM1NDk1Y2Q3Y2FjNTUzMGY5NjhiMTE0N2EyYjYwYjFjNjU=
@@ -3,15 +3,15 @@ $:.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.5'
7
- s.date = '2013-06-26'
6
+ s.version = '0.2.6'
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"
10
10
  s.authors = ["Douglas Rossignolli"]
11
11
  s.email = 'douglas@pixxel.net.br'
12
12
  s.homepage = 'https://github.com/xdougx/api-moip-assinaturas'
13
13
  s.license = 'Apache Licence 2.0'
14
- s.files = Dir["{lib/**/*.rb,README.rdoc,test/**/*.rb,Rakefile,*.gemspec}"]
14
+ s.files = Dir["{lib/**/*.rb,lib/locales/*.yml,README.rdoc,test/**/*.rb,Rakefile,*.gemspec}"]
15
15
  s.require_paths = ["lib"]
16
16
 
17
17
  s.required_ruby_version = '>= 1.9.3'
@@ -20,8 +20,10 @@ Gem::Specification.new do |s|
20
20
  s.add_development_dependency 'httparty', '~> 0.11.0', '>= 0.11.0'
21
21
  s.add_development_dependency 'json', '~> 1.7.7', '>= 1.7.7'
22
22
  s.add_development_dependency 'activemodel', '~> 3.2.12', '>= 3.2.12'
23
+ s.add_development_dependency 'i18n', '~> 0.6.1', '>= 0.6.1'
23
24
 
24
25
  s.add_dependency 'httparty', '>= 0.11.0'
25
26
  s.add_dependency 'json', '>= 1.7.7'
26
27
  s.add_dependency 'activemodel', '>= 3.2.12'
28
+ s.add_dependency 'i18n', '~> 0.6.1', '>= 0.6.1'
27
29
  end
@@ -0,0 +1,5 @@
1
+ en:
2
+ moip:
3
+ errors:
4
+ presence_of_address: "can't be blank"
5
+ presence_of_billing_info: "can't be blank"
@@ -15,3 +15,5 @@ require 'moip/models/invoice'
15
15
  require 'moip/models/payment'
16
16
  require 'moip/models/plan'
17
17
  require 'moip/models/subscription'
18
+
19
+ I18n.load_path += ['lib/locales/en.yml']
@@ -20,7 +20,7 @@ module Moip
20
20
  self.token = ""
21
21
  self.acount_key = ""
22
22
  self.auth_key = ""
23
- self.env = ""
23
+ self.env = ""
24
24
  end
25
25
  end
26
26
  end
@@ -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 => "Invalid email"
15
+ validates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i
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, "can't be blank" 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, "can't be blank" 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,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api-moip-assinaturas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Douglas Rossignolli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-26 00:00:00.000000000 Z
11
+ date: 2013-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -70,6 +70,26 @@ dependencies:
70
70
  - - ! '>='
71
71
  - !ruby/object:Gem::Version
72
72
  version: 3.2.12
73
+ - !ruby/object:Gem::Dependency
74
+ name: i18n
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ~>
78
+ - !ruby/object:Gem::Version
79
+ version: 0.6.1
80
+ - - ! '>='
81
+ - !ruby/object:Gem::Version
82
+ version: 0.6.1
83
+ type: :development
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: 0.6.1
90
+ - - ! '>='
91
+ - !ruby/object:Gem::Version
92
+ version: 0.6.1
73
93
  - !ruby/object:Gem::Dependency
74
94
  name: httparty
75
95
  requirement: !ruby/object:Gem::Requirement
@@ -112,6 +132,26 @@ dependencies:
112
132
  - - ! '>='
113
133
  - !ruby/object:Gem::Version
114
134
  version: 3.2.12
135
+ - !ruby/object:Gem::Dependency
136
+ name: i18n
137
+ requirement: !ruby/object:Gem::Requirement
138
+ requirements:
139
+ - - ~>
140
+ - !ruby/object:Gem::Version
141
+ version: 0.6.1
142
+ - - ! '>='
143
+ - !ruby/object:Gem::Version
144
+ version: 0.6.1
145
+ type: :runtime
146
+ prerelease: false
147
+ version_requirements: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ~>
150
+ - !ruby/object:Gem::Version
151
+ version: 0.6.1
152
+ - - ! '>='
153
+ - !ruby/object:Gem::Version
154
+ version: 0.6.1
115
155
  description: Gem desenvolvida para atender aos requisitos do moip api de assinaturas
116
156
  email: douglas@pixxel.net.br
117
157
  executables: []
@@ -130,6 +170,7 @@ files:
130
170
  - lib/moip/models/subscription.rb
131
171
  - lib/moip/webhooks.rb
132
172
  - lib/moip.rb
173
+ - lib/locales/en.yml
133
174
  - api_moip_assinaturas.gemspec
134
175
  homepage: https://github.com/xdougx/api-moip-assinaturas
135
176
  licenses: