From b04c0df83ca1274b05d89659528d93e08816cdf4 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 26 2017 09:08:42 +0000 Subject: import rh-ror50-rubygem-method_source-0.8.2-4.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2fa6e44 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/method_source-0.8.2.gem diff --git a/.rh-ror50-rubygem-method_source.metadata b/.rh-ror50-rubygem-method_source.metadata new file mode 100644 index 0000000..7043801 --- /dev/null +++ b/.rh-ror50-rubygem-method_source.metadata @@ -0,0 +1 @@ +ea691a5adb25c9485d9916690dbc339e646aa8b1 SOURCES/method_source-0.8.2.gem diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/rubygem-method_source-0.8.2-fix-fixnum-bignum-warnings-tests.patch b/SOURCES/rubygem-method_source-0.8.2-fix-fixnum-bignum-warnings-tests.patch new file mode 100644 index 0000000..174d80c --- /dev/null +++ b/SOURCES/rubygem-method_source-0.8.2-fix-fixnum-bignum-warnings-tests.patch @@ -0,0 +1,13 @@ +diff --git a/test/test.rb b/test/test.rb +index 4743a50..b99f717 100644 +--- a/test/test.rb ++++ b/test/test.rb +@@ -13,7 +13,7 @@ + end + + it 'should not raise for immediate instance methods' do +- [Symbol, Fixnum, TrueClass, FalseClass, NilClass].each do |immediate_class| ++ [Symbol, Integer, TrueClass, FalseClass, NilClass].each do |immediate_class| + lambda { immediate_class.instance_method(:to_s).source_location }.should.not.raise + end + end diff --git a/SOURCES/rubygem-method_source-0.8.2-fix-fixnum-bignum-warnings.patch b/SOURCES/rubygem-method_source-0.8.2-fix-fixnum-bignum-warnings.patch new file mode 100644 index 0000000..de77fd6 --- /dev/null +++ b/SOURCES/rubygem-method_source-0.8.2-fix-fixnum-bignum-warnings.patch @@ -0,0 +1,52 @@ +diff --git a/lib/method_source/code_helpers.rb b/lib/method_source/code_helpers.rb +index 6c1d53e..9d9da55 100644 +--- a/lib/method_source/code_helpers.rb ++++ b/lib/method_source/code_helpers.rb +@@ -6,14 +6,14 @@ module CodeHelpers + # This is useful to get module or method source code. + # + # @param [Array, File, String] file The file to parse, either as a File or as +- # @param [Fixnum] line_number The line number at which to look. ++ # @param [Integer] line_number The line number at which to look. + # NOTE: The first line in a file is + # line 1! + # @param [Hash] options The optional configuration parameters. + # @option options [Boolean] :strict If set to true, then only completely + # valid expressions are returned. Otherwise heuristics are used to extract + # expressions that may have been valid inside an eval. +- # @option options [Fixnum] :consume A number of lines to automatically ++ # @option options [Integer] :consume A number of lines to automatically + # consume (add to the expression buffer) without checking for validity. + # @return [String] The first complete expression + # @raise [SyntaxError] If the first complete expression can't be identified +@@ -46,7 +46,7 @@ def expression_at(file, line_number, options={}) + # + # @param [Array, File, String] file The file to parse, either as a File or as + # a String or an Array of lines. +- # @param [Fixnum] line_number The line number at which to look. ++ # @param [Integer] line_number The line number at which to look. + # NOTE: The first line in a file is line 1! + # @return [String] The comment + def comment_describing(file, line_number) +@@ -84,7 +84,7 @@ def complete_expression?(str) + # Get the first expression from the input. + # + # @param [Array] lines +- # @param [Fixnum] consume A number of lines to automatically ++ # @param [Integer] consume A number of lines to automatically + # consume (add to the expression buffer) without checking for validity. + # @yield a clean-up function to run before checking for complete_expression + # @return [String] a valid ruby expression +diff --git a/lib/method_source/source_location.rb b/lib/method_source/source_location.rb +index 1e2a22a..7629869 100644 +--- a/lib/method_source/source_location.rb ++++ b/lib/method_source/source_location.rb +@@ -111,7 +111,7 @@ def source_location + case + when klass == Symbol + return :a.method(name).source_location +- when klass == Fixnum ++ when klass == Integer + return 0.method(name).source_location + when klass == TrueClass + return true.method(name).source_location diff --git a/SPECS/rubygem-method_source.spec b/SPECS/rubygem-method_source.spec new file mode 100644 index 0000000..3dac59d --- /dev/null +++ b/SPECS/rubygem-method_source.spec @@ -0,0 +1,130 @@ +%{?scl:%scl_package rubygem-%{gem_name}} +%{!?scl:%global pkg_name %{name}} + +# Generated from method_source-0.7.1.gem by gem2rpm -*- rpm-spec -*- +%global gem_name method_source + +Summary: Retrieve the source code for a method +Name: %{?scl_prefix}rubygem-%{gem_name} +Version: 0.8.2 +Release: 4%{?dist} +Group: Development/Languages +License: MIT +URL: http://banisterfiend.wordpress.com +Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem + +# Fix Fixnum/Bignum deprecated warning for Ruby 2.4.0. +# https://github.com/banister/method_source/commit/05ce7fc +Patch0: rubygem-method_source-0.8.2-fix-fixnum-bignum-warnings.patch +Patch1: rubygem-method_source-0.8.2-fix-fixnum-bignum-warnings-tests.patch + +Requires: %{?scl_prefix_ruby}ruby(release) +Requires: %{?scl_prefix_ruby}ruby(rubygems) +BuildRequires: %{?scl_prefix_ruby}ruby(release) +BuildRequires: %{?scl_prefix_ruby}ruby(rubygems) +BuildRequires: %{?scl_prefix_ruby}ruby +BuildRequires: %{?scl_prefix_ruby}rubygems-devel +BuildRequires: %{_bindir}/bacon +BuildArch: noarch +Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version} + +# Explicitly require runtime subpackage, as long as older scl-utils do not generate it +%{?scl:Requires: %{?scl_prefix}runtime} + +%description +Retrieve the source code for a method + +%package doc +Summary: Documentation for %{pkg_name} +Group: Documentation +Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release} +BuildArch: noarch + +%description doc +Documentation for %{pkg_name} + +%prep +%setup -n %{pkg_name}-%{version} -q -c -T +%{?scl:scl enable %{scl} - << \EOF} +set -e +%gem_install -n %{SOURCE0} + +pushd .%{gem_instdir} +%patch0 -p1 +popd +%{?scl:EOF} + +%build + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -a .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + +%check +pushd .%{gem_instdir} + +cat %{PATCH1} | patch -p1 + +%{?scl:scl enable %{scl} - << \EOF} +bacon test/test.rb +%{?scl:EOF} +popd + +%files +# There is no %%license macro on RHEL6. +# https://bugzilla.redhat.com/show_bug.cgi?id=1386246 +%{!?_licensedir:%global license %%doc} + +%dir %{gem_instdir} +%exclude %{gem_instdir}/.* +%license %{gem_instdir}/LICENSE +%{gem_libdir} +%exclude %{gem_cache} +%{gem_spec} + +%files doc +%doc %{gem_docdir} +%{gem_instdir}/Gemfile +%doc %{gem_instdir}/README.markdown +%{gem_instdir}/Rakefile +%{gem_instdir}/method_source.gemspec +%{gem_instdir}/test + +%changelog +* Tue Feb 14 2017 Jun Aruga - 0.8.2-4 +- Fix Fixnum/Bignum deprecated warning for Ruby 2.4.0. + +* Thu Feb 04 2016 Fedora Release Engineering - 0.8.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Jun 18 2015 Fedora Release Engineering - 0.8.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Tue Feb 24 2015 Vít Ondruch - 0.8.2-1 +- Update to method_source 0.8.2. + +* Sun Jun 08 2014 Fedora Release Engineering - 0.8.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sun Aug 04 2013 Fedora Release Engineering - 0.8.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Mar 07 2013 Vít Ondruch - 0.8.1-1 +- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 +- Update to method_source 0.8.1. + +* Thu Feb 14 2013 Fedora Release Engineering - 0.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Jul 31 2012 Vít Ondruch - 0.8-1 +- Update to method_source 0.8. + +* Sat Jul 21 2012 Fedora Release Engineering - 0.7.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed May 02 2012 Vít Ondruch - 0.7.1-2 +- Mark LICENSE as a %%doc. + +* Wed May 02 2012 Vít Ondruch - 0.7.1-1 +- Initial package