lib/neetob/cli/github/make_pr/script.rb in neetob-0.1.5 vs lib/neetob/cli/github/make_pr/script.rb in neetob-0.2.0

- old
+ new

@@ -7,21 +7,25 @@ module Neetob class CLI module Github module MakePr class Script < Base - attr_accessor :apps, :sandbox, :path_to_the_script_file, :pr_description + attr_accessor :apps, :sandbox, :path_to_the_script_file, :pr_description, :should_fix_nanos - def initialize(apps, path_to_the_script_file, pr_title, branch_name, pr_description, sandbox = false) + def initialize(apps, path_to_the_script_file, pr_title, + branch_name, pr_description, should_fix_nanos, sandbox = false) super(pr_title, branch_name) @apps = apps @sandbox = sandbox @path_to_the_script_file = path_to_the_script_file @pr_description = pr_description + @should_fix_nanos = should_fix_nanos end def run - matching_apps = find_all_matching_apps(apps, :github, sandbox) + matching_apps = should_fix_nanos ? + add_org_suffix(find_all_matching_gems) : + find_all_matching_apps(apps, :github, sandbox) delete_and_create_temp_neetob_dir matching_apps.each do |app| ui.info("\n Working on #{app} \n") begin clone_app_in_tmp_dir(app)