sigep_web 0.2.2 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c41ec42477892fa6e4458479ca03b3585d001f5
4
- data.tar.gz: 9ee34acb51e6a741ae296fe288f671c2d998c78a
3
+ metadata.gz: f12c9ca936a648c646573d77a2e4e6ec162e7597
4
+ data.tar.gz: 458d59ec08f7e75801dd2e68e37e08fc5bec2499
5
5
  SHA512:
6
- metadata.gz: 0a7413f97edb6a3911e440333e7d27f6db1be4db5aeaca4822c24bbba4e0221bc49b7a252e46294ada693a283f76468c9920b4f13e164c386522a68b580e3d8f
7
- data.tar.gz: fd6504adb863c49eb17446a0b1d056977eae610f5172755714c985cc9df5693cba1382cb0baca7effef5c523789f21037db873cac37f84a53327f03907ed10ee
6
+ metadata.gz: c19d6fc42e7e3065db14b5bf005b9515328f49a499aa4c9d0be269a3c231ecf07beae745b082a8c1d342d62455938da94e4d576089cc0262ec1d36c8ac3354bf
7
+ data.tar.gz: 765151cf22183facdff3d1977381331d0720749a84bda2f940e434652021b46f8a7a5cb77fdded9c7faed25589e675fc93ffc65f911b310e781df0626544dfa1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sigep_web (0.2.1)
4
+ sigep_web (0.2.2)
5
5
  nokogiri (~> 1.6)
6
6
  savon (~> 2.10.0)
7
7
 
@@ -35,14 +35,20 @@ module SigepWeb
35
35
  private
36
36
  def build_label_array(label_range)
37
37
  label_array = []
38
- label_range = label_range.split(',')
39
- label = label_range[0].to_s
40
- label_base = label.gsub(/[\d]/, '').split(' ')
41
- number = label.gsub(/[^\d]/, '').to_i
38
+ start_label, end_label = label_range.split(',')
39
+ prefix = start_label[0,2]
40
+ suffix = start_label[11,12]
41
+ number = start_label[2,8].to_i
42
+ end_number = end_label[2,8].to_i
42
43
 
43
- while number <= label_range[1].gsub(/[^\d]/, '').to_i do
44
- label_array.push(label_base[0] + '0' + number.to_s + ' ' + label_base[1])
44
+ while number <= end_number do
45
+ use_number = number.to_s
45
46
 
47
+ if use_number.size < 8
48
+ use_number = ('0' * (8 - use_number.size)) + use_number
49
+ end
50
+
51
+ label_array.push prefix + use_number + ' ' + suffix
46
52
  number += 1
47
53
  end
48
54
 
@@ -1,3 +1,3 @@
1
1
  module SigepWeb
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
@@ -1,7 +1,10 @@
1
1
  module SigepWeb
2
2
  class WebServiceInterfaceApi
3
3
  def initialize
4
- @client = Savon.client({ wsdl: url, ssl_verify_mode: :none })
4
+ @client = Savon.client({
5
+ wsdl: url,
6
+ ssl_verify_mode: :none
7
+ })
5
8
  end
6
9
 
7
10
  def process(method, message)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sigep_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - |+
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2016-01-18 00:00:00.000000000 Z
13
+ date: 2016-01-19 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: savon