clli 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitattributes +17 -0
- data/clli-0.0.2.gem +0 -0
- data/lib/clli/data/entity_types.yml +8 -0
- data/lib/clli/data/region_conversions.yml +5 -0
- data/lib/clli/pattern.rb +12 -4
- data/lib/clli/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b0831ac65a01580b387099ec93e4c7107ed92cc
|
4
|
+
data.tar.gz: c7318dfa8dd3d0f7d3572cf7365ad402a720091f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97225b0ddf872ecd485bc0145cefb3632a02cb69d2da8f2453c923d489499aa5c94e0d215041fb3f72acf5bd30d6b108f3a82d1c3e66f2570cfa5eef95f25e64
|
7
|
+
data.tar.gz: 1f3b925e668f42547ac6af6c6f0a3337e39d23e60a8e896302c9e54bd228e884065b9979eb236138f657f0ba90f9e276b06fa3221b6ca687fc09ef2a021d3e35
|
data/.gitattributes
ADDED
@@ -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
|
data/clli-0.0.2.gem
ADDED
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'
|
data/lib/clli/pattern.rb
CHANGED
@@ -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",
|
data/lib/clli/version.rb
CHANGED
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.
|
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-
|
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
|