lsv-plus 1.0.2 → 1.0.3
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 +3 -1
- data/lib/lsv_plus/record_formatter.rb +1 -1
- data/lib/lsv_plus/version.rb +1 -1
- data/lsv-plus.gemspec +1 -0
- data/spec/integration/simple_spec.rb +6 -4
- data/spec/record_formatter_spec.rb +7 -1
- data/spec/spec_helper.rb +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f27c56d91a1b6603fb6099e462394ec8a495e583
|
4
|
+
data.tar.gz: 8a5bf1453101ba5e42c3827becd0aa4cee1fe442
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d68e6a5c9281030695f9bb5a8130e3bef9c70a938d4e5d761706fd567145d9589bf0a3d57a2c7efa1b20d96f57caea5a6946d3ec92deef610447ea3060646b65
|
7
|
+
data.tar.gz: e21c8dd2bb37fccffb14ec44691953c66ebf2fbee534313bf71ad1de09682032346154114e33e378ab593715ca95338611dc84795454c642ed4d900ed5b0e2b5
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
lsv-plus (1.0.
|
4
|
+
lsv-plus (1.0.2)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -52,6 +52,7 @@ GEM
|
|
52
52
|
term-ansicolor (1.3.2)
|
53
53
|
tins (~> 1.0)
|
54
54
|
thor (0.19.1)
|
55
|
+
timecop (0.8.0)
|
55
56
|
tins (1.6.0)
|
56
57
|
unf (0.1.4)
|
57
58
|
unf_ext
|
@@ -66,6 +67,7 @@ DEPENDENCIES
|
|
66
67
|
rake (~> 10.4)
|
67
68
|
rspec (~> 3.4)
|
68
69
|
rspec_junit_formatter (~> 0.2)
|
70
|
+
timecop (~> 0.8)
|
69
71
|
|
70
72
|
BUNDLED WITH
|
71
73
|
1.10.6
|
@@ -18,7 +18,7 @@ module LSVplus
|
|
18
18
|
def call
|
19
19
|
[
|
20
20
|
type, version, processing_type, processing_date,
|
21
|
-
|
21
|
+
debitor_bank_clearing_number, creation_date, creditor_bank_clearing_number,
|
22
22
|
creator_identification, record_number, lsv_identification,
|
23
23
|
currency, amount,
|
24
24
|
creditor_iban, creditor_address,
|
data/lib/lsv_plus/version.rb
CHANGED
data/lsv-plus.gemspec
CHANGED
@@ -22,4 +22,5 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_development_dependency 'rspec', '~> 3.4'
|
23
23
|
spec.add_development_dependency 'rspec_junit_formatter', '~> 0.2'
|
24
24
|
spec.add_development_dependency 'coveralls', '~> 0.8'
|
25
|
+
spec.add_development_dependency 'timecop', '~> 0.8'
|
25
26
|
end
|
@@ -40,7 +40,7 @@ RSpec.describe 'Simple LSV+ file' do
|
|
40
40
|
let(:record_string) do
|
41
41
|
[
|
42
42
|
record_type, version, processing_type, processing_date,
|
43
|
-
|
43
|
+
debitor_bank_clearing_number, creation_date, creditor_bank_clearing_number,
|
44
44
|
creator_identification, record_number, lsv_identification,
|
45
45
|
currency, amount,
|
46
46
|
creditor_iban, creditor_address,
|
@@ -90,8 +90,10 @@ RSpec.describe 'Simple LSV+ file' do
|
|
90
90
|
end
|
91
91
|
|
92
92
|
it 'returns a valid LSV+ file' do
|
93
|
-
|
94
|
-
|
95
|
-
|
93
|
+
Timecop.travel(Date.new(2016, 1, 10)) do
|
94
|
+
file = LSVplus::File.new(file_attributes)
|
95
|
+
file.add_record LSVplus::Record.new(record_attributes)
|
96
|
+
expect(file.to_s).to eq(valid_output)
|
97
|
+
end
|
96
98
|
end
|
97
99
|
end
|
@@ -29,6 +29,12 @@ RSpec.describe LSVplus::RecordFormatter do
|
|
29
29
|
let(:index) { 1 }
|
30
30
|
let(:instance) { LSVplus::RecordFormatter.new(file, record, index) }
|
31
31
|
|
32
|
+
around do |example|
|
33
|
+
Timecop.travel(Date.new(2016, 1, 10)) do
|
34
|
+
example.call
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
32
38
|
describe '.call' do
|
33
39
|
let(:record_formatter_double) { instance_double(LSVplus::RecordFormatter) }
|
34
40
|
|
@@ -43,7 +49,7 @@ RSpec.describe LSVplus::RecordFormatter do
|
|
43
49
|
describe '#call' do
|
44
50
|
it 'returns all the formatted fields as string' do
|
45
51
|
%i(type version processing_type processing_date
|
46
|
-
|
52
|
+
debitor_bank_clearing_number creation_date creditor_bank_clearing_number
|
47
53
|
creator_identification record_number lsv_identification
|
48
54
|
currency amount
|
49
55
|
creditor_iban creditor_address
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lsv-plus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Raffael Schmid
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0.8'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: timecop
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.8'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.8'
|
69
83
|
description: Create a LSV+ file which can be uploaded to your bank.
|
70
84
|
email:
|
71
85
|
- raffael.schmid@welltravel.com
|