bin_checker 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: e9bf657f1faebdc5a0eae041e9628c2673b4f988
4
- data.tar.gz: f164ed47719bed30940945ff97a3dd5b7e799966
3
+ metadata.gz: b4edb0f23a52ab499b7981197c10d8dda703e8cc
4
+ data.tar.gz: d652c3cca612f9a1f5007400052d52e4b9d63fe7
5
5
  SHA512:
6
- metadata.gz: 84aef049b71ed02a8f8e8619e058514dd55b46fb69f4ccfd408c8bf3448ee4a9720bf6d319e7f8dcb68d27dfe86a107cb8a9090b786faa0d3b6453d0e8dbdc20
7
- data.tar.gz: 4f0d7a69bf53772ee1fb7116950710aef5120eb8af9d7e4138fb8713c180b7adb4d703a305c594af32ef0709e64169304cac156fa0aaaa3b10af5cff50e86674
6
+ metadata.gz: e669d11db82d58a17381b85c9fdd0f9286420398c8f43167c3bfa45cc2c4d76fd4ddf747cdc23e833caf11f5311ed412ecf2dc2f51948ca60c4b937b26136a99
7
+ data.tar.gz: bff8603a85ae78b2ff2141441d8f03d911d09c93b794fea7835bbb37d2afd01874ad3da5a9ed969741aa592fbbe4ff729acb3c0f1e1e62566bcd9c6caa18f593
data/.gitignore CHANGED
@@ -21,4 +21,8 @@ tmp
21
21
  *.so
22
22
  *.o
23
23
  *.a
24
- mkmf.log
24
+ *~
25
+ *.swp
26
+ *.swo
27
+ *.log
28
+
data/README.md CHANGED
@@ -1,6 +1,14 @@
1
1
  # BinChecker
2
2
 
3
- Bin checker identifies Turkish banks with bin numbers, It bases on [berkayunal](https://github.com/berkayunal)'s bin [list](https://gist.github.com/berkayunal/1595676).
3
+ Bin checker identifies Turkish banks with bin numbers, It bases on [berkayunal](https://github.com/berkayunal)'s
4
+ bin [list](https://gist.github.com/berkayunal/1595676).
5
+
6
+ ## Requirements
7
+
8
+ Before generating your application, you will need:
9
+
10
+ * Ruby ~> 2.0
11
+ * Rails ~> 3.0 or Rails ~> 4.0
4
12
 
5
13
  ## Installation
6
14
 
@@ -25,24 +33,25 @@ After installation you should run
25
33
  for seeding datas.
26
34
 
27
35
  ## Usage
28
- When you want to get bank infos just run like
29
-
30
- card = BinNumber.get_bank('454894')
31
-
32
- card.bank_name
33
- => "T.C. ZİRAAT BANKASI A.Ş."
34
-
35
- card.card_type
36
- => "VISA"
37
-
38
- card.sub_type
39
- => "CLASSIC"
40
-
41
- card.virtual
42
- => false
43
-
44
- card.prepaid
45
- => false
36
+
37
+ When you want to get bank infos just run like
38
+
39
+ card = BinNumber.find_by bin_number: '454894'
40
+
41
+ card.bank_name
42
+ => "T.C. ZİRAAT BANKASI A.Ş."
43
+
44
+ card.card_type
45
+ => "VISA"
46
+
47
+ card.sub_type
48
+ => "CLASSIC"
49
+
50
+ card.virtual
51
+ => false
52
+
53
+ card.prepaid
54
+ => false
46
55
 
47
56
  ## Bugs and Feedback
48
57
 
@@ -72,4 +81,4 @@ Once you've made your great commits:
72
81
 
73
82
  ## License
74
83
 
75
- Copyright 2014 lab2023 - information technologies
84
+ Copyright 2014 lab2023 - information technologies
@@ -1,3 +1,3 @@
1
1
  module BinChecker
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'.freeze
3
3
  end
@@ -5,6 +5,7 @@ class BinNumber < ActiveRecord::Base
5
5
  self.table_name = 'bin_checker_bin_numbers'
6
6
 
7
7
  def self.get_bank(bin_id)
8
+ ActiveSupport::Deprecation.warn "`self.get_bank` is deprecated and may be removed from future releases.", caller
8
9
  bin_number = BinNumber.where(bin_number: bin_id.to_s).try(:first)
9
10
  if bin_number.present?
10
11
  bin_number
@@ -12,4 +13,4 @@ class BinNumber < ActiveRecord::Base
12
13
  nil
13
14
  end
14
15
  end
15
- end
16
+ end
data/log/.gitkeep ADDED
File without changes
data/spec/spec_helper.rb CHANGED
@@ -2,11 +2,14 @@ require 'rubygems'
2
2
  require 'bundler/setup'
3
3
  require 'active_model'
4
4
  require 'active_record'
5
+ require 'logger'
5
6
 
6
7
  Bundler.setup
7
8
 
8
9
  require 'bin_checker'
9
10
 
11
+ ActiveRecord::Base.logger = Logger.new(File.join(File.dirname(__FILE__), "../log/debug.log"))
12
+
10
13
  RSpec.configure do |config|
11
14
 
12
- end
15
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bin_checker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - lab2023
@@ -9,76 +9,76 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-04 00:00:00.000000000 Z
12
+ date: 2014-11-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
20
  version: '1.6'
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ~>
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: '1.6'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - '>='
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rspec
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - '>='
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - '>='
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: activemodel
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - '>='
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - '>='
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: activerecord
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - '>='
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - '>='
81
+ - - ">="
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  description: Bin checker identifies Turkish banks with bin numbers.
@@ -89,8 +89,8 @@ executables: []
89
89
  extensions: []
90
90
  extra_rdoc_files: []
91
91
  files:
92
- - .gitignore
93
- - .travis.yml
92
+ - ".gitignore"
93
+ - ".travis.yml"
94
94
  - CHANGELOG.md
95
95
  - Gemfile
96
96
  - LICENSE.txt
@@ -106,6 +106,7 @@ files:
106
106
  - lib/models/bin_number.rb
107
107
  - lib/tasks/files/bin.csv
108
108
  - lib/tasks/initialize_bin_numbers.rake
109
+ - log/.gitkeep
109
110
  - spec/bin_number_spec.rb
110
111
  - spec/spec_helper.rb
111
112
  homepage: https://github.com/lab2023/bin_checker
@@ -118,17 +119,17 @@ require_paths:
118
119
  - lib
119
120
  required_ruby_version: !ruby/object:Gem::Requirement
120
121
  requirements:
121
- - - '>='
122
+ - - ">="
122
123
  - !ruby/object:Gem::Version
123
124
  version: '0'
124
125
  required_rubygems_version: !ruby/object:Gem::Requirement
125
126
  requirements:
126
- - - '>='
127
+ - - ">="
127
128
  - !ruby/object:Gem::Version
128
129
  version: '0'
129
130
  requirements: []
130
131
  rubyforge_project:
131
- rubygems_version: 2.0.14
132
+ rubygems_version: 2.2.2
132
133
  signing_key:
133
134
  specification_version: 4
134
135
  summary: Bin checker identifies Turkish banks with bin numbers.