Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ $ gem2rpm --templates
The template is a standard ERB file that comes with several variables:

- `package` - the `Gem::Package` for the gem
- `spec` - the `Gem::Specification` for the gem (the same as `format.spec`)
- `spec` - the `Gem::Specification` for the gem
- `config` - the `Gem2Rpm::Configuration` that can redefine default macros or rules used in `spec` template helpers
- `runtime_dependencies` - the `Gem2Rpm::RpmDependencyList` providing list of package runtime dependencies
- `development_dependencies` - the `Gem2Rpm::RpmDependencyList` providing list of package development dependencies
Expand All @@ -82,10 +82,6 @@ The template is a standard ERB file that comes with several variables:
- `main_files` - the `Gem2Rpm::RpmFileList` providing list of files suitable for main package
- `doc_files` - the `Gem2Rpm::RpmFileList` providing list of files suitable for -doc subpackage

The following variables still work, but are now deprecated:

- `format` - The `Gem::Format` for the gem. Please note that this is kept just for compatibility reasons, since RubyGems 2.0 removed this class.

### Template Configuration

To make the templates lighter and more complete, Gem2Rpm introduced in version 0.11.0 new configurable template variables such as `main_files` or `doc_files` that can be further configured via local `config` variable as follows:
Expand Down
1 change: 0 additions & 1 deletion lib/gem2rpm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
require 'rubygems/package'
require 'gem2rpm/context'
require 'gem2rpm/distro'
require 'gem2rpm/gem/format'
require 'gem2rpm/gem/specification'
require 'gem2rpm/rpm_dependency_list'
require 'gem2rpm/rpm_file_list'
Expand Down
4 changes: 1 addition & 3 deletions lib/gem2rpm/context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Gem2Rpm
class Context
include Gem2Rpm::TemplateHelpers

attr_reader :nongem, :local, :doc_subpackage, :package, :format, :spec,
attr_reader :nongem, :local, :doc_subpackage, :package, :spec,
:config, :runtime_dependencies, :development_dependencies, :tests,
:files, :download_path

Expand All @@ -14,8 +14,6 @@ def initialize(fname, nongem = true, local = false, doc_subpackage = true)
@doc_subpackage = doc_subpackage

@package = Gem::Package.new(fname)
# Deprecate, kept just for backward compatibility.
@format = Gem2Rpm::Format.new(@package)
@spec = Gem2Rpm::Specification.new(@package.spec)

@config = Configuration.instance.reset
Expand Down
19 changes: 0 additions & 19 deletions lib/gem2rpm/gem/format.rb

This file was deleted.