Class: GSVersionValue
- Inherits:
-
Object
- Object
- GSVersionValue
- Defined in:
- lib/fastlane/plugin/gs_versioning/helper/gs_version_api_provider.rb
Constant Summary collapse
- @@versions_dict =
values stores like {‘beta’:Version, ‘rc’:Version, ‘release’: Version}
{}
Class Method Summary collapse
Instance Method Summary collapse
-
#updateValue(projectName, buildType, value) ⇒ Object
projectName string - project alias build string - beta/rc/release value Version object.
Class Method Details
.getVersion(project_name) ⇒ Object
93 94 95 |
# File 'lib/fastlane/plugin/gs_versioning/helper/gs_version_api_provider.rb', line 93 def self.getVersion(project_name) self.versions_dict[project_name] end |
.parseBackendResponse(body) ⇒ Object
78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/fastlane/plugin/gs_versioning/helper/gs_version_api_provider.rb', line 78 def self.parseBackendResponse(body) puts(body.to_s) versions = {} body.each do |serverValue| project_alias = serverValue['alias'] localValue = Version.parse({ 'beta' => serverValue['betaVersionName'], 'rc' => serverValue['rcVersionName'], 'release' => serverValue['releaseVersionName'] }) versions[project_alias] = localValue end @@versions_dict = versions end |
.versions_dict ⇒ Object
63 64 65 66 67 68 69 |
# File 'lib/fastlane/plugin/gs_versioning/helper/gs_version_api_provider.rb', line 63 def self.versions_dict if @@versions_dict.length == 0 GSVersionApiProvider.getVersions puts('Did update versions static variable') end @@versions_dict end |
Instance Method Details
#updateValue(projectName, buildType, value) ⇒ Object
projectName string - project alias build string - beta/rc/release value Version object
74 75 76 |
# File 'lib/fastlane/plugin/gs_versioning/helper/gs_version_api_provider.rb', line 74 def updateValue(projectName, buildType, value) self.versions_dict[projectName][buildType] = value end |