sepa_clearer 0.0.1

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a7ce7eb7546a981a9ef75e7b6262ad986130b4b7
4
+ data.tar.gz: 3c710cc6ce56c5978f1bdb7091cd5dc368c48f03
5
+ SHA512:
6
+ metadata.gz: 063a702bc34cc03c1381b6a5214d5b5bb3a21d7d30be0038faf5aca98718b7d100c658e1b789158511150d1917248bd052e14b46f80de734604cf914e38046bb
7
+ data.tar.gz: 10f0f9f913932f09dc2e3ac603bc6756f8952aad363b5380f5c3ae7b753f955680b565b6aae1ae19d1d6ce94550121b704801467783619d913543ad86a470118
data/.gitignore ADDED
@@ -0,0 +1,22 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in sepa-clearer.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Maximilian Schulz
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # SepaClearer
2
+
3
+ Check capabilities of european payment providers who participate in the SEPA
4
+ system. The gem currently supports only "Deutsche Bundesbank" as a clearer. You
5
+ can fetch all providers and their capabilities or fetch only a unique provider
6
+ by his BIC.
7
+
8
+ Currently the gem fetches all data into memory which can be quite heavy. You
9
+ might want to store it in your local database for quick and easy access.
10
+
11
+
12
+ ## Installation
13
+
14
+ Add this line to your application's Gemfile:
15
+
16
+ gem 'sepa-clearer'
17
+
18
+ And then execute:
19
+
20
+ $ bundle
21
+
22
+ Or install it yourself as:
23
+
24
+ $ gem install sepa-clearer
25
+
26
+
27
+ ## Usage
28
+
29
+ # Create a new cleaer instance
30
+ clearer = SepaClearer::Clearer.new('DeutscheBundesbank')
31
+
32
+ # Fetch all payment providers
33
+ clearer.all
34
+ # => [<PaymentProvider: …>, <PaymentProvider: …>]
35
+
36
+ # Fetch a single provider by his identifier code. The BIC is normalized (uppercase and 11 letters filled with X)
37
+ clearer.find_by_bic('DEIRGENDWAS')
38
+ # => <PaymentProvider: @bic="DEIRGENDWAS", @name="Your Provider", @supports=[:core, :cor1]>
39
+
40
+
41
+ ## Update clearer list
42
+
43
+ Run ```bin/update_data``` from your command line. The script should fetch the
44
+ latest data and replace the clearer lists with the new data.
45
+
46
+ If the script fails, check if the urls have changed. You should find the data here:
47
+ http://www.bundesbank.de/Navigation/EN/Tasks/Payment_systems/SEPA/SCL_Directory/scl_directory.html
48
+
49
+
50
+ ## Contributing
51
+
52
+ 1. Fork it ( https://github.com/railslove/sepa-clearer/fork )
53
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
54
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
55
+ 4. Push to the branch (`git push origin my-new-feature`)
56
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
data/bin/update_data ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env ruby
2
+ echo "Fetching new data from Bundesbank"
3
+ curl http://www.bundesbank.de/Redaktion/DE/Downloads/Aufgaben/Unbarer_Zahlungsverkehr/SEPA/verzeichnis_der_erreichbaren_zahlungsdienstleister.csv?__blob=publicationFile > data/bundesbank.new.csv
4
+
5
+ echo "Remove first crappy line"
6
+ sed -i "" 1d data/bundesbank.new.csv
7
+
8
+ echo "Replace old file with new one"
9
+ rm data/deutsche_bundesbank.csv
10
+ mv data/bundesbank.new.csv data/deutsche_bundesbank.csv
11
+
12
+ echo "Done!"