Skip to content

Commit

Permalink
Remove Requires/Provides which are now autogenerated.
Browse files Browse the repository at this point in the history
Ruby 2.1 ships with Requires/Provides RPM generator. This removes the
need to explicitly specify the runtime dependencies.
  • Loading branch information
voxik committed Apr 10, 2014
1 parent 56a7afc commit 9b22ca0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
10 changes: 0 additions & 10 deletions templates/fedora-21-rawhide.spec.erb
Expand Up @@ -11,15 +11,6 @@ License: <%= spec.licenses.join(" and ") %>
URL: <%= spec.homepage %>
<% end -%>
Source0: <%= download_path %>%{gem_name}-%{version}.gem
Requires: ruby(release)
<% for req in spec.required_rubygems_version -%>
Requires: ruby(rubygems) <%= req %>
<% end -%>
<% for d in spec.runtime_dependencies -%>
<% for req in d.requirement -%>
Requires: rubygem(<%= d.name %>) <%= req %>
<% end -%>
<% end -%>
BuildRequires: ruby(release)
<% for req in spec.required_rubygems_version -%>
BuildRequires: rubygems-devel <%= req %>
Expand All @@ -37,7 +28,6 @@ BuildRequires: ruby<%= "-devel" unless spec.extensions.empty? %> <%= req %>
<% if spec.extensions.empty? -%>
BuildArch: noarch
<% end -%>
Provides: rubygem(%{gem_name}) = %{version}

%description
<%= spec.description %>
Expand Down
16 changes: 12 additions & 4 deletions test/templates/test_fedora.rb
Expand Up @@ -21,10 +21,6 @@ def test_omitting_url_from_rpm_spec
assert_no_match(/\sURL: /, @out_string)
end

def test_rubygems_version_requirement
assert_match(/\sRequires: ruby\(rubygems\) >= 1.3.6/, @out_string)
end

def test_rubys_version_build_requirement
assert_match(/\sBuildRequires: ruby-devel >= 1.8.6/, @out_string)
end
Expand All @@ -46,4 +42,16 @@ def test_build_requires
assert_match(/^# BuildRequires: rubygem\(test_development\) >= 1\.0\.0$/, @out_string)
end

def test_rubygems_is_not_required
assert_no_match(/\sruby\(rubygems\)/, @out_string)
end

def test_nothing_is_required
assert_no_match(/\sRequires:\s*rubygem\(\w*\).*$/, @out_string)
end

def test_provides_is_not_generated_anymore
assert_no_match(/\sProvides:\s*rubygem\(%\{gem_name\}\)/, @out_string)
end

end

0 comments on commit 9b22ca0

Please sign in to comment.