Module: Gravitext::DevTools
- Included in:
- LineCounter, ManifestWriter
- Defined in:
- lib/gravitext-devtools.rb,
lib/gravitext-devtools/base.rb,
lib/gravitext-devtools/line_counter.rb,
lib/gravitext-devtools/header_writer.rb,
lib/gravitext-devtools/version_writer.rb,
lib/gravitext-devtools/manifest_writer.rb
Defined Under Namespace
Classes: GitFileLister, HeaderProcessor, HeaderWriter, LineCounter, ManifestWriter, VersionWriter
Constant Summary
collapse
- VERSION =
"1.3.0"
Class Method Summary
collapse
Class Method Details
37
38
39
|
# File 'lib/gravitext-devtools.rb', line 37
def self.configure( &block )
Hooker.with( :gt, &block )
end
|
.load_config_from_pwd ⇒ Object
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# File 'lib/gravitext-devtools.rb', line 41
def self.load_config_from_pwd
count = 0
pwd = File.expand_path( Dir.pwd )
while( File.directory?( pwd ) )
cfile = File.join( pwd, '.gt-config' )
if File.exist?( cfile )
Hooker.load_file( cfile )
break
end
break if File.exist?( File.join( pwd, '.git' ) )
pwd = File.dirname( pwd )
break if ( count += 1 ) > 4
break if pwd == '/'
end
end
|