Skip to content

Commit fa213f5

Browse files
authored
Merge pull request #9325 from AriaXLi/PUP-12031
(PUP-12031) Consolidate gem depenendencies & metadata into puppet.gem…
2 parents fb44fd9 + e58bc11 commit fa213f5

File tree

6 files changed

+62
-129
lines changed

6 files changed

+62
-129
lines changed

.gemspec

-84
This file was deleted.

Gemfile

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ def location_for(place, fake_version = nil)
1212
end
1313
end
1414

15-
# Make sure these gem requirements are in sync with the gempspec and ext/project_data.yaml
15+
# Make sure these gem requirements are in sync with the gempspec. Specifically,
16+
# the runtime_dependencies in puppet.gemspec match the runtime dependencies here
17+
# (like facter, semantic_puppet, and puppet-resource_api)
1618

1719
gem "facter", *location_for(ENV['FACTER_LOCATION'] || ["~> 4.3"])
1820
gem "semantic_puppet", *location_for(ENV['SEMANTIC_PUPPET_LOCATION'] || ["~> 1.0"])
@@ -33,6 +35,7 @@ group(:features) do
3335
# requires native ldap headers/libs
3436
# gem 'ruby-ldap', '~> 0.9', require: false, platforms: [:ruby]
3537
gem 'puppetserver-ca', '~> 2.0', require: false
38+
gem 'CFPropertyList', ['>= 3.0.6', '< 4'], require: false
3639
end
3740

3841
group(:test) do

Rakefile

+13
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,19 @@ task :default do
4545
sh %{rake -T}
4646
end
4747

