Class: Neetob::CLI::Github::FastererAudit
- Inherits:
-
MakePr::Base
- Object
- Base
- Base
- MakePr::Base
- Neetob::CLI::Github::FastererAudit
- Defined in:
- lib/neetob/cli/github/fasterer_audit.rb
Constant Summary collapse
- DESCRIPTION =
"Fix optimization issues reported by fasterer"
Constants inherited from MakePr::Base
MakePr::Base::BRANCH_NAME, MakePr::Base::PR_TITLE, MakePr::Base::REPO_SPECIFIC_COMMANDS_BEFORE_BUNDLE_INSTALL
Constants inherited from Base
Instance Attribute Summary collapse
-
#repos ⇒ Object
Returns the value of attribute repos.
-
#sandbox ⇒ Object
Returns the value of attribute sandbox.
Attributes inherited from MakePr::Base
Attributes inherited from Base
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(repos, sandbox = false) ⇒ FastererAudit
constructor
A new instance of FastererAudit.
- #run ⇒ Object
Methods included from Utils
#camel_case_to_slug, #is_upper?, #symbolize_keys
Constructor Details
#initialize(repos, sandbox = false) ⇒ FastererAudit
Returns a new instance of FastererAudit.
12 13 14 15 16 |
# File 'lib/neetob/cli/github/fasterer_audit.rb', line 12 def initialize(repos, sandbox = false) super() @repos = repos @sandbox = sandbox end |
Instance Attribute Details
#repos ⇒ Object
Returns the value of attribute repos.
10 11 12 |
# File 'lib/neetob/cli/github/fasterer_audit.rb', line 10 def repos @repos end |
#sandbox ⇒ Object
Returns the value of attribute sandbox.
10 11 12 |
# File 'lib/neetob/cli/github/fasterer_audit.rb', line 10 def sandbox @sandbox end |
Instance Method Details
#run ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/neetob/cli/github/fasterer_audit.rb', line 18 def run matching_repos = find_all_matching_apps_or_repos(repos, :github, sandbox) report = nil matching_repos.each do |repo| begin ui.info("\nWorking on repo #{repo}", print_to_audit_log: false) clone_repo_in_tmp_dir(repo) bundle_install!(repo) report = run_fasterer(repo) ui.success("Successfully executed fasterer for #{repo}", print_to_audit_log: false) rescue StandardError => e ExceptionHandler.new(e).process end end `rm -rf /tmp/neetob` unless Thread.current[:audit_mode] if Thread.current[:audit_mode] report end end |