Joined May 2011
·

Alex Rothenberg

AppDev
·
Cambridge, MA
·
·
·

You could generate a "secret.rb" file at compile time that isn't checked into git. Add something like this to your Rakefile

task :'build:device' => 'secret'
task :'build:simulator' => 'secret'

task :secret do
if ENV['SECRETAPPLICATIONID'].nil? || ENV['SECRETAPIKEY'].nil?
raise 'Need to set the env variables "SECRETAPPLICATIONID" and "SECRETAPIKEY"'
end

File.open('app/secrets.rb', 'w') do |f|
f.write <<-FILE
SECRETAPPLICATIONID = '#{ENV['SECRETAPPLICATIONID']}'
SECRETAPIKEY = '#{ENV['SECRETAPIKEY' ]}'
FILE
end
end

Achievements
383 Karma
16,066 Total ProTip Views