48+
namespace :pl_ci do
49+
desc 'Build puppet gems'
50+
task :gem_build do
51+
stdout, stderr, status = Open3.capture3('gem build puppet.gemspec --platform x86-mingw32 && gem build puppet.gemspec --platform x64-mingw32 && gem build puppet.gemspec --platform universal-darwin && gem build puppet.gemspec')
52+
if !status.exitstatus.zero?
53+
puts "Error building facter.gemspec \n#{stdout} \n#{stderr}"
54+
exit(1)
55+
else
56+
puts stdout
57+
end
58+
end
59+
end
60+
4861
task :spec do
4962
ENV["LOG_SPEC_ORDER"] = "true"
5063
sh %{rspec #{ENV['TEST'] || ENV['TESTS'] || 'spec'}}

ext/project_data.yaml

-43
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,10 @@
11
---
22
project: 'puppet'
3-
author: 'Puppet Labs'
4-
5-
homepage: 'https://github.com/puppetlabs/puppet'
6-
summary: 'Puppet, an automated configuration management tool'
7-
description: 'Puppet, an automated configuration management tool'
8-
version_file: 'lib/puppet/version.rb'
9-
# files and gem_files are space separated lists
10-
files: '[A-Z]* install.rb bin lib conf man examples ext tasks locales'
11-
# Make sure these gem requirements are in sync with the gemspec and Gemfile
12-
gem_files: '[A-Z]* install.rb bin lib conf man examples ext tasks locales'
13-
gem_test_files:
14-
gem_executables: 'puppet'
15-
gem_default_executables: 'puppet'
16-
gem_license: 'Apache-2.0'
17-
gem_forge_project: 'puppet'
18-
gem_required_ruby_version: '>= 3.1.0'
19-
gem_required_rubygems_version: '> 1.3.1'
20-
gem_runtime_dependencies:
21-
facter: ['>= 4.3.0', '< 5']
22-
semantic_puppet: '~> 1.0'
23-
fast_gettext: ['>= 2.1', '< 3']
24-
locale: '~> 2.1'
25-
multi_json: '~> 1.13'
26-
puppet-resource_api: '~>1.5'
27-
concurrent-ruby: "~> 1.0"
28-
deep_merge: '~> 1.0'
29-
scanf: '~> 1.0'
303
gem_rdoc_options:
314
- --title
325
- "Puppet - Configuration Management"
336
- --main
347
- README.md
358
- --line-numbers
36-
gem_platform_dependencies:
37-
universal-darwin:
38-
gem_runtime_dependencies:
39-
CFPropertyList: ['>= 3.0.6', '< 4']
40-
x86-mingw32:
41-
gem_runtime_dependencies:
42-
ffi: '1.15.5'
43-
minitar: '~> 0.9'
44-
x64-mingw32:
45-
gem_runtime_dependencies:
46-
ffi: '1.15.5'
47-
minitar: '~> 0.9'
48-
bundle_platforms:
49-
universal-darwin: all
50-
x86-mingw32: mingw
51-
x64-mingw32: x64_mingw
529
pre_tasks:
5310
'package:apple': 'cfpropertylist'

puppet.gemspec

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
Gem::Specification.new do |s|
2+
s.name = "puppet"
3+
version = "8.7.0"
4+
mdata = version.match(/(\d+\.\d+\.\d+)/)
5+
s.version = mdata ? mdata[1] : version
6+
s.licenses = ['Apache-2.0']
7+
8+
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1")
9+
s.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
10+
s.authors = ["Puppet Labs"]
11+
s.date = "2012-08-17"
12+
s.description = <<~EOF
13+
Puppet, an automated administrative engine for your Linux, Unix, and Windows systems, performs administrative tasks
14+
(such as adding users, installing packages, and updating server configurations) based on a centralized specification.
15+
EOF
16+
s.email = "[email protected]"
17+
s.executables = ["puppet"]
18+
s.files = Dir['[A-Z]*'] + Dir['install.rb'] + Dir['bin/*'] + Dir['lib/**/*'] + Dir['conf/*'] + Dir['man/**/*'] + Dir['tasks/*'] + Dir['locales/**/*'] + Dir['ext/**/*'] + Dir['examples/**/*']
19+
s.license = "Apache-2.0"
20+
s.homepage = "https://github.com/puppetlabs/puppet"
21+
s.rdoc_options = ["--title", "Puppet - Configuration Management", "--main", "README", "--line-numbers"]
22+
s.require_paths = ["lib"]
23+
s.summary = "Puppet, an automated configuration management tool"
24+
s.specification_version = 4
25+
s.add_runtime_dependency(%q<facter>, [">= 4.3.0", "< 5"])
26+
s.add_runtime_dependency(%q<semantic_puppet>, "~> 1.0")
27+
s.add_runtime_dependency(%q<fast_gettext>, ">= 2.1", "< 3")
28+
s.add_runtime_dependency(%q<locale>, "~> 2.1")
29+
s.add_runtime_dependency(%q<multi_json>, "~> 1.13")
30+
s.add_runtime_dependency(%q<puppet-resource_api>, "~> 1.5")
31+
s.add_runtime_dependency(%q<concurrent-ruby>, "~> 1.0")
32+
s.add_runtime_dependency(%q<deep_merge>, "~> 1.0")
33+
s.add_runtime_dependency(%q<scanf>, "~> 1.0")
34+
35+
platform = s.platform.to_s
36+
if platform == 'universal-darwin'
37+
s.add_runtime_dependency('CFPropertyList', ['>= 3.0.6', '< 4'])
38+
end
39+
40+
if platform == 'x64-mingw32' || platform == 'x86-mingw32'
41+
s.add_runtime_dependency('ffi', '1.15.5')
42+
s.add_runtime_dependency('minitar', '~> 0.9')
43+
end
44+
end

spec/unit/provider/user/directoryservice_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
module Puppet::Util::Plist
55
end
66

7-
describe Puppet::Type.type(:user).provider(:directoryservice) do
7+
describe Puppet::Type.type(:user).provider(:directoryservice), :if => Puppet.features.cfpropertylist? do
88
let(:username) { 'nonexistent_user' }
99
let(:user_path) { "/Users/#{username}" }
1010
let(:resource) do

0 commit comments

Comments
 (0)