puppet 8.6.0 → 8.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +6 -2
  3. data/Gemfile.lock +42 -38
  4. data/Rakefile +45 -22
  5. data/examples/hiera/README.md +68 -57
  6. data/examples/hiera/data/common.yaml +12 -0
  7. data/examples/hiera/data/dc1.yaml +6 -0
  8. data/examples/hiera/hiera.yaml +15 -0
  9. data/examples/hiera/modules/ntp/data/common.yaml +4 -0
  10. data/examples/hiera/modules/ntp/hiera.yaml +9 -0
  11. data/examples/hiera/modules/ntp/manifests/config.pp +16 -4
  12. data/examples/hiera/modules/ntp/templates/ntp.conf.epp +3 -0
  13. data/examples/hiera/modules/users/manifests/common.pp +7 -2
  14. data/examples/hiera/modules/users/manifests/dc1.pp +7 -2
  15. data/examples/hiera/site.pp +1 -1
  16. data/ext/project_data.yaml +0 -45
  17. data/lib/puppet/daemon.rb +1 -0
  18. data/lib/puppet/pops/loader/static_loader.rb +2 -2
  19. data/lib/puppet/pops/lookup/module_data_provider.rb +9 -9
  20. data/lib/puppet/provider/aix_object.rb +1 -1
  21. data/lib/puppet/provider/group/groupadd.rb +30 -9
  22. data/lib/puppet/provider/package/xbps.rb +127 -0
  23. data/lib/puppet/scheduler/splay_job.rb +9 -0
  24. data/lib/puppet/type/exec.rb +8 -0
  25. data/lib/puppet/util/command_line/trollop.rb +20 -2
  26. data/lib/puppet/util/rpm_compare.rb +1 -1
  27. data/lib/puppet/util/windows/com.rb +2 -2
  28. data/lib/puppet/version.rb +1 -1
  29. data/locales/puppet.pot +604 -600
  30. data/man/man5/puppet.conf.5 +2 -2
  31. data/man/man8/puppet-agent.8 +1 -1
  32. data/man/man8/puppet-apply.8 +1 -1
  33. data/man/man8/puppet-catalog.8 +1 -1
  34. data/man/man8/puppet-config.8 +1 -1
  35. data/man/man8/puppet-describe.8 +1 -1
  36. data/man/man8/puppet-device.8 +1 -1
  37. data/man/man8/puppet-doc.8 +1 -1
  38. data/man/man8/puppet-epp.8 +1 -1
  39. data/man/man8/puppet-facts.8 +1 -1
  40. data/man/man8/puppet-filebucket.8 +1 -1
  41. data/man/man8/puppet-generate.8 +1 -1
  42. data/man/man8/puppet-help.8 +1 -1
  43. data/man/man8/puppet-lookup.8 +1 -1
  44. data/man/man8/puppet-module.8 +1 -1
  45. data/man/man8/puppet-node.8 +1 -1
  46. data/man/man8/puppet-parser.8 +1 -1
  47. data/man/man8/puppet-plugin.8 +1 -1
  48. data/man/man8/puppet-report.8 +1 -1
  49. data/man/man8/puppet-resource.8 +1 -1
  50. data/man/man8/puppet-script.8 +1 -1
  51. data/man/man8/puppet-ssl.8 +1 -1
  52. data/man/man8/puppet.8 +2 -2
  53. metadata +13 -23
  54. data/examples/hiera/etc/hiera.yaml +0 -15
  55. data/examples/hiera/etc/hieradb/common.yaml +0 -3
  56. data/examples/hiera/etc/hieradb/dc1.yaml +0 -6
  57. data/examples/hiera/etc/hieradb/development.yaml +0 -2
  58. data/examples/hiera/etc/puppet.conf +0 -3
  59. data/examples/hiera/modules/data/manifests/common.pp +0 -4
  60. data/examples/hiera/modules/ntp/manifests/data.pp +0 -4
  61. data/examples/hiera/modules/ntp/templates/ntp.conf.erb +0 -3
  62. data/examples/hiera/modules/users/manifests/development.pp +0 -4
  63. data/tasks/benchmark.rake +0 -180
  64. data/tasks/cfpropertylist.rake +0 -15
  65. data/tasks/ci.rake +0 -24
  66. data/tasks/generate_ast_model.rake +0 -90
  67. data/tasks/generate_cert_fixtures.rake +0 -199
  68. data/tasks/manpages.rake +0 -67
  69. data/tasks/memwalk.rake +0 -195
  70. data/tasks/parallel.rake +0 -410
  71. data/tasks/parser.rake +0 -22
  72. data/tasks/yard.rake +0 -59
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPETCONF" "5" "April 2024" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPETCONF" "5" "June 2024" "Puppet, Inc." "Puppet manual"
5
5
  \fBThis page is autogenerated; any changes will get overwritten\fR
