ios_parser 0.3.3 → 0.4.0

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
  SHA1:
3
- metadata.gz: 171eddd89d5cab8faaa45c3d6a913df8c7b6bc28
4
- data.tar.gz: 6bda5b3e474d03a3fa4a02a6399b62ddd89bbc9a
3
+ metadata.gz: 70ba90a49c66d3aeb9508337c1a018353bae30ba
4
+ data.tar.gz: 326039e8f3eb1aa6dca37843799598cbc48db944
5
5
  SHA512:
6
- metadata.gz: 310aa7caec14048c544f0f65073a37e9deb6687fe372ead09a1c63a07b7d7189be4f91cbeba4ce40d3ab75264f45358d039980494572ab2077a8ed98dfb2a14e
7
- data.tar.gz: 5df2bf63775bb0cba0ad20734494d7252751bb5357761fc28e8defe80eaa9bfec75565206a0011c6cf806749bfb5f26fe7a961678a3339ffb05f2bff713a6b9d
6
+ metadata.gz: bab554233dcbadf4973c3d3b2221d401b5b4fe955eb54d1def89dd3b43da584af7638f7a3d6c984f9fb9a00471f7fa27a9e4423d59c62441d776180ce7180b25
7
+ data.tar.gz: 076d66dd99628d7d5ada809147599243c065f346b8b0dbc4b25d34a4444bec01555c7583e4a299f536703d37a827a96340838cfbc9e57a274a28f51364322fb5
data/.travis.yml CHANGED
@@ -4,4 +4,10 @@ rvm:
4
4
  - 2.1.10
5
5
  - 2.2.5
6
6
  - 2.3.1
7
+ matrix:
8
+ include:
9
+ - rvm: jruby
10
+ env: JRUBY_OPTS='-Xcompat.version=2.0'
7
11
  bundler_args: --without guard
12
+ before_install:
13
+ - if [ "jruby" != "$TRAVIS_RUBY_VERSION" ]; then gem install bundler --without guard; fi
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 0.4.0 (2016-06-08)
2
+
3
+ Enhancements:
4
+
5
+ - add support for JRuby (in 2.0 compatability mode)
6
+
7
+
1
8
  ## 0.3.3 (2016-05-17)
2
9
 
3
10
  Bugfixes:
data/Rakefile CHANGED
@@ -13,4 +13,8 @@ Rake::ExtensionTask.new do |ext|
13
13
  ext.gem_spec = spec
14
14
  end
15
15
 
16
- task default: [:compile, :spec]
16
+ if RUBY_ENGINE == 'jruby'
17
+ task default: :spec
18
+ else
19
+ task default: [:compile, :spec]
20
+ end
data/ios_parser.gemspec CHANGED
@@ -13,7 +13,9 @@ Gem::Specification.new do |s|
13
13
  s.files = `git ls-files`.split("\n")
14
14
  s.test_files = `git ls-files -- {spec,features}/*`.split("\n")
15
15
 
16
- s.extensions << 'ext/ios_parser/c_lexer/extconf.rb'
16
+ unless RUBY_ENGINE == 'jruby'
17
+ s.extensions << 'ext/ios_parser/c_lexer/extconf.rb'
18
+ end
17
19
 
18
20
  s.add_development_dependency 'rspec', '~>3.2'
19
21
  s.add_development_dependency 'rubocop', '~>0.37'
@@ -1,7 +1,7 @@
1
1
  module IOSParser
2
2
  class << self
3
3
  def version
4
- '0.3.3'
4
+ '0.4.0'
5
5
  end
6
6
  end
7
7
  end
data/lib/ios_parser.rb CHANGED
@@ -1,6 +1,8 @@
1
1
  require 'json'
2
2
 
3
3
  module IOSParser
4
+ class LexError < StandardError; end
5
+
4
6
  def self.lexer
5
7
  if const_defined?(:PureLexer)
6
8
  PureLexer
@@ -8,10 +10,12 @@ module IOSParser
8
10
  require_relative 'ios_parser/c_lexer'
9
11
  CLexer
10
12
  end
13
+ rescue LoadError
14
+ require 'ios_parser/lexer'
15
+ return PureLexer
11
16
  end
12
17
 
13
18
  Lexer = lexer
14
- class LexError < StandardError; end
15
19
  end
16
20
 
17
21
  require_relative 'ios_parser/ios'
@@ -80,8 +80,8 @@ END
80
80
  expect(tokens.map(&:last)).to eq expectation
81
81
  end # it 'pure' do
82
82
 
83
- it 'c' do
84
- tokens = IOSParser::CLexer.new.call(input)
83
+ it 'default' do
84
+ tokens = IOSParser.lexer.new.call(input)
85
85
  expect(tokens.map(&:last)).to eq expectation
86
86
  end # it 'c' do
87
87
  end # context 'indented region' do
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.3.3
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Miller
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-17 00:00:00.000000000 Z
11
+ date: 2016-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec