Module: GitmeTime::Config
- Defined in:
- lib/gitme_time/config.rb
Class Method Summary collapse
- .domain ⇒ Object
- .password ⇒ Object
- .project_config_file ⇒ Object
- .project_data? ⇒ Boolean
- .project_directory ⇒ Object
- .project_directory? ⇒ Boolean
- .project_hook_file ⇒ Object
- .project_id ⇒ Object
- .project_tag ⇒ Object
- .track_empty_hours? ⇒ Boolean
- .username ⇒ Object
Class Method Details
.domain ⇒ Object
22 23 24 |
# File 'lib/gitme_time/config.rb', line 22 def domain project_data['domain'] end |
.password ⇒ Object
34 35 36 |
# File 'lib/gitme_time/config.rb', line 34 def password user_data['basecamp.password'] end |
.project_config_file ⇒ Object
42 43 44 |
# File 'lib/gitme_time/config.rb', line 42 def project_config_file File.join project_directory, '.gitme_time.yml' end |
.project_data? ⇒ Boolean
38 39 40 |
# File 'lib/gitme_time/config.rb', line 38 def project_data? File.exists? project_config_file end |
.project_directory ⇒ Object
10 11 12 |
# File 'lib/gitme_time/config.rb', line 10 def project_directory `git rev-parse --show-toplevel 2> /dev/null`.chomp end |
.project_directory? ⇒ Boolean
6 7 8 |
# File 'lib/gitme_time/config.rb', line 6 def project_directory? project_directory.present? end |
.project_hook_file ⇒ Object
46 47 48 |
# File 'lib/gitme_time/config.rb', line 46 def project_hook_file File. '../.git/hooks/post-commit', Config.project_config_file end |
.project_id ⇒ Object
26 27 28 |
# File 'lib/gitme_time/config.rb', line 26 def project_id project_data['project_id'] end |
.project_tag ⇒ Object
14 15 16 |
# File 'lib/gitme_time/config.rb', line 14 def project_tag project_data['tag'] end |
.track_empty_hours? ⇒ Boolean
18 19 20 |
# File 'lib/gitme_time/config.rb', line 18 def track_empty_hours? project_data['track_empty_hours'] end |
.username ⇒ Object
30 31 32 |
# File 'lib/gitme_time/config.rb', line 30 def username user_data['basecamp.username'] end |