lens_protocol 0.1.1 → 0.2.1

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.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/.envrc +2 -0
  3. data/.gitignore +1 -0
  4. data/.rubocop.yml +16 -4
  5. data/.ruby-version +1 -1
  6. data/.travis.yml +1 -3
  7. data/Gemfile.lock +47 -34
  8. data/README.md +2 -2
  9. data/examples/oma/R1000_1.oma +213 -213
  10. data/examples/oma/R1000_2.oma +213 -213
  11. data/examples/oma/STHKFMT.oma +358 -0
  12. data/lens_protocol.gemspec +2 -2
  13. data/lib/lens_protocol/errors.rb +3 -0
  14. data/lib/lens_protocol/oma/builder.rb +18 -0
  15. data/lib/lens_protocol/oma/formatter.rb +10 -2
  16. data/lib/lens_protocol/oma/line.rb +16 -0
  17. data/lib/lens_protocol/oma/message.rb +5 -59
  18. data/lib/lens_protocol/oma/parser.rb +17 -9
  19. data/lib/lens_protocol/oma/record.rb +0 -1
  20. data/lib/lens_protocol/oma/types/array.rb +21 -0
  21. data/lib/lens_protocol/oma/types/chiral.rb +31 -0
  22. data/lib/lens_protocol/oma/types/ignored.rb +15 -0
  23. data/lib/lens_protocol/oma/types/matrix.rb +17 -0
  24. data/lib/lens_protocol/oma/types/single.rb +21 -0
  25. data/lib/lens_protocol/oma/types/trcfmt.rb +77 -0
  26. data/lib/lens_protocol/oma/types/type.rb +74 -0
  27. data/lib/lens_protocol/oma/types/values/tracing_dataset.rb +42 -0
  28. data/lib/lens_protocol/oma/types.rb +81 -79
  29. data/lib/lens_protocol/oma.rb +1 -1
  30. data/lib/lens_protocol/version.rb +1 -1
  31. data/lib/lens_protocol.rb +10 -6
  32. data/shell.nix +9 -0
  33. metadata +27 -21
  34. data/lib/lens_protocol/oma/type/base.rb +0 -97
  35. data/lib/lens_protocol/oma/type/integer.rb +0 -15
  36. data/lib/lens_protocol/oma/type/numeric.rb +0 -24
  37. data/lib/lens_protocol/oma/type/r.rb +0 -17
  38. data/lib/lens_protocol/oma/type/text.rb +0 -8
  39. data/lib/lens_protocol/oma/type/trcfmt.rb +0 -30
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f52440ba4cb5aa106d20f5e2dec603fd8f75508d00a07002e5194dc0117d1ffa
4
- data.tar.gz: 686003127105da31fd7c098f9503080436e6dbffb59cc4ea8acd57e15b858d08
3
+ metadata.gz: 7ae06c71ffe22849d1ba5d494e20355afb3fd7e0b11234e991595577e91954ec
4
+ data.tar.gz: ea5abd5dc9508221918a0fdd3c09ff9ea2c935b9827973e137de61130418107f
5
5
  SHA512:
6
- metadata.gz: 37e3d839004b895a670aeb2ca292f78c11489fcf0d24173b16d563222d645a374722289a53300848ffe5fba4b93d19d59ad07d71a637276fc35441b5b6864b1f
7
- data.tar.gz: f70bc9f019573762fced363a312eaa72ee9ba35a173dc385abe76a04757f444b33deb3b862723e34ebd6c382e0655d67f500a6fcc5265317b1283a40f1febed9
6
+ metadata.gz: a166c7080c650b0b7cfea002e1a090f2633a5064307625e343ad0286931282f8b7389dbc4cc7d9eb9b40155d46a036fb3c732ef9b135033d6988ae43bc0cc166
7
+ data.tar.gz: f7d168737fa3a50d7dd5426cdbff33a5b87d693b7c6adda1e5de4dfec727353d3318684f8f264aaa0d7aebaba1640001d006a84b481a497c5dae789a68dcfe66
data/.envrc ADDED
@@ -0,0 +1,2 @@
1
+ layout ruby
2
+ use nix
data/.gitignore CHANGED
@@ -6,6 +6,7 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ /.direnv/
9
10
 
10
11
  # rspec failure tracking
11
12
  .rspec_status
data/.rubocop.yml CHANGED
@@ -55,19 +55,31 @@ Style/MutableConstant:
55
55
  Style/RescueModifier:
