문제

What are the recommended procedures for removing sensitive information from a Rakefile?

For example, my project's Rakefile looks like:

# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project'
require 'bubble-wrap'

Motion::Project::App.setup do |app|
  # Use `rake config' to see complete project settings.
  app.name = 'App Name'
  app.codesign_certificate  = 'iPhone Developer: Name Goes Here (12SELC3456)'
end

Since app.codesign_certificate = 'iPhone Developer: Name Goes Here (12SELC3456)' doesn't pertain to other contributers of the project, I'd like to remove it before committing my code to source control.

도움이 되었습니까?

해결책

Putting that info in other file, for instance an YML, and referencing it on your Rakefile? The YML would be on you .gitignore to avoid committing personal information.

Example of .YML file:

app:
  codesign_certificate: "iPhone Developer: Name Goes Here (12SELC3456)"

EDIT

For more info how to read an YML file: How do I parse a YAML file

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top