ios_parser 0.5.1-java → 0.5.2-java

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: 5f9739888110fca98f2a7a764dbccc4ef97a3f6f99e785c164e2e2caa09939b8
4
- data.tar.gz: 7216b01e069f70e56c6a55c6dc2e107eab0d475c7f003129738be4f3537dac1c
3
+ metadata.gz: 9c0628b6d7d24d5456f290e334119b4afa4a1eb62ccdbe85688688ae603ce656
4
+ data.tar.gz: 31d2bf09dcc2f26ba239b057c2137ff7f0d42ea14423d8044714ea658caa7449
5
5
  SHA512:
6
- metadata.gz: 901d8bfb5466a1926d5bc0186d95b9318a5d28ad44b6e3fcd38087ab3454160854b2fff1268783a49c3559ee77b885fd882baa095bfaf3ecae9c6c6fc7da3004
7
- data.tar.gz: 530a86052a6057db115311ae9df397404946390e404512cb5b0450bb80150060d39fea582e2b1747d6e609f93647555a268930f119e88783fe3ddd33f74c1a49
6
+ metadata.gz: 4458547431b857b56c5dd21f78aeaf4df06baad856764a11e1e98694ab025cf88cc9fb955d18089524e0ce917298f7e8e5d57d0d034be0793bfb4730828d9c01
7
+ data.tar.gz: ef80e9ebddf399569d88b350a3d7f579d216d8904c8ab6bb3af44e1c4ca5575d5de4b646c51afe21c3db167391856404740c5c51f7b5a6148c0942f82c022a8f
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: java
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
  requirement: !ruby/object:Gem::Requirement