    # File lib/fog/google/models/storage/directory.rb, line 48
            def public_url
              requires :key
              if connection.get_bucket_acl(key).body['AccessControlList'].detect {|entry| entry['Scope']['type'] == 'AllUsers' && entry['Permission'] == 'READ'}
                if key.to_s =~ /^(?:[a-z]|\d(?!\d{0,2}(?:\.\d{1,3}){3}$))(?:[a-z0-9]|\.(?![\.\-])|\-(?![\.])){1,61}[a-z0-9]$/
                  "https://#{key}.commondatastorage.googleapis.com"
                else
                  "https://commondatastorage.googleapis.com/#{key}"
                end
              else
                nil
              end
            end