Sha256: 2f651d09337e7e16f63296d2e80ad8b00042a51bc6e0571e073c1d8916e47d50

Contents?: true

Size: 778 Bytes

Versions: 2

Compression:

Stored size: 778 Bytes

Contents

# frozen_string_literal: true

#
#  Copyright 2021 Square, Inc.
#
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  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.
#

module EnvParser
  def parse_env(output)
    Hash[*output.lines.select { |l| l.include?(' = ') }.map { |l| l.split(' =', 2) }.flatten.map(&:strip)]
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cocoapods-pack-1.0.1 lib/cocoapods-pack/env_parser.rb
cocoapods-pack-1.0.0 lib/cocoapods-pack/env_parser.rb