lib/bundler/vendor/thor/lib/thor/shell/terminal.rb
class Bundler::Thor module Shell module Terminal DEFAULT_TERMINAL_WIDTH = 80 class << self # This code was copied from Rake, available under MIT-LICENSE # Copyright (c) 2003, 2004 Jim Weirich def terminal_width result = if ENV["THOR_COLUMNS"] ENV["THOR_COLUMNS"].to_i else unix? ? dynamic_width : DEFAULT_TERMINAL_WIDTH end result < 10 ? DEFAULT_TERMINAL_WIDTH : result rescue DEFAULT_TERMINAL_WIDTH end def unix? RUBY_PLATFORM =~ /(aix|darwin|linux|(net|free|open)bsd|cygwin|solaris)/i end private # Calculate the dynamic width of the terminal def dynamic_width @dynamic_width ||= (dynamic_width_stty.nonzero? || dynamic_width_tput) end def dynamic_width_stty `stty size 2>/dev/null`.split[1].to_i end def dynamic_width_tput `tput cols 2>/dev/null`.to_i end end end end end
Source Files
- lib/bundler.rb
- lib/bundler/build_metadata.rb
- lib/bundler/capistrano.rb
- lib/bundler/checksum.rb
- lib/bundler/ci_detector.rb
- lib/bundler/cli.rb
- lib/bundler/cli/add.rb
- lib/bundler/cli/binstubs.rb
- lib/bundler/cli/cache.rb
- lib/bundler/cli/check.rb
- lib/bundler/cli/clean.rb
- lib/bundler/cli/common.rb
- lib/bundler/cli/config.rb
- lib/bundler/cli/console.rb
- lib/bundler/cli/doctor.rb
- lib/bundler/cli/exec.rb
- lib/bundler/cli/fund.rb
- lib/bundler/cli/gem.rb
- lib/bundler/cli/info.rb
- lib/bundler/cli/init.rb
- lib/bundler/cli/inject.rb
- lib/bundler/cli/install.rb
- lib/bundler/cli/issue.rb
- lib/bundler/cli/list.rb
- lib/bundler/cli/lock.rb
- lib/bundler/cli/open.rb
- lib/bundler/cli/outdated.rb
- lib/bundler/cli/platform.rb
- lib/bundler/cli/plugin.rb
- lib/bundler/cli/pristine.rb
- lib/bundler/cli/remove.rb
- lib/bundler/cli/show.rb
- lib/bundler/cli/update.rb
- lib/bundler/cli/viz.rb
- lib/bundler/compact_index_client.rb
- lib/bundler/compact_index_client/cache.rb
- lib/bundler/compact_index_client/cache_file.rb
- lib/bundler/compact_index_client/gem_parser.rb
- lib/bundler/compact_index_client/updater.rb
- lib/bundler/constants.rb
- lib/bundler/current_ruby.rb
- lib/bundler/definition.rb
- lib/bundler/dependency.rb
- lib/bundler/deployment.rb
- lib/bundler/deprecate.rb
- lib/bundler/digest.rb
- lib/bundler/dsl.rb
- lib/bundler/endpoint_specification.rb
- lib/bundler/env.rb
- lib/bundler/environment_preserver.rb
- lib/bundler/errors.rb
- lib/bundler/feature_flag.rb
- lib/bundler/fetcher.rb
- lib/bundler/fetcher/base.rb
- lib/bundler/fetcher/compact_index.rb
- lib/bundler/fetcher/dependency.rb
- lib/bundler/fetcher/downloader.rb
- lib/bundler/fetcher/gem_remote_fetcher.rb
- lib/bundler/fetcher/index.rb
- lib/bundler/force_platform.rb
- lib/bundler/friendly_errors.rb
- lib/bundler/gem_helper.rb
- lib/bundler/gem_helpers.rb
- lib/bundler/gem_tasks.rb
- lib/bundler/gem_version_promoter.rb
- lib/bundler/graph.rb
- lib/bundler/index.rb
- lib/bundler/injector.rb
- lib/bundler/inline.rb
- lib/bundler/installer.rb
- lib/bundler/installer/gem_installer.rb
- lib/bundler/installer/parallel_installer.rb
- lib/bundler/installer/standalone.rb
- lib/bundler/lazy_specification.rb
- lib/bundler/lockfile_generator.rb
- lib/bundler/lockfile_parser.rb
- lib/bundler/match_metadata.rb
- lib/bundler/match_platform.rb
- lib/bundler/match_remote_metadata.rb
- lib/bundler/mirror.rb
- lib/bundler/plugin.rb
- lib/bundler/plugin/api.rb
- lib/bundler/plugin/api/source.rb
- lib/bundler/plugin/dsl.rb
- lib/bundler/plugin/events.rb
- lib/bundler/plugin/index.rb
- lib/bundler/plugin/installer.rb
- lib/bundler/plugin/installer/git.rb
- lib/bundler/plugin/installer/rubygems.rb
- lib/bundler/plugin/source_list.rb
- lib/bundler/process_lock.rb
- lib/bundler/remote_specification.rb
- lib/bundler/resolver.rb
- lib/bundler/resolver/base.rb
- lib/bundler/resolver/candidate.rb
- lib/bundler/resolver/incompatibility.rb
- lib/bundler/resolver/package.rb
- lib/bundler/resolver/root.rb
- lib/bundler/resolver/spec_group.rb
- lib/bundler/retry.rb
- lib/bundler/ruby_dsl.rb
- lib/bundler/ruby_version.rb
- lib/bundler/rubygems_ext.rb
- lib/bundler/rubygems_gem_installer.rb
- lib/bundler/rubygems_integration.rb
- lib/bundler/runtime.rb
- lib/bundler/safe_marshal.rb
- lib/bundler/self_manager.rb
- lib/bundler/settings.rb
- lib/bundler/settings/validator.rb
- lib/bundler/setup.rb
- lib/bundler/shared_helpers.rb
- lib/bundler/similarity_detector.rb
- lib/bundler/source.rb
- lib/bundler/source/gemspec.rb
- lib/bundler/source/git.rb
- lib/bundler/source/git/git_proxy.rb
- lib/bundler/source/metadata.rb
- lib/bundler/source/path.rb
- lib/bundler/source/path/installer.rb
- lib/bundler/source/rubygems.rb
- lib/bundler/source/rubygems/remote.rb
- lib/bundler/source/rubygems_aggregate.rb
- lib/bundler/source_list.rb
- lib/bundler/source_map.rb
- lib/bundler/spec_set.rb
- lib/bundler/stub_specification.rb
- lib/bundler/ui.rb
- lib/bundler/ui/rg_proxy.rb
- lib/bundler/ui/shell.rb
- lib/bundler/ui/silent.rb
- lib/bundler/uri_credentials_filter.rb
- lib/bundler/uri_normalizer.rb
- lib/bundler/vendor/connection_pool/lib/connection_pool.rb
- lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb
- lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb
- lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb
- lib/bundler/vendor/fileutils/lib/fileutils.rb
- lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb
- lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
- lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb
- lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb
- lib/bundler/vendor/pub_grub/lib/pub_grub.rb
- lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb
- lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb
- lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb
- lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb
- lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
- lib/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb
- lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb
- lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb
- lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb
- lib/bundler/vendor/pub_grub/lib/pub_grub/term.rb
- lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb
- lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb
- lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb
- lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb
- lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb
- lib/bundler/vendor/thor/lib/thor.rb
- lib/bundler/vendor/thor/lib/thor/actions.rb
- lib/bundler/vendor/thor/lib/thor/actions/create_file.rb
- lib/bundler/vendor/thor/lib/thor/actions/create_link.rb
- lib/bundler/vendor/thor/lib/thor/actions/directory.rb
- lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb
- lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb
- lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb
- lib/bundler/vendor/thor/lib/thor/base.rb
- lib/bundler/vendor/thor/lib/thor/command.rb
- lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb
- lib/bundler/vendor/thor/lib/thor/error.rb
- lib/bundler/vendor/thor/lib/thor/group.rb
- lib/bundler/vendor/thor/lib/thor/invocation.rb
- lib/bundler/vendor/thor/lib/thor/line_editor.rb
- lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb
- lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb
- lib/bundler/vendor/thor/lib/thor/nested_context.rb
- lib/bundler/vendor/thor/lib/thor/parser.rb
- lib/bundler/vendor/thor/lib/thor/parser/argument.rb
- lib/bundler/vendor/thor/lib/thor/parser/arguments.rb
- lib/bundler/vendor/thor/lib/thor/parser/option.rb
- lib/bundler/vendor/thor/lib/thor/parser/options.rb
- lib/bundler/vendor/thor/lib/thor/rake_compat.rb
- lib/bundler/vendor/thor/lib/thor/runner.rb
- lib/bundler/vendor/thor/lib/thor/shell.rb
- lib/bundler/vendor/thor/lib/thor/shell/basic.rb
- lib/bundler/vendor/thor/lib/thor/shell/color.rb
- lib/bundler/vendor/thor/lib/thor/shell/column_printer.rb
- lib/bundler/vendor/thor/lib/thor/shell/html.rb
- lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb
- lib/bundler/vendor/thor/lib/thor/shell/terminal.rb
- lib/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb
- lib/bundler/vendor/thor/lib/thor/util.rb
- lib/bundler/vendor/thor/lib/thor/version.rb
- lib/bundler/vendor/tsort/lib/tsort.rb
- lib/bundler/vendor/uri/lib/uri.rb
- lib/bundler/vendor/uri/lib/uri/common.rb
- lib/bundler/vendor/uri/lib/uri/file.rb
- lib/bundler/vendor/uri/lib/uri/ftp.rb
- lib/bundler/vendor/uri/lib/uri/generic.rb
- lib/bundler/vendor/uri/lib/uri/http.rb
- lib/bundler/vendor/uri/lib/uri/https.rb
- lib/bundler/vendor/uri/lib/uri/ldap.rb
- lib/bundler/vendor/uri/lib/uri/ldaps.rb
- lib/bundler/vendor/uri/lib/uri/mailto.rb
- lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb
- lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb
- lib/bundler/vendor/uri/lib/uri/version.rb
- lib/bundler/vendor/uri/lib/uri/ws.rb
- lib/bundler/vendor/uri/lib/uri/wss.rb
- lib/bundler/vendored_fileutils.rb
- lib/bundler/vendored_net_http.rb
- lib/bundler/vendored_persistent.rb
- lib/bundler/vendored_pub_grub.rb
- lib/bundler/vendored_thor.rb
- lib/bundler/vendored_timeout.rb
- lib/bundler/vendored_tsort.rb
- lib/bundler/vendored_uri.rb
- lib/bundler/version.rb
- lib/bundler/vlad.rb
- lib/bundler/worker.rb
- lib/bundler/yaml_serializer.rb