6
6
  .
7
7
  .SH "Configuration settings"
@@ -973,7 +973,7 @@ The time to wait for data to be read from an HTTP connection\. If nothing is rea
973
973
  The HTTP User\-Agent string to send when making network requests\.
974
974
  .
975
975
  .IP "\(bu" 4
976
- \fIDefault\fR: \fBPuppet/8\.6\.0 Ruby/3\.1\.1\-p18 (x86_64\-linux)\fR
976
+ \fIDefault\fR: \fBPuppet/8\.7\.0 Ruby/3\.1\.1\-p18 (x86_64\-linux)\fR
977
977
  .
978
978
  .IP "" 0
979
979
  .
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-AGENT" "8" "April 2024" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-AGENT" "8" "June 2024" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-agent\fR \- The puppet agent daemon
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-APPLY" "8" "April 2024" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-APPLY" "8" "June 2024" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-apply\fR \- Apply Puppet manifests locally
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-CATALOG" "8" "April 2024" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-CATALOG" "8" "June 2024" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-catalog\fR \- Compile, save, view, and convert catalogs\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-CONFIG" "8" "April 2024" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-CONFIG" "8" "June 2024" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-config\fR \- Interact with Puppet\'s settings\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-DESCRIBE" "8" "April 2024" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-DESCRIBE" "8" "June 2024" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-describe\fR \- Display help about resource types
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-DEVICE" "8" "April 2024" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-DEVICE" "8" "June 2024" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-device\fR \- Manage remote network devices
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-DOC" "8" "April 2024" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-DOC" "8" "June 2024" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-doc\fR \- Generate Puppet references
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-EPP" "8" "April 2024" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-EPP" "8" "June 2024" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-epp\fR \- Interact directly with the EPP template parser/renderer\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-FACTS" "8" "April 2024" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-FACTS" "8" "June 2024" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-facts\fR \- Retrieve and store facts\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-FILEBUCKET" "8" "April 2024" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-FILEBUCKET" "8" "June 2024" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-filebucket\fR \- Store and retrieve files in a filebucket
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-GENERATE" "8" "April 2024" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-GENERATE" "8" "June 2024" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-generate\fR \- Generates Puppet code from Ruby definitions\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-HELP" "8" "April 2024" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-HELP" "8" "June 2024" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-help\fR \- Display Puppet help\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-LOOKUP" "8" "April 2024" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-LOOKUP" "8" "June 2024" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-lookup\fR \- Interactive Hiera lookup
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-MODULE" "8" "April 2024" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-MODULE" "8" "June 2024" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-module\fR \- Creates, installs and searches for modules on the Puppet Forge\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-NODE" "8" "April 2024" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-NODE" "8" "June 2024" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-node\fR \- View and manage node definitions\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-PARSER" "8" "April 2024" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-PARSER" "8" "June 2024" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-parser\fR \- Interact directly with the parser\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-PLUGIN" "8" "April 2024" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-PLUGIN" "8" "June 2024" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-plugin\fR \- Interact with the Puppet plugin system\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-REPORT" "8" "April 2024" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-REPORT" "8" "June 2024" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-report\fR \- Create, display, and submit reports\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-RESOURCE" "8" "April 2024" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-RESOURCE" "8" "June 2024" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-resource\fR \- The resource abstraction layer shell
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-SCRIPT" "8" "April 2024" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-SCRIPT" "8" "June 2024" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-script\fR \- Run a puppet manifests as a script without compiling a catalog
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-SSL" "8" "April 2024" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-SSL" "8" "June 2024" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-ssl\fR \- Manage SSL keys and certificates for puppet SSL clients
data/man/man8/puppet.8 CHANGED
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET" "8" "April 2024" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET" "8" "June 2024" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\fR
@@ -25,4 +25,4 @@ Specialized:
25
25
  catalog Compile, save, view, and convert catalogs\. describe Display help about resource types device Manage remote network devices doc Generate Puppet references epp Interact directly with the EPP template parser/renderer\. facts Retrieve and store facts\. filebucket Store and retrieve files in a filebucket generate Generates Puppet code from Ruby definitions\. node View and manage node definitions\. parser Interact directly with the parser\. plugin Interact with the Puppet plugin system\. script Run a puppet manifests as a script without compiling a catalog ssl Manage SSL keys and certificates for puppet SSL clients
