poise 2.6.0 → 2.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +3 -0
  3. data/CHANGELOG.md +7 -0
  4. data/Gemfile +1 -1
  5. data/README.md +1 -1
  6. data/Rakefile +1 -1
  7. data/lib/poise.rb +1 -1
  8. data/lib/poise/backports.rb +1 -1
  9. data/lib/poise/backports/not_passed.rb +2 -2
  10. data/lib/poise/backports/verify_path.rb +1 -1
  11. data/lib/poise/error.rb +1 -1
  12. data/lib/poise/helpers.rb +1 -1
  13. data/lib/poise/helpers/chefspec_matchers.rb +1 -1
  14. data/lib/poise/helpers/defined_in.rb +12 -6
  15. data/lib/poise/helpers/fused.rb +1 -1
  16. data/lib/poise/helpers/include_recipe.rb +1 -1
  17. data/lib/poise/helpers/inversion.rb +2 -2
  18. data/lib/poise/helpers/inversion/options_provider.rb +1 -1
  19. data/lib/poise/helpers/inversion/options_resource.rb +15 -1
  20. data/lib/poise/helpers/lazy_default.rb +1 -1
  21. data/lib/poise/helpers/lwrp_polyfill.rb +1 -1
  22. data/lib/poise/helpers/notifying_block.rb +1 -1
  23. data/lib/poise/helpers/option_collector.rb +1 -1
  24. data/lib/poise/helpers/resource_cloning.rb +1 -1
  25. data/lib/poise/helpers/resource_name.rb +1 -1
  26. data/lib/poise/helpers/resource_subclass.rb +1 -1
  27. data/lib/poise/helpers/subcontext_block.rb +1 -1
  28. data/lib/poise/helpers/subresources.rb +1 -1
  29. data/lib/poise/helpers/subresources/child.rb +1 -1
  30. data/lib/poise/helpers/subresources/container.rb +1 -1
  31. data/lib/poise/helpers/subresources/default_containers.rb +1 -1
  32. data/lib/poise/helpers/template_content.rb +1 -1
  33. data/lib/poise/provider.rb +1 -1
  34. data/lib/poise/resource.rb +1 -1
  35. data/lib/poise/subcontext.rb +1 -1
  36. data/lib/poise/subcontext/resource_collection.rb +1 -1
  37. data/lib/poise/subcontext/runner.rb +1 -1
  38. data/lib/poise/utils.rb +1 -1
  39. data/lib/poise/utils/resource_provider_mixin.rb +1 -1
  40. data/lib/poise/utils/shell_out.rb +1 -1
  41. data/lib/poise/version.rb +2 -2
  42. data/poise.gemspec +1 -1
  43. data/test/cookbook/attributes/default.rb +1 -1
  44. data/test/cookbook/libraries/app.rb +1 -1
  45. data/test/cookbook/libraries/app_config.rb +1 -1
  46. data/test/cookbook/libraries/inversion.rb +1 -1
  47. data/test/cookbook/metadata.rb +1 -1
  48. data/test/cookbook/recipes/default.rb +1 -1
  49. data/test/cookbook/recipes/inversion.rb +1 -1
  50. data/test/gemfiles/chef-12.0.gemfile +1 -1
  51. data/test/gemfiles/chef-12.1.gemfile +1 -1
  52. data/test/gemfiles/chef-12.2.gemfile +1 -1
  53. data/test/gemfiles/chef-12.3.gemfile +1 -1
  54. data/test/gemfiles/chef-12.4.gemfile +3 -1
  55. data/test/gemfiles/chef-12.5.gemfile +1 -1
  56. data/test/gemfiles/chef-12.6.gemfile +1 -1
  57. data/test/gemfiles/chef-12.7.gemfile +19 -0
  58. data/test/gemfiles/chef-12.8.gemfile +19 -0
  59. data/test/gemfiles/chef-12.gemfile +1 -1
  60. data/test/gemfiles/master.gemfile +1 -1
  61. data/test/integration/default/serverspec/default_spec.rb +1 -1
  62. data/test/integration/default/serverspec/inversion_spec.rb +1 -1
  63. data/test/spec/backports/not_passed_spec.rb +1 -1
  64. data/test/spec/backports/verify_path_spec.rb +1 -1
  65. data/test/spec/helpers/chefspec_matchers_spec.rb +1 -1
  66. data/test/spec/helpers/defined_in_spec.rb +1 -1
  67. data/test/spec/helpers/fused_spec.rb +1 -1
  68. data/test/spec/helpers/include_recipe_spec.rb +1 -1
  69. data/test/spec/helpers/inversion/options_resource_spec.rb +11 -1
  70. data/test/spec/helpers/inversion_spec.rb +18 -1
  71. data/test/spec/helpers/lazy_default_spec.rb +1 -1
  72. data/test/spec/helpers/lwrp_polyfill_spec.rb +1 -1
  73. data/test/spec/helpers/notifying_block_spec.rb +1 -1
  74. data/test/spec/helpers/option_collector_spec.rb +1 -1
  75. data/test/spec/helpers/resource_cloning_spec.rb +1 -1
  76. data/test/spec/helpers/resource_name_spec.rb +1 -1
  77. data/test/spec/helpers/resource_subclass_spec.rb +1 -1
  78. data/test/spec/helpers/subcontext_block_spec.rb +1 -1
  79. data/test/spec/helpers/subresources/child_spec.rb +1 -1
  80. data/test/spec/helpers/subresources/container_spec.rb +1 -1
  81. data/test/spec/helpers/template_content_spec.rb +1 -1
  82. data/test/spec/poise_spec.rb +1 -1
  83. data/test/spec/provider_spec.rb +1 -1
  84. data/test/spec/resource_spec.rb +1 -1
  85. data/test/spec/spec_helper.rb +1 -1
  86. data/test/spec/subcontext/resource_collection_spec.rb +1 -1
  87. data/test/spec/utils/resource_provider_mixin_spec.rb +1 -1
  88. data/test/spec/utils/shell_out_spec.rb +1 -1
  89. data/test/spec/utils_spec.rb +1 -1
  90. metadata +7 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1545650809810c8ee25795e7b56b933568de0914
