Class: Papa::Task::Sandbox::Generate
- Inherits:
-
Object
- Object
- Papa::Task::Sandbox::Generate
- Defined in:
- lib/papa/task/sandbox/generate.rb
Instance Attribute Summary collapse
-
#git_details ⇒ Object
Returns the value of attribute git_details.
-
#local_path ⇒ Object
Returns the value of attribute local_path.
-
#options ⇒ Object
Returns the value of attribute options.
-
#remote_path ⇒ Object
Returns the value of attribute remote_path.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Generate
constructor
A new instance of Generate.
- #run ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Generate
Returns a new instance of Generate.
11 12 13 14 15 16 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 52 |
# File 'lib/papa/task/sandbox/generate.rb', line 11 def initialize( = {}) @options = @remote_path = Helper::Path.generate_sandbox_path('remote', ) @local_path = Helper::Path.generate_sandbox_path('local', ) @git_details = [ { commit: 'APP-1 - Add butterfree gem', branch: 'feature/1-add-butterfree-gem', base_branch: 'develop' }, { commit: 'APP-2 - Add beedrill gem', branch: 'feature/2-add-beedrill-gem', base_branch: 'develop' }, { commit: 'APP-3 - Add pidgey gem', branch: 'patch/17.8.0/3-add-pidgey-gem', base_branch: 'develop' }, { commit: 'APP-4 - Fix charmeleon spelling', branch: 'bugfix/4-fix-charmeleon-spelling', base_branch: 'master' }, { commit: 'APP-5 - Fix gem source', branch: 'bugfix/5-fix-gem-source', base_branch: 'master' }, { commit: 'APP-6 - Add pidgeotto gem', branch: 'feature/6-add-pidgeotto-gem', base_branch: 'develop' }, { commit: 'APP-7 - Add pidgeot gem', branch: 'feature/7-add-pidgeot-gem', base_branch: 'develop' } ] end |
Instance Attribute Details
#git_details ⇒ Object
Returns the value of attribute git_details.
9 10 11 |
# File 'lib/papa/task/sandbox/generate.rb', line 9 def git_details @git_details end |
#local_path ⇒ Object
Returns the value of attribute local_path.
9 10 11 |
# File 'lib/papa/task/sandbox/generate.rb', line 9 def local_path @local_path end |
#options ⇒ Object
Returns the value of attribute options.
9 10 11 |
# File 'lib/papa/task/sandbox/generate.rb', line 9 def @options end |
#remote_path ⇒ Object
Returns the value of attribute remote_path.
9 10 11 |
# File 'lib/papa/task/sandbox/generate.rb', line 9 def remote_path @remote_path end |
Instance Method Details
#run ⇒ Object
54 55 56 57 58 59 60 61 |
# File 'lib/papa/task/sandbox/generate.rb', line 54 def run Helper::Output.stdout('Started generation of sandbox...') unless [:silent] task_directory = File.(File.dirname(__dir__)) @branches_directory = File.join(task_directory, 'sandbox', 'branches') setup_remote_repository setup_local_repository unless [:silent] end |