26
26
  .
27
27
  .P
28
- See \'puppet help \fIsubcommand\fR \fIaction\fR\' for help on a specific subcommand action\. See \'puppet help \fIsubcommand\fR\' for help on a specific subcommand\. Puppet v8\.6\.0
28
+ See \'puppet help \fIsubcommand\fR \fIaction\fR\' for help on a specific subcommand action\. See \'puppet help \fIsubcommand\fR\' for help on a specific subcommand\. Puppet v8\.7\.0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.6.0
4
+ version: 8.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-09 00:00:00.000000000 Z
11
+ date: 2012-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: facter
@@ -148,7 +148,9 @@ dependencies:
148
148
  - - "~>"
149
149
  - !ruby/object:Gem::Version
150
150
  version: '1.0'
151
- description: Puppet, an automated configuration management tool
151
+ description: |
152
+ Puppet, an automated administrative engine for your Linux, Unix, and Windows systems, performs administrative tasks
153
+ (such as adding users, installing packages, and updating server configurations) based on a centralized specification.
152
154
  email: info@puppetlabs.com
153
155
  executables:
154
156
  - puppet
@@ -176,18 +178,15 @@ files:
176
178
  - examples/enc/regexp_nodes/parameters/service/sandbox
177
179
  - examples/enc/regexp_nodes/regexp_nodes.rb
178
180
  - examples/hiera/README.md
179
- - examples/hiera/etc/hiera.yaml
180
- - examples/hiera/etc/hieradb/common.yaml
181
- - examples/hiera/etc/hieradb/dc1.yaml
182
- - examples/hiera/etc/hieradb/development.yaml
183
- - examples/hiera/etc/puppet.conf
184
- - examples/hiera/modules/data/manifests/common.pp
181
+ - examples/hiera/data/common.yaml
182
+ - examples/hiera/data/dc1.yaml
183
+ - examples/hiera/hiera.yaml
184
+ - examples/hiera/modules/ntp/data/common.yaml
185
+ - examples/hiera/modules/ntp/hiera.yaml
185
186
  - examples/hiera/modules/ntp/manifests/config.pp
186
- - examples/hiera/modules/ntp/manifests/data.pp
187
- - examples/hiera/modules/ntp/templates/ntp.conf.erb
187
+ - examples/hiera/modules/ntp/templates/ntp.conf.epp
188
188
  - examples/hiera/modules/users/manifests/common.pp
189
189
  - examples/hiera/modules/users/manifests/dc1.pp
190
- - examples/hiera/modules/users/manifests/development.pp
191
190
  - examples/hiera/site.pp
192
191
  - examples/nagios/check_puppet.rb
193
192
  - ext/README.md
@@ -959,6 +958,7 @@ files:
959
958
  - lib/puppet/provider/package/windows/exe_package.rb
