ios_parser 0.8.0 → 0.9.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d622ced70b173f1c2b514b3060694ecf722641e098367551ac66878c40059c5f
4
- data.tar.gz: 20fedb53829b28a18ce1d5aa72107b13534ea3b01118a7b988fc6f4b4d01a83c
3
+ metadata.gz: babc4e16c01c0b6e3ced0b4967866bd3acbf0dfcaa9c430a9401e3c0bd0dbdda
4
+ data.tar.gz: 43dc2cf1baf951b74ce56f455378b578ac0b7b3adaf2358ed9e222a8331d39e4
5
5
  SHA512:
6
- metadata.gz: 5ab205f2e84a5bf71e3bf1ceb1b2b8c5cef6bfcf0900ca4d472fcd1079174a448549efba14d58597eb04cde8f5bf29d5c059db14624b2695b763a75f5468df1f
7
- data.tar.gz: 36fd7e6722935457f9c8e3f60231fe37c4c5fe0ee9a6a9922ed45a5a5b9fbd7d26f9b631056298a8b95acdeb7f4c5e6a136b4df9d0ede939918062e292766231
6
+ metadata.gz: 01cb83ac915e218a43020948cd12667ea1ca98e243b07686dad513794688dd17afe8a42ae6a55c58439755dab6ff32cd7e79dbc07d5568a4b398c3b0ae28f346
7
+ data.tar.gz: 1f713a21a7959547d27d4383ad9175a0c5295ce2a70cc1586a8588c99b78810cd7ecee11a094b5fb119f72eced558293c5d95d0b510dda2bdb77cc8bfca7d775
@@ -18,7 +18,7 @@ permissions:
18
18
 
19
19
  jobs:
20
20
  test:
21
- runs-on: ubuntu-latest
21
+ runs-on: ubuntu-24.04
22
22
  strategy:
23
23
  matrix:
24
24
  ruby-version:
@@ -32,9 +32,8 @@ jobs:
32
32
  - '2.7'
33
33
  - '3.0'
34
34
  - '3.1'
35
- - jruby-9.1.17.0
36
- - jruby-9.2.21.0
37
- - jruby-9.3.6.0
35
+ - jruby-9.4.7.0
36
+ - jruby-10.0.2.0
38
37
 
39
38
  steps:
40
39
  - uses: actions/checkout@v3
@@ -38,10 +38,10 @@ typedef struct LexInfo LexInfo;
38
38
  #define IS_SPACE(C) C == ' ' || C == '\t' || C == '\r'
39
39
  #define IS_NEWLINE(C) C == '\n'
40
40
  #define IS_COMMENT(C) C == '!'
41
- #define IS_DIGIT(C) '0' <= C && C <= '9'
41
+ #define IS_DIGIT(C) (('0' <= C) && (C <= '9'))
42
42
  #define IS_DOT(C) C == '.'
43
43
  #define IS_DECIMAL(C) IS_DIGIT(C) || IS_DOT(C)
44
- #define IS_LETTER(C) 'a' <= C && C <= 'z' || 'A' <= C && C <= 'Z'
44
+ #define IS_LETTER(C) (('a' <= C) && (C <= 'z')) || (('A' <= C) && (C <= 'Z'))
45
45
  #define IS_PUNCT(C) strchr("-+$:/,()|*#=<>!\"\\&@;%~{}'\"?[]_^`", C)
46
46
  #define IS_WORD(C) IS_DECIMAL(C) || IS_LETTER(C) || IS_PUNCT(C)
47
47
  #define IS_LEAD_ZERO(C) C == '0'
@@ -201,7 +201,7 @@ static VALUE allocate(VALUE klass) {
201
201
  return Data_Wrap_Struct(klass, mark, deallocate, lex);
202
202
  }
203
203
 
