Class: FlutterRb::PluginPodspecAuthorsCheck

Inherits:
PluginPodspecCheck show all
Defined in:
lib/flutter_rb/checks/plugin_podspec_check.rb

Overview

This class represents a check for Flutter plugin’s authors in the podspec file. It is a subclass of PluginPodspecCheck and overrides the necessary methods to perform the specific check.

Constant Summary

Constants inherited from Check

Check::UNIMPLEMENTED_ERROR

Instance Method Summary collapse

Methods inherited from PluginPodspecCheck

#description, #name

Methods inherited from Check

#description, #name

Instance Method Details

#check(project) ⇒ CheckReport

Performs the check for the plugin’s authors in the podspec file. It checks if the ‘authors’ parameter is present in the podspec file. If it is present, it returns a CheckReport with a normal status. If it is not present, it returns a CheckReport with an error status.

Parameters:

  • project (Project)

    the project for which the check is performed

Returns:



119
120
121
122
123
124
125
126
127
128
129
# File 'lib/flutter_rb/checks/plugin_podspec_check.rb', line 119

def check(project)
  podspec = project.ios_folder.podspec
  author_exists = !podspec.authors.nil?

  CheckReport.new(
    name,
    author_exists ? ::CheckReportStatus::NORMAL : ::CheckReportStatus::ERROR,
    description,
    podspec.path
  )
end

#podspec_parameterString

Returns the parameter for which the check is performed in the podspec file. In this case, it returns ‘authors’.

Returns:

  • (String)

    the parameter for which the check is performed



108
109
110
# File 'lib/flutter_rb/checks/plugin_podspec_check.rb', line 108

def podspec_parameter
  'authors'
end