boa_vista_stubs 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzI0NmMzN2JlZTkzYWIzYTk2YzVlYjYwYWIzNTY2NWM4YzMzYzQ5ZQ==
4
+ MjNkNmJlMjUyNGFhYjQzY2U2ZTJkNTA3OTM1MDkzZjIxOGU4N2VmNw==
5
5
  data.tar.gz: !binary |-
6
- MGUyMjk3MzAwMTQyMmU2MTAyNjA1MTY4MzE1MGUwZTI4NGJiZDdkMw==
6
+ MzZiYmJmOGJjODE2NDg0ZmM1ZjRkYjkwZjRhMzJjYzczZDY4OTIyOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MGM3ZmVjNTNmZjMxNzYyNDBiODc3YmNlOGY2YjdjZjI5YTIyM2RmMjM4YTUw
10
- MWI3NWM3MWZlMmM0MGI3YmRlZWVlZWI2NDQ4MjUwYTJjNzM1NjI4MGQ0NzY3
11
- MGJmZmVmZTRmOGE5YzVmZDIwNTUzMGZhYjM1OWZiZWZjYmFkMWI=
9
+ MjJiY2RjYjJhMDhkMDM1MTgxMTBhMGU1NDQxMDBmYTM4Mzk5OTMxZThiYzY5
10
+ N2I4ZWRlOGVhZTNkZjMzMmQ5NjU3M2ZjYTNlNzEwYWQ4N2VhYTUwMjNmZGQ3
11
+ MmVkNzM5OGIwZTFiZWY0Nzk5NzdjM2MyZjczODA4ZTk5YTNkMmU=
12
12
  data.tar.gz: !binary |-
13
- ZGNmNjQzMzlkZDVjZmRkYjZkMDYzMjNjZGVjOTNhNGI1OTBjMWVmN2M3YTkz
14
- YTkzYzViZTliNWRhNDU0ZmYyODI2YmJjZjNlYzIwODI4MTM1ZGU1MmE1YTk0
15
- MTdkNzAyMTE4YjAyZjU4YWNiYzNhYzUxMTRhMjJkYzYzYzdjMWM=
13
+ ODY2YmFjMjlhNzBhZWNlNzk1OWRlZGZkY2VlZTBkOTJiY2YyMmEzNzI2OTVl
14
+ MjcyNmIzNmI3ZTA5MTZkN2EyZmMwMTQwYWVlN2M3ZWVkMWNiMGVlYzE0MDBm
15
+ MTUxNWUzOWZjZTNlY2E1Mjk5OGViNzg3MGEzY2I4NTE1MGMyZjc=
@@ -2,12 +2,14 @@ module BoaVistaStubs
2
2
  class Document::Cpf
3
3
  include BoaVistaStubs::Document::Extension
4
4
 
5
- attr_reader :document_number
6
-
7
5
  def initialize(document_number)
8
6
  @document_number = document_number
9
7
  end
10
8
 
9
+ def document_number
10
+ @document_number.slice(3..-1)
11
+ end
12
+
11
13
  def valid?
12
14
  validator(cleared_document_number).valid_cpf?
13
15
  end
@@ -1,3 +1,3 @@
1
1
  module BoaVistaStubs
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
@@ -166,3 +166,115 @@ Processing by BoaVistaStubs::RequestsController#index as HTML
166
166
  Parameters: {"consulta"=>"my search string"}
167
167
  Rendered text template (0.0ms)
168
168
  Completed 200 OK in 58.8ms (Views: 58.0ms)
