ios_parser 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2de99dbf9bae8e78c136f2ae91976e4989dcf1b38ee329184c379a8e23346183
4
- data.tar.gz: a5a644079df051eb363682d43773b056fe9b0101493494bd6ae4571cf1196920
3
+ metadata.gz: 34aee436a05fb00bbb2964694017e4592083d4411e93614be6767f8919a6b7c1
4
+ data.tar.gz: e7985ca414f954d59539c10abd1330c2842ac44f2f557aaac9a902145bfe2eec
5
5
  SHA512:
6
- metadata.gz: 58f820e3c067173aa657c137a0da9c2d3da94eb9b6ebe489281ea29a5185ee36c3a3f6bbba7bd1c4e5317845c629dfd6ce05b4a29c704e5bd457de589835be6d
7
- data.tar.gz: 7df6f8eed3246238da8db8a8d5aa7d19ebd7a45c32c01951615de5314c729b713640192496e04f3fcb8fddcca0c2701d72c51970da4eb9d9a2c55333559c58ac
6
+ metadata.gz: 54a4675f244006397240e590c277f84fcf626f8c561e5c49f5656d62c5bbce0dfda4bdd26c5fc5d8329da7fd8a697948dccbe58f2e1d507f56ccea6f450a032b
7
+ data.tar.gz: 583e81712114f810869f42c852211298e71adbb0cd51fbe1bf9ae5b9f964d31cbdcd70bd64212ddba808aca1383ce8302bff3adf5ef75f9716599ff0469fbec3
data/.travis.yml CHANGED
@@ -3,10 +3,11 @@ rvm:
3
3
  - 2.0.0
4
4
  - 2.1.10
5
5
  - 2.2.10
6
- - 2.3.7
7
- - 2.4.4
8
- - 2.5.1
6
+ - 2.3.8
7
+ - 2.4.5
8
+ - 2.5.3
9
9
  - jruby-9.1.16.0
10
+ - jruby-9.2.0.0
10
11
  matrix:
11
12
  include:
12
13
  - rvm: jruby
@@ -65,8 +65,10 @@ module IOSParser
65
65
 
66
66
  def comment
67
67
  self.state = :comment
68
- update_indentation
69
- self.state = :root if newline?
68
+ return unless newline?
69
+ delimit
70
+ self.state = :line_start
71
+ self.indent = 0
70
72
  end
71
73
 
72
74
  def comment?
@@ -1,7 +1,7 @@
1
1
  module IOSParser
2
2
  class << self
3
3
  def version
4
- '0.5.1'
4
+ '0.5.2'
5
5
  end
6
6
  end
7
7
  end
@@ -285,6 +285,35 @@ END
285
285
  expect { subject }.to raise_error(pattern)
286
286
  end
287
287
  end
288
+
289
+ context 'subcommands separated by comment line' do
290
+ let(:input) do
291
+ <<-END.unindent
292
+ router static
293
+ address-family ipv4 unicast
294
+ !
295
+ address-family ipv6 unicast
296
+ END
297
+ end
298
+
299
+ let(:expected) do
300
+ [
301
+ 'router', 'static', :EOL,
302
+ :INDENT,
303
+ 'address-family', 'ipv4', 'unicast', :EOL,
304
+ 'address-family', 'ipv6', 'unicast', :EOL,
305
+ :DEDENT
306
+ ]
307
+ end
308
+
309
+ it 'lexes both subcommands' do
310
+ expect(subject.map(&:last)).to eq expected
311
+ end
312
+
313
+ it 'lexes both subcommands (with the pure ruby lexer)' do
314
+ expect(subject_pure.map(&:last)).to eq expected
315
+ end
316
+ end
288
317
  end
289
318
  end
290
319
  end
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,9 @@
1
1
  $LOAD_PATH << File.dirname(__FILE__) + '/../lib'
2
2
 
3
+ RSpec.configure do |rspec|
4
+ rspec.filter_run_when_matching(focus: true)
5
+ end
6
+
3
7
  def klass
4
8
  described_class
5
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ios_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Miller
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-10 00:00:00.000000000 Z
11
+ date: 2018-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler