Class: Artifacts
- Inherits:
-
Object
- Object
- Artifacts
- Defined in:
- lib/artifacts.rb,
lib/artifacts/tag.rb,
lib/artifacts/comment.rb,
lib/artifacts/version.rb,
lib/artifacts/artifact.rb,
lib/artifacts/exception.rb,
lib/artifacts/executable.rb,
lib/artifacts/artifact_artifact.rb
Defined Under Namespace
Classes: Artifact, ArtifactArtifact, Comment, Executable, Tag
Constant Summary collapse
- FILENAME =
'.artifacts'
- VERSION =
"2.1.2"
- Exception =
Class.new( ::Exception )
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(path = self.class.guess_path) ⇒ Artifacts
constructor
A new instance of Artifacts.
Constructor Details
Class Method Details
.guess_path ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/artifacts.rb', line 15 def self.guess_path directory = Dir.pwd until directory.empty? do path = File.join( directory, FILENAME ) return directory if File.exists?( path ) previous_directory = directory directory = File.join( File.split( directory )[0..-2] ) break if directory == previous_directory end raise UnableToLocatePath end |
.username ⇒ Object
5 6 7 |
# File 'lib/artifacts/executable.rb', line 5 def self.username "#{`git config user.name`.strip} <#{`git config user.email`.strip}>" end |