rbraspag 0.0.16 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/rbraspag/utils.rb +1 -1
- data/lib/rbraspag/version.rb +1 -1
- data/spec/eft_spec.rb +1 -1
- data/spec/utils_spec.rb +17 -1
- metadata +22 -23
- data/rbraspag-0.0.11.gem +0 -0
data/Gemfile.lock
CHANGED
data/lib/rbraspag/utils.rb
CHANGED
@@ -3,7 +3,7 @@ module Braspag
|
|
3
3
|
def self.convert_decimal_to_string(value)
|
4
4
|
cents = "0#{((value - value.to_i) * 100).to_i}".slice(-2,2)
|
5
5
|
integer = (value - (value - value.to_i)).to_i
|
6
|
-
"#{integer}
|
6
|
+
"#{integer},#{cents}"
|
7
7
|
end
|
8
8
|
|
9
9
|
def self.convert_to_map(document, map = {})
|
data/lib/rbraspag/version.rb
CHANGED
data/spec/eft_spec.rb
CHANGED
@@ -156,7 +156,7 @@ describe Braspag::Eft do
|
|
156
156
|
<input type="text" name="VENDAID" value="1234123125" />
|
157
157
|
<input type="text" name="nome" value="" />
|
158
158
|
<input type="text" name="CPF" value="" />
|
159
|
-
<input type="text" name="VALOR" value="
|
159
|
+
<input type="text" name="VALOR" value="123,00" />
|
160
160
|
<input type="text" name="CODPAGAMENTO" value="11" />
|
161
161
|
<input type="text" name="PARCELAS" value="1" />
|
162
162
|
<input type="text" name="TIPOPARCELADO" value="0" />
|
data/spec/utils_spec.rb
CHANGED
@@ -3,8 +3,24 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
|
3
3
|
|
4
4
|
describe Braspag::Utils do
|
5
5
|
it '.convert_decimal_to_string' do
|
6
|
-
Braspag::Utils.convert_decimal_to_string(10.80).should == "
|
6
|
+
Braspag::Utils.convert_decimal_to_string(10.80).should == "10,80"
|
7
7
|
end
|
8
8
|
|
9
|
+
it '.convert_decimal_to_string' do
|
10
|
+
Braspag::Utils.convert_decimal_to_string(10.00).should == "10,00"
|
11
|
+
end
|
12
|
+
|
13
|
+
it '.convert_decimal_to_string' do
|
14
|
+
Braspag::Utils.convert_decimal_to_string(1).should == "1,00"
|
15
|
+
end
|
16
|
+
|
17
|
+
it '.convert_decimal_to_string' do
|
18
|
+
Braspag::Utils.convert_decimal_to_string(1.00).should == "1,00"
|
19
|
+
end
|
20
|
+
|
21
|
+
it '.convert_decimal_to_string' do
|
22
|
+
Braspag::Utils.convert_decimal_to_string(0.90).should == "0,90"
|
23
|
+
end
|
24
|
+
|
9
25
|
pending "convert_to_map"
|
10
26
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbraspag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.17
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -14,12 +14,12 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2011-08-
|
17
|
+
date: 2011-08-16 00:00:00.000000000 -03:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: cs-httpi
|
22
|
-
requirement: &
|
22
|
+
requirement: &15473600 !ruby/object:Gem::Requirement
|
23
23
|
none: false
|
24
24
|
requirements:
|
25
25
|
- - ! '>='
|
@@ -27,10 +27,10 @@ dependencies:
|
|
27
27
|
version: 0.9.5.2
|
28
28
|
type: :runtime
|
29
29
|
prerelease: false
|
30
|
-
version_requirements: *
|
30
|
+
version_requirements: *15473600
|
31
31
|
- !ruby/object:Gem::Dependency
|
32
32
|
name: json
|
33
|
-
requirement: &
|
33
|
+
requirement: &15466960 !ruby/object:Gem::Requirement
|
34
34
|
none: false
|
35
35
|
requirements:
|
36
36
|
- - ! '>='
|
@@ -38,10 +38,10 @@ dependencies:
|
|
38
38
|
version: '0'
|
39
39
|
type: :runtime
|
40
40
|
prerelease: false
|
41
|
-
version_requirements: *
|
41
|
+
version_requirements: *15466960
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: nokogiri
|
44
|
-
requirement: &
|
44
|
+
requirement: &15462740 !ruby/object:Gem::Requirement
|
45
45
|
none: false
|
46
46
|
requirements:
|
47
47
|
- - ! '>='
|
@@ -49,10 +49,10 @@ dependencies:
|
|
49
49
|
version: '0'
|
50
50
|
type: :runtime
|
51
51
|
prerelease: false
|
52
|
-
version_requirements: *
|
52
|
+
version_requirements: *15462740
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: rake
|
55
|
-
requirement: &
|
55
|
+
requirement: &15459920 !ruby/object:Gem::Requirement
|
56
56
|
none: false
|
57
57
|
requirements:
|
58
58
|
- - ! '>='
|
@@ -60,10 +60,10 @@ dependencies:
|
|
60
60
|
version: '0'
|
61
61
|
type: :development
|
62
62
|
prerelease: false
|
63
|
-
version_requirements: *
|
63
|
+
version_requirements: *15459920
|
64
64
|
- !ruby/object:Gem::Dependency
|
65
65
|
name: rspec
|
66
|
-
requirement: &
|
66
|
+
requirement: &15457340 !ruby/object:Gem::Requirement
|
67
67
|
none: false
|
68
68
|
requirements:
|
69
69
|
- - ! '>='
|
@@ -71,10 +71,10 @@ dependencies:
|
|
71
71
|
version: '0'
|
72
72
|
type: :development
|
73
73
|
prerelease: false
|
74
|
-
version_requirements: *
|
74
|
+
version_requirements: *15457340
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: fakeweb
|
77
|
-
requirement: &
|
77
|
+
requirement: &15455720 !ruby/object:Gem::Requirement
|
78
78
|
none: false
|
79
79
|
requirements:
|
80
80
|
- - ! '>='
|
@@ -82,10 +82,10 @@ dependencies:
|
|
82
82
|
version: '0'
|
83
83
|
type: :development
|
84
84
|
prerelease: false
|
85
|
-
version_requirements: *
|
85
|
+
version_requirements: *15455720
|
86
86
|
- !ruby/object:Gem::Dependency
|
87
87
|
name: shoulda-matchers
|
88
|
-
requirement: &
|
88
|
+
requirement: &15453720 !ruby/object:Gem::Requirement
|
89
89
|
none: false
|
90
90
|
requirements:
|
91
91
|
- - ! '>='
|
@@ -93,10 +93,10 @@ dependencies:
|
|
93
93
|
version: '0'
|
94
94
|
type: :development
|
95
95
|
prerelease: false
|
96
|
-
version_requirements: *
|
96
|
+
version_requirements: *15453720
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: guard-rspec
|
99
|
-
requirement: &
|
99
|
+
requirement: &15451080 !ruby/object:Gem::Requirement
|
100
100
|
none: false
|
101
101
|
requirements:
|
102
102
|
- - ! '>='
|
@@ -104,10 +104,10 @@ dependencies:
|
|
104
104
|
version: '0'
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
|
-
version_requirements: *
|
107
|
+
version_requirements: *15451080
|
108
108
|
- !ruby/object:Gem::Dependency
|
109
109
|
name: guard-bundler
|
110
|
-
requirement: &
|
110
|
+
requirement: &15449120 !ruby/object:Gem::Requirement
|
111
111
|
none: false
|
112
112
|
requirements:
|
113
113
|
- - ! '>='
|
@@ -115,10 +115,10 @@ dependencies:
|
|
115
115
|
version: '0'
|
116
116
|
type: :development
|
117
117
|
prerelease: false
|
118
|
-
version_requirements: *
|
118
|
+
version_requirements: *15449120
|
119
119
|
- !ruby/object:Gem::Dependency
|
120
120
|
name: ruby-debug19
|
121
|
-
requirement: &
|
121
|
+
requirement: &15409620 !ruby/object:Gem::Requirement
|
122
122
|
none: false
|
123
123
|
requirements:
|
124
124
|
- - ! '>='
|
@@ -126,7 +126,7 @@ dependencies:
|
|
126
126
|
version: '0'
|
127
127
|
type: :development
|
128
128
|
prerelease: false
|
129
|
-
version_requirements: *
|
129
|
+
version_requirements: *15409620
|
130
130
|
description: rbraspag gem to use Braspag gateway
|
131
131
|
email:
|
132
132
|
- tinorj@gmail.com
|
@@ -161,7 +161,6 @@ files:
|
|
161
161
|
- lib/rbraspag/payment_method.rb
|
162
162
|
- lib/rbraspag/utils.rb
|
163
163
|
- lib/rbraspag/version.rb
|
164
|
-
- rbraspag-0.0.11.gem
|
165
164
|
- rbraspag.gemspec
|
166
165
|
- spec/bill_spec.rb
|
167
166
|
- spec/connection_spec.rb
|
data/rbraspag-0.0.11.gem
DELETED
Binary file
|