Module: Braid

Extended by:
T::Sig
Defined in:
lib/braid/main.rb,
lib/braid.rb,
lib/braid/config.rb,
lib/braid/mirror.rb,
lib/braid/command.rb,
lib/braid/version.rb,
lib/braid/operations.rb,
lib/braid/commands/add.rb,
lib/braid/commands/diff.rb,
lib/braid/commands/push.rb,
lib/braid/commands/setup.rb,
lib/braid/commands/remove.rb,
lib/braid/commands/status.rb,
lib/braid/commands/update.rb,
lib/braid/operations_lite.rb,
lib/braid/sorbet/fake_runtime.rb,
lib/braid/commands/upgrade_config.rb

Overview

typed: strict

Defined Under Namespace

Modules: Commands, Operations, T Classes: BraidError, Command, Config, InternalError, Mirror, NoPushToTag

Constant Summary collapse

OLD_CONFIG_FILE =
'.braids'
CONFIG_FILE =
'.braids.json'
REQUIRED_GIT_VERSION =

See the background in the “Supported environments” section of README.md.

The newest Git feature that Braid is currently known to rely on is ‘git ls-remote –symref`, which was added in Git 2.8.0 (in 2016). It doesn’t seem worth even a small amount of work to remove that dependency and support even older versions of Git. So set that as the declared requirement for now. In general, a reasonable approach might be to try to support the oldest version of Git in current “long-term support” versions of popular OS distributions.

'2.8.0'
Home =
File.expand_path(ENV['HOME'] || '~')
VERSION =
'1.1.10'.freeze

Class Method Summary collapse

Methods included from T::Sig

sig

Class Method Details

.forceObject



38
39
40
# File 'lib/braid.rb', line 38

def self.force
  !!@force
end

.force=(new_value) ⇒ Object



43
44
45
# File 'lib/braid.rb', line 43

def self.force=(new_value)
  @force = !!new_value
end

.local_cache_dirObject



53
54
55
# File 'lib/braid.rb', line 53

def self.local_cache_dir
  File.expand_path(ENV['BRAID_LOCAL_CACHE_DIR'] || "#{ENV['HOME']}/.braid/cache")
end

.use_local_cacheObject



48
49
50
# File 'lib/braid.rb', line 48

def self.use_local_cache
  [nil, 'true', '1'].include?(ENV['BRAID_USE_LOCAL_CACHE'])
end

.verboseObject



26
27
28
# File 'lib/braid.rb', line 26

def self.verbose
  !!@verbose
end

.verbose=(new_value) ⇒ Object



31
32
33
# File 'lib/braid.rb', line 31

def self.verbose=(new_value)
  @verbose = !!new_value
end