From 3e22722833065498da6ab799cebbbccc10b7152f Mon Sep 17 00:00:00 2001 From: Colby Swandale Date: Mon, 17 Apr 2017 01:18:45 +1000 Subject: move list of dsl valid keys to constant --- lib/bundler/dsl.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb index 9330be7390..b22ebc53cd 100644 --- a/lib/bundler/dsl.rb +++ b/lib/bundler/dsl.rb @@ -14,6 +14,9 @@ module Bundler VALID_PLATFORMS = Bundler::Dependency::PLATFORM_MAP.keys.freeze + VALID_KEYS = %w(group groups git path glob name branch ref tag require submodules + platform platforms type source install_if).freeze + attr_reader :gemspecs attr_accessor :dependencies @@ -306,7 +309,7 @@ module Bundler end def valid_keys - @valid_keys ||= %w(group groups git path glob name branch ref tag require submodules platform platforms type source install_if) + @valid_keys ||= VALID_KEYS end def normalize_options(name, version, opts) -- cgit v1.2.1