@@ -248,7 +248,7 @@ def new_cookbook_artifact_v2(name, identifier, opts = {})
248248 end
249249
250250 def new_cookbook_artifact ( name , identifier , opts = { } )
251- if platform . server_api_version >= 2
251+ if Pedant :: Config . pedant_platform . server_api_version >= 2
252252 new_cookbook_artifact_v2 ( name , identifier , opts )
253253 else
254254 new_cookbook_artifact_v0 ( name , identifier , opts )
@@ -442,7 +442,7 @@ def new_cookbook_v2(name, version, opts = {})
442442 end
443443
444444 def new_cookbook ( name , version , opts = { } )
445- if platform . server_api_version >= 2
445+ if Pedant :: Config . pedant_platform . server_api_version >= 2
446446 new_cookbook_v2 ( name , version , opts )
447447 else
448448 new_cookbook_v0 ( name , version , opts )
@@ -523,7 +523,7 @@ def retrieved_cookbook_v2(name, version, opts = {})
523523 # the API because it's not used by the client and wastes
524524 # bandwidth
525525 def retrieved_cookbook ( name , version , opts = { } )
526- if platform . server_api_version >= 2
526+ if Pedant :: Config . pedant_platform . server_api_version >= 2
527527 retrieved_cookbook_v2 ( name , version , opts )
528528 else
529529 retrieved_cookbook_v0 ( name , version , opts )
@@ -633,7 +633,7 @@ def get_latest_cookbooks(cookbook_spec, num_versions = 1)
633633 #
634634
635635 def checksums_for_type ( type , cb_version = cookbook_version )
636- if platform . server_api_version >= 2
636+ if Pedant :: Config . pedant_platform . server_api_version >= 2
637637 checksums_for_all_files ( type , cb_version )
638638 else
639639 checksums_for_segment_type ( type , cb_version )
@@ -657,7 +657,7 @@ def checksums_for_all_files(type, cb_version = cookbook_version)
657657 end
658658
659659 def extract_segment ( cbv , segment )
660- if platform . server_api_version >= 2
660+ if Pedant :: Config . pedant_platform . server_api_version >= 2
661661 files = cbv [ "all_files" ] || [ ]
662662 files . select do |f |
663663 seg , name = f [ "name" ] . split ( "/" )
@@ -670,7 +670,7 @@ def extract_segment(cbv, segment)
670670 end
671671
672672 def select_segment ( segment )
673- if platform . server_api_version >= 2
673+ if Pedant :: Config . pedant_platform . server_api_version >= 2
674674 "all_files"
675675 else
676676 segment
0 commit comments