turkish_banks 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/turkish_banks/bank.rb +2 -2
- data/lib/turkish_banks/branch.rb +2 -2
- data/lib/turkish_banks/turkish_bank.rb +6 -7
- data/lib/turkish_banks/version.rb +1 -1
- data/turkish_banks.gemspec +2 -2
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca42c14b39a614002531ce11b1725e0cccf081ab
|
4
|
+
data.tar.gz: ab14ff70a0ea3c418e9f4e73bacce962e5f6e8a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d7a6f65122b6074ff253051fb8420ab074dc975a730973775700498c7e6fc74c7cf226f67098a2eeb14f6b10d75f42e56aa5e1f3fab29fbceb2ea35ef58123c
|
7
|
+
data.tar.gz: eb9c06486ceaaa47ca041c0ade0d2a2974cbc800284a5c81fcdc22c740e6ac29f7fbc70271b93d20d72744c40cfca5bb6607af83b4b0c206786922163f5546fa
|
data/Gemfile
CHANGED
data/lib/turkish_banks/bank.rb
CHANGED
data/lib/turkish_banks/branch.rb
CHANGED
@@ -5,22 +5,22 @@ module TurkishBanks
|
|
5
5
|
using TurkishSupport
|
6
6
|
attr_accessor :last_update_date, :banks
|
7
7
|
|
8
|
-
BANKS_URL = "http://eftemkt.tcmb.gov.tr/bankasubelistesi/bankaSubeTumListe.xml"
|
8
|
+
BANKS_URL = "http://eftemkt.tcmb.gov.tr/bankasubelistesi/bankaSubeTumListe.xml".freeze
|
9
9
|
|
10
10
|
def initialize
|
11
11
|
doc = Nokogiri.XML(open(BANKS_URL), nil, 'UTF-8')
|
12
12
|
doc.remove_namespaces!
|
13
|
-
response
|
13
|
+
response = Hash.from_xml(doc.to_s)
|
14
14
|
@last_update_date = response["bankaSubeTumListe"]["tarih"]
|
15
|
-
@banks
|
15
|
+
@banks = response["bankaSubeTumListe"]["bankaSubeleri"]
|
16
16
|
end
|
17
17
|
|
18
|
-
def get_information_of
|
18
|
+
def get_information_of(bank_name)
|
19
19
|
bank = get_bank(bank_name).first["banka"]
|
20
20
|
TurkishBanks::Bank.new bank
|
21
21
|
end
|
22
22
|
|
23
|
-
def get_branches_of
|
23
|
+
def get_branches_of(bank_name)
|
24
24
|
branches = get_bank(bank_name).first["sube"]
|
25
25
|
branches.each do |branch|
|
26
26
|
TurkishBanks::Branch.new branch
|
@@ -28,8 +28,7 @@ module TurkishBanks
|
|
28
28
|
end
|
29
29
|
|
30
30
|
private
|
31
|
-
|
32
|
-
def get_bank bank_name
|
31
|
+
def get_bank(bank_name)
|
33
32
|
@banks.select {|b| b["banka"]["bAd"] == bank_name.upcase}
|
34
33
|
end
|
35
34
|
end
|
data/turkish_banks.gemspec
CHANGED
@@ -24,8 +24,8 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.require_paths = ["lib"]
|
25
25
|
|
26
26
|
spec.add_development_dependency "bundler", "~> 1.8"
|
27
|
-
spec.add_development_dependency "rake", "~>
|
28
|
-
spec.add_development_dependency "nokogiri", "~> 1.
|
27
|
+
spec.add_development_dependency "rake", "~> 12.0"
|
28
|
+
spec.add_development_dependency "nokogiri", "~> 1.7.0"
|
29
29
|
spec.add_development_dependency "activesupport"
|
30
30
|
spec.add_development_dependency "turkish_support"
|
31
31
|
end
|
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.4.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:
|
11
|
+
date: 2017-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -30,28 +30,28 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '12.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '12.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: nokogiri
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.7.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: 1.7.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: activesupport
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -123,9 +123,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
123
|
version: '0'
|
124
124
|
requirements: []
|
125
125
|
rubyforge_project:
|
126
|
-
rubygems_version: 2.
|
126
|
+
rubygems_version: 2.6.8
|
127
127
|
signing_key:
|
128
128
|
specification_version: 4
|
129
129
|
summary: Fetch Turkish Banks and their branches.
|
130
130
|
test_files: []
|
131
|
-
has_rdoc:
|