diff --git a/README.md b/README.md index d0be4a5..f4c2e94 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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: diff --git a/lib/gem2rpm.rb b/lib/gem2rpm.rb index 965e799..5bd803f 100644 --- a/lib/gem2rpm.rb +++ b/lib/gem2rpm.rb @@ -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' diff --git a/lib/gem2rpm/context.rb b/lib/gem2rpm/context.rb index e7cdb87..35e0055 100644 --- a/lib/gem2rpm/context.rb +++ b/lib/gem2rpm/context.rb @@ -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 @@ -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 diff --git a/lib/gem2rpm/gem/format.rb b/lib/gem2rpm/gem/format.rb deleted file mode 100644 index 453eab0..0000000 --- a/lib/gem2rpm/gem/format.rb +++ /dev/null @@ -1,19 +0,0 @@ -require 'delegate' - -module Gem2Rpm - class Format < SimpleDelegator - # Returns the value of attribute gem_path - def gem_path - super - rescue - spec.file_name - end - - # Returns the value of attribute file_entries - def file_entries - super - rescue - spec.files - end - end -end