Class: EasyCreds::Project::Rails
- Inherits:
-
Object
- Object
- EasyCreds::Project::Rails
- Defined in:
- lib/easy_creds/project.rb
Overview
Represents a Rails application project.
Instance Attribute Summary collapse
-
#root ⇒ Object
readonly
Returns the value of attribute root.
Instance Method Summary collapse
- #config_file_path ⇒ Object
- #credentials_dir ⇒ Object
- #environments_dir ⇒ Object
- #example_template_path ⇒ Object
- #git_repo? ⇒ Boolean
- #gitignore_path ⇒ Object
-
#initialize(root:) ⇒ Rails
constructor
A new instance of Rails.
- #log_dir ⇒ Object
- #rails? ⇒ Boolean
- #slug ⇒ Object
- #standalone? ⇒ Boolean
Constructor Details
Instance Attribute Details
#root ⇒ Object (readonly)
Returns the value of attribute root.
33 34 35 |
# File 'lib/easy_creds/project.rb', line 33 def root @root end |
Instance Method Details
#config_file_path ⇒ Object
48 |
# File 'lib/easy_creds/project.rb', line 48 def config_file_path = @root.join('config/easy_creds.yml') |
#credentials_dir ⇒ Object
43 |
# File 'lib/easy_creds/project.rb', line 43 def credentials_dir = @root.join('config/credentials') |
#environments_dir ⇒ Object
44 |
# File 'lib/easy_creds/project.rb', line 44 def environments_dir = @root.join('config/environments') |
#example_template_path ⇒ Object
47 |
# File 'lib/easy_creds/project.rb', line 47 def example_template_path = credentials_dir.join('example.yml') |
#git_repo? ⇒ Boolean
46 |
# File 'lib/easy_creds/project.rb', line 46 def git_repo? = @root.join('.git').exist? |
#gitignore_path ⇒ Object
45 |
# File 'lib/easy_creds/project.rb', line 45 def gitignore_path = @root.join('.gitignore') |
#log_dir ⇒ Object
42 |
# File 'lib/easy_creds/project.rb', line 42 def log_dir = @root.join('log') |
#rails? ⇒ Boolean
39 |
# File 'lib/easy_creds/project.rb', line 39 def rails? = true |
#slug ⇒ Object
49 |
# File 'lib/easy_creds/project.rb', line 49 def slug = @root.basename.to_s |
#standalone? ⇒ Boolean
40 |
# File 'lib/easy_creds/project.rb', line 40 def standalone? = false |