Class: FlutterRb::PluginPodspecSourceCheck

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

Overview

This class represents a check for Flutter plugin’s source 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 source in the podspec file. It checks if the ‘source’ 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:



150
151
152
153
154
155
156
157
158
159
# File 'lib/flutter_rb/checks/plugin_podspec_check.rb', line 150

def check(project)
  podspec = project.ios_folder.podspec

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

#podspec_parameterString

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

Returns:

  • (String)

    the parameter for which the check is performed



139
140
141
# File 'lib/flutter_rb/checks/plugin_podspec_check.rb', line 139

def podspec_parameter
  'source'
end