Module: RailsGitVersion
- Extended by:
- RailsGitVersion
- Included in:
- RailsGitVersion
- Defined in:
- lib/rails_git_version.rb,
lib/rails_git_version/config.rb,
lib/rails_git_version/engine.rb,
lib/rails_git_version/version.rb,
app/helpers/rails_git_version/application_helper.rb,
app/controllers/rails_git_version/application_controller.rb,
app/controllers/rails_git_version/description_controller.rb
Defined Under Namespace
Modules: ApplicationHelper
Classes: ApplicationController, Configuration, DescriptionController, Engine
Constant Summary
collapse
- VERSION =
"0.0.1"
Class Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Class Attribute Details
.repo ⇒ Object
Returns the value of attribute repo.
9
10
11
|
# File 'lib/rails_git_version.rb', line 9
def repo
@repo
end
|
Class Method Details
.config ⇒ Object
13
14
15
|
# File 'lib/rails_git_version/config.rb', line 13
def self.config
@config
end
|
Instance Method Details
#setup ⇒ Object
12
13
14
15
16
17
18
19
20
|
# File 'lib/rails_git_version.rb', line 12
def setup
config.root ||= Rails.root
@repo = Grit::Repo.new(config.root.to_s)
log_success
rescue Grit::InvalidGitRepositoryError
@repo = nil
log_failure
end
|