169
+ Processing by BoaVistaStubs::RequestsController#index as HTML
170
+ Parameters: {"consulta"=>"my search string"}
171
+ Rendered text template (0.0ms)
172
+ Completed 200 OK in 23.2ms (Views: 22.4ms)
173
+ Processing by BoaVistaStubs::RequestsController#index as HTML
174
+ Parameters: {"consulta"=>"my search string"}
175
+ Rendered text template (0.0ms)
176
+ Completed 200 OK in 43.6ms (Views: 42.5ms)
177
+ Processing by BoaVistaStubs::RequestsController#index as HTML
178
+ Parameters: {"consulta"=>"my search string"}
179
+ Rendered text template (0.0ms)
180
+ Completed 200 OK in 38.3ms (Views: 37.5ms)
181
+ Processing by BoaVistaStubs::RequestsController#index as HTML
182
+ Parameters: {"consulta"=>"my search string"}
183
+ Rendered text template (0.0ms)
184
+ Completed 200 OK in 21.4ms (Views: 20.7ms)
185
+ Processing by BoaVistaStubs::RequestsController#index as HTML
186
+ Parameters: {"consulta"=>"my search string"}
187
+ Rendered text template (0.0ms)
188
+ Completed 200 OK in 36.6ms (Views: 36.0ms)
189
+ Processing by BoaVistaStubs::RequestsController#index as HTML
190
+ Parameters: {"consulta"=>"my search string"}
191
+ Rendered text template (0.0ms)
192
+ Completed 200 OK in 21.0ms (Views: 20.3ms)
193
+ Processing by BoaVistaStubs::RequestsController#index as HTML
194
+ Parameters: {"consulta"=>"my search string"}
195
+ Rendered text template (0.0ms)
196
+ Completed 200 OK in 33.2ms (Views: 32.6ms)
197
+ Processing by BoaVistaStubs::RequestsController#index as HTML
198
+ Parameters: {"consulta"=>"my search string"}
199
+ Rendered text template (0.0ms)
200
+ Completed 200 OK in 21.7ms (Views: 21.0ms)
201
+ Processing by BoaVistaStubs::RequestsController#index as HTML
202
+ Parameters: {"consulta"=>"my search string"}
203
+ Rendered text template (0.0ms)
204
+ Completed 200 OK in 17.0ms (Views: 16.3ms)
205
+ Processing by BoaVistaStubs::RequestsController#index as HTML
206
+ Parameters: {"consulta"=>"my search string"}
207
+ Rendered text template (0.0ms)
208
+ Completed 200 OK in 16.7ms (Views: 16.0ms)
209
+ Processing by BoaVistaStubs::RequestsController#index as HTML
210
+ Parameters: {"consulta"=>"my search string"}
211
+ Rendered text template (0.0ms)
212
+ Completed 200 OK in 19.1ms (Views: 18.5ms)
213
+ Processing by BoaVistaStubs::RequestsController#index as HTML
214
+ Parameters: {"consulta"=>"my search string"}
215
+ Rendered text template (0.0ms)
216
+ Completed 200 OK in 22.3ms (Views: 21.3ms)
217
+ Processing by BoaVistaStubs::RequestsController#index as HTML
218
+ Parameters: {"consulta"=>"my search string"}
219
+ Rendered text template (0.0ms)
220
+ Completed 200 OK in 15.3ms (Views: 14.6ms)
221
+ Processing by BoaVistaStubs::RequestsController#index as HTML
222
+ Parameters: {"consulta"=>"my search string"}
223
+ Rendered text template (0.0ms)
224
+ Completed 200 OK in 17.5ms (Views: 16.7ms)
225
+ Processing by BoaVistaStubs::RequestsController#index as HTML
226
+ Parameters: {"consulta"=>"my search string"}
227
+ Rendered text template (0.0ms)
228
+ Completed 200 OK in 29.8ms (Views: 29.1ms)
229
+ Processing by BoaVistaStubs::RequestsController#index as HTML
230
+ Parameters: {"consulta"=>"my search string"}
231
+ Rendered text template (0.0ms)
232
+ Completed 200 OK in 36.4ms (Views: 35.8ms)
233
+ Processing by BoaVistaStubs::RequestsController#index as HTML
234
+ Parameters: {"consulta"=>"my search string"}
235
+ Rendered text template (0.0ms)
236
+ Completed 200 OK in 33.9ms (Views: 33.2ms)
237
+ Processing by BoaVistaStubs::RequestsController#index as HTML
238
+ Parameters: {"consulta"=>"my search string"}
239
+ Rendered text template (0.0ms)
240
+ Completed 200 OK in 18.0ms (Views: 17.4ms)
241
+ Processing by BoaVistaStubs::RequestsController#index as HTML
242
+ Parameters: {"consulta"=>"my search string"}
243
+ Rendered text template (0.0ms)
244
+ Completed 200 OK in 35.0ms (Views: 34.4ms)
245
+ Processing by BoaVistaStubs::RequestsController#index as HTML
246
+ Parameters: {"consulta"=>"my search string"}
247
+ Rendered text template (0.0ms)
248
+ Completed 200 OK in 53.1ms (Views: 52.3ms)
249
+ Processing by BoaVistaStubs::RequestsController#index as HTML
250
+ Parameters: {"consulta"=>"my search string"}
251
+ Rendered text template (0.0ms)
252
+ Completed 200 OK in 29.6ms (Views: 28.9ms)
253
+ Processing by BoaVistaStubs::RequestsController#index as HTML
254
+ Parameters: {"consulta"=>"my search string"}
255
+ Rendered text template (0.0ms)
256
+ Completed 200 OK in 29.6ms (Views: 28.9ms)
257
+ Processing by BoaVistaStubs::RequestsController#index as HTML
258
+ Parameters: {"consulta"=>"my search string"}
259
+ Rendered text template (0.0ms)
260
+ Completed 200 OK in 35.3ms (Views: 34.6ms)
261
+ Processing by BoaVistaStubs::RequestsController#index as HTML
262
+ Parameters: {"consulta"=>"my search string"}
263
+ Rendered text template (0.0ms)
264
+ Completed 200 OK in 15.2ms (Views: 14.6ms)
265
+ Processing by BoaVistaStubs::RequestsController#index as HTML
266
+ Parameters: {"consulta"=>"my search string"}
267
+ Rendered text template (0.0ms)
268
+ Completed 200 OK in 21.2ms (Views: 20.5ms)
269
+ Processing by BoaVistaStubs::RequestsController#index as HTML
270
+ Parameters: {"consulta"=>"my search string"}
271
+ Rendered text template (0.0ms)
272
+ Completed 200 OK in 29.8ms (Views: 29.1ms)
273
+ Processing by BoaVistaStubs::RequestsController#index as HTML
274
+ Parameters: {"consulta"=>"my search string"}
275
+ Rendered text template (0.0ms)
276
+ Completed 200 OK in 19.4ms (Views: 18.7ms)
277
+ Processing by BoaVistaStubs::RequestsController#index as HTML
278
+ Parameters: {"consulta"=>"my search string"}
279
+ Rendered text template (0.0ms)
280
+ Completed 200 OK in 16.6ms (Views: 16.0ms)
@@ -3,12 +3,19 @@ require 'rails_helper'
3
3
  RSpec.describe BoaVistaStubs::Document::Cpf do
4
4
  subject(:instance) { described_class.new(document_number) }
5
5
 
6
- let(:document_number) { '86165232000115' }
6
+ let(:document_number) { '00030630011299' }
7
7
 
8
8
  describe '#initialize' do
9
9
  it { expect(instance).to be_a_instance_of(described_class) }
10
10
  end
11
11
 
12
+ describe '#document_number' do
13
+ it 'returns the document number without zeros' do
14
+ doc = described_class.new(document_number)
15
+ expect(doc.document_number).to eq('30630011299')
16
+ end
17
+ end
18
+
12
19
  describe '#valid?' do
13
20
  it 'returns true when the document number is included in configuration' do
14
21
  document_number = "30630011299 "
data/spec/spec_helper.rb CHANGED
@@ -1,7 +1,15 @@
1
1
  require 'boa_vista_stubs'
2
2
  require 'boa_vista'
3
+ require 'simplecov'
4
+ require 'coveralls'
3
5
  require 'pry'
4
6
 
7
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
8
+ SimpleCov::Formatter::HTMLFormatter,
9
+ Coveralls::SimpleCov::Formatter
10
+ ]
11
+ SimpleCov.start
12
+
5
13
  RSpec.configure do |config|
6
14
  config.expect_with :rspec do |expectations|
7
15
  expectations.include_chain_clauses_in_custom_matcher_descriptions = true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boa_vista_stubs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kleber Shimabuku
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-03-17 00:00:00.000000000 Z
12
+ date: 2016-03-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -67,6 +67,34 @@ dependencies:
67
67
  - - ! '>='
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: simplecov
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ! '>='
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: coveralls
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ! '>='
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ! '>='
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
70
98
  description: BoaVistaStubs.
71
99
  email:
72
100
  - klebershimabuku@gmail.com
@@ -76,7 +104,6 @@ extensions: []
76
104
  extra_rdoc_files: []
77
105
  files:
78
106
  - MIT-LICENSE
79
- - README.rdoc
80
107
  - Rakefile
81
108
  - app/assets/javascripts/boa_vista_stubs/application.js
82
109
  - app/assets/stylesheets/boa_vista_stubs/application.css
data/README.rdoc DELETED
@@ -1,3 +0,0 @@
1
- = BoaVistaStubs
2
-
3
- This project rocks and uses MIT-LICENSE.