dinero 0.0.4 → 0.0.5
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 +4 -4
- data/Gemfile.lock +1 -1
- data/examples/sdccu.rb +34 -0
- data/lib/dinero/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb4017cc6f43d6883dd8eaea2c6adbda5825a2d5
|
4
|
+
data.tar.gz: 76bf1dcc51b7a3a8bfa06a10f5caa4a5e758916c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46bcc34c6eefdadb0e6bd3b1a9b15ef49d4f1c94e33573b93ba62be90eb695d35f78948214535dc69125b4bbb0fd977340fea786ebf8c6be2fcf88bb70d32ef7
|
7
|
+
data.tar.gz: a7ad3b30ba1ee06fb0ef0cb5eba40395ad83a12b2bdf9abb5586f376ed17d5f7593e255ca8e332c239c618bd9a23f74844124461df17edb6f5929635d502aeaa
|
data/Gemfile.lock
CHANGED
data/examples/sdccu.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
require_relative '../lib/dinero'
|
2
|
+
require 'pry-byebug'
|
3
|
+
|
4
|
+
@username = "mickeymouse"
|
5
|
+
@password = "meeskamooska"
|
6
|
+
@answers = [
|
7
|
+
{"question" => "Who is your first love?", "answer"=>"minnie"},
|
8
|
+
{"question" => "What is your favorite word?", "answer"=>"cheese"},
|
9
|
+
{"question" => "Who is your best friend", "answer" => "donald duck"}
|
10
|
+
]
|
11
|
+
|
12
|
+
def camelize term
|
13
|
+
string = term.to_s.sub(/^[a-z\d]*/) { $&.capitalize }
|
14
|
+
string.gsub!(/(?:_|(\/))([a-z\d]*)/i) { "#{$1}#{$2.capitalize}" }
|
15
|
+
string.gsub!(/\//, '::')
|
16
|
+
string
|
17
|
+
end
|
18
|
+
|
19
|
+
def show_balances bank
|
20
|
+
puts "Retrieving your bank account information..."
|
21
|
+
bank.accounts
|
22
|
+
|
23
|
+
puts "+" + "-" * 80 + "+"
|
24
|
+
puts "| %35s | %12s | %11s | %11s |" % %w(name number balance available)
|
25
|
+
puts "+" + "-" * 80 + "+"
|
26
|
+
bank.accounts.each do |acct|
|
27
|
+
puts "| %35s | %12s | $%10.2f | $%10.2f |" % [acct.name, acct.number, acct.balance, acct.available]
|
28
|
+
end
|
29
|
+
puts "+" + "-" * 80 + "+"
|
30
|
+
end
|
31
|
+
|
32
|
+
bank = Dinero::Bank::Sdccu.new(username: @username, password: @password, security_questions: @answers)
|
33
|
+
|
34
|
+
show_balances bank
|
data/lib/dinero/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dinero
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Lang
|
@@ -168,6 +168,7 @@ files:
|
|
168
168
|
- Rakefile
|
169
169
|
- dinero.gemspec
|
170
170
|
- examples/get_balances.rb
|
171
|
+
- examples/sdccu.rb
|
171
172
|
- lib/dinero.rb
|
172
173
|
- lib/dinero/account.rb
|
173
174
|
- lib/dinero/banks.rb
|