4
- data.tar.gz: f5a89f28a4da2042b4bd722a2a7b334079535d6d
3
+ metadata.gz: e47e162a7a11083aa3e77caaae22aaf1c4e99016
4
+ data.tar.gz: 134c96de6e304855267955a405f8c25715b68a54
5
5
  SHA512:
6
- metadata.gz: c5d033b6598795b685e866618581578ee0799710f8297ba43fef51540932d9a3d4e03a509b4c07effcf991a1da613164fb1e4c38a32b0dc7945c79f901909456
7
- data.tar.gz: ab4f538ab3c09fcbfa5a9950a70c73bde93fb787f070cdcb3c059c00761a73e54eb44c1013ce17ea15af6736616997c99498c2ae5ded3c00d83265ec4584c89c
6
+ metadata.gz: 2d8c33eba4b57fe71ad2c9a1e00f8b30ec0e619ef76520efc4b21c4e0df56daad869ca6458b801f9f9cdfed313e7639380252714c3a907ff381194c03fadc364
7
+ data.tar.gz: f15d7623d0efcf762f728339f7d8a9403ba1a238151c7c5cdd67d55600d8610b3ad49e7ff3eebf213c684d90dc907423b424664ce937b980fd73b388b8771f58
data/.travis.yml CHANGED
@@ -8,6 +8,7 @@ env:
8
8
  - secure: ax5czUwK8PVHXu/B3qbRZ8AACqXW4scIElQbn4sBuLp+VyTeutGax1uO6yTi7yv3xJUbEL3Z6gdZD/sOZpSKm8SL0YhkijoSs68HJCsau8cl7fvPJ0+JIlKqWazKEA1PaCmJHQv5J9TEyPyeSxZaIyacqOwOcUTyOkRDGyC+im8=
9
9
  - secure: jEiZqcy6E5WC1nBmfJBSLPpYOUBFdpoo7DsLrvIpKVRpOw7slb+VgIru5AzbONvVD/8CYstgqiVVoGaCP/ywWWqakOQ2thp0BqWN/OVlsuPiemAdLRMMsmekkaFUdAa5l8QUUI0YiTSpSLUXQFWZrXbiARCALGAvDBbsqF1JhgA=
10
10
  - secure: e3TH/N8tcx54wShV7s96OXDXuDbo9YnekLK3L3WrYrCK12gHVcW7xlMxPctGy14h6VaP1PBXJfUjd7cdzmHgudTo8HlR4Ui0kpjp85XrohPsLmVaFDxjAstLFm4VKMpsoKUZoPZY5J8bO9b606p872M5yO4rwKy3bVK/CP6mTBY=
11
+ before_install: "gem install bundler"
11
12
  bundler_args: "--binstubs=$PWD/bin --jobs 3 --retry 3"
12
13
  script:
13
14
  - "./bin/rake travis"
@@ -20,4 +21,6 @@ gemfile:
20
21
  - test/gemfiles/chef-12.4.gemfile
21
22
  - test/gemfiles/chef-12.5.gemfile
22
23
  - test/gemfiles/chef-12.6.gemfile
