class Fastlane::Helper::DingtalkMsgHelper

Public Class Methods

assets(name) click to toggle source
# File lib/fastlane/plugin/dingtalk_msg/helper/dingtalk_msg_helper.rb, line 13
def self.assets(name)
  "#{gem_path('fastlane-plugin-dingtalk_msg')}/lib/assets/#{name}.erb"
end
gem_path(gem_name) click to toggle source

Taken from github.com/fastlane/fastlane/blob/f0dd4d0f4ecc74d9f7f62e0efc33091d975f2043/fastlane_core/lib/fastlane_core/helper.rb#L248-L259 Unsure best other way to do this so using this logic for now since its deprecated in fastlane proper

# File lib/fastlane/plugin/dingtalk_msg/helper/dingtalk_msg_helper.rb, line 25
def self.gem_path(gem_name)
  if !Helper.is_test? and Gem::Specification.find_all_by_name(gem_name).any?
    return Gem::Specification.find_by_name(gem_name).gem_dir
  else
    return './'
  end
end
render(template, template_vars_hash) click to toggle source
# File lib/fastlane/plugin/dingtalk_msg/helper/dingtalk_msg_helper.rb, line 17
def self.render(template, template_vars_hash)
  Fastlane::ErbalT.new(template_vars_hash).render(File.read(template))
end