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.8.10.2 lib/flydata/util/shell.rb
flydata-0.8.10.1 lib/flydata/util/shell.rb
flydata-0.8.9.11 lib/flydata/util/shell.rb
flydata-0.8.10 lib/flydata/util/shell.rb
flydata-0.8.9 lib/flydata/util/shell.rb
flydata-0.8.8 lib/flydata/util/shell.rb
flydata-0.8.7 lib/flydata/util/shell.rb
flydata-0.8.6 lib/flydata/util/shell.rb
flydata-0.8.5 lib/flydata/util/shell.rb
flydata-0.8.4 lib/flydata/util/shell.rb
flydata-0.8.3 lib/flydata/util/shell.rb
flydata-0.8.2 lib/flydata/util/shell.rb
flydata-0.8.1 lib/flydata/util/shell.rb
flydata-0.8.0 lib/flydata/util/shell.rb
flydata-0.7.19 lib/flydata/util/shell.rb
flydata-0.7.18 lib/flydata/util/shell.rb
flydata-0.7.17 lib/flydata/util/shell.rb
flydata-0.7.16 lib/flydata/util/shell.rb
flydata-0.7.15 lib/flydata/util/shell.rb
flydata-0.7.14 lib/flydata/util/shell.rb