vagrant-unbundled 2.2.18.0 → 2.2.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/Gemfile.lock +6 -6
- data/contrib/zsh/generate_zsh_completion.rb +2 -2
- data/lib/vagrant/errors.rb +8 -0
- data/plugins/commands/upload/command.rb +1 -1
- data/plugins/guests/atomic/guest.rb +1 -1
- data/plugins/guests/coreos/cap/configure_networks.rb +65 -0
- data/plugins/guests/darwin/cap/mount_smb_shared_folder.rb +6 -3
- data/plugins/guests/suse/cap/halt.rb +5 -1
- data/plugins/guests/windows/cap/rsync.rb +5 -1
- data/plugins/hosts/darwin/cap/path.rb +4 -0
- data/plugins/hosts/darwin/cap/version.rb +23 -0
- data/plugins/hosts/darwin/plugin.rb +5 -0
- data/plugins/hosts/windows/cap/ssh.rb +1 -1
- data/plugins/providers/virtualbox/action/network.rb +39 -2
- data/plugins/provisioners/chef/cap/freebsd/chef_installed.rb +5 -3
- data/plugins/provisioners/chef/cap/linux/chef_installed.rb +5 -3
- data/plugins/provisioners/chef/cap/omnios/chef_installed.rb +7 -5
- data/plugins/provisioners/chef/cap/windows/chef_installed.rb +3 -2
- data/templates/locales/en.yml +25 -0
- data/vagrant.gemspec +1 -1
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/CONTRIBUTING.md +23 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/CONTRIBUTORS.md +140 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/LICENSE.md +20 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/README.md +492 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/data/cacert.pem +3232 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/excon.gemspec +45 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/connection.rb +599 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/constants.rb +172 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/error.rb +229 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/extensions/uri.rb +34 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/headers.rb +85 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/instrumentors/logging_instrumentor.rb +48 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/instrumentors/standard_instrumentor.rb +21 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/middlewares/base.rb +31 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/middlewares/capture_cookies.rb +32 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/middlewares/decompress.rb +44 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/middlewares/escape_path.rb +12 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/middlewares/expects.rb +25 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/middlewares/idempotent.rb +57 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/middlewares/instrumentor.rb +49 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/middlewares/mock.rb +61 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/middlewares/redirect_follower.rb +87 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/middlewares/response_parser.rb +16 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/pretty_printer.rb +39 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/response.rb +234 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/socket.rb +297 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/ssl_socket.rb +194 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/test/plugin/server/exec.rb +26 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/test/plugin/server/puma.rb +23 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/test/plugin/server/unicorn.rb +40 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/test/plugin/server/webrick.rb +26 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/test/server.rb +106 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/unix_socket.rb +42 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/utils.rb +143 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon/version.rb +4 -0
- data/vendor/bundle/ruby/3.0.0/gems/excon-0.89.0/lib/excon.rb +255 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/MIT-LICENSE +20 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/README.md +122 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/backend/base.rb +289 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/backend/cache.rb +113 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/backend/cache_file.rb +36 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/backend/cascade.rb +56 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/backend/chain.rb +130 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/backend/fallbacks.rb +97 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/backend/flatten.rb +118 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/backend/gettext.rb +85 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/backend/interpolation_compiler.rb +123 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/backend/key_value.rb +206 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/backend/memoize.rb +54 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/backend/metadata.rb +71 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/backend/pluralization.rb +55 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/backend/simple.rb +108 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/backend/transliterator.rb +108 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/backend.rb +21 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/config.rb +165 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/core_ext/hash.rb +59 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/exceptions.rb +111 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/gettext/helpers.rb +75 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/gettext/po_parser.rb +329 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/gettext.rb +28 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/interpolate/ruby.rb +39 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/locale/fallbacks.rb +99 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/locale/tag/parents.rb +24 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/locale/tag/rfc4646.rb +74 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/locale/tag/simple.rb +39 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/locale/tag.rb +28 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/locale.rb +8 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/middleware.rb +17 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/tests/basics.rb +60 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/tests/defaults.rb +52 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/tests/interpolation.rb +163 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/tests/link.rb +66 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/tests/localization/date.rb +117 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/tests/localization/date_time.rb +103 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/tests/localization/procs.rb +117 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/tests/localization/time.rb +103 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/tests/localization.rb +19 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/tests/lookup.rb +81 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/tests/pluralization.rb +35 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/tests/procs.rb +60 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/tests.rb +14 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n/version.rb +5 -0
- data/vendor/bundle/ruby/3.0.0/gems/i18n-1.8.11/lib/i18n.rb +415 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/Code-of-Conduct.md +73 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/Contributing.md +132 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/History.md +269 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/Licence.md +25 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/Manifest.txt +31 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/README.rdoc +194 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/Rakefile +270 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/lib/mime/type/columnar.rb +57 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/lib/mime/type.rb +634 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/lib/mime/types/_columnar.rb +137 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/lib/mime/types/cache.rb +58 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/lib/mime/types/columnar.rb +3 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/lib/mime/types/container.rb +96 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/lib/mime/types/deprecations.rb +36 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/lib/mime/types/full.rb +19 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/lib/mime/types/loader.rb +159 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/lib/mime/types/logger.rb +37 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/lib/mime/types/registry.rb +90 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/lib/mime/types.rb +233 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/lib/mime-types.rb +3 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/test/bad-fixtures/malformed +9 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/test/fixture/json.json +1 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/test/fixture/old-data +9 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/test/fixture/yaml.yaml +55 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/test/minitest_helper.rb +11 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/test/test_mime_type.rb +621 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/test/test_mime_types.rb +169 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/test/test_mime_types_cache.rb +118 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/test/test_mime_types_class.rb +159 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/test/test_mime_types_lazy.rb +49 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-3.4.1/test/test_mime_types_loader.rb +32 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/Code-of-Conduct.md +75 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/Contributing.md +241 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/History.md +494 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/Licence.md +24 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/Manifest.txt +34 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/README.md +73 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/Rakefile +155 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/data/content_type_mime.db +878 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/data/ext_mime.db +1198 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/data/mime-types.json +1 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/data/mime.content_type.column +2376 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/data/mime.docs.column +2376 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/data/mime.encoding.column +2376 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/data/mime.flags.column +2376 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/data/mime.friendly.column +2376 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/data/mime.pext.column +2376 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/data/mime.use_instead.column +2376 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/data/mime.xrefs.column +2376 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/lib/mime/types/data.rb +21 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/lib/mime-types-data.rb +3 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/types/application.yaml +17254 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/types/audio.yaml +1716 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/types/chemical.yaml +71 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/types/conference.yaml +9 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/types/drawing.yaml +15 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/types/font.yaml +65 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/types/image.yaml +1251 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/types/message.yaml +200 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/types/model.yaml +390 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/types/multipart.yaml +179 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/types/provisional-standard-types.yaml +129 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/types/text.yaml +1166 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/types/video.yaml +1121 -0
- data/vendor/bundle/ruby/3.0.0/gems/mime-types-data-3.2021.1115/types/world.yaml +8 -0
- data/vendor/bundle/ruby/3.0.0/specifications/excon-0.89.0.gemspec +58 -0
- data/vendor/bundle/ruby/3.0.0/specifications/i18n-1.8.11.gemspec +32 -0
- data/vendor/bundle/ruby/3.0.0/specifications/mime-types-3.4.1.gemspec +63 -0
- data/vendor/bundle/ruby/3.0.0/specifications/mime-types-data-3.2021.1115.gemspec +54 -0
- data/version.txt +1 -1
- metadata +157 -4
@@ -0,0 +1,270 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rubygems"
|
4
|
+
require "hoe"
|
5
|
+
require "rake/clean"
|
6
|
+
|
7
|
+
# This is required until https://github.com/seattlerb/hoe/issues/112 is fixed
|
8
|
+
class Hoe
|
9
|
+
def with_config
|
10
|
+
config = Hoe::DEFAULT_CONFIG
|
11
|
+
|
12
|
+
rc = File.expand_path("~/.hoerc")
|
13
|
+
homeconfig = load_config(rc)
|
14
|
+
config = config.merge(homeconfig)
|
15
|
+
|
16
|
+
localconfig = load_config(File.expand_path(File.join(Dir.pwd, ".hoerc")))
|
17
|
+
config = config.merge(localconfig)
|
18
|
+
|
19
|
+
yield config, rc
|
20
|
+
end
|
21
|
+
|
22
|
+
def load_config(name)
|
23
|
+
File.exist?(name) ? safe_load_yaml(name) : {}
|
24
|
+
end
|
25
|
+
|
26
|
+
def safe_load_yaml(name)
|
27
|
+
return safe_load_yaml_file(name) if YAML.respond_to?(:safe_load_file)
|
28
|
+
|
29
|
+
data = IO.binread(name)
|
30
|
+
YAML.safe_load(data, permitted_classes: [Regexp])
|
31
|
+
rescue
|
32
|
+
YAML.safe_load(data, [Regexp])
|
33
|
+
end
|
34
|
+
|
35
|
+
def safe_load_yaml_file(name)
|
36
|
+
YAML.safe_load_file(name, permitted_classes: [Regexp])
|
37
|
+
rescue
|
38
|
+
YAML.safe_load_file(name, [Regexp])
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
Hoe.plugin :doofus
|
43
|
+
Hoe.plugin :gemspec2
|
44
|
+
Hoe.plugin :git
|
45
|
+
Hoe.plugin :minitest
|
46
|
+
Hoe.plugin :email unless ENV["CI"]
|
47
|
+
|
48
|
+
spec = Hoe.spec "mime-types" do
|
49
|
+
developer("Austin Ziegler", "halostatue@gmail.com")
|
50
|
+
self.need_tar = true
|
51
|
+
|
52
|
+
require_ruby_version ">= 2.0"
|
53
|
+
|
54
|
+
self.history_file = "History.md"
|
55
|
+
self.readme_file = "README.rdoc"
|
56
|
+
|
57
|
+
license "MIT"
|
58
|
+
|
59
|
+
extra_deps << ["mime-types-data", "~> 3.2015"]
|
60
|
+
|
61
|
+
extra_dev_deps << ["hoe-doofus", "~> 1.0"]
|
62
|
+
extra_dev_deps << ["hoe-gemspec2", "~> 1.1"]
|
63
|
+
extra_dev_deps << ["hoe-git", "~> 1.6"]
|
64
|
+
extra_dev_deps << ["hoe-rubygems", "~> 1.0"]
|
65
|
+
extra_dev_deps << ["standard", "~> 1.0"]
|
66
|
+
extra_dev_deps << ["minitest", "~> 5.4"]
|
67
|
+
extra_dev_deps << ["minitest-autotest", "~> 1.0"]
|
68
|
+
extra_dev_deps << ["minitest-focus", "~> 1.0"]
|
69
|
+
extra_dev_deps << ["minitest-bonus-assertions", "~> 3.0"]
|
70
|
+
extra_dev_deps << ["minitest-hooks", "~> 1.4"]
|
71
|
+
extra_dev_deps << ["rake", ">= 10.0", "< 14.0"]
|
72
|
+
|
73
|
+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.0")
|
74
|
+
extra_dev_deps << ["simplecov", "~> 0.7"]
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
namespace :benchmark do
|
79
|
+
task :support do
|
80
|
+
%w[lib support].each { |path|
|
81
|
+
$LOAD_PATH.unshift(File.join(Rake.application.original_dir, path))
|
82
|
+
}
|
83
|
+
end
|
84
|
+
|
85
|
+
desc "Benchmark Load Times"
|
86
|
+
task :load, [:repeats] => "benchmark:support" do |_, args|
|
87
|
+
require "benchmarks/load"
|
88
|
+
Benchmarks::Load.report(
|
89
|
+
File.join(Rake.application.original_dir, "lib"),
|
90
|
+
args.repeats
|
91
|
+
)
|
92
|
+
end
|
93
|
+
|
94
|
+
desc "Allocation counts"
|
95
|
+
task :allocations, [:top_x, :mime_types_only] => "benchmark:support" do |_, args|
|
96
|
+
require "benchmarks/load_allocations"
|
97
|
+
Benchmarks::LoadAllocations.report(
|
98
|
+
top_x: args.top_x,
|
99
|
+
mime_types_only: args.mime_types_only
|
100
|
+
)
|
101
|
+
end
|
102
|
+
|
103
|
+
desc "Columnar allocation counts"
|
104
|
+
task "allocations:columnar", [:top_x, :mime_types_only] => "benchmark:support" do |_, args|
|
105
|
+
require "benchmarks/load_allocations"
|
106
|
+
Benchmarks::LoadAllocations.report(
|
107
|
+
columnar: true,
|
108
|
+
top_x: args.top_x,
|
109
|
+
mime_types_only: args.mime_types_only
|
110
|
+
)
|
111
|
+
end
|
112
|
+
|
113
|
+
desc "Columnar allocation counts (full load)"
|
114
|
+
task "allocations:columnar:full", [:top_x, :mime_types_only] => "benchmark:support" do |_, args|
|
115
|
+
require "benchmarks/load_allocations"
|
116
|
+
Benchmarks::LoadAllocations.report(
|
117
|
+
columnar: true,
|
118
|
+
top_x: args.top_x,
|
119
|
+
mime_types_only: args.mime_types_only,
|
120
|
+
full: true
|
121
|
+
)
|
122
|
+
end
|
123
|
+
|
124
|
+
desc "Memory profiler"
|
125
|
+
task :memory, [:top_x, :mime_types_only] => "benchmark:support" do |_, args|
|
126
|
+
require "benchmarks/memory_profiler"
|
127
|
+
Benchmarks::ProfileMemory.report(
|
128
|
+
mime_types_only: args.mime_types_only,
|
129
|
+
top_x: args.top_x
|
130
|
+
)
|
131
|
+
end
|
132
|
+
|
133
|
+
desc "Columnar memory profiler"
|
134
|
+
task "memory:columnar", [:top_x, :mime_types_only] => "benchmark:support" do |_, args|
|
135
|
+
require "benchmarks/memory_profiler"
|
136
|
+
Benchmarks::ProfileMemory.report(
|
137
|
+
columnar: true,
|
138
|
+
mime_types_only: args.mime_types_only,
|
139
|
+
top_x: args.top_x
|
140
|
+
)
|
141
|
+
end
|
142
|
+
|
143
|
+
desc "Columnar allocation counts (full load)"
|
144
|
+
task "memory:columnar:full", [:top_x, :mime_types_only] => "benchmark:support" do |_, args|
|
145
|
+
require "benchmarks/memory_profiler"
|
146
|
+
Benchmarks::ProfileMemory.report(
|
147
|
+
columnar: true,
|
148
|
+
full: true,
|
149
|
+
top_x: args.top_x,
|
150
|
+
mime_types_only: args.mime_types_only
|
151
|
+
)
|
152
|
+
end
|
153
|
+
|
154
|
+
desc "Object counts"
|
155
|
+
task objects: "benchmark:support" do
|
156
|
+
require "benchmarks/object_counts"
|
157
|
+
Benchmarks::ObjectCounts.report
|
158
|
+
end
|
159
|
+
|
160
|
+
desc "Columnar object counts"
|
161
|
+
task "objects:columnar" => "benchmark:support" do
|
162
|
+
require "benchmarks/object_counts"
|
163
|
+
Benchmarks::ObjectCounts.report(columnar: true)
|
164
|
+
end
|
165
|
+
|
166
|
+
desc "Columnar object counts (full load)"
|
167
|
+
task "objects:columnar:full" => "benchmark:support" do
|
168
|
+
require "benchmarks/object_counts"
|
169
|
+
Benchmarks::ObjectCounts.report(columnar: true, full: true)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
namespace :profile do
|
174
|
+
directory "tmp/profile"
|
175
|
+
|
176
|
+
CLEAN.add "tmp"
|
177
|
+
|
178
|
+
def ruby_prof(script)
|
179
|
+
require "pathname"
|
180
|
+
output = Pathname("tmp/profile").join(script)
|
181
|
+
output.mkpath
|
182
|
+
script = Pathname("support/profile").join("#{script}.rb")
|
183
|
+
|
184
|
+
args = [
|
185
|
+
"-W0",
|
186
|
+
"-Ilib",
|
187
|
+
"-S", "ruby-prof",
|
188
|
+
"-R", "mime/types",
|
189
|
+
"-s", "self",
|
190
|
+
"-p", "multi",
|
191
|
+
"-f", output.to_s,
|
192
|
+
script.to_s
|
193
|
+
]
|
194
|
+
ruby args.join(" ")
|
195
|
+
end
|
196
|
+
|
197
|
+
task full: "tmp/profile" do
|
198
|
+
ruby_prof "full"
|
199
|
+
end
|
200
|
+
|
201
|
+
task columnar: :support do
|
202
|
+
ruby_prof "columnar"
|
203
|
+
end
|
204
|
+
|
205
|
+
task "columnar:full" => :support do
|
206
|
+
ruby_prof "columnar_full"
|
207
|
+
end
|
208
|
+
end
|
209
|
+
|
210
|
+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.0")
|
211
|
+
namespace :test do
|
212
|
+
desc "Run test coverage"
|
213
|
+
task :coverage do
|
214
|
+
spec.test_prelude = [
|
215
|
+
'require "simplecov"',
|
216
|
+
'SimpleCov.start("test_frameworks") { command_name "Minitest" }',
|
217
|
+
'gem "minitest"'
|
218
|
+
].join("; ")
|
219
|
+
Rake::Task["test"].execute
|
220
|
+
end
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
namespace :convert do
|
225
|
+
namespace :docs do
|
226
|
+
task :setup do
|
227
|
+
gem "rdoc"
|
228
|
+
require "rdoc/rdoc"
|
229
|
+
@doc_converter ||= RDoc::Markup::ToMarkdown.new
|
230
|
+
end
|
231
|
+
|
232
|
+
FileList["*.rdoc"].each do |name|
|
233
|
+
rdoc = name
|
234
|
+
mark = "#{File.basename(name, ".rdoc")}.md"
|
235
|
+
|
236
|
+
file mark => [rdoc, :setup] do |t|
|
237
|
+
puts "#{rdoc} => #{mark}"
|
238
|
+
File.open(t.name, "wb") { |target|
|
239
|
+
target.write @doc_converter.convert(IO.read(t.prerequisites.first))
|
240
|
+
}
|
241
|
+
end
|
242
|
+
|
243
|
+
CLEAN.add mark
|
244
|
+
|
245
|
+
task run: [mark]
|
246
|
+
end
|
247
|
+
end
|
248
|
+
|
249
|
+
desc "Convert documentation from RDoc to Markdown"
|
250
|
+
task docs: "convert:docs:run"
|
251
|
+
end
|
252
|
+
|
253
|
+
namespace :deps do
|
254
|
+
task :top, [:number] => "benchmark:support" do |_, args|
|
255
|
+
require "deps"
|
256
|
+
Deps.run(args)
|
257
|
+
end
|
258
|
+
end
|
259
|
+
|
260
|
+
task :console do
|
261
|
+
arguments = %w[irb]
|
262
|
+
arguments.push(*spec.spec.require_paths.map { |dir| "-I#{dir}" })
|
263
|
+
arguments.push("-r#{spec.spec.name.gsub("-", File::SEPARATOR)}")
|
264
|
+
unless system(*arguments)
|
265
|
+
error "Command failed: #{show_command}"
|
266
|
+
abort
|
267
|
+
end
|
268
|
+
end
|
269
|
+
|
270
|
+
# vim: syntax=ruby
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "mime/type"
|
4
|
+
|
5
|
+
# A version of MIME::Type that works hand-in-hand with a MIME::Types::Columnar
|
6
|
+
# container to load data by columns.
|
7
|
+
#
|
8
|
+
# When a field is has not yet been loaded, that data will be loaded for all
|
9
|
+
# types in the container before forwarding the message to MIME::Type.
|
10
|
+
#
|
11
|
+
# More information can be found in MIME::Types::Columnar.
|
12
|
+
#
|
13
|
+
# MIME::Type::Columnar is *not* intended to be created except by
|
14
|
+
# MIME::Types::Columnar containers.
|
15
|
+
class MIME::Type::Columnar < MIME::Type
|
16
|
+
def initialize(container, content_type, extensions) # :nodoc:
|
17
|
+
@container = container
|
18
|
+
self.content_type = content_type
|
19
|
+
self.extensions = extensions
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.column(*methods, file: nil) # :nodoc:
|
23
|
+
file ||= methods.first
|
24
|
+
|
25
|
+
file_method = :"load_#{file}"
|
26
|
+
methods.each do |m|
|
27
|
+
define_method m do |*args|
|
28
|
+
@container.send(file_method)
|
29
|
+
super(*args)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
column :friendly
|
35
|
+
column :encoding, :encoding=
|
36
|
+
column :docs, :docs=
|
37
|
+
column :preferred_extension, :preferred_extension=
|
38
|
+
column :obsolete, :obsolete=, :obsolete?, :registered, :registered=, :registered?, :signature, :signature=,
|
39
|
+
:signature?, :provisional, :provisional=, :provisional?, file: "flags"
|
40
|
+
column :xrefs, :xrefs=, :xref_urls
|
41
|
+
column :use_instead, :use_instead=
|
42
|
+
|
43
|
+
def encode_with(coder) # :nodoc:
|
44
|
+
@container.send(:load_friendly)
|
45
|
+
@container.send(:load_encoding)
|
46
|
+
@container.send(:load_docs)
|
47
|
+
@container.send(:load_flags)
|
48
|
+
@container.send(:load_use_instead)
|
49
|
+
@container.send(:load_xrefs)
|
50
|
+
@container.send(:load_preferred_extension)
|
51
|
+
super
|
52
|
+
end
|
53
|
+
|
54
|
+
class << self
|
55
|
+
undef column
|
56
|
+
end
|
57
|
+
end
|