Class: FlutterRb::PluginPodspecVersionCheck
- Inherits:
-
PluginPodspecCheck
- Object
- Check
- PluginPodspecCheck
- FlutterRb::PluginPodspecVersionCheck
- Defined in:
- lib/flutter_rb/checks/plugin_podspec_check.rb
Overview
This class represents a check for Flutter plugin’s version 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
Instance Method Summary collapse
-
#check(project) ⇒ CheckReport
Performs the check for the plugin’s version in the podspec file.
-
#podspec_parameter ⇒ String
Returns the parameter for which the check is performed in the podspec file.
Methods inherited from PluginPodspecCheck
Methods inherited from Check
Instance Method Details
#check(project) ⇒ CheckReport
Performs the check for the plugin’s version in the podspec file. It compares the version in the pubspec file with the version in the podspec file. If they match, it returns a CheckReport with a normal status. If they do not match, it returns a CheckReport with a warning status.
87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/flutter_rb/checks/plugin_podspec_check.rb', line 87 def check(project) version_in_pubspec = project.pubspec.pubspec_info.version podspec = project.ios_folder.podspec version_in_podspec = podspec.version CheckReport.new( name, version_in_pubspec == version_in_podspec ? ::CheckReportStatus::NORMAL : ::CheckReportStatus::WARNING, description, podspec.path ) end |
#podspec_parameter ⇒ String
Returns the parameter for which the check is performed in the podspec file. In this case, it returns ‘version’.
76 77 78 |
# File 'lib/flutter_rb/checks/plugin_podspec_check.rb', line 76 def podspec_parameter 'version' end |