Class: Adopter::MigrationPlan
- Inherits:
-
Object
- Object
- Adopter::MigrationPlan
- Defined in:
- lib/adopter/migration_plan.rb
Instance Attribute Summary collapse
-
#ci_platform ⇒ Object
readonly
Returns the value of attribute ci_platform.
-
#config_overrides ⇒ Object
readonly
Returns the value of attribute config_overrides.
-
#converted_features ⇒ Object
readonly
Returns the value of attribute converted_features.
-
#converted_pages ⇒ Object
readonly
Returns the value of attribute converted_pages.
-
#converted_steps ⇒ Object
readonly
Returns the value of attribute converted_steps.
-
#converted_tests ⇒ Object
readonly
Returns the value of attribute converted_tests.
-
#gemfile_additions ⇒ Object
readonly
Returns the value of attribute gemfile_additions.
-
#manual_actions ⇒ Object
readonly
Returns the value of attribute manual_actions.
-
#output_path ⇒ Object
readonly
Returns the value of attribute output_path.
-
#skeleton_structure ⇒ Object
readonly
Returns the value of attribute skeleton_structure.
-
#source_path ⇒ Object
readonly
Returns the value of attribute source_path.
-
#target_automation ⇒ Object
readonly
Returns the value of attribute target_automation.
-
#target_framework ⇒ Object
readonly
Returns the value of attribute target_framework.
-
#warnings ⇒ Object
readonly
Returns the value of attribute warnings.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ MigrationPlan
constructor
:reek:LongParameterList { enabled: false }.
- #summary ⇒ Object
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(attrs = {}) ⇒ MigrationPlan
:reek:LongParameterList { enabled: false }
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/adopter/migration_plan.rb', line 11 def initialize(attrs = {}) @source_path = attrs[:source_path] @output_path = attrs[:output_path] @target_automation = attrs[:target_automation] @target_framework = attrs[:target_framework] @ci_platform = attrs[:ci_platform] @skeleton_structure = attrs[:skeleton_structure] || {} @converted_pages = attrs[:converted_pages] || [] @converted_tests = attrs[:converted_tests] || [] @converted_features = attrs[:converted_features] || [] @converted_steps = attrs[:converted_steps] || [] @gemfile_additions = attrs[:gemfile_additions] || [] @config_overrides = attrs[:config_overrides] || {} @warnings = attrs[:warnings] || [] @manual_actions = attrs[:manual_actions] || [] end |
Instance Attribute Details
#ci_platform ⇒ Object (readonly)
Returns the value of attribute ci_platform.
5 6 7 |
# File 'lib/adopter/migration_plan.rb', line 5 def ci_platform @ci_platform end |
#config_overrides ⇒ Object (readonly)
Returns the value of attribute config_overrides.
5 6 7 |
# File 'lib/adopter/migration_plan.rb', line 5 def config_overrides @config_overrides end |
#converted_features ⇒ Object (readonly)
Returns the value of attribute converted_features.
5 6 7 |
# File 'lib/adopter/migration_plan.rb', line 5 def converted_features @converted_features end |
#converted_pages ⇒ Object (readonly)
Returns the value of attribute converted_pages.
5 6 7 |
# File 'lib/adopter/migration_plan.rb', line 5 def converted_pages @converted_pages end |
#converted_steps ⇒ Object (readonly)
Returns the value of attribute converted_steps.
5 6 7 |
# File 'lib/adopter/migration_plan.rb', line 5 def converted_steps @converted_steps end |
#converted_tests ⇒ Object (readonly)
Returns the value of attribute converted_tests.
5 6 7 |
# File 'lib/adopter/migration_plan.rb', line 5 def converted_tests @converted_tests end |
#gemfile_additions ⇒ Object (readonly)
Returns the value of attribute gemfile_additions.
5 6 7 |
# File 'lib/adopter/migration_plan.rb', line 5 def gemfile_additions @gemfile_additions end |
#manual_actions ⇒ Object (readonly)
Returns the value of attribute manual_actions.
5 6 7 |
# File 'lib/adopter/migration_plan.rb', line 5 def manual_actions @manual_actions end |
#output_path ⇒ Object (readonly)
Returns the value of attribute output_path.
5 6 7 |
# File 'lib/adopter/migration_plan.rb', line 5 def output_path @output_path end |
#skeleton_structure ⇒ Object (readonly)
Returns the value of attribute skeleton_structure.
5 6 7 |
# File 'lib/adopter/migration_plan.rb', line 5 def skeleton_structure @skeleton_structure end |
#source_path ⇒ Object (readonly)
Returns the value of attribute source_path.
5 6 7 |
# File 'lib/adopter/migration_plan.rb', line 5 def source_path @source_path end |
#target_automation ⇒ Object (readonly)
Returns the value of attribute target_automation.
5 6 7 |
# File 'lib/adopter/migration_plan.rb', line 5 def target_automation @target_automation end |
#target_framework ⇒ Object (readonly)
Returns the value of attribute target_framework.
5 6 7 |
# File 'lib/adopter/migration_plan.rb', line 5 def target_framework @target_framework end |
#warnings ⇒ Object (readonly)
Returns the value of attribute warnings.
5 6 7 |
# File 'lib/adopter/migration_plan.rb', line 5 def warnings @warnings end |
Instance Method Details
#summary ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/adopter/migration_plan.rb', line 52 def summary { pages: converted_pages.length, tests: converted_tests.length, features: converted_features.length, steps: converted_steps.length, custom_gems: gemfile_additions.length, warnings: warnings.length, manual_actions: manual_actions.length } end |
#to_h ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/adopter/migration_plan.rb', line 28 def to_h { source_path:, output_path:, target_automation:, target_framework:, ci_platform:, skeleton_structure:, converted_pages: converted_pages.map(&:to_h), converted_tests: converted_tests.map(&:to_h), converted_features: converted_features.map(&:to_h), converted_steps: converted_steps.map(&:to_h), gemfile_additions:, config_overrides:, warnings:, manual_actions: } end |
#to_json(*args) ⇒ Object
47 48 49 50 |
# File 'lib/adopter/migration_plan.rb', line 47 def to_json(*args) require 'json' to_h.to_json(*args) end |