diff options
author | Thom May <thom@chef.io> | 2016-01-14 14:08:03 +0000 |
---|---|---|
committer | Thom May <thom@chef.io> | 2016-01-14 14:08:03 +0000 |
commit | 51cfbdc4d16739caac4d946fadbe678444aafe34 (patch) | |
tree | 56dfd8f1cd9fd933de27268b32402e955a43ac2b /lib/chef/run_list | |
parent | 05064423057d4cf46f4713b81b08829cf6d20af6 (diff) | |
download | chef-51cfbdc4d16739caac4d946fadbe678444aafe34.tar.gz |
Use double quotes by default
This is an entirely mechanically generated (chefstyle -a) change, to go
along with chef/chefstyle#5 . We should pick something and use it
consistently, and my opinion is that double quotes are the appropriate
thing.
Diffstat (limited to 'lib/chef/run_list')
-rw-r--r-- | lib/chef/run_list/run_list_expansion.rb | 14 | ||||
-rw-r--r-- | lib/chef/run_list/run_list_item.rb | 10 | ||||
-rw-r--r-- | lib/chef/run_list/versioned_recipe_list.rb | 8 |
3 files changed, 16 insertions, 16 deletions
diff --git a/lib/chef/run_list/run_list_expansion.rb b/lib/chef/run_list/run_list_expansion.rb index 2f2d170446..fa3b6730b3 100644 --- a/lib/chef/run_list/run_list_expansion.rb +++ b/lib/chef/run_list/run_list_expansion.rb @@ -16,13 +16,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -require 'chef/mash' +require "chef/mash" -require 'chef/mixin/deep_merge' +require "chef/mixin/deep_merge" -require 'chef/role' -require 'chef/server_api' -require 'chef/json_compat' +require "chef/role" +require "chef/server_api" +require "chef/json_compat" class Chef class RunList @@ -149,7 +149,7 @@ class Chef def to_hash seen_items = {:recipe => {}, :role => {}} - {:id => @environment, :run_list => convert_run_list_trace('top level', seen_items)} + {:id => @environment, :run_list => convert_run_list_trace("top level", seen_items)} end private @@ -186,7 +186,7 @@ class Chef seen_items[item.type][item.name] = true case item.type when :recipe - {:type => 'recipe', :name => item.name, :version => item.version, :skipped => !!skipped} + {:type => "recipe", :name => item.name, :version => item.version, :skipped => !!skipped} when :role error = @role_errors[item.name] missing = @all_missing_roles[item.name] diff --git a/lib/chef/run_list/run_list_item.rb b/lib/chef/run_list/run_list_item.rb index 43bb239754..c6ab17bdeb 100644 --- a/lib/chef/run_list/run_list_item.rb +++ b/lib/chef/run_list/run_list_item.rb @@ -31,10 +31,10 @@ class Chef case item when Hash assert_hash_is_valid_run_list_item!(item) - @type = (item['type'] || item[:type]).to_sym - @name = item['name'] || item[:name] - if (item.has_key?('version') || item.has_key?(:version)) - @version = item['version'] || item[:version] + @type = (item["type"] || item[:type]).to_sym + @name = item["name"] || item[:name] + if (item.has_key?("version") || item.has_key?(:version)) + @version = item["version"] || item[:version] end when String if match = QUALIFIED_RECIPE.match(item) @@ -89,7 +89,7 @@ class Chef end def assert_hash_is_valid_run_list_item!(item) - unless (item.key?('type')|| item.key?(:type)) && (item.key?('name') || item.key?(:name)) + unless (item.key?("type")|| item.key?(:type)) && (item.key?("name") || item.key?(:name)) raise ArgumentError, "Initializing a #{self.class} from a hash requires that it have a 'type' and 'name' key" end end diff --git a/lib/chef/run_list/versioned_recipe_list.rb b/lib/chef/run_list/versioned_recipe_list.rb index 514685b72d..b6a2a8402f 100644 --- a/lib/chef/run_list/versioned_recipe_list.rb +++ b/lib/chef/run_list/versioned_recipe_list.rb @@ -15,8 +15,8 @@ # 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 'chef/version_class' -require 'chef/version_constraint' +require "chef/version_class" +require "chef/version_constraint" # Why does this class exist? # Why did we not just modify RunList/RunListItem? @@ -70,7 +70,7 @@ class Chef # @return [Array] Array of strings with fully-qualified recipe names def with_fully_qualified_names_and_version_constraints self.map do |recipe_name| - qualified_recipe = if recipe_name.include?('::') + qualified_recipe = if recipe_name.include?("::") recipe_name else "#{recipe_name}::default" @@ -90,7 +90,7 @@ class Chef # @return [Array] Array of strings with fully-qualified and unexpanded recipe names def with_duplicate_names self.map do |recipe_name| - if recipe_name.include?('::') + if recipe_name.include?("::") recipe_name else [recipe_name, "#{recipe_name}::default"] |