960
959
  - lib/puppet/provider/package/windows/msi_package.rb
961
960
  - lib/puppet/provider/package/windows/package.rb
961
+ - lib/puppet/provider/package/xbps.rb
962
962
  - lib/puppet/provider/package/yum.rb
963
963
  - lib/puppet/provider/package/zypper.rb
964
964
  - lib/puppet/provider/package_targetable.rb
@@ -1258,16 +1258,6 @@ files:
1258
1258
  - man/man8/puppet-script.8
1259
1259
  - man/man8/puppet-ssl.8
1260
1260
  - man/man8/puppet.8
1261
- - tasks/benchmark.rake
1262
- - tasks/cfpropertylist.rake
1263
- - tasks/ci.rake
1264
- - tasks/generate_ast_model.rake
1265
- - tasks/generate_cert_fixtures.rake
1266
- - tasks/manpages.rake
1267
- - tasks/memwalk.rake
1268
- - tasks/parallel.rake
1269
- - tasks/parser.rake
1270
- - tasks/yard.rake
1271
1261
  homepage: https://github.com/puppetlabs/puppet
1272
1262
  licenses:
1273
1263
  - Apache-2.0
@@ -1277,7 +1267,7 @@ rdoc_options:
1277
1267
  - "--title"
1278
1268
  - Puppet - Configuration Management
1279
1269
  - "--main"
1280
- - README.md
1270
+ - README
1281
1271
  - "--line-numbers"
1282
1272
  require_paths:
1283
1273
  - lib