56
56
  Enabled: false
57
57
 
58
+ Style/HashEachMethods:
59
+ Enabled: false
60
+
61
+ Style/HashTransformKeys:
62
+ Enabled: false
63
+
64
+ Style/HashTransformValues:
65
+ Enabled: false
66
+
67
+ Layout/LineLength:
68
+ Max: 120
69
+
58
70
  Layout/SpaceInsideHashLiteralBraces:
59
71
  Enabled: false
60
72
 
61
73
  Layout/MultilineMethodCallIndentation:
62
74
  Enabled: false
63
75
 
64
- Layout/TrailingBlankLines:
76
+ Layout/TrailingEmptyLines:
65
77
  Enabled: false
66
78
 
67
- Layout/IndentArray:
79
+ Layout/FirstArrayElementIndentation:
68
80
  EnforcedStyle: consistent
69
81
 
70
- Layout/AlignParameters:
82
+ Layout/ParameterAlignment:
71
83
  EnforcedStyle: with_fixed_indentation
72
84
 
73
85
  Layout/SpaceInLambdaLiteral:
@@ -94,5 +106,5 @@ Lint/AmbiguousOperator:
94
106
  Lint/AmbiguousBlockAssociation:
95
107
  Enabled: false
96
108
 
97
- Naming/UncommunicativeMethodParamName:
109
+ Naming/MethodParameterName:
98
110
  Enabled: false
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.5.0
1
+ 2.7.5
data/.travis.yml CHANGED
@@ -2,6 +2,4 @@
2
2
  sudo: false
3
3
  language: ruby
4
4
  cache: bundler
5
- rvm:
6
- - 2.5.0
7
- before_install: gem install bundler -v 2.0.2
5
+ before_install: gem install bundler -v 2.1.4
data/Gemfile.lock CHANGED
@@ -1,32 +1,32 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lens_protocol (0.1.1)
4
+ lens_protocol (0.2.1)
5
5
  activesupport (>= 4.0)
6
6
  nokogiri
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (6.0.1)
11
+ activesupport (6.0.3.1)
12
12
  concurrent-ruby (~> 1.0, >= 1.0.2)
13
13
  i18n (>= 0.7, < 2)
14
14
  minitest (~> 5.1)
15
15
  tzinfo (~> 1.1)
16
- zeitwerk (~> 2.2)
17
- byebug (11.0.1)
18
- coderay (1.1.2)
19
- concurrent-ruby (1.1.5)
16
+ zeitwerk (~> 2.2, >= 2.2.2)
17
+ ast (2.4.0)
18
+ coderay (1.1.3)
19
+ concurrent-ruby (1.1.6)
20
20
  diff-lcs (1.3)
21
- ffi (1.11.2)
22
- formatador (0.2.5)
23
- guard (2.16.1)
21
+ ffi (1.15.5)
22
+ formatador (1.1.0)
23
+ guard (2.18.0)
24
24
  formatador (>= 0.2.4)
25
25
  listen (>= 2.7, < 4.0)
26
26
  lumberjack (>= 1.0.12, < 2.0)
27
27
  nenv (~> 0.1)
28
28
  notiffany (~> 0.0)
29
- pry (>= 0.9.12)
29
+ pry (>= 0.13.0)
30
30
  shellany (~> 0.0)
31
31
  thor (>= 0.18.1)
32
32
  guard-compat (1.2.1)
@@ -34,35 +34,38 @@ GEM
34
34
  guard (~> 2.1)
35
35
  guard-compat (~> 1.1)
36
36
  rspec (>= 2.99.0, < 4.0)
37
- i18n (1.7.0)
37
+ i18n (1.8.2)
38
38
  concurrent-ruby (~> 1.0)
39
- listen (3.2.0)
39
+ jaro_winkler (1.5.4)
40
+ listen (3.7.1)
40
41
  rb-fsevent (~> 0.10, >= 0.10.3)
41
42
  rb-inotify (~> 0.9, >= 0.9.10)
42
- lumberjack (1.0.13)
43
- method_source (0.9.2)
44
- mini_portile2 (2.4.0)
45
- minitest (5.13.0)
43
+ lumberjack (1.2.8)
44
+ method_source (1.0.0)
45
+ minitest (5.14.1)
46
46
  mustermann (1.0.3)
47
47
  nenv (0.3.0)
