bin/chef-vault in chef-vault-4.0.6 vs bin/chef-vault in chef-vault-4.0.10
- old
+ new
@@ -16,11 +16,11 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-require "optparse"
+require "optparse" unless defined?(OptionParser)
options_config = {
chef: {
short: "k",
long: "chef-config-file",
@@ -80,10 +80,10 @@
options_config.each do |option, config|
options[option] = options[option] ? options[option] : config[:default]
end
-require "rubygems"
+require "rubygems" unless defined?(Gem)
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
require "chef-vault"
ChefVault::Log.init(STDOUT)
ChefVault.load_config(options[:chef])