@@ -1,15 +0,0 @@
1
- ---
2
- :backends:
3
- - yaml
4
- - puppet
5
-
6
- :hierarchy:
7
- - "%{location}"
8
- - "%{environment}"
9
- - common
10
-
11
- :yaml:
12
- :datadir: etc/hieradb
13
-
14
- :puppet:
15
- :datasource: data
@@ -1,3 +0,0 @@
1
- classes:
2
- - users::common
3
- - ntp::config
@@ -1,6 +0,0 @@
1
- ---
2
- ntpservers:
3
- - ntp1.dc1.example.com
4
- - ntp2.dc1.example.com
5
- classes:
6
- - users::dc1
@@ -1,2 +0,0 @@
1
- ---
2
- classes: users::development
@@ -1,3 +0,0 @@
1
- [main]
2
- modulepath = modules
3
-
@@ -1,4 +0,0 @@
1
- # sets the common (across all puppet conf) ntp servers.
2
- class data::common {
3
- $ntpservers = ['ntp1.example.com', 'ntp2.example.com']
4
- }
@@ -1,4 +0,0 @@
1
- # this class will be loaded using hiera's 'puppet' backend
2
- class ntp::data {
3
- $ntpservers = ['1.pool.ntp.org', '2.pool.ntp.org']
4
- }
@@ -1,3 +0,0 @@
1
- <% [ntpservers].flatten.each do |server| -%>
2
- server <%= server %>
3
- <% end -%>
@@ -1,4 +0,0 @@
1
- # notifies
2
- class users::development {
3
- notify{'Adding users::development': }
4
- }
data/tasks/benchmark.rake DELETED
@@ -1,180 +0,0 @@
1
- require 'benchmark'
2
- require 'tmpdir'
3
- require 'csv'
4
- require 'objspace'
5
-
6
- namespace :benchmark do
7
- def generate_scenario_tasks(location, name)
8
- desc File.read(File.join(location, 'description'))
9
- task name => "#{name}:run"
10
- # Load a BenchmarkerTask to handle config of the benchmark
11
- task_handler_file = File.expand_path(File.join(location, 'benchmarker_task.rb'))
12
- if File.exist?(task_handler_file)
13
- require task_handler_file
14
- run_args = BenchmarkerTask.run_args
15
- else
16
- run_args = []
17
- end
18
-
19
- namespace name do
20
- task :setup do
21
- ENV['ITERATIONS'] ||= '10'
22
- ENV['SIZE'] ||= '100'
23
- ENV['TARGET'] ||= Dir.mktmpdir(name)
24
- ENV['TARGET'] = File.expand_path(ENV['TARGET'])
25
-
26
- mkdir_p(ENV['TARGET'])
27
-
28
- require File.expand_path(File.join(location, 'benchmarker.rb'))
29
-
30
- @benchmark = Benchmarker.new(ENV['TARGET'], ENV['SIZE'].to_i)
31
- end
32
-
33
- task :generate => :setup do
34
- @benchmark.generate
35
- @benchmark.setup
36
- end
37
-
38
- desc "Run the #{name} scenario."
39
- task :run, [*run_args] => :generate do |_, args|
40
- report = []
41
- details = []
42
- Benchmark.benchmark(Benchmark::CAPTION, 10, Benchmark::FORMAT, "> total:", "> avg:") do |b|
43
- times = []
44
- ENV['ITERATIONS'].to_i.times do |i|
45
- start_time = Time.now.to_i
46
- times << b.report("Run #{i + 1}") do
47
- details << @benchmark.run(args)
48
- end
49
- report << [to_millis(start_time), to_millis(times.last.real), 200, true, name]
50
- end
51
-
52
- sum = times.inject(Benchmark::Tms.new, &:+)
53
-
54
- [sum, sum / times.length]
55
- end
56
-
57
- write_csv("#{name}.samples",
58
- %w{timestamp elapsed responsecode success name},
59
- report)
60
-
61
- # report details, if any were produced
62
- if details[0].is_a?(Array) && details[0][0].is_a?(Benchmark::Tms)
63
- # assume all entries are Tms if the first is
64
- # turn each into a hash of label => tms (since labels are lost when doing arithmetic on Tms)
65
- hashed = details.reduce([]) do |memo, measures|
66
- memo << measures.reduce({}) {|memo2, measure| memo2[measure.label] = measure; memo2}
67
- memo
68
- end
69
- # sum across all hashes
70
- result = {}
71
-
72
- hashed_totals = hashed.reduce {|memo, h| memo.merge(h) {|k, old, new| old + new }}
73
- # average the totals
74
- hashed_totals.keys.each {|k| hashed_totals[k] /= details.length }
75
- min_width = 14
76
- max_width = (hashed_totals.keys.map(&:length) << min_width).max
77
- puts "\n"
78
- puts sprintf("%2$*1$s %3$s", -max_width, 'Details (avg)', " user system total real")
79
- puts "-" * (46 + max_width)
80
- hashed_totals.sort.each {|k,v| puts sprintf("%2$*1$s %3$s", -max_width, k, v.format) }
81
- end
82
- end
83
-
84
- desc "Profile a single run of the #{name} scenario."
85
- task :profile, [:warm_up_runs, *run_args] => :generate do |_, args|
86
- warm_up_runs = (args[:warm_up_runs] || '0').to_i
87
- warm_up_runs.times do
88
- @benchmark.run(args)
89
- end
90
-
91
- require 'ruby-prof'
92
-
93
- result = RubyProf.profile do
94
- @benchmark.run(args)
95
- end
96
-
97
- printer = RubyProf::CallTreePrinter.new(result)
98
- printer.print(:profile => name, :path => ENV['TARGET'])
99
- path = File.join(ENV['TARGET'], "#{name}.callgrind.out.#{$$}")
100
- puts "Generated callgrind file: #{path}"
101
- end
102
-
103
- desc "Print a memory profile of the #{name} scenario."
104
- task :memory_profile, [*run_args] => :generate do |_, args|
105
- begin
106
- require 'memory_profiler'
107
- rescue LoadError
108
- abort("Run `bundle install --with development` to install the 'memory_profiler' gem.")
109
- end
110
-
111
- report = MemoryProfiler.report do
112
- @benchmark.run(args)
113
- end
114
-
115
- path = "mem_profile_#{$PID}"
116
- report.pretty_print(to_file: path)
117
-
118
- puts "Generated memory profile: #{File.absolute_path(path)}"
119
- end
120
-
121
- desc "Generate a heap dump with object allocation tracing of the #{name} scenario."
122
- task :heap_dump, [*run_args] => :generate do |_, args|
123
- ObjectSpace.trace_object_allocations_start
124
-
125
- if ENV['DISABLE_GC']
126
- GC.disable
127
- end
128
-
129
- @benchmark.run(args)
130
-
131
- unless ENV['DISABLE_GC']
132
- GC.start
133
- end
134
-
135
- path = "heap_#{$PID}.json"
136
- File.open(path, 'w') do |file|
137
- ObjectSpace.dump_all(output: file)
138
- end
139
-
140
- puts "Generated heap dump: #{File.absolute_path(path)}"
141
- end
142
-
143
- def to_millis(seconds)
144
- (seconds * 1000).round
145
- end
146
-
147
- def write_csv(file, header, data)
148
- CSV.open(file, 'w') do |csv|
149
- csv << header
150
- data.each do |line|
151
- csv << line
152
- end
153
- end
154
- end
155
- end
156
- end
157
-
158
- scenarios = []
159
- Dir.glob('benchmarks/*') do |location|
160
- name = File.basename(location)
161
- scenarios << name
162
- generate_scenario_tasks(location, File.basename(location))
163
- end
164
-
165
- namespace :all do
166
- desc "Profile all of the scenarios. (#{scenarios.join(', ')})"
167
- task :profile do
168
- scenarios.each do |name|
169
- sh "rake benchmark:#{name}:profile"
170
- end
171
- end
172
-
173
- desc "Run all of the scenarios. (#{scenarios.join(', ')})"
174
- task :run do
175
- scenarios.each do |name|
176
- sh "rake benchmark:#{name}:run"
177
- end
178
- end
179
- end
180
- end
@@ -1,15 +0,0 @@
1
- task 'cfpropertylist' do
2
- if defined? Pkg::Config and Pkg::Config.project_root
3
- cfp_version = "2.3.5"
4
- libdir = File.join(Pkg::Config.project_root, "lib")
5
- source = "https://github.com/ckruse/CFPropertyList/archive/cfpropertylist-#{cfp_version}.tar.gz"
6
- target_dir = Pkg::Util::File.mktemp
7
- target = File.join(target_dir, "cfpropertylist")
8
- Pkg::Util::Net.fetch_uri(source, target)
9
- Pkg::Util::File.untar_into(target, target_dir, "--strip-components 1")
10
- mv(Dir.glob("#{File.join(target_dir, "lib")}/cfpropertylist*"), libdir)
11
- mv(Dir.glob("#{target_dir}/{LICENSE,README,THANKS}"), File.join(libdir, "cfpropertylist"))
12
- else
13
- warn "It looks like the packaging tasks have not been loaded. You'll need to `rake package:bootstrap` before using this task"
14
- end
15
- end
data/tasks/ci.rake DELETED
@@ -1,24 +0,0 @@
1
- require 'yaml'
2
- require 'time'
3
-
4
- namespace "ci" do
5
- desc "Tar up the acceptance/ directory so that package test runs have tests to run against."
6
- task :acceptance_artifacts => :tag_creator do
7
- Dir.chdir("acceptance") do
8
- rm_f "acceptance-artifacts.tar.gz"
9
- sh "tar -czv --exclude .bundle -f acceptance-artifacts.tar.gz *"
10
- end
11
- end
12
-
13
- task :tag_creator do
14
- Dir.chdir("acceptance") do
15
- File.open('creator.txt', 'w') do |fh|
16
- YAML.dump({
17
- 'creator_id' => ENV['CREATOR'] || ENV['BUILD_URL'] || 'unknown',
18
- 'created_on' => Time.now.iso8601,
19
- 'commit' => (`git log -1 --oneline` rescue "unknown: #{$!}")
20
- }, fh)
21
- end
22
- end
23
- end
24
- end