Module: Mono
- Includes:
- Gitti
- Defined in:
- lib/mono/version.rb,
lib/mono.rb,
lib/mono.rb,
lib/mono/base.rb,
lib/mono/tool.rb,
lib/mono/version.rb,
lib/mono/commands/env.rb,
lib/mono/commands/run.rb,
lib/mono/experimental.rb,
lib/mono/commands/sync.rb,
lib/mono/commands/fetch.rb,
lib/mono/commands/backup.rb,
lib/mono/commands/status.rb
Overview
experimental stuff
Defined Under Namespace
Constant Summary collapse
Class Method Summary collapse
- .clone(name, depth: nil) ⇒ Object
- .monofile ⇒ Object
-
.open(name, &block) ⇒ Object
add some short cuts.
-
.sync(name) ⇒ Object
add some more “porcelain” helpers.
-
.walk(path = root) ⇒ Object
lint/print mono (source) tree - check for git repos (via .git/ dir).
Class Method Details
.clone(name, depth: nil) ⇒ Object
48 |
# File 'lib/mono/base.rb', line 48 def self.clone( name, depth: nil ) MonoGitHub.clone( name, depth: depth ); end |
.monofile ⇒ Object
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/mono.rb', line 42 def self.monofile path = Monofile.find if path Monofile.read( path ) else puts "!! WARN: no mono configuration file found; looking for #{Monofile::NAMES.join(', ')} in (#{Dir.getwd})" Monofile.new ## return empty set -todo/check: return nil - why? why not? end end |
.open(name, &block) ⇒ Object
add some short cuts
47 |
# File 'lib/mono/base.rb', line 47 def self.open( name, &block ) MonoGitProject.open( name, &block ); end |
.sync(name) ⇒ Object
add some more “porcelain” helpers
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/mono/base.rb', line 52 def self.sync( name ) ## add some options - why? why not? ## - :readonly - auto-adds depth: 1 on clone or such - why? why not? ## - :clone true/false - do NOT clone only fast forward or such - why? why not? ## - :clean true/false or similar - only clone repos; no fast forward ## others - ideas -- ?? ## note: allow passing in (reusing) of mononames too mononame = name.is_a?( Mononame ) ? name : Mononame.parse( name ) if mononame.exist? MonoGitProject.open( mononame ) do |proj| if proj.changes? puts "!! WARN - local changes in workdir; skipping fast forward (remote) sync / merge" else proj.fast_forward ## note: use git pull --ff-only (fast forward only - do NOT merge) end end else MonoGitHub.clone( mononame ) end end |
.walk(path = root) ⇒ Object
lint/print mono (source) tree
- check for git repos (via .git/ dir)
turn into
- tree or
- lint or
- doctor or
- check or such command - why? why not?
16 17 18 19 |
# File 'lib/mono/experimental.rb', line 16 def self.walk( path=root) repos = walk_dir( path ) repos end |