24
+ - test/gemfiles/chef-12.7.gemfile
25
+ - test/gemfiles/chef-12.8.gemfile
23
26
  - test/gemfiles/master.gemfile
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## v2.6.1
4
+
5
+ * Compatibility with Chef master to fix issues with `defined_in!` not ignoring
6
+ stack frames from Chef code.
7
+ * Setting a provider in a inversion options resource now works as (probably)
8
+ expected.
9
+
3
10
  ## v2.6.0
4
11
 
5
12
  * New backwards-compatibility helper: `Poise::Backports::VERIFY_PATH`. Use it
data/Gemfile CHANGED
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
data/README.md CHANGED
@@ -218,7 +218,7 @@ The Poise test server infrastructure is generously sponsored by [Rackspace](http
218
218
 
219
219
  ## License
220
220
 
221
- Copyright 2013-2015, Noah Kantrowitz
221
+ Copyright 2013-2016, Noah Kantrowitz
222
222
 
223
223
  Licensed under the Apache License, Version 2.0 (the "License");
224
224
  you may not use this file except in compliance with the License.
data/Rakefile CHANGED
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
data/lib/poise.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@ module Poise
29
29
  NOT_PASSED = if defined?(Chef::NOT_PASSED)
30
30
  Chef::NOT_PASSED
31
31
  else
32
- # Copyright 2015, Chef Software Inc.
32
+ # Copyright 2015-2016, Chef Software Inc.
33
33
  # Used under Apache License, Version 2.0.
34
34
  Object.new.tap do |not_passed|
35
35
  def not_passed.to_s
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
data/lib/poise/error.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
data/lib/poise/helpers.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -36,6 +36,14 @@ module Poise
36
36
  # end
37
37
  # end
38
38
  module DefinedIn
39
+ # Path to the root of Poise's code.
40
+ # @see #poise_defined!
41
+ POISE_LIB_ROOT = ::File.expand_path('../..', __FILE__)
42
+
43
+ # Path to the root of Chef's code.
44
+ # @see #poise_defined!
45
+ CHEF_LIB_ROOT = ::Gem::Specification.find_by_name('chef').gem_dir
46
+
39
47
  # Wrapper for {.poise_defined_in_cookbook} to pass the run context for you.
40
48
  #
41
49
  # @see .poise_defined_in_cookbook
@@ -79,14 +87,12 @@ module Poise
79
87
  def poise_defined!(caller_array)
80
88
  # Only try to set this once.
81
89
  return if @poise_defined_in
82
- # Path to ignore, assumes Halite transformation which I'm not thrilled
83
- # about.
84
- poise_libraries = File.expand_path('../..', __FILE__)
85
90
  # Parse out just the filenames.
86
91
  caller_array = caller_array.map {|line| line.split(/:/, 2).first }
87
- # Find the first non-poise line.
92
+ # Find the first non-poise, non-chef line. This assumes Halite
93
+ # transformation which I'm not thrilled about.
88
94
  caller_path = caller_array.find do |line|
89
- !line.start_with?(poise_libraries)
95
+ !line.start_with?(POISE_LIB_ROOT) && !line.start_with?(CHEF_LIB_ROOT)
90
96
  end
91
97
  Chef::Log.debug("[#{self.name}] Recording poise_defined_in as #{caller_path}")
92
98
  @poise_defined_in = caller_path
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -364,7 +364,7 @@ module Poise
364
364
  end
365
365
  end
366
366
  return false unless resource_name_equivalents[inversion_resource]
367
- provider_name = resolve_inversion_provider(node, resource)
367
+ provider_name = resolve_inversion_provider(node, resource).to_s
368
368
  Poise.debug("[#{resource}] Checking provides? on #{self.name}. Got provider_name #{provider_name.inspect}")
369
369
  provider_name == provides.to_s || ( provider_name == 'auto' && !resource.provider_no_auto.include?(provides.to_s) && provides_auto?(node, resource) )
370
370
  end
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
16
16
 
17
17
  require 'chef/mash'
18
18
 
19
+ require 'poise/backports'
19
20
  require 'poise/error'
20
21
 
21
22
 
@@ -48,6 +49,19 @@ module Poise
48
49
  _options[method_sym]
49
50
  end
50
51
 
52
+ # Capture setting the provider and make it Do What I Mean. This does
53
+ # mean you can't set the actual provider for the options resource, which
54
+ # is fine because the provider is a no-op.
55
+ #
56
+ # @api private
57
+ def provider(val=Poise::NOT_PASSED)
58
+ if val == Poise::NOT_PASSED
59
+ super()
60
+ else
61
+ _options[:provider] = val
62
+ end
63
+ end
64
+
51
65
  # Insert the options data in to the run state. This has to match the
52
66
  # layout used in {Poise::Helpers::Inversion::Provider.inversion_options}.
53
67
  #
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
data/lib/poise/utils.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
data/lib/poise/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -16,5 +16,5 @@
16
16
 
17
17
 
18
18
  module Poise
19
- VERSION = '2.6.0'
19
+ VERSION = '2.6.1'
20
20
  end
data/poise.gemspec CHANGED
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -17,3 +17,5 @@
17
17
  eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
18
18
 
19
19
  gem 'chef', '~> 12.4.3'
20
+ # Pending https://github.com/berkshelf/ridley/pull/335
21
+ gem 'ridley', '4.4.1'
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -0,0 +1,19 @@
1
+ #
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
18
+
19
+ gem 'chef', '~> 12.7.2'
@@ -0,0 +1,19 @@
1
+ #
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
18
+
19
+ gem 'chef', '~> 12.8.1'
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -93,6 +93,16 @@ describe Poise::Helpers::Inversion::OptionsResource do
93
93
 
94
94
  it { is_expected.to run_poise_test_options('test').with(_options: {'foo' => 'chefspec.local', 'baz' => 'chefspec.locala'}) }
95
95
  end # /context with derived options
96
+
97
+ context 'with a provider' do
98
+ recipe do
99
+ poise_test_options 'test' do
100
+ provider :other
101
+ end
102
+ end
103
+
104
+ it { is_expected.to run_poise_test_options('test').with(_options: {'provider' => :other}) }
105
+ end # /context with a provider
96
106
  end # /describe #_options
97
107
 
98
108
  describe 'provider options' do
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -353,6 +353,23 @@ describe Poise::Helpers::Inversion do
353
353
 
354
354
  its(:resolve) { is_expected.to eq provider(:poise_test_inversion_other) }
355
355
  end # /context with provider_no_auto
356
+
357
+ context 'with a symbol provider via options' do
358
+ provider(:poise_test_inversion_subclass, parent: :poise_test_inversion) do
359
+ provides(:inverted_subclass)
360
+ end
361
+ recipe(subject: false) do
362
+ node.run_state['poise_inversion'] ||= {}
363
+ node.run_state['poise_inversion'][:poise_test_inversion] ||= {}
364
+ node.run_state['poise_inversion'][:poise_test_inversion]['test'] ||= {}
365
+ node.run_state['poise_inversion'][:poise_test_inversion]['test']['*'] ||= {}
366
+ node.run_state['poise_inversion'][:poise_test_inversion]['test']['*']['provider'] = :inverted_subclass
367
+ poise_test_inversion 'test'
368
+ end
369
+ let(:test_resource) { chef_run.poise_test_inversion('test') }
370
+
371
+ its(:resolve) { is_expected.to eq provider(:poise_test_inversion_subclass) }
372
+ end # /context with a symbol provider via options
356
373
  end # /describe provider resolution
357
374
  end # /describe Poise::Helpers::Inversion::Provider
358
375
  end
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2013-2015, Noah Kantrowitz
2
+ # Copyright 2013-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poise
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noah Kantrowitz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-30 00:00:00.000000000 Z
11
+ date: 2016-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: halite
@@ -107,6 +107,8 @@ files:
107
107
  - test/gemfiles/chef-12.4.gemfile
108
108
  - test/gemfiles/chef-12.5.gemfile
109
109
  - test/gemfiles/chef-12.6.gemfile
110
+ - test/gemfiles/chef-12.7.gemfile
111
+ - test/gemfiles/chef-12.8.gemfile
110
112
  - test/gemfiles/chef-12.gemfile
111
113
  - test/gemfiles/master.gemfile
112
114
  - test/integration/default/serverspec/default_spec.rb
@@ -158,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
160
  version: '0'
159
161
  requirements: []
160
162
  rubyforge_project:
161
- rubygems_version: 2.4.8
163
+ rubygems_version: 2.6.2
162
164
  signing_key:
163
165
  specification_version: 4
164
166
  summary: Helpers for writing extensible Chef cookbooks.
@@ -179,6 +181,8 @@ test_files:
179
181
  - test/gemfiles/chef-12.4.gemfile
180
182
  - test/gemfiles/chef-12.5.gemfile
181
183
  - test/gemfiles/chef-12.6.gemfile
184
+ - test/gemfiles/chef-12.7.gemfile
185
+ - test/gemfiles/chef-12.8.gemfile
182
186
  - test/gemfiles/chef-12.gemfile
183
187
  - test/gemfiles/master.gemfile
184
188
  - test/integration/default/serverspec/default_spec.rb