turkish_banks 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 +4 -4
- data/README.md +17 -7
- data/lib/turkish_banks/bank.rb +12 -0
- data/lib/turkish_banks/branch.rb +12 -0
- data/lib/turkish_banks/turkish_bank.rb +9 -4
- data/lib/turkish_banks/version.rb +1 -1
- data/lib/turkish_banks.rb +2 -0
- data/turkish_banks-0.1.0.gem +0 -0
- data/turkish_banks.gemspec +1 -1
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5029ddc0ebe347cd8ad48c7c875fbdbb8a060cf5
|
4
|
+
data.tar.gz: 2ebfbeeb4f1f4aa5eaba5f693023f639b8274b09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d20970cd9349b14f3ef7101116e859499ab1d9a855047c3f55b5df3120d76b93cf08ced2606b63863f9169aa9591c2c44f8d20efee148d11e46b3997686de330
|
7
|
+
data.tar.gz: c352d024b79c74fa5ac2ebc9df2a38a0433e9533c14b7d56911d7018800247c482ee7116d57353988d7e9ff073b49a62a96db4d8c685152fb701a1218a26ca3a
|
data/README.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
# TurkishBanks
|
1
|
+
# TurkishBanks
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/turkish_banks.svg)](http://badge.fury.io/rb/turkish_banks)
|
4
|
+
[![Code Climate](https://codeclimate.com/github/enderahmetyurt/turkish_support/badges/gpa.svg)](https://codeclimate.com/github/enderahmetyurt/turkish_support)
|
2
5
|
|
3
6
|
Fetch all banks and their information from http://www.tcmb.gov.tr/.
|
4
7
|
|
@@ -21,15 +24,22 @@ Or install it yourself as:
|
|
21
24
|
## Usage
|
22
25
|
|
23
26
|
```ruby
|
27
|
+
# Creates a TurkishBank object
|
24
28
|
turkish_bank = TurkishBanks::TurkishBank.new
|
25
|
-
|
29
|
+
|
30
|
+
# Gets last update date
|
26
31
|
turkish_bank.last_update_date
|
27
|
-
|
32
|
+
|
33
|
+
# Gets all banks
|
28
34
|
turkish_bank.banks
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
35
|
+
|
36
|
+
# Returns a bank object
|
37
|
+
bank = turkish_bank.get_information_of "türkiye cumhuriyeti ziraat bankası a.ş."
|
38
|
+
bank.name # => TÜRKİYE CUMHURİYETİ ZIRAAT BANKASI A.Ş.
|
39
|
+
|
40
|
+
# Returns a collection of branch objectes
|
41
|
+
branches = turkish_bank.get_branches_of "türkiye cumhuriyeti ziraat bankası a.ş."
|
42
|
+
branches.first.name # => "ANKARA ŞUBESİ"
|
33
43
|
```
|
34
44
|
|
35
45
|
## TODO
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require "turkish_support"
|
2
|
+
|
2
3
|
module TurkishBanks
|
3
4
|
class TurkishBank
|
4
5
|
using TurkishSupport
|
@@ -15,16 +16,20 @@ module TurkishBanks
|
|
15
16
|
end
|
16
17
|
|
17
18
|
def get_information_of bank_name
|
18
|
-
bank(bank_name).first["banka"]
|
19
|
+
bank = get_bank(bank_name).first["banka"]
|
20
|
+
TurkishBanks::Bank.new bank
|
19
21
|
end
|
20
22
|
|
21
23
|
def get_branches_of bank_name
|
22
|
-
|
23
|
-
|
24
|
+
branches = get_bank(bank_name).first["sube"]
|
25
|
+
branches.each do |branch|
|
26
|
+
TurkishBanks::Branch.new branch
|
27
|
+
end
|
28
|
+
end
|
24
29
|
|
25
30
|
private
|
26
31
|
|
27
|
-
def
|
32
|
+
def get_bank bank_name
|
28
33
|
@banks.select {|b| b["banka"]["bAd"] == bank_name.upcase}
|
29
34
|
end
|
30
35
|
end
|
data/lib/turkish_banks.rb
CHANGED
Binary file
|
data/turkish_banks.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
|
|
14
14
|
# end
|
15
15
|
|
16
16
|
spec.summary = "Fetch Turkish Banks and their branches."
|
17
|
-
spec.description = "Fetch the all data about Turkish Banks and
|
17
|
+
spec.description = "Fetch the all data about Turkish Banks and their branches."
|
18
18
|
spec.homepage = "https://github.com/enderahmetyurt/turkish_banks"
|
19
19
|
spec.license = "MIT"
|
20
20
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turkish_banks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ender Ahmet Yurt
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -80,7 +80,7 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
description: Fetch the all data about Turkish Banks and
|
83
|
+
description: Fetch the all data about Turkish Banks and their branches.
|
84
84
|
email:
|
85
85
|
- enderyurt@gmail.com
|
86
86
|
executables: []
|
@@ -98,8 +98,11 @@ files:
|
|
98
98
|
- bin/console
|
99
99
|
- bin/setup
|
100
100
|
- lib/turkish_banks.rb
|
101
|
+
- lib/turkish_banks/bank.rb
|
102
|
+
- lib/turkish_banks/branch.rb
|
101
103
|
- lib/turkish_banks/turkish_bank.rb
|
102
104
|
- lib/turkish_banks/version.rb
|
105
|
+
- turkish_banks-0.1.0.gem
|
103
106
|
- turkish_banks.gemspec
|
104
107
|
homepage: https://github.com/enderahmetyurt/turkish_banks
|
105
108
|
licenses:
|
@@ -121,8 +124,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
124
|
version: '0'
|
122
125
|
requirements: []
|
123
126
|
rubyforge_project:
|
124
|
-
rubygems_version: 2.
|
127
|
+
rubygems_version: 2.2.1
|
125
128
|
signing_key:
|
126
129
|
specification_version: 4
|
127
130
|
summary: Fetch Turkish Banks and their branches.
|
128
131
|
test_files: []
|
132
|
+
has_rdoc:
|