ci_power 0.0.24 → 0.0.25
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ci_power/action.rb +63 -63
- data/lib/ci_power/address.rb +97 -97
- data/lib/ci_power/communication.rb +18 -18
- data/lib/ci_power/debt_claim.rb +73 -73
- data/lib/ci_power/debtor_data.rb +65 -65
- data/lib/ci_power/dossier_data.rb +93 -93
- data/lib/ci_power/export.rb +165 -165
- data/lib/ci_power/installment_plan.rb +39 -39
- data/lib/ci_power/open_appointment.rb +45 -21
- data/lib/ci_power/process_data.rb +108 -108
- data/lib/ci_power/record.rb +41 -41
- data/lib/ci_power/version.rb +3 -3
- data/lib/ci_power.rb +13 -13
- data/lib/generators/ci_power/ci_power_generator.rb +11 -11
- data/lib/generators/ci_power/templates/cip_export.rb +12 -12
- data/lib/tasks/ci_power.rake +23 -23
- data/spec/ci_power/export_spec.rb +74 -74
- data/spec/ci_power/installment_plan_spec.rb +60 -60
- data/spec/spec_helper.rb +20 -20
- metadata +94 -88
@@ -1,61 +1,61 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
module CiPower
|
4
|
-
describe InstallmentPlan do
|
5
|
-
describe "Functions" do
|
6
|
-
let(:installment_plan) do
|
7
|
-
InstallmentPlan.new :group_no => '1',
|
8
|
-
:address_identification_debtee => '123456',
|
9
|
-
:address_identification_debtor => '987654',
|
10
|
-
:no_of_installments => '4',
|
11
|
-
:installment_amount => '215',
|
12
|
-
:first_installment_date => '20120816',
|
13
|
-
:period => 'Month',
|
14
|
-
:interval => '2',
|
15
|
-
:installment_fee => '15',
|
16
|
-
:fixed_size_installment_amount => '0',
|
17
|
-
:last_installment_date => '20130416'
|
18
|
-
|
19
|
-
end
|
20
|
-
|
21
|
-
describe "#to_cip" do
|
22
|
-
it "record_type should be 15 on pos 1" do
|
23
|
-
installment_plan.to_cip[0..1].should == '15'
|
24
|
-
end
|
25
|
-
it "group_no should be 1 on pos 3" do
|
26
|
-
installment_plan.to_cip[2..8].strip.should == '1'
|
27
|
-
end
|
28
|
-
it "address_identification_debtee should be 123456 on pos 10" do
|
29
|
-
installment_plan.to_cip[9..33].strip.should == '123456'
|
30
|
-
end
|
31
|
-
it "address_identification_debtor should be 987654 on pos 35" do
|
32
|
-
installment_plan.to_cip[34..58].strip.should == '987654'
|
33
|
-
end
|
34
|
-
it "no_of_installments should be 4 on pos 60" do
|
35
|
-
installment_plan.to_cip[59..61].strip.should == '4'
|
36
|
-
end
|
37
|
-
it "installment_amount should be 215 on pos 63" do
|
38
|
-
installment_plan.to_cip[62..76].strip.should == '215'
|
39
|
-
end
|
40
|
-
it "first_installment_date should be 20120816 on pos 78" do
|
41
|
-
installment_plan.to_cip[77..86].strip.should == '20120816'
|
42
|
-
end
|
43
|
-
it "period should be Month on pos 88" do
|
44
|
-
installment_plan.to_cip[87..96].strip.should == 'Month'
|
45
|
-
end
|
46
|
-
it "interval should be 2 on pos 98" do
|
47
|
-
installment_plan.to_cip[97..99].strip.should == '2'
|
48
|
-
end
|
49
|
-
it "installment_fee should be 15 on pos 101" do
|
50
|
-
installment_plan.to_cip[100..114].strip.should == '15'
|
51
|
-
end
|
52
|
-
it "fixed_size_installment_amount should be 0 on pos 116" do
|
53
|
-
installment_plan.to_cip[115..115].strip.should == '0'
|
54
|
-
end
|
55
|
-
it "last_installment_date should be 20130416 on pos 117" do
|
56
|
-
installment_plan.to_cip[116..125].strip.should == '20130416'
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module CiPower
|
4
|
+
describe InstallmentPlan do
|
5
|
+
describe "Functions" do
|
6
|
+
let(:installment_plan) do
|
7
|
+
InstallmentPlan.new :group_no => '1',
|
8
|
+
:address_identification_debtee => '123456',
|
9
|
+
:address_identification_debtor => '987654',
|
10
|
+
:no_of_installments => '4',
|
11
|
+
:installment_amount => '215',
|
12
|
+
:first_installment_date => '20120816',
|
13
|
+
:period => 'Month',
|
14
|
+
:interval => '2',
|
15
|
+
:installment_fee => '15',
|
16
|
+
:fixed_size_installment_amount => '0',
|
17
|
+
:last_installment_date => '20130416'
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "#to_cip" do
|
22
|
+
it "record_type should be 15 on pos 1" do
|
23
|
+
installment_plan.to_cip[0..1].should == '15'
|
24
|
+
end
|
25
|
+
it "group_no should be 1 on pos 3" do
|
26
|
+
installment_plan.to_cip[2..8].strip.should == '1'
|
27
|
+
end
|
28
|
+
it "address_identification_debtee should be 123456 on pos 10" do
|
29
|
+
installment_plan.to_cip[9..33].strip.should == '123456'
|
30
|
+
end
|
31
|
+
it "address_identification_debtor should be 987654 on pos 35" do
|
32
|
+
installment_plan.to_cip[34..58].strip.should == '987654'
|
33
|
+
end
|
34
|
+
it "no_of_installments should be 4 on pos 60" do
|
35
|
+
installment_plan.to_cip[59..61].strip.should == '4'
|
36
|
+
end
|
37
|
+
it "installment_amount should be 215 on pos 63" do
|
38
|
+
installment_plan.to_cip[62..76].strip.should == '215'
|
39
|
+
end
|
40
|
+
it "first_installment_date should be 20120816 on pos 78" do
|
41
|
+
installment_plan.to_cip[77..86].strip.should == '20120816'
|
42
|
+
end
|
43
|
+
it "period should be Month on pos 88" do
|
44
|
+
installment_plan.to_cip[87..96].strip.should == 'Month'
|
45
|
+
end
|
46
|
+
it "interval should be 2 on pos 98" do
|
47
|
+
installment_plan.to_cip[97..99].strip.should == '2'
|
48
|
+
end
|
49
|
+
it "installment_fee should be 15 on pos 101" do
|
50
|
+
installment_plan.to_cip[100..114].strip.should == '15'
|
51
|
+
end
|
52
|
+
it "fixed_size_installment_amount should be 0 on pos 116" do
|
53
|
+
installment_plan.to_cip[115..115].strip.should == '0'
|
54
|
+
end
|
55
|
+
it "last_installment_date should be 20130416 on pos 117" do
|
56
|
+
installment_plan.to_cip[116..125].strip.should == '20130416'
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
61
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
# This file was generated by the `rspec --init` command. Conventionally, all
|
2
|
-
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
-
# Require this file using `require "spec_helper"` to ensure that it is only
|
4
|
-
# loaded once.
|
5
|
-
#
|
6
|
-
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
7
|
-
|
8
|
-
require 'ci_power'
|
9
|
-
|
10
|
-
RSpec.configure do |config|
|
11
|
-
config.treat_symbols_as_metadata_keys_with_true_values = true
|
12
|
-
config.run_all_when_everything_filtered = true
|
13
|
-
config.filter_run :focus
|
14
|
-
|
15
|
-
# Run specs in random order to surface order dependencies. If you find an
|
16
|
-
# order dependency and want to debug it, you can fix the order by providing
|
17
|
-
# the seed, which is printed after each run.
|
18
|
-
# --seed 1234
|
19
|
-
config.order = 'random'
|
20
|
-
end
|
1
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
2
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
+
# Require this file using `require "spec_helper"` to ensure that it is only
|
4
|
+
# loaded once.
|
5
|
+
#
|
6
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
7
|
+
|
8
|
+
require 'ci_power'
|
9
|
+
|
10
|
+
RSpec.configure do |config|
|
11
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
12
|
+
config.run_all_when_everything_filtered = true
|
13
|
+
config.filter_run :focus
|
14
|
+
|
15
|
+
# Run specs in random order to surface order dependencies. If you find an
|
16
|
+
# order dependency and want to debug it, you can fix the order by providing
|
17
|
+
# the seed, which is printed after each run.
|
18
|
+
# --seed 1234
|
19
|
+
config.order = 'random'
|
20
|
+
end
|
metadata
CHANGED
@@ -1,109 +1,115 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: ci_power
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.25
|
4
5
|
prerelease:
|
5
|
-
version: 0.0.24
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
8
|
-
|
7
|
+
authors:
|
8
|
+
- Maik Duff
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
12
|
+
date: 2012-09-13 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rspec
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rdoc
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rake
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
49
62
|
description: Creates input files for CI-Power interface
|
50
|
-
email:
|
51
|
-
|
63
|
+
email:
|
64
|
+
- md@impac.ch
|
52
65
|
executables: []
|
53
|
-
|
54
66
|
extensions: []
|
55
|
-
|
56
67
|
extra_rdoc_files: []
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
- spec/ci_power/installment_plan_spec.rb
|
78
|
-
has_rdoc: true
|
68
|
+
files:
|
69
|
+
- lib/ci_power/action.rb
|
70
|
+
- lib/ci_power/address.rb
|
71
|
+
- lib/ci_power/communication.rb
|
72
|
+
- lib/ci_power/debtor_data.rb
|
73
|
+
- lib/ci_power/debt_claim.rb
|
74
|
+
- lib/ci_power/dossier_data.rb
|
75
|
+
- lib/ci_power/export.rb
|
76
|
+
- lib/ci_power/installment_plan.rb
|
77
|
+
- lib/ci_power/open_appointment.rb
|
78
|
+
- lib/ci_power/process_data.rb
|
79
|
+
- lib/ci_power/record.rb
|
80
|
+
- lib/ci_power/version.rb
|
81
|
+
- lib/ci_power.rb
|
82
|
+
- lib/generators/ci_power/ci_power_generator.rb
|
83
|
+
- lib/generators/ci_power/templates/cip_export.rb
|
84
|
+
- lib/tasks/ci_power.rake
|
85
|
+
- spec/ci_power/export_spec.rb
|
86
|
+
- spec/ci_power/installment_plan_spec.rb
|
87
|
+
- spec/spec_helper.rb
|
79
88
|
homepage: http://www.impac.ch
|
80
89
|
licenses: []
|
81
|
-
|
82
90
|
post_install_message:
|
83
91
|
rdoc_options: []
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
92
|
+
require_paths:
|
93
|
+
- lib
|
94
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
88
95
|
none: false
|
89
|
-
requirements:
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ! '>='
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
101
|
none: false
|
95
|
-
requirements:
|
96
|
-
|
97
|
-
|
98
|
-
|
102
|
+
requirements:
|
103
|
+
- - ! '>='
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '0'
|
99
106
|
requirements: []
|
100
|
-
|
101
107
|
rubyforge_project: ci_power
|
102
|
-
rubygems_version: 1.
|
108
|
+
rubygems_version: 1.8.24
|
103
109
|
signing_key:
|
104
110
|
specification_version: 3
|
105
111
|
summary: CI-Power Interface
|
106
|
-
test_files:
|
107
|
-
|
108
|
-
|
109
|
-
|
112
|
+
test_files:
|
113
|
+
- spec/ci_power/export_spec.rb
|
114
|
+
- spec/ci_power/installment_plan_spec.rb
|
115
|
+
- spec/spec_helper.rb
|