Class: Pod::BasicInfo
- Inherits:
-
Object
- Object
- Pod::BasicInfo
- Defined in:
- lib/cocoapods-vemars/command/basicInfo.rb
Instance Attribute Summary collapse
-
#app_key ⇒ Object
readonly
Returns the value of attribute app_key.
-
#bundle_id ⇒ Object
readonly
Returns the value of attribute bundle_id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#string_replacements ⇒ Object
readonly
Returns the value of attribute string_replacements.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
- #date ⇒ Object
-
#initialize(app_key, bundle_id = nil, name = nil, version = nil) ⇒ BasicInfo
constructor
A new instance of BasicInfo.
- #user_email ⇒ Object
- #user_name ⇒ Object
- #year ⇒ Object
Constructor Details
#initialize(app_key, bundle_id = nil, name = nil, version = nil) ⇒ BasicInfo
Returns a new instance of BasicInfo.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/cocoapods-vemars/command/basicInfo.rb', line 9 def initialize(app_key, bundle_id=nil, name=nil, version=nil) @app_key = app_key @name = name @bundle_id = bundle_id @version = version prefix = name[0..2].upcase @string_replacements = { "Bob" => "ByteDance", "TODAYS_DATE" => date, "TODAYS_YEAR" => year, "${USER_NAME}" => user_name, "${USER_EMAIL}" => user_email, "${YEAR}" => year, "${DATE}" => date, "Template" => @name, "Template_InHouse" => @name + "_InHouse", "${POD_NAME}" => @name, "CPD" => prefix, "${APPKEY}" => @app_key, "${MPAAS_VERSION}" => @version, "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}" => @bundle_id } end |
Instance Attribute Details
#app_key ⇒ Object (readonly)
Returns the value of attribute app_key.
3 4 5 |
# File 'lib/cocoapods-vemars/command/basicInfo.rb', line 3 def app_key @app_key end |
#bundle_id ⇒ Object (readonly)
Returns the value of attribute bundle_id.
5 6 7 |
# File 'lib/cocoapods-vemars/command/basicInfo.rb', line 5 def bundle_id @bundle_id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/cocoapods-vemars/command/basicInfo.rb', line 4 def name @name end |
#string_replacements ⇒ Object (readonly)
Returns the value of attribute string_replacements.
7 8 9 |
# File 'lib/cocoapods-vemars/command/basicInfo.rb', line 7 def string_replacements @string_replacements end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
6 7 8 |
# File 'lib/cocoapods-vemars/command/basicInfo.rb', line 6 def version @version end |
Instance Method Details
#date ⇒ Object
35 36 37 |
# File 'lib/cocoapods-vemars/command/basicInfo.rb', line 35 def date Time.now.strftime "%m/%d/%Y" end |
#user_email ⇒ Object
47 48 49 |
# File 'lib/cocoapods-vemars/command/basicInfo.rb', line 47 def user_email (`git config user.email` || "bytedance@bytedance.com").strip end |
#user_name ⇒ Object
43 44 45 |
# File 'lib/cocoapods-vemars/command/basicInfo.rb', line 43 def user_name (`git config user.name` || "bytedance" ).strip end |
#year ⇒ Object
39 40 41 |
# File 'lib/cocoapods-vemars/command/basicInfo.rb', line 39 def year Time.now.year.to_s end |