myfinance-rails 0.1.0 → 0.2.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1d0a342fa46b7fe310ab6cf6f7816987a9c7186
|
4
|
+
data.tar.gz: 19c2ba771beb72837f9b2c30f5e867a35db25347
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8473f2a1cc5aa6bdeafd6a7bc4dc890e657f70003b7b869ebf34f5247f9df9c8f99abdadc7b73530f2f0fcbab8700edff25e77e96f3990fe22435414e4f51d9e
|
7
|
+
data.tar.gz: a19152b3221b3770aa9b9e25883d32b2889147309a0d77d864c47ccb15db442e359cf741cd4311e8df929ca31d04c35a113276237012fcdad529188fc9f31d1c
|
@@ -42,7 +42,13 @@ module Myfinance
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def self.classification_centers
|
45
|
-
|
45
|
+
centers = []
|
46
|
+
for page in 1..50
|
47
|
+
response = lget "/classification_centers.json?page=#{page}"
|
48
|
+
break if response.empty?
|
49
|
+
centers = centers.concat response
|
50
|
+
end
|
51
|
+
centers
|
46
52
|
end
|
47
53
|
end
|
48
54
|
|
data/lib/myfinance/version.rb
CHANGED
data/lib/myfinance.rb
CHANGED
@@ -83,8 +83,9 @@ describe "Manipulando Centros de Receita e Custo", type: :feature do
|
|
83
83
|
end
|
84
84
|
|
85
85
|
it "#classification_centers" do
|
86
|
-
double
|
87
|
-
expect(Myfinance).to receive(:lget).once.with("/classification_centers.json").and_return
|
88
|
-
expect(Myfinance
|
86
|
+
double classification_center_double = double("classification_center_double")
|
87
|
+
expect(Myfinance).to receive(:lget).once.with("/classification_centers.json?page=1").and_return [classification_center_double]
|
88
|
+
expect(Myfinance).to receive(:lget).once.with("/classification_centers.json?page=2").and_return []
|
89
|
+
expect(Myfinance.classification_centers).to eql([classification_center_double])
|
89
90
|
end
|
90
91
|
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
describe 'Manipulando Contas de Depósito', type: :feature do
|
2
|
+
|
3
|
+
require 'myfinance'
|
4
|
+
|
5
|
+
it '#contas_deposito' do
|
6
|
+
double contas_deposito_double = double("contas_deposito")
|
7
|
+
expect(Myfinance).to receive(:lget).once.with("/entities/1/deposit_accounts.json").and_return contas_deposito_double
|
8
|
+
expect(Myfinance.contas_deposito(1)).to eql(contas_deposito_double)
|
9
|
+
end
|
10
|
+
end
|
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
|
+
version: 0.2.0
|
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: 2015-
|
11
|
+
date: 2015-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -86,6 +86,7 @@ files:
|
|
86
86
|
- lib/myfinance/centro_receita_custo.rb
|
87
87
|
- lib/myfinance/conta_a_pagar.rb
|
88
88
|
- lib/myfinance/conta_a_receber.rb
|
89
|
+
- lib/myfinance/conta_deposito.rb
|
89
90
|
- lib/myfinance/entidade.rb
|
90
91
|
- lib/myfinance/imposto.rb
|
91
92
|
- lib/myfinance/pessoa.rb
|
@@ -94,6 +95,7 @@ files:
|
|
94
95
|
- spec/features/account_spec.rb
|
95
96
|
- spec/features/categoria_spec.rb
|
96
97
|
- spec/features/centro_receita_custo_spec.rb
|
98
|
+
- spec/features/conta_deposito_spec.rb
|
97
99
|
- spec/features/contas_a_receber_spec.rb
|
98
100
|
- spec/features/entidades_spec.rb
|
99
101
|
- spec/features/imposto_spec.rb
|
@@ -127,6 +129,7 @@ test_files:
|
|
127
129
|
- spec/features/account_spec.rb
|
128
130
|
- spec/features/categoria_spec.rb
|
129
131
|
- spec/features/centro_receita_custo_spec.rb
|
132
|
+
- spec/features/conta_deposito_spec.rb
|
130
133
|
- spec/features/contas_a_receber_spec.rb
|
131
134
|
- spec/features/entidades_spec.rb
|
132
135
|
- spec/features/imposto_spec.rb
|