Module: Gitdocs
- Defined in:
- lib/gitdocs/cli.rb,
lib/gitdocs.rb,
lib/gitdocs/share.rb,
lib/gitdocs/search.rb,
lib/gitdocs/manager.rb,
lib/gitdocs/version.rb,
lib/gitdocs/notifier.rb,
lib/gitdocs/repository.rb,
lib/gitdocs/browser_app.rb,
lib/gitdocs/initializer.rb,
lib/gitdocs/git_notifier.rb,
lib/gitdocs/settings_app.rb,
lib/gitdocs/synchronizer.rb,
lib/gitdocs/configuration.rb,
lib/gitdocs/repository/path.rb,
lib/gitdocs/rendering_helper.rb,
lib/gitdocs/repository/committer.rb
Overview
Class for executing File and Git operations on a specific path in the repository.
Defined Under Namespace
Modules: RenderingHelper Classes: BrowserApp, Cli, Configuration, GitNotifier, Initializer, Manager, Notifier, Repository, Search, SettingsApp, Share, Synchronizer
Constant Summary collapse
- Restart =
Class.new(RuntimeError)
- VERSION =
'0.6.2'.freeze
Instance Attribute Summary collapse
-
#notification ⇒ Boolean
Default to true.
- #path ⇒ String
-
#polling_interval ⇒ Double
Defaults to 15.0.
-
#remote_branch ⇒ String
Default to ‘master’.
-
#remote_name ⇒ String
Default to ‘origin’.
- #sync_type ⇒ 'full', 'fetch'
Class Method Summary collapse
- .init_log ⇒ void
- .log_debug(message) ⇒ void
- .log_error(message) ⇒ void
- .log_info(message) ⇒ void
- .log_path ⇒ String
- .log_warn(message) ⇒ void
Instance Attribute Details
#notification ⇒ Boolean
Returns default to true.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/gitdocs/configuration.rb', line 17 module Gitdocs class Configuration # @return [Boolean] def self.start_web_frontend Config.global.start_web_frontend end # @return [Integer] def self.web_frontend_port Config.global.web_frontend_port end # @param [Hash] new_config def self.update(new_config) Config.global.update_attributes(new_config) end # NOTE: This record has been kept as a subclass to avoid changing the # database table. There are other ways to achieve this, but this seemed most # clear for now. [2015-06-26 -- acant] # # @!attribute start_frontend_port # @return [Boolean] defaults to true # @!attribute web_frontend_port # @return [Integer] defaults to 8888 class Config < ActiveRecord::Base # @return [Gitdocs::Configuration::Config] def self.global fail if all.size > 1 create! if all.empty? all.first end end end end |
#path ⇒ String
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/gitdocs/configuration.rb', line 17 module Gitdocs class Configuration # @return [Boolean] def self.start_web_frontend Config.global.start_web_frontend end # @return [Integer] def self.web_frontend_port Config.global.web_frontend_port end # @param [Hash] new_config def self.update(new_config) Config.global.update_attributes(new_config) end # NOTE: This record has been kept as a subclass to avoid changing the # database table. There are other ways to achieve this, but this seemed most # clear for now. [2015-06-26 -- acant] # # @!attribute start_frontend_port # @return [Boolean] defaults to true # @!attribute web_frontend_port # @return [Integer] defaults to 8888 class Config < ActiveRecord::Base # @return [Gitdocs::Configuration::Config] def self.global fail if all.size > 1 create! if all.empty? all.first end end end end |
#polling_interval ⇒ Double
Returns defaults to 15.0.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/gitdocs/configuration.rb', line 17 module Gitdocs class Configuration # @return [Boolean] def self.start_web_frontend Config.global.start_web_frontend end # @return [Integer] def self.web_frontend_port Config.global.web_frontend_port end # @param [Hash] new_config def self.update(new_config) Config.global.update_attributes(new_config) end # NOTE: This record has been kept as a subclass to avoid changing the # database table. There are other ways to achieve this, but this seemed most # clear for now. [2015-06-26 -- acant] # # @!attribute start_frontend_port # @return [Boolean] defaults to true # @!attribute web_frontend_port # @return [Integer] defaults to 8888 class Config < ActiveRecord::Base # @return [Gitdocs::Configuration::Config] def self.global fail if all.size > 1 create! if all.empty? all.first end end end end |
#remote_branch ⇒ String
Returns default to ‘master’.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/gitdocs/configuration.rb', line 17 module Gitdocs class Configuration # @return [Boolean] def self.start_web_frontend Config.global.start_web_frontend end # @return [Integer] def self.web_frontend_port Config.global.web_frontend_port end # @param [Hash] new_config def self.update(new_config) Config.global.update_attributes(new_config) end # NOTE: This record has been kept as a subclass to avoid changing the # database table. There are other ways to achieve this, but this seemed most # clear for now. [2015-06-26 -- acant] # # @!attribute start_frontend_port # @return [Boolean] defaults to true # @!attribute web_frontend_port # @return [Integer] defaults to 8888 class Config < ActiveRecord::Base # @return [Gitdocs::Configuration::Config] def self.global fail if all.size > 1 create! if all.empty? all.first end end end end |
#remote_name ⇒ String
Returns default to ‘origin’.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/gitdocs/configuration.rb', line 17 module Gitdocs class Configuration # @return [Boolean] def self.start_web_frontend Config.global.start_web_frontend end # @return [Integer] def self.web_frontend_port Config.global.web_frontend_port end # @param [Hash] new_config def self.update(new_config) Config.global.update_attributes(new_config) end # NOTE: This record has been kept as a subclass to avoid changing the # database table. There are other ways to achieve this, but this seemed most # clear for now. [2015-06-26 -- acant] # # @!attribute start_frontend_port # @return [Boolean] defaults to true # @!attribute web_frontend_port # @return [Integer] defaults to 8888 class Config < ActiveRecord::Base # @return [Gitdocs::Configuration::Config] def self.global fail if all.size > 1 create! if all.empty? all.first end end end end |
#sync_type ⇒ 'full', 'fetch'
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/gitdocs/configuration.rb', line 17 module Gitdocs class Configuration # @return [Boolean] def self.start_web_frontend Config.global.start_web_frontend end # @return [Integer] def self.web_frontend_port Config.global.web_frontend_port end # @param [Hash] new_config def self.update(new_config) Config.global.update_attributes(new_config) end # NOTE: This record has been kept as a subclass to avoid changing the # database table. There are other ways to achieve this, but this seemed most # clear for now. [2015-06-26 -- acant] # # @!attribute start_frontend_port # @return [Boolean] defaults to true # @!attribute web_frontend_port # @return [Integer] defaults to 8888 class Config < ActiveRecord::Base # @return [Gitdocs::Configuration::Config] def self.global fail if all.size > 1 create! if all.empty? all.first end end end end |
Class Method Details
.init_log ⇒ void
This method returns an undefined value.
70 71 72 73 74 75 76 77 78 |
# File 'lib/gitdocs.rb', line 70 def self.init_log return if @initialized # Initialize the logger log_output = Initializer.foreground ? STDOUT : log_path Celluloid.logger = Logger.new(log_output) Celluloid.logger.level = Initializer.verbose ? Logger::DEBUG : Logger::INFO @initialized = true end |
.log_debug(message) ⇒ void
This method returns an undefined value.
39 40 41 42 |
# File 'lib/gitdocs.rb', line 39 def self.log_debug() init_log Celluloid.logger.debug() end |
.log_error(message) ⇒ void
This method returns an undefined value.
60 61 62 63 |
# File 'lib/gitdocs.rb', line 60 def self.log_error() init_log Celluloid.logger.error() end |
.log_info(message) ⇒ void
This method returns an undefined value.
46 47 48 49 |
# File 'lib/gitdocs.rb', line 46 def self.log_info() init_log Celluloid.logger.info() end |
.log_path ⇒ String
33 34 35 |
# File 'lib/gitdocs.rb', line 33 def self.log_path File.('log', Initializer.root_dirname) end |
.log_warn(message) ⇒ void
This method returns an undefined value.
53 54 55 56 |
# File 'lib/gitdocs.rb', line 53 def self.log_warn() init_log Celluloid.logger.warn() end |