* 1 bug fix: * RPStringScanner#lineno was still using byte offset, not char offset. (brynary) * 1 minor enhancement: * Improved error output on invalid char in expression. * 1 bug fix: * Fixed lexing of no-name ivars. (whitequark) 52 down makes 99.9767% or 3.7σ. 130 files failed to parse out of 558k. * 4 minor enhancements: * Added RP_TIMEOUT env var to override default timeout of 10 seconds. * Minor optimization to RubyLexer#parse_number * Only output parseerror output to stderr if $DEBUG. * ruby_parse_extract_error modified to include 'it' blocks in its search. * 7 bug fixes: * 1.9: Fixed args in dot-call forms (eg f.(...)). * 1.9: Fixed lexing stabby lambda w/ do/end * Deal better with DOS files. Ugh. * Fix line number of production after heredoc. * Fixed RubyParser#process to reuse parser instances across calls. * Fixed line numbers for several productions. OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby:extensions/rubygem-ruby_parser?expand=0&rev=18
97 lines
2.8 KiB
RPMSpec
97 lines
2.8 KiB
RPMSpec
#
|
|
# spec file for package rubygem-ruby_parser
|
|
#
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: rubygem-ruby_parser
|
|
Version: 3.0.4
|
|
Release: 0
|
|
%define mod_name ruby_parser
|
|
%define mod_full_name %{mod_name}-%{version}
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: ruby-macros >= 1
|
|
BuildRequires: rubygem(rdoc) > 3.10
|
|
Url: https://github.com/seattlerb/ruby_parser
|
|
Source: %{mod_full_name}.gem
|
|
Summary: ruby_parser (RP) is a ruby parser written in pure ruby (utilizing
|
|
License: MIT
|
|
Group: Development/Languages/Ruby
|
|
|
|
%description
|
|
ruby_parser (RP) is a ruby parser written in pure ruby (utilizing
|
|
racc--which does by default use a C extension). RP's output is
|
|
the same as ParseTree's output: s-expressions using ruby's arrays and
|
|
base types.
|
|
As an example:
|
|
def conditional1 arg1
|
|
return 1 if arg1 == 0
|
|
return 0
|
|
end
|
|
becomes:
|
|
s(:defn, :conditional1, s(:args, :arg1),
|
|
s(:if,
|
|
s(:call, s(:lvar, :arg1), :==, s(:lit, 0)),
|
|
s(:return, s(:lit, 1)),
|
|
nil),
|
|
s(:return, s(:lit, 0)))
|
|
|
|
%package doc
|
|
Summary: RDoc documentation for %{mod_name}
|
|
Group: Development/Languages/Ruby
|
|
Requires: %{name} = %{version}
|
|
|
|
%description doc
|
|
Documentation generated at gem installation time.
|
|
Usually in RDoc and RI formats.
|
|
|
|
%package testsuite
|
|
Summary: Test suite for %{mod_name}
|
|
Group: Development/Languages/Ruby
|
|
Requires: %{name} = %{version}
|
|
|
|
%description testsuite
|
|
Test::Unit or RSpec files, useful for developers.
|
|
|
|
%prep
|
|
#gem_unpack
|
|
#if you need patches, apply them here and replace the # with a % sign in the surrounding lines
|
|
#gem_build
|
|
|
|
%build
|
|
|
|
%install
|
|
%gem_install -f
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%{_bindir}/ruby_parse
|
|
%{_bindir}/ruby_parse_extract_error
|
|
%{_libdir}/ruby/gems/%{rb_ver}/cache/%{mod_full_name}.gem
|
|
%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/
|
|
%exclude %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/test
|
|
%{_libdir}/ruby/gems/%{rb_ver}/specifications/%{mod_full_name}.gemspec
|
|
|
|
%files doc
|
|
%defattr(-,root,root,-)
|
|
%doc %{_libdir}/ruby/gems/%{rb_ver}/doc/%{mod_full_name}/
|
|
|
|
%files testsuite
|
|
%defattr(-,root,root,-)
|
|
%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/test
|
|
|
|
%changelog
|