Skip to content

Commit b995285

Browse files
committed
(PUP-12031) Consolidate gem depenendencies & metadata into puppet.gemspec
This commit moves the puppet gem metadata from ext/project_yaml.data and .gemspec into puppet.gemspec. This change allows the puppet gem to be built using `gem build puppet.gemspec`. Additionally, for platform specific gems (e.g. puppet-universal-darwin.gem and puppet-x64-mingw32.gem), there is conditional logic in puppet.gemspec so platform specific dependecies such as ffi are appended when building those platform-specific gems.
1 parent fb44fd9 commit b995285

File tree

3 files changed

+44
-102
lines changed

3 files changed

+44
-102
lines changed

.gemspec

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

ext/project_data.yaml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,3 @@ gem_rdoc_options:
3333
- --main
3434
- README.md
3535
- --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
52-
pre_tasks:
53-
'package:apple': 'cfpropertylist'

puppet.gemspec

Lines changed: 44 additions & 0 deletions
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 = "puppet@puppetlabs.com"
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

0 commit comments

Comments
 (0)