Navigation Menu

Skip to content

Commit

Permalink
Point to ruby 1.8 shim
Browse files Browse the repository at this point in the history
Using a shim allows us to catch when 1.8 of ruby is not present and provide other options.

#ignore
  • Loading branch information
infininight committed Jun 18, 2014
1 parent bc3f1ee commit e0823ef
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Commands/Build & Run.plist
Expand Up @@ -17,7 +17,7 @@
#
# if the build succeeds, it will run the target
XCODE_PROJECT_FILE=$(/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -- "${TM_BUNDLE_SUPPORT}/bin/find_xcode_project.rb")
XCODE_PROJECT_FILE=$(ruby18 -- "${TM_BUNDLE_SUPPORT}/bin/find_xcode_project.rb")
export XCODE_PROJECT_FILE
export XCODE_RUN_BUILD=1
Expand Down
2 changes: 1 addition & 1 deletion Commands/Import Xcode Project….plist
Expand Up @@ -5,7 +5,7 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
<string>#!/usr/bin/env ruby18
# import the frontmost opened project window in Xcode
source_path = %x{osascript -e 'tell application "TextMate"
Expand Down
2 changes: 1 addition & 1 deletion Commands/Jump to Next Error.tmCommand
Expand Up @@ -5,7 +5,7 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -wKU
<string>#!/usr/bin/env ruby18 -wKU
require ENV['TM_SUPPORT_PATH'] + '/lib/textmate'
Expand Down
2 changes: 1 addition & 1 deletion Commands/List Files in Active Target.plist
Expand Up @@ -5,7 +5,7 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>PROJECT_FILE=$(/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -- "${TM_BUNDLE_SUPPORT}/bin/find_xcode_project.rb")
<string>PROJECT_FILE=$(ruby18 -- "${TM_BUNDLE_SUPPORT}/bin/find_xcode_project.rb")
#PROJECT_FILE=${PROJECT_FILE##*/}
"${TM_BUNDLE_SUPPORT}/bin/xcode_project.rb" project=${PROJECT_FILE} list</string>
Expand Down
2 changes: 1 addition & 1 deletion Commands/New Project….tmCommand
Expand Up @@ -5,7 +5,7 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -wKU
<string>#!/usr/bin/env ruby18 -wKU
SUPPORT = ENV['TM_SUPPORT_PATH']
MATE = "#{SUPPORT}/bin/mate"
Expand Down
2 changes: 1 addition & 1 deletion Commands/Open Project in Xcode.tmCommand
Expand Up @@ -5,7 +5,7 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>PROJECT=$(/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -- "${TM_BUNDLE_SUPPORT}/bin/find_xcode_project.rb")
<string>PROJECT=$(ruby18 -- "${TM_BUNDLE_SUPPORT}/bin/find_xcode_project.rb")
if [[ -f "${PROJECT}/project.pbxproj" ]]; then
open -a Xcode "${PROJECT}"
else
Expand Down
2 changes: 1 addition & 1 deletion Commands/Run (xcode target).plist
Expand Up @@ -8,7 +8,7 @@
<string>#!/usr/bin/env bash
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] &amp;&amp; . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
PROJECT=$(/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -- "${TM_BUNDLE_SUPPORT}/bin/find_xcode_project.rb")
PROJECT=$(ruby18 -- "${TM_BUNDLE_SUPPORT}/bin/find_xcode_project.rb")
if [[ -f "${PROJECT}/project.pbxproj" ]]; then
"${TM_BUNDLE_SUPPORT}/bin/run_xcode_target.rb" -project_dir="$PROJECT"
else
Expand Down
2 changes: 1 addition & 1 deletion Support/bin/find_objroot.rb
@@ -1,4 +1,4 @@
#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
#!/usr/bin/env ruby18

require "#{ENV['TM_SUPPORT_PATH']}/lib/osx/plist"

Expand Down
2 changes: 1 addition & 1 deletion Support/bin/find_xcode_project.rb
@@ -1,4 +1,4 @@
#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
#!/usr/bin/env ruby18
# Copyright 2005 Chris Thomas. All rights reserved.
# MIT license; share and enjoy.
require 'pathname'
Expand Down
2 changes: 1 addition & 1 deletion Support/bin/run_xcode_target.rb
@@ -1,4 +1,4 @@
#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -s
#!/usr/bin/env ruby18 -s
# encoding: utf-8

require "#{ENV['TM_SUPPORT_PATH']}/lib/osx/plist"
Expand Down
6 changes: 3 additions & 3 deletions Support/bin/run_xcodebuild.sh
Expand Up @@ -19,10 +19,10 @@
if [[ -n $XCODE_PROJECT_FILE ]]; then
PROJECT_FILE=$XCODE_PROJECT_FILE
else
PROJECT_FILE=$(/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -- "${TM_BUNDLE_SUPPORT}/bin/find_xcode_project.rb")
PROJECT_FILE=$(ruby18 -- "${TM_BUNDLE_SUPPORT}/bin/find_xcode_project.rb")
fi

USE_CONFIGURATIONS=$(/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -- "${TM_BUNDLE_SUPPORT}/bin/xcode_version.rb")
USE_CONFIGURATIONS=$(ruby18 -- "${TM_BUNDLE_SUPPORT}/bin/xcode_version.rb")

#
# Get into the correct directory and make the project file relative to it
Expand Down Expand Up @@ -68,4 +68,4 @@ OBJROOT=$("${TM_BUNDLE_SUPPORT}"/bin/find_objroot.rb)
echo $OBJROOT

export PROJECT_FILE
xcodebuild ${PROJECT_FILE:+-project "$PROJECT_FILE"} ${TM_TARGET:+-target $TM_TARGET} $BUILD_STYLE $XCODE_BUILD_VERB ${OBJROOT:+"OBJROOT=$OBJROOT"} 2>&1| /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -- "${TM_BUNDLE_SUPPORT}/bin/format_build_output.rb"
xcodebuild ${PROJECT_FILE:+-project "$PROJECT_FILE"} ${TM_TARGET:+-target $TM_TARGET} $BUILD_STYLE $XCODE_BUILD_VERB ${OBJROOT:+"OBJROOT=$OBJROOT"} 2>&1| ruby18 -- "${TM_BUNDLE_SUPPORT}/bin/format_build_output.rb"
2 changes: 1 addition & 1 deletion Support/bin/xcode_project.rb
@@ -1,4 +1,4 @@
#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
#!/usr/bin/env ruby18

# class XcodeApplication < Object
# attr_accessor :active_project
Expand Down
2 changes: 1 addition & 1 deletion Support/bin/xcode_version.rb
@@ -1,4 +1,4 @@
#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
#!/usr/bin/env ruby18
# Copyright 2005 Chris Thomas. All rights reserved.
# MIT license; share and enjoy.

Expand Down

0 comments on commit e0823ef

Please sign in to comment.