cartolify 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/cartolify.gemspec +76 -0
- data/lib/cartolify/banks/chileempresas_bank.rb +4 -1
- data/lib/cartolify/transaction.rb +2 -1
- metadata +18 -17
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2
|
data/cartolify.gemspec
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "cartolify"
|
8
|
+
s.version = "0.2"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Patricio Bruna"]
|
12
|
+
s.date = "2012-05-28"
|
13
|
+
s.description = "This is the Engine for my Budget System"
|
14
|
+
s.email = "pbruna@gmail.com"
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE.txt",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
"Gemfile",
|
22
|
+
"Gemfile.lock",
|
23
|
+
"LICENSE.txt",
|
24
|
+
"README.rdoc",
|
25
|
+
"Rakefile",
|
26
|
+
"VERSION",
|
27
|
+
"cartolify.gemspec",
|
28
|
+
"lib/cartolify.rb",
|
29
|
+
"lib/cartolify/account.rb",
|
30
|
+
"lib/cartolify/bank.rb",
|
31
|
+
"lib/cartolify/banks/bci_bank.rb",
|
32
|
+
"lib/cartolify/banks/bci_mobi_bank.rb",
|
33
|
+
"lib/cartolify/banks/chileempresas_bank.rb",
|
34
|
+
"lib/cartolify/transaction.rb",
|
35
|
+
"test/helper.rb",
|
36
|
+
"test/test_bank.rb",
|
37
|
+
"test/test_bci_bank.rb",
|
38
|
+
"test/test_cartolify.rb"
|
39
|
+
]
|
40
|
+
s.homepage = "http://github.com/pbruna/cartolify"
|
41
|
+
s.licenses = ["MIT"]
|
42
|
+
s.require_paths = ["lib"]
|
43
|
+
s.rubygems_version = "1.8.10"
|
44
|
+
s.summary = "Lib for getting info of Chilean Banks"
|
45
|
+
|
46
|
+
if s.respond_to? :specification_version then
|
47
|
+
s.specification_version = 3
|
48
|
+
|
49
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
50
|
+
s.add_runtime_dependency(%q<mechanize>, [">= 0"])
|
51
|
+
s.add_runtime_dependency(%q<nokogiri>, [">= 0"])
|
52
|
+
s.add_runtime_dependency(%q<json>, [">= 0"])
|
53
|
+
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
54
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
55
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
|
56
|
+
s.add_development_dependency(%q<turn>, [">= 0"])
|
57
|
+
else
|
58
|
+
s.add_dependency(%q<mechanize>, [">= 0"])
|
59
|
+
s.add_dependency(%q<nokogiri>, [">= 0"])
|
60
|
+
s.add_dependency(%q<json>, [">= 0"])
|
61
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
62
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
63
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
64
|
+
s.add_dependency(%q<turn>, [">= 0"])
|
65
|
+
end
|
66
|
+
else
|
67
|
+
s.add_dependency(%q<mechanize>, [">= 0"])
|
68
|
+
s.add_dependency(%q<nokogiri>, [">= 0"])
|
69
|
+
s.add_dependency(%q<json>, [">= 0"])
|
70
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
71
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
72
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
73
|
+
s.add_dependency(%q<turn>, [">= 0"])
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
@@ -43,10 +43,13 @@ class CHILEEMPRESASBank < Bank
|
|
43
43
|
total = convert_money_to_integer(mov[4]) * -1
|
44
44
|
end
|
45
45
|
|
46
|
+
saldo = convert_money_to_integer(mov[6])
|
47
|
+
|
46
48
|
transaccion_info = {
|
47
49
|
:date => Date.parse(mov[0]),
|
48
50
|
:description => mov[1],
|
49
|
-
:total => total
|
51
|
+
:total => total,
|
52
|
+
:saldo => saldo
|
50
53
|
}
|
51
54
|
transactions << Transaction.new(transaccion_info)
|
52
55
|
end
|
@@ -1,10 +1,11 @@
|
|
1
1
|
class Transaction
|
2
|
-
attr_reader :total, :date, :description, :type
|
2
|
+
attr_reader :total, :date, :description, :type, :saldo
|
3
3
|
|
4
4
|
def initialize(hash)
|
5
5
|
@total = hash[:total]
|
6
6
|
@date = hash[:date]
|
7
7
|
@description = hash[:description]
|
8
|
+
@saldo = hash[:saldo]
|
8
9
|
end
|
9
10
|
|
10
11
|
def income?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cartolify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.2'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mechanize
|
16
|
-
requirement: &
|
16
|
+
requirement: &70234086467780 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70234086467780
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: nokogiri
|
27
|
-
requirement: &
|
27
|
+
requirement: &70234086466680 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70234086466680
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: json
|
38
|
-
requirement: &
|
38
|
+
requirement: &70234086465940 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70234086465940
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rdoc
|
49
|
-
requirement: &
|
49
|
+
requirement: &70234086464300 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '3.12'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70234086464300
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: bundler
|
60
|
-
requirement: &
|
60
|
+
requirement: &70234086461560 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 1.0.0
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70234086461560
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: jeweler
|
71
|
-
requirement: &
|
71
|
+
requirement: &70234086460380 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 1.8.3
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70234086460380
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: turn
|
82
|
-
requirement: &
|
82
|
+
requirement: &70234086458140 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,7 +87,7 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70234086458140
|
91
91
|
description: This is the Engine for my Budget System
|
92
92
|
email: pbruna@gmail.com
|
93
93
|
executables: []
|
@@ -103,6 +103,7 @@ files:
|
|
103
103
|
- README.rdoc
|
104
104
|
- Rakefile
|
105
105
|
- VERSION
|
106
|
+
- cartolify.gemspec
|
106
107
|
- lib/cartolify.rb
|
107
108
|
- lib/cartolify/account.rb
|
108
109
|
- lib/cartolify/bank.rb
|
@@ -129,7 +130,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
129
130
|
version: '0'
|
130
131
|
segments:
|
131
132
|
- 0
|
132
|
-
hash: -
|
133
|
+
hash: -3344870923913993964
|
133
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
134
135
|
none: false
|
135
136
|
requirements:
|