rs.ge 0.0.13 → 0.0.14
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.
- data/lib/rs.rb +2 -2
- data/lib/rs/car.rb +6 -0
- data/lib/rs/version.rb +1 -1
- data/lib/rs/waybill.rb +3 -0
- data/rs.gemspec +2 -2
- data/spec/rs/car_spec.rb +25 -0
- data/tmp/waybill.pdf +12 -4
- metadata +8 -6
data/lib/rs.rb
CHANGED
@@ -6,6 +6,7 @@ require 'rs/dict'
|
|
6
6
|
require 'rs/waybill'
|
7
7
|
require 'rs/print'
|
8
8
|
require 'rs/invoice'
|
9
|
+
require 'rs/car'
|
9
10
|
|
10
11
|
module RS
|
11
12
|
# ელქტრონული ზედნადების ფორმის WSDL მისამართი
|
@@ -72,5 +73,4 @@ module RS
|
|
72
73
|
end
|
73
74
|
params['attributes!'] = attributes unless attributes.empty?
|
74
75
|
end
|
75
|
-
|
76
|
-
end
|
76
|
+
end
|
data/lib/rs/car.rb
ADDED
data/lib/rs/version.rb
CHANGED
data/lib/rs/waybill.rb
CHANGED
@@ -266,6 +266,9 @@ module RS
|
|
266
266
|
unless RS.is_valid_personal_tin(self.driver_tin)
|
267
267
|
RS.append_validation_error(@validation_errors, :driver_tin, 'მძღოლის პირადი ნომერი არასწორია')
|
268
268
|
end
|
269
|
+
unless RS.valid_vehicle_number?(self.car_number)
|
270
|
+
RS.append_validation_error(@validation_errors, :car_number, 'არასწორი მანქანის ნომერი: ჩაწერეთ ABC123 ფორმატში!')
|
271
|
+
end
|
269
272
|
else
|
270
273
|
if self.driver_name.nil? or self.driver_name.strip.empty?
|
271
274
|
RS.append_validation_error(@validation_errors, :driver_name, 'ჩაწერეთ მძღოლის სახელი')
|
data/rs.gemspec
CHANGED
data/spec/rs/car_spec.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
def valid_vehicle_number(number)
|
6
|
+
describe "#{number} სწორი სახელმწიფო ნომერია" do
|
7
|
+
it { RS.valid_vehicle_number?(number).should == true }
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def invalid_vehicle_number(number)
|
12
|
+
describe "#{number} არასწორი სახელმწიფო ნომერია" do
|
13
|
+
it { RS.valid_vehicle_number?(number).should == false }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
describe 'მანქანის ნომრების შემოწმება' do
|
18
|
+
valid_vehicle_number 'WDW842'
|
19
|
+
valid_vehicle_number 'KFK061'
|
20
|
+
valid_vehicle_number 'wdw467'
|
21
|
+
valid_vehicle_number 'kfk061'
|
22
|
+
invalid_vehicle_number 'WDW-842'
|
23
|
+
invalid_vehicle_number 'Subaru WDW842'
|
24
|
+
invalid_vehicle_number 'Mercedes KFK061'
|
25
|
+
end
|
data/tmp/waybill.pdf
CHANGED
@@ -173,7 +173,7 @@ S
|
|
173
173
|
BT
|
174
174
|
216.128 787.246 Td
|
175
175
|
/F1.0 7 Tf
|
176
|
-
<
|
176
|
+
<323620> Tj
|
177
177
|
/F1.1 7 Tf
|
178
178
|
<2d222e2f2b20> Tj
|
179
179
|
/F1.0 7 Tf
|
@@ -243,7 +243,11 @@ S
|
|
243
243
|
BT
|
244
244
|
367.06 787.246 Td
|
245
245
|
/F1.0 7 Tf
|
246
|
-
|
246
|
+
<<<<<<< HEAD
|
247
|
+
<31343a3538> Tj
|
248
|
+
=======
|
249
|
+
<32303a3534> Tj
|
250
|
+
>>>>>>> 84f0ea474301dd0749ab57c9daca9a0af5902545
|
247
251
|
ET
|
248
252
|
|
249
253
|
0.000 0.000 0.000 scn
|
@@ -6027,7 +6031,7 @@ S
|
|
6027
6031
|
BT
|
6028
6032
|
328.628 112.88399999999965 Td
|
6029
6033
|
/F1.0 7 Tf
|
6030
|
-
<
|
6034
|
+
<323620> Tj
|
6031
6035
|
/F1.1 7 Tf
|
6032
6036
|
<2d222e2f2b20> Tj
|
6033
6037
|
/F1.0 7 Tf
|
@@ -6064,7 +6068,11 @@ S
|
|
6064
6068
|
BT
|
6065
6069
|
439.56 112.88399999999965 Td
|
6066
6070
|
/F1.0 7 Tf
|
6067
|
-
|
6071
|
+
<<<<<<< HEAD
|
6072
|
+
<31343a3538> Tj
|
6073
|
+
=======
|
6074
|
+
<32303a3534> Tj
|
6075
|
+
>>>>>>> 84f0ea474301dd0749ab57c9daca9a0af5902545
|
6068
6076
|
ET
|
6069
6077
|
|
6070
6078
|
0.000 0.000 0.000 scn
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rs.ge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-03-
|
12
|
+
date: 2012-03-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -96,17 +96,17 @@ dependencies:
|
|
96
96
|
requirement: !ruby/object:Gem::Requirement
|
97
97
|
none: false
|
98
98
|
requirements:
|
99
|
-
- -
|
99
|
+
- - ~>
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version:
|
101
|
+
version: 0.0.5
|
102
102
|
type: :runtime
|
103
103
|
prerelease: false
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
|
-
- -
|
107
|
+
- - ~>
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version:
|
109
|
+
version: 0.0.5
|
110
110
|
description: ruby client for rs.ge web services
|
111
111
|
email:
|
112
112
|
- dimitri@c12.ge
|
@@ -121,6 +121,7 @@ files:
|
|
121
121
|
- README.md
|
122
122
|
- Rakefile
|
123
123
|
- lib/rs.rb
|
124
|
+
- lib/rs/car.rb
|
124
125
|
- lib/rs/dict.rb
|
125
126
|
- lib/rs/invoice.rb
|
126
127
|
- lib/rs/print.rb
|
@@ -128,6 +129,7 @@ files:
|
|
128
129
|
- lib/rs/version.rb
|
129
130
|
- lib/rs/waybill.rb
|
130
131
|
- rs.gemspec
|
132
|
+
- spec/rs/car_spec.rb
|
131
133
|
- spec/rs/dict_spec.rb
|
132
134
|
- spec/rs/open_user.rb
|
133
135
|
- spec/rs/pdf_spec.rb
|