204
- static VALUE initialize(VALUE self, VALUE input_text) {
204
+ static VALUE initialize(VALUE self) {
205
205
  LexInfo *lex;
206
206
  Data_Get_Struct(self, LexInfo, lex);
207
207
 
@@ -405,7 +405,7 @@ static void start_certificate(LexInfo *lex) {
405
405
 
406
406
  int is_banner_end_char(LexInfo *lex) {
407
407
  return CURRENT_CHAR(lex) == lex->banner_delimiter &&
408
- (0 < lex->pos && '\n' == lex->text[lex->pos - 1] ||
408
+ ((0 < lex->pos && '\n' == lex->text[lex->pos - 1]) ||
409
409
  '\n' == lex->text[lex->pos + 1]);
410
410
  }
411
411
 
@@ -287,7 +287,8 @@ module IOSParser
287
287
  ('A'..'Z').cover?(char) ||
288
288
  ['-', '+', '$', ':', '/', ',', '(', ')', '|', '*', '#', '=', '<', '>',
289
289
  '!', '"', '&', '@', ';', '%', '~', '{', '}', "'", '?', '[', ']', '_',
290
- '^', '\\', '`'].include?(char)
290
+ '^', '\\', '`'].include?(char) ||
291
+ /[[:graph:]]/.match(char)
291
292
  end
292
293
 
293
294
  def space
@@ -1,7 +1,7 @@
1
1
  module IOSParser
2
2
  class << self
3
3
  def version
4
- '0.8.0'
4
+ '0.9.1'
5
5
  end
6
6
  end
7
7
  end
@@ -0,0 +1,16 @@
1
+ require_relative '../../spec_helper'
2
+ require 'ios_parser'
3
+ require 'ios_parser/lexer'
4
+
5
+ module IOSParser
6
+ describe PureLexer do
7
+ describe '#call' do
8
+ it 'accepts non-whitespace printable characters as words' do
9
+ input = "before emdash – after emdash"
10
+ tokens = PureLexer.new.call(input)
11
+ expect(tokens.map(&:value)).to eq %w[before emdash – after emdash]
12
+ expect(tokens.map(&:col)).to eq [1, 8, 15, 17, 23]
13
+ end
14
+ end
15
+ end
16
+ end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ios_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Miller
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2022-07-06 00:00:00.000000000 Z
10
+ date: 1980-01-01 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rake-compiler
@@ -52,7 +51,6 @@ dependencies:
52
51
  - - "~>"
53
52
  - !ruby/object:Gem::Version
54
53
  version: '0.54'
55
- description:
56
54
  email: bjmllr@gmail.com
57
55
  executables: []
58
56
  extensions:
@@ -89,13 +87,13 @@ files:
89
87
  - spec/lib/ios_parser/ios/queryable_spec.rb
90
88
  - spec/lib/ios_parser/ios_spec.rb
91
89
  - spec/lib/ios_parser/lexer_spec.rb
90
+ - spec/lib/ios_parser/pure_spec.rb
92
91
  - spec/lib/ios_parser_spec.rb
93
92
  - spec/spec_helper.rb
94
93
  homepage: https://github.com/bjmllr/ios_parser
95
94
  licenses:
96
95
  - GPL-3.0
97
96
  metadata: {}
98
- post_install_message:
99
97
  rdoc_options: []
100
98
  require_paths:
101
99
  - lib
@@ -110,13 +108,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
108
  - !ruby/object:Gem::Version
111
109
  version: '0'
112
110
  requirements: []
113
- rubygems_version: 3.1.6
114
- signing_key:
111
+ rubygems_version: 3.7.2
115
112
  specification_version: 4
116
113
  summary: convert network switch and router config files to structured data
117
114
  test_files:
118
115
  - spec/lib/ios_parser/ios/queryable_spec.rb
119
116
  - spec/lib/ios_parser/ios_spec.rb
120
117
  - spec/lib/ios_parser/lexer_spec.rb
118
+ - spec/lib/ios_parser/pure_spec.rb
121
119
  - spec/lib/ios_parser_spec.rb
122
120
  - spec/spec_helper.rb