Module: Braid
- Defined in:
- lib/braid/config.rb,
lib/braid.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/commands/upgrade_config.rb
Overview
One helper that is shared with the integration test harness and has no dependencies on the rest of Braid.
Defined Under Namespace
Modules: Commands, Operations
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 ‘receive.denyCurrentBranch = updateInstead` (in spec/integration/push_spec.rb), which was added in Git 2.3.0 (in 2015). 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.3.0'
- VERSION =
'1.1.4'.freeze
Class Method Summary
collapse
Class Method Details
.force ⇒ Object
27
28
29
|
# File 'lib/braid.rb', line 27
def self.force
!!@force
end
|
.force=(new_value) ⇒ Object
31
32
33
|
# File 'lib/braid.rb', line 31
def self.force=(new_value)
@force = !!new_value
end
|
.local_cache_dir ⇒ Object
39
40
41
|
# File 'lib/braid.rb', line 39
def self.local_cache_dir
File.expand_path(ENV['BRAID_LOCAL_CACHE_DIR'] || "#{ENV['HOME']}/.braid/cache")
end
|
.use_local_cache ⇒ Object
35
36
37
|
# File 'lib/braid.rb', line 35
def self.use_local_cache
[nil, 'true', '1'].include?(ENV['BRAID_USE_LOCAL_CACHE'])
end
|
.verbose ⇒ Object
19
20
21
|
# File 'lib/braid.rb', line 19
def self.verbose
!!@verbose
end
|
.verbose=(new_value) ⇒ Object
23
24
25
|
# File 'lib/braid.rb', line 23
def self.verbose=(new_value)
@verbose = !!new_value
end
|