Sha256: 03d3c7d1e5ea095e502532db3f93fbd5b105a6a326413c4939252f86b00d114f

Contents?: true

Size: 558 Bytes

Versions: 73

Compression:

Stored size: 558 Bytes

Contents

require 'open3'

module Flydata
  module Util
    class Shell
      # Call this method if cmd includes bundle exec on different path
      def self.run_bundle_cmd(cmd, option = {})
        run_cmd(cmd, option.merge(bundle: true))
      end

      def self.run_cmd(cmd, option = {})
        # To avoid to use same env value in the child process
        env = if option[:bundle]
                { 'BUNDLE_GEMFILE' => nil, 'GEM_HOME' => nil, }
              else
                {}
              end
        Open3.capture3(env, cmd)
      end
    end
  end
end

Version data entries

73 entries across 73 versions & 1 rubygems

Version Path
flydata-0.7.13 lib/flydata/util/shell.rb
flydata-0.7.12 lib/flydata/util/shell.rb
flydata-0.7.11 lib/flydata/util/shell.rb
flydata-0.7.10 lib/flydata/util/shell.rb
flydata-0.7.9 lib/flydata/util/shell.rb
flydata-0.7.8 lib/flydata/util/shell.rb
flydata-0.7.7 lib/flydata/util/shell.rb
flydata-0.7.6 lib/flydata/util/shell.rb
flydata-0.7.5 lib/flydata/util/shell.rb
flydata-0.7.4 lib/flydata/util/shell.rb
flydata-0.7.2.1 lib/flydata/util/shell.rb
flydata-0.7.2 lib/flydata/util/shell.rb
flydata-0.7.1 lib/flydata/util/shell.rb
flydata-0.7.0 lib/flydata/util/shell.rb
flydata-0.6.14 lib/flydata/util/shell.rb
flydata-0.6.13 lib/flydata/util/shell.rb
flydata-0.6.12 lib/flydata/util/shell.rb
flydata-0.6.11 lib/flydata/util/shell.rb
flydata-0.6.10 lib/flydata/util/shell.rb
flydata-0.6.9 lib/flydata/util/shell.rb