clli 0.0.2 → 0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7fed2fa68851679d24a3d977749614df1f254de7
4
- data.tar.gz: e06cd436511a92e21c6cb994a7e9bcd9b42edfaf
3
+ metadata.gz: 6b0831ac65a01580b387099ec93e4c7107ed92cc
4
+ data.tar.gz: c7318dfa8dd3d0f7d3572cf7365ad402a720091f
5
5
  SHA512:
6
- metadata.gz: 8c0d085c0a98fc06961f94b622b29438fc76ed68ffee32f92c84ccd7a8f7ffcd9430968c31be24c5c54e465588c4647d8975ccd0440d90a98b2b3de52aaf9669
7
- data.tar.gz: 830b24af359280a5fa2d2960c9369888b35be6d92e5c789203e3b49546cb93ef2583e2cac82440acb928deb2d099461b4786226f78aab1d8885c7c455ee488e5
6
+ metadata.gz: 97225b0ddf872ecd485bc0145cefb3632a02cb69d2da8f2453c923d489499aa5c94e0d215041fb3f72acf5bd30d6b108f3a82d1c3e66f2570cfa5eef95f25e64
7
+ data.tar.gz: 1f3b925e668f42547ac6af6c6f0a3337e39d23e60a8e896302c9e54bd228e884065b9979eb236138f657f0ba90f9e276b06fa3221b6ca687fc09ef2a021d3e35
@@ -0,0 +1,17 @@
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
3
+
4
+ # Custom for Visual Studio
5
+ *.cs diff=csharp
6
+
7
+ # Standard to msysgit
8
+ *.doc diff=astextplain
9
+ *.DOC diff=astextplain
10
+ *.docx diff=astextplain
11
+ *.DOCX diff=astextplain
12
+ *.dot diff=astextplain
13
+ *.DOT diff=astextplain
14
+ *.pdf diff=astextplain
15
+ *.PDF diff=astextplain
16
+ *.rtf diff=astextplain
17
+ *.RTF diff=astextplain
Binary file
@@ -13,6 +13,14 @@ switching_types:
13
13
  RSn: 'Remote Switching System'
14
14
  XaX: 'Teletypewriter Switching System'
15
15
  CTx: 'Concentrator'
16
+ # From: https://groups.google.com/forum/#!topic/comp.dcom.telecom/2YEFiwbDLo8
17
+ RLx: 'Remote Line Card'
18
+ PSx: 'Packet Switch'
19
+ RPx: 'Remote Packet Switch'
20
+ CMx: 'Cellular/Mobile Switch'
21
+ VSx: 'Video Switch'
22
+ OSx: 'Optical Switch'
23
+ OLx: 'Optical Line Card'
16
24
 
17
25
  switchboard_and_desk:
18
26
  C: 'Centralized Automatic Message Accounting (CAMA) Board'
@@ -23,3 +23,8 @@ HS:
23
23
  EO:
24
24
  state:
25
25
  country: XS
26
+
27
+ # SAIPAN, NN - https://en.wikipedia.org/wiki/Susupe
28
+ NN:
29
+ state:
30
+ country: MP
@@ -45,7 +45,7 @@ class CLLI
45
45
  entity_code = entity_code_pattern(options)
46
46
  nonbuilding_location = nonbuilding_location_pattern(options)
47
47
  customer_location = customer_location_pattern(options)
48
- "#{place}(?:#{network_site}(?:#{entity_code})?|#{nonbuilding_location}|#{customer_location})"
48
+ "\\A#{place}(?:#{network_site}(?:#{entity_code})?|#{nonbuilding_location}|#{customer_location})\\z"
49
49
  end
50
50
 
51
51
  ##
@@ -85,18 +85,26 @@ class CLLI
85
85
  # +options+:: see #pattern for more details.
86
86
  def entity_code_pattern(**options)
87
87
  options = DEFAULT_PATTERN_OPTIONS.merge(options)
88
- named_group(options[:entity_code_group], [
88
+ named_group(options[:entity_code_group], options[:strict] ? strict_entity_code_pattern : relaxed_entity_code_pattern)
89
+ end
90
+
91
+ def strict_entity_code_pattern
92
+ [
89
93
  switching_entity_code_pattern, # (Table B)
90
94
  switchboard_and_desk_entity_code_pattern, # (Table C)
91
95
  miscellaneous_switching_termination_entity_code_pattern, # (Table D)
92
96
  nonswitching_entity_code_pattern # (Table E)
93
- ].join('|'))
97
+ ].join('|')
98
+ end
99
+
100
+ def relaxed_entity_code_pattern
101
+ '[A-Z0-9]{3}'
94
102
  end
95
103
 
96
104
  # Switching Entities (Table B)
97
105
  def switching_entity_code_pattern
98
106
  [
99
- "(?:MG|SG|CG|DS|[#{n}][#{n}])[#{x1}]",
107
+ "(?:MG|SG|CG|DS|RL|PS|RP|CM|VS|OS|OL|[#{n}][#{n}])[#{x1}]",
100
108
  "[CB#{n}][#{n}]T",
101
109
  "[#{n}]GT",
102
110
  "Z[#{a}]Z",
@@ -1,4 +1,4 @@
1
1
  # This file defines the gem version.
2
2
  class CLLI
3
- VERSION = '0.0.2'
3
+ VERSION = '0.0.3'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Wheeler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-15 00:00:00.000000000 Z
11
+ date: 2016-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -80,6 +80,7 @@ extensions: []
80
80
  extra_rdoc_files: []
81
81
  files:
82
82
  - ".codeclimate.yml"
83
+ - ".gitattributes"
83
84
  - ".gitignore"
84
85
  - ".rubocop.yml"
85
86
  - ".travis.yml"
@@ -90,6 +91,7 @@ files:
90
91
  - bin/console
91
92
  - bin/setup
92
93
  - clli-0.0.1.gem
94
+ - clli-0.0.2.gem
93
95
  - clli.gemspec
94
96
  - doc/795-100-100_I5.pdf
95
97
  - lib/clli.rb