Class: PM::UpdateResut

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-byte-panglem-beta/recorder.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeUpdateResut

Returns a new instance of UpdateResut.



200
201
202
203
204
205
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 200

def initialize()
  @is_sdk_update = false
  @is_rely_update = false
  @sdk_list = []
  @rely_list = []
end

Instance Attribute Details

#is_rely_updateObject

Returns the value of attribute is_rely_update.



190
191
192
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 190

def is_rely_update
  @is_rely_update
end

#is_sdk_updateObject

Returns the value of attribute is_sdk_update.



189
190
191
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 189

def is_sdk_update
  @is_sdk_update
end

#rely_listObject

Returns the value of attribute rely_list.



192
193
194
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 192

def rely_list
  @rely_list
end

#rely_nameObject

Returns the value of attribute rely_name.



194
195
196
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 194

def rely_name
  @rely_name
end

#rely_original_versionObject

Returns the value of attribute rely_original_version.



196
197
198
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 196

def rely_original_version
  @rely_original_version
end

#rely_target_versionObject

Returns the value of attribute rely_target_version.



198
199
200
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 198

def rely_target_version
  @rely_target_version
end

#sdk_listObject

Returns the value of attribute sdk_list.



191
192
193
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 191

def sdk_list
  @sdk_list
end

#sdk_nameObject

Returns the value of attribute sdk_name.



193
194
195
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 193

def sdk_name
  @sdk_name
end

#sdk_original_versionObject

Returns the value of attribute sdk_original_version.



195
196
197
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 195

def sdk_original_version
  @sdk_original_version
end

#sdk_target_versionObject

Returns the value of attribute sdk_target_version.



197
198
199
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 197

def sdk_target_version
  @sdk_target_version
end

Class Method Details

.from_hash(hash) ⇒ Object



207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 207

def self.from_hash(hash)
  re = UpdateResut.new()
  re.sdk_name =  "Ads-Global"
  re.rely_name = "BURelyFoundation_Global"
  re.sdk_original_version = hash["SDK_ORIGINAL_VERSION"]
  re.sdk_target_version = hash["SDK_TARGET_VERSION"]
  re.rely_original_version = hash['RELY_ORIGINAL_VERSION']
  re.rely_target_version = hash['RELY_TARGET_VERSION']
  re.is_sdk_update = re.sdk_original_version != re.sdk_target_version
  re.is_rely_update = re.rely_original_version != re.rely_target_version
  info_r = PM::SpecificationInfo.get_info
  re.sdk_list = info_r[re.sdk_name].select do |spec|
    Pod::Specification.root_name(spec.name) == re.sdk_name && spec.version.version == re.sdk_target_version
  end
  re.rely_list = info_r[ re.rely_name].select do |spec|
    Pod::Specification.root_name(spec.name) ==  re.rely_name && spec.version.version == re.rely_target_version
  end
  re
end