48
- nokogiri (1.10.5)
49
- mini_portile2 (~> 2.4.0)
48
+ nokogiri (1.13.1-arm64-darwin)
49
+ racc (~> 1.4)
50
50
  notiffany (0.1.3)
51
51
  nenv (~> 0.1)
52
52
  shellany (~> 0.0)
53
- pry (0.12.2)
54
- coderay (~> 1.1.0)
55
- method_source (~> 0.9.0)
56
- pry-byebug (3.7.0)
57
- byebug (~> 11.0)
58
- pry (~> 0.10)
59
- rack (2.0.7)
53
+ parallel (1.19.1)
54
+ parser (2.7.0.4)
55
+ ast (~> 2.4.0)
56
+ pry (0.14.1)
57
+ coderay (~> 1.1)
58
+ method_source (~> 1.0)
59
+ racc (1.6.0)
60
+ rack (2.2.3)
60
61
  rack-protection (2.0.7)
61
62
  rack
62
- rake (10.5.0)
63
- rb-fsevent (0.10.3)
64
- rb-inotify (0.10.0)
63
+ rainbow (3.0.0)
64
+ rake (13.0.1)
65
+ rb-fsevent (0.11.1)
66
+ rb-inotify (0.10.1)
65
67
  ffi (~> 1.0)
68
+ rexml (3.2.4)
66
69
  rspec (3.9.0)
67
70
  rspec-core (~> 3.9.0)
68
71
  rspec-expectations (~> 3.9.0)
@@ -76,18 +79,28 @@ GEM
76
79
  diff-lcs (>= 1.2.0, < 2.0)
77
80
  rspec-support (~> 3.9.0)
78
81
  rspec-support (3.9.0)
82
+ rubocop (0.80.1)
83
+ jaro_winkler (~> 1.5.1)
84
+ parallel (~> 1.10)
85
+ parser (>= 2.7.0.1)
86
+ rainbow (>= 2.2.2, < 4.0)
87
+ rexml
88
+ ruby-progressbar (~> 1.7)
89
+ unicode-display_width (>= 1.4.0, < 1.7)
90
+ ruby-progressbar (1.10.1)
79
91
  shellany (0.0.1)
80
92
  sinatra (2.0.7)
81
93
  mustermann (~> 1.0)
82
94
  rack (~> 2.0)
83
95
  rack-protection (= 2.0.7)
84
96
  tilt (~> 2.0)
85
- thor (0.20.3)
97
+ thor (1.2.1)
86
98
  thread_safe (0.3.6)
87
99
  tilt (2.0.10)
88
- tzinfo (1.2.5)
100
+ tzinfo (1.2.7)
89
101
  thread_safe (~> 0.1)
90
- zeitwerk (2.2.1)
102
+ unicode-display_width (1.6.1)
103
+ zeitwerk (2.3.0)
91
104
 
92
105
  PLATFORMS
93
106
  ruby
@@ -97,10 +110,10 @@ DEPENDENCIES
97
110
  guard-rspec
98
111
  lens_protocol!
99
112
  pry
100
- pry-byebug
101
- rake (~> 10.0)
113
+ rake (~> 13.0)
102
114
  rspec (~> 3.0)
115
+ rubocop (~> 0.80.0)
103
116
  sinatra
104
117
 
105
118
  BUNDLED WITH
106
- 2.0.2
119
+ 2.1.4
data/README.md CHANGED
@@ -4,7 +4,7 @@ A Ruby parser and builder for the OMA protocol (a.k.a. Data Communication Standa
4
4
 
5
5
  Furthermore, it allows you to generate a SVG representation of the tracing datasets.
6
6
 
7
- [![Build Status](https://travis-ci.org/eeng/lens_protocol.svg?branch=master)](https://travis-ci.org/eeng/lens_protocol)
7
+ [![Build Status](https://app.travis-ci.com/eeng/lens_protocol.svg?branch=master)](https://app.travis-ci.com/eeng/lens_protocol)
8
8
 
9
9
  ## Installation
10
10
 
@@ -19,7 +19,7 @@ gem 'lens_protocol'
19
19
  ```ruby
20
20
  require 'lens_protocol'
21
21
  message = LensProtocol::OMA.parse(File.read('examples/oma/R360_1.oma'))
22
- message.values_of('SPH') # => [1.25, -0.5]
22
+ message.value_of('SPH') # => [1.25, -0.5]
23
23
  ```
24
24
 
25
25
  ### Generating an OMA file