質問

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