Skip to content

Commit a994d95

Browse files
committed
Drop deprecated Gem2Rpm::Format
1 parent 6017ce5 commit a994d95

File tree

4 files changed

+2
-28
lines changed

4 files changed

+2
-28
lines changed

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ $ gem2rpm --templates
7373
The template is a standard ERB file that comes with several variables:
7474

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

85-
The following variables still work, but are now deprecated:
86-
87-
- `format` - The `Gem::Format` for the gem. Please note that this is kept just for compatibility reasons, since RubyGems 2.0 removed this class.
88-
8985
### Template Configuration
9086

9187
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:

lib/gem2rpm.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
require 'rubygems/package'
44
require 'gem2rpm/context'
55
require 'gem2rpm/distro'
6-
require 'gem2rpm/gem/format'
76
require 'gem2rpm/gem/specification'
87
require 'gem2rpm/rpm_dependency_list'
98
require 'gem2rpm/rpm_file_list'

lib/gem2rpm/context.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Gem2Rpm
44
class Context
55
include Gem2Rpm::TemplateHelpers
66

7-
attr_reader :nongem, :local, :doc_subpackage, :package, :format, :spec,
7+
attr_reader :nongem, :local, :doc_subpackage, :package, :spec,
88
:config, :runtime_dependencies, :development_dependencies, :tests,
99
:files, :download_path
1010

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

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

2119
@config = Configuration.instance.reset

lib/gem2rpm/gem/format.rb

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)