Class: Fastlane::Apprepo::Manifest

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/plugin/apprepo/manifest.rb,
lib/fastlane/plugin/apprepo/helper/manifest.rb

Overview

Responsible for parsing and providing manifest.json

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(appcode) ⇒ Manifest

Returns a new instance of Manifest.



19
20
21
22
# File 'lib/fastlane/plugin/apprepo/manifest.rb', line 19

def initialize(appcode)
  self.appcode = appcode
  UI.message('Initializing requires APPCODE. ' + self.appcode)
end

Instance Attribute Details

#appcodeObject

Translated internal key names from Fastlane to Apprepo



11
12
13
# File 'lib/fastlane/plugin/apprepo/manifest.rb', line 11

def appcode
  @appcode
end

#bundle_identifierObject

app_identifier



13
14
15
# File 'lib/fastlane/plugin/apprepo/manifest.rb', line 13

def bundle_identifier
  @bundle_identifier
end

#bundle_versionObject

app_version



14
15
16
# File 'lib/fastlane/plugin/apprepo/manifest.rb', line 14

def bundle_version
  @bundle_version
end

#filenameObject

IPA file name



12
13
14
# File 'lib/fastlane/plugin/apprepo/manifest.rb', line 12

def filename
  @filename
end

#notifyObject

will send push notification / slack



17
18
19
# File 'lib/fastlane/plugin/apprepo/manifest.rb', line 17

def notify
  @notify
end

#subtitleObject

app_description



16
17
18
# File 'lib/fastlane/plugin/apprepo/manifest.rb', line 16

def subtitle
  @subtitle
end

#titleObject

app_name



15
16
17
# File 'lib/fastlane/plugin/apprepo/manifest.rb', line 15

def title
  @title
end

Instance Method Details

#manifest_as_jsonObject

Provide JSON serialized data



29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/fastlane/plugin/apprepo/manifest.rb', line 29

def manifest_as_json
  structure = {
    appcode: appcode,
    filename: filename,
    bundle_identifier: bundle_identifier,
    bundle_version: bundle_version,
    title: title,
    subtitle: subtitle,
    notify: notify
  }

  fputs structure
end

#parse_json(json) ⇒ Object



24
25
26
# File 'lib/fastlane/plugin/apprepo/manifest.rb', line 24

def parse_json(json)
  # TODO: load values from JSON
end