tl1 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/ruby.yml +38 -0
- data/.rubocop.yml +7 -0
- data/Gemfile +1 -0
- data/README.md +4 -1
- data/Rakefile +1 -0
- data/lib/tl1/ast.rb +4 -3
- data/lib/tl1/command.rb +3 -2
- data/lib/tl1/input_format.rb +1 -0
- data/lib/tl1/output_format.rb +1 -0
- data/lib/tl1/platforms/bti.rb +0 -1
- data/lib/tl1/session.rb +1 -0
- data/lib/tl1/test_io.rb +1 -0
- data/lib/tl1/version.rb +2 -1
- data/lib/tl1.rb +1 -0
- data/tl1.gemspec +4 -3
- metadata +19 -20
- data/.travis.yml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4064651754fc2db620598b78faf1692f04c1d9e355805d6d49562b9f589d1126
|
4
|
+
data.tar.gz: 837e3e1c7f4d4059e0b95ecafab8534cc8bc8c57e82d392672887caeef489f2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eea6f6297fc224ffb1c890ba7d50171bc1d92c13a3c81711e8bacd23929e30f0ce77add62ad54f9cd779c1e4f60ce1ecdc2f1cca6dd2126207dde04aed0af8df
|
7
|
+
data.tar.gz: 239749dfb981ef8afc69b89be5ef6741fe2190e3640ff26552778de5ae6fc41d7b4f888ddd3757cd9a882743a7204264b7a5b4988ed943decc0c1410b4997692
|
@@ -0,0 +1,38 @@
|
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ "master" ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ "master" ]
|
8
|
+
|
9
|
+
permissions:
|
10
|
+
contents: read
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
test:
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
strategy:
|
16
|
+
matrix:
|
17
|
+
ruby-version:
|
18
|
+
- '2.3'
|
19
|
+
- '2.4'
|
20
|
+
- '2.5'
|
21
|
+
- '2.6'
|
22
|
+
- '2.7'
|
23
|
+
- '3.0'
|
24
|
+
- '3.1'
|
25
|
+
- jruby-9.1.17.0
|
26
|
+
- jruby-9.2.21.0
|
27
|
+
- jruby-9.3.6.0
|
28
|
+
|
29
|
+
steps:
|
30
|
+
- uses: actions/checkout@v3
|
31
|
+
- name: Set up Ruby
|
32
|
+
# https://github.com/ruby/setup-ruby#versioning
|
33
|
+
uses: ruby/setup-ruby@v1
|
34
|
+
with:
|
35
|
+
ruby-version: ${{ matrix.ruby-version }}
|
36
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
37
|
+
- name: Run tests
|
38
|
+
run: bundle exec rake
|
data/.rubocop.yml
CHANGED
@@ -16,11 +16,18 @@ Metrics/MethodLength:
|
|
16
16
|
|
17
17
|
Metrics/ModuleLength:
|
18
18
|
Exclude:
|
19
|
+
- 'lib/tl1/platforms/bti.rb'
|
19
20
|
- 'spec/**/*'
|
20
21
|
|
21
22
|
Metrics/LineLength:
|
22
23
|
Exclude:
|
23
24
|
- 'spec/tl1/command_spec.rb'
|
24
25
|
|
26
|
+
Naming/HeredocDelimiterNaming:
|
27
|
+
Enabled: false
|
28
|
+
|
29
|
+
Style/CommentedKeyword:
|
30
|
+
Enabled: false
|
31
|
+
|
25
32
|
Style/BlockDelimiters:
|
26
33
|
Enabled: false
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
#
|
1
|
+
# TL1
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/tl1.svg)](https://rubygems.org/gems/tl1)
|
4
|
+
[![Build Status](https://travis-ci.org/bjmllr/tl1.svg)](https://travis-ci.org/bjmllr/tl1)
|
2
5
|
|
3
6
|
The TL1 protocol is used by network operators to manage optical and other
|
4
7
|
networking equipment produced by multiple vendors. Although it is has a terse
|
data/Rakefile
CHANGED
data/lib/tl1/ast.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require 'strscan'
|
3
4
|
|
4
5
|
module TL1
|
@@ -33,14 +34,14 @@ module TL1
|
|
33
34
|
|
34
35
|
module_function def split(string, delimiter)
|
35
36
|
scanner = StringScanner.new(string)
|
36
|
-
array = [
|
37
|
+
array = [+'']
|
37
38
|
|
38
39
|
loop do
|
39
40
|
return array if scanner.eos?
|
40
41
|
char = scanner.getch
|
41
42
|
case char
|
42
43
|
when delimiter
|
43
|
-
array <<
|
44
|
+
array << +''
|
44
45
|
when '"'
|
45
46
|
array.last << split_quoted(scanner)
|
46
47
|
else
|
@@ -50,7 +51,7 @@ module TL1
|
|
50
51
|
end
|
51
52
|
|
52
53
|
module_function def split_quoted(scanner)
|
53
|
-
string =
|
54
|
+
string = +'"'
|
54
55
|
|
55
56
|
loop do
|
56
57
|
raise 'Unexpected end of quoted string' if scanner.eos?
|
data/lib/tl1/command.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require 'strscan'
|
3
4
|
|
4
5
|
module TL1
|
@@ -75,7 +76,7 @@ module TL1
|
|
75
76
|
end
|
76
77
|
|
77
78
|
def scan_record(scanner)
|
78
|
-
record =
|
79
|
+
record = +''
|
79
80
|
|
80
81
|
scan_characters(scanner) do |char|
|
81
82
|
case char
|
@@ -95,7 +96,7 @@ module TL1
|
|
95
96
|
end
|
96
97
|
|
97
98
|
def scan_record_quoted_string(scanner)
|
98
|
-
record =
|
99
|
+
record = +''
|
99
100
|
|
100
101
|
scan_characters(scanner) do |char|
|
101
102
|
case char
|
data/lib/tl1/input_format.rb
CHANGED
data/lib/tl1/output_format.rb
CHANGED
data/lib/tl1/platforms/bti.rb
CHANGED
data/lib/tl1/session.rb
CHANGED
data/lib/tl1/test_io.rb
CHANGED
data/lib/tl1/version.rb
CHANGED
data/lib/tl1.rb
CHANGED
data/tl1.gemspec
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
5
|
require 'tl1/version'
|
5
6
|
|
@@ -20,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
20
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
22
|
spec.require_paths = ['lib']
|
22
23
|
|
23
|
-
spec.add_development_dependency '
|
24
|
-
spec.add_development_dependency 'rake', '~> 10.0'
|
24
|
+
spec.add_development_dependency 'rake'
|
25
25
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
26
|
+
spec.add_development_dependency 'rubocop', '~> 0.54' if RUBY_VERSION > '2.1'
|
26
27
|
end
|
metadata
CHANGED
@@ -1,67 +1,67 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tl1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Miller
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '3.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '3.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rubocop
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0.54'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
55
|
-
description:
|
54
|
+
version: '0.54'
|
55
|
+
description:
|
56
56
|
email:
|
57
57
|
- bmiller@rackspace.com
|
58
58
|
executables: []
|
59
59
|
extensions: []
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
|
+
- ".github/workflows/ruby.yml"
|
62
63
|
- ".gitignore"
|
63
64
|
- ".rubocop.yml"
|
64
|
-
- ".travis.yml"
|
65
65
|
- CODE_OF_CONDUCT.md
|
66
66
|
- Gemfile
|
67
67
|
- LICENSE.txt
|
@@ -83,7 +83,7 @@ homepage: https://github.com/bjmllr/tl1
|
|
83
83
|
licenses:
|
84
84
|
- GPL-3.0
|
85
85
|
metadata: {}
|
86
|
-
post_install_message:
|
86
|
+
post_install_message:
|
87
87
|
rdoc_options: []
|
88
88
|
require_paths:
|
89
89
|
- lib
|
@@ -98,9 +98,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
98
|
- !ruby/object:Gem::Version
|
99
99
|
version: '0'
|
100
100
|
requirements: []
|
101
|
-
|
102
|
-
|
103
|
-
signing_key:
|
101
|
+
rubygems_version: 3.3.7
|
102
|
+
signing_key:
|
104
103
|
specification_version: 4
|
105
104
|
summary: Define, send, and receive TL1 messages
|
106
105
|
test_files: []
|