Skip to content

Commit 290ebdb

Browse files
authored
Merge pull request #9331 from mhashizume/PA-6294/main/rake-gem
Simplify Rakefile
2 parents b0d63e5 + 366e8c6 commit 290ebdb

11 files changed

+4
-22
lines changed

Rakefile

+4-22
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,9 @@
1-
# Rakefile for Puppet -*- ruby -*-
2-
RAKE_ROOT = File.dirname(__FILE__)
1+
# frozen_string_literal: true
32

4-
# We need access to the Puppet.version method
5-
$LOAD_PATH.unshift(File.expand_path("lib"))
6-
require 'puppet/version'
7-
8-
$LOAD_PATH << File.join(RAKE_ROOT, 'tasks')
9-
10-
begin
11-
require 'rubygems'
12-
require 'rubygems/package_task'
13-
rescue LoadError
14-
# Users of older versions of Rake (0.8.7 for example) will not necessarily
15-
# have rubygems installed, or the newer rubygems package_task for that
16-
# matter.
17-
require 'rake/packagetask'
18-
require 'rake/gempackagetask'
19-
end
20-
21-
require 'rake'
223
require 'open3'
23-
24-
Dir['tasks/**/*.rake'].each { |t| load t }
4+
require 'rake'
5+
require 'rubygems'
6+
require 'rubygems/package_task'
257

268
if Rake.application.top_level_tasks.grep(/^(pl:|package:)/).any?
279
begin
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)