myfinance-rails 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/myfinance/pessoa.rb +1 -1
- data/lib/myfinance/version.rb +1 -1
- data/spec/features/pessoas_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00b36aac58f077485644970bdc060e669a59e99a
|
4
|
+
data.tar.gz: 955b0fa8471fe1b6ab0530f104007696788bd2ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9e3b07412b62ad67d83f54900254c5bafc88f25af64e5a213f8e121e4202a8a518f1c22ebd3776c125aa1a258ea79d6d548eab1ea7e3e06ffb1465b6b45adbe
|
7
|
+
data.tar.gz: b491844b962d1fb579ba453a3237a44fe900e50352b62e336f4843027487c1c330324895403063ff6a527eb287a657aa1416e9a4cdee193d069d0043e3f30cf2
|
data/lib/myfinance/pessoa.rb
CHANGED
@@ -4,7 +4,7 @@ module Myfinance
|
|
4
4
|
@everyone ||= all_people
|
5
5
|
mid = nil
|
6
6
|
@everyone.each do | pessoa |
|
7
|
-
if pessoa['federation_subscription_number_only_numbers'] == cnpj_ou_nome or pessoa['federation_subscription_number'] == cnpj_ou_nome or pessoa['name'] ==
|
7
|
+
if pessoa['federation_subscription_number_only_numbers'] == cnpj_ou_nome or pessoa['federation_subscription_number'] == cnpj_ou_nome or pessoa['name'].casecmp(cnpj_ou_nome) == 0
|
8
8
|
mid = pessoa['id']
|
9
9
|
break
|
10
10
|
end
|
data/lib/myfinance/version.rb
CHANGED
@@ -55,6 +55,12 @@ describe 'Manipulando Pessoas', type: :feature do
|
|
55
55
|
expect(id).to_not be_nil
|
56
56
|
end
|
57
57
|
|
58
|
+
it 'Se procurar por nome cadastrado, mas em case diferente, deve voltar id' do
|
59
|
+
Myfinance.setup('2acecbb483842ebbfb2c638070bf019b70e757190166d277')
|
60
|
+
id = Myfinance.pessoa_id('CiClAnO')
|
61
|
+
expect(id).to_not be_nil
|
62
|
+
end
|
63
|
+
|
58
64
|
it 'Se procurar por nome não cadastrado, deve voltar id nulo' do
|
59
65
|
Myfinance.setup('2acecbb483842ebbfb2c638070bf019b70e757190166d277')
|
60
66
|
id = Myfinance.pessoa_id('Ciclano Ciclano')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: myfinance-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- José Lopes Neto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03
|
11
|
